Synchronized from the repo: https://github.com/kcl-lang/lib/tree/main/nodejs
npm install kcl-lib
import { execProgram, ExecProgramArgs } from "kcl-lib";
function main() {
const result = execProgram(new ExecProgramArgs(["schema.k"]));
console.log(result.yamlResult);
}
main();
- Install
node.js
andpnpm
- Install
cargo
(for Rust code) - Install dependencies
pnpm install
pnpm build
pnpm test
pnpm format