difftreelog
feat(bindings) implement WASM
in: master
3 files changed
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -20,8 +20,7 @@
## Bindings
C bindings (libjsonnet.so) are WIP
-
-Something is implemented, but mostly unusable for now
+JS bindings are WIP too, but also available in WASM form
See them in `./bindings/jsonnet/`
bindings/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.rsdiffbeforeafterboth--- a/bindings/jsonnet/src/lib.rs
+++ b/bindings/jsonnet/src/lib.rs
@@ -17,6 +17,9 @@
};
#[no_mangle]
+pub extern "C" fn _start() {}
+
+#[no_mangle]
pub extern "C" fn jsonnet_version() -> &'static [u8; 8] {
b"v0.16.0\0"
}