Skip to content

Latest commit

 

History

History

jsonnet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

jsonnet for TypeScript

Compile the jsonnet library

The script build_wasm.sh compiles go-jsonnet project to WASM and stores the result in the folder ./dist.

For old versions of node you need to edit the file ./dist/wasm_exec.js. After the line use strict add line globalThis.crypto ??= require('crypto');. Maybe more changes are needed: golang/go#53128.

The wrapper

The module ./libjsonnet defines two function:

  • jsonnet_evaluate_snippet: Wrapper for the corresponding jsonnet library function
  • evaluate: Simplified interface. Only code and its external variables

For sample usage in Nodejs, see ../in-action/nodejs-cli/.