difftreelog
feat(bindings) implement WASM
in: master
3 files changed
README.mddiffbeforeafterboth20## Bindings20## Bindings212122C bindings (libjsonnet.so) are WIP22C bindings (libjsonnet.so) are WIP23JS bindings are WIP too, but also available in WASM form232424Something is implemented, but mostly unusable for now2526See them in `./bindings/jsonnet/`25See them in `./bindings/jsonnet/`272628## Benchmark27## Benchmarkbindings/Makefilediffbeforeafterboth10 ldd ./c/libjsonnet_test_file10 ldd ./c/libjsonnet_test_file11 valgrind --leak-check=full ./c/libjsonnet_test_file test.jsonnet11 valgrind --leak-check=full ./c/libjsonnet_test_file test.jsonnet1213../target/wasm32-wasi/release/jsonnet.wasm:14 cd jsonnet && cargo wasi build --release -p jsonnet && cd ..1516test-js: ../target/wasm32-wasi/release/jsonnet.wasm17 node --experimental-wasi-unstable-preview1 --experimental-wasm-bigint js/index121813bindings/jsonnet/src/lib.rsdiffbeforeafterboth16 rc::Rc,16 rc::Rc,17};17};1819#[no_mangle]20pub extern "C" fn _start() {}182119#[no_mangle]22#[no_mangle]20pub extern "C" fn jsonnet_version() -> &'static [u8; 8] {23pub extern "C" fn jsonnet_version() -> &'static [u8; 8] {