
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
1.9 KiB
1.9 KiB
key differences between api_nu_plugin_kcl and nu_plugin_kcl:
api_nu_plugin_kcl vs nu_plugin_kcl
api_nu_plugin_kcl (API-based approach):
- Uses KCL Rust API directly via kcl-lang crate
- Commands: kcl-exec, kcl-run (inline code execution)
- Dependencies: kcl-lang = { git = "https://github.com/kcl-lang/lib" }
- Functionality: Direct API integration with KCL library
- Advanced features: Dependency resolution from kcl.mod, external packages support
- File execution: Can execute multiple KCL files with project management
- Status: Not tracked in plugin registry (likely experimental/development)
nu_plugin_kcl (CLI wrapper approach):
- Uses KCL CLI wrapper via system command execution
- Commands: kcl-run, kcl-format, kcl-validate
- Dependencies: Only nushell plugin dependencies (no direct KCL API)
- Functionality: Wraps KCL CLI commands through subprocess execution
- Mature features: Full CLI integration with formatting and validation
- File operations: Single file execution with comprehensive CLI options
- Status: Tracked in plugin registry, has upstream repository
Key Architectural Differences:
- Integration Method: - api_nu_plugin_kcl: Direct Rust API integration - nu_plugin_kcl: CLI subprocess wrapper
- Capabilities: - api_nu_plugin_kcl: Project-aware, dependency management, inline code execution - nu_plugin_kcl: Complete CLI feature set (run/format/validate)
- Dependencies: - api_nu_plugin_kcl: Requires KCL Rust library compilation - nu_plugin_kcl: Requires KCL CLI installed on system
- Maturity: - api_nu_plugin_kcl: Experimental, more complex but potentially more powerful - nu_plugin_kcl: Production-ready with comprehensive documentation
The @ prefix likely indicates that api_nu_plugin_kcl is a variant or experimental version focusing on direct API integration rather than CLI wrapping.