Documentation
¶
Overview ¶
Package kclrender is the single seam through which forge evaluates KCL. It renders via the embedded kpm package manager + kcl-go runtime — no external `kcl` binary required on PATH — and registers forge's KCL plugin namespace (kcl_plugin.forge.*) so KCL can pull host-runtime values (e.g. resolve_port) during evaluation.
kpm reads the package's kcl.mod and resolves dependencies — git, local path, and OCI/registry — exactly like the `kcl` CLI, so projects declare the forge module (and any extra packages) in kcl.mod in whatever style they like; forge neither parses nor special-cases deps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run renders the KCL at source — a package directory or a single .k file — and returns the raw JSON result.
workDir is the process cwd KCL's `file.read` resolves against (the project root for deploy-as-data main.k files that read `deploy/kcl/components_gen.json`), so it is part of the contract. dArgs are `-D key=value` top-level option assignments (e.g. "env=dev"). kpm progress/diagnostics go to stderr.
Types ¶
This section is empty.