git.delta.rocks / jrsonnet / refs/commits / 15b5e67b8996

difftreelog

Merge pull request #109 from julienduchesne/julienduchesne/fix-libjsonnet-build

Yaroslav Bolyukin2023-05-06parents: #4be0ffe #ca4a5e0.patch.diff
in: master

2 files changed

modifiedbindings/Makefilediffbeforeafterboth
--- a/bindings/Makefile
+++ b/bindings/Makefile
@@ -1,5 +1,5 @@
 ../target/release/libjsonnet.so:
-	cargo build --release -p jsonnet
+	cargo build --release -p libjsonnet
 
 ./c/libjsonnet_test_file: ./c/libjsonnet_test_file.c ../target/release/libjsonnet.so
 	gcc -L../target/release/ -ljsonnet ./c/libjsonnet_test_file.c -o ./c/libjsonnet_test_file
@@ -11,7 +11,7 @@
 	valgrind --leak-check=full ./c/libjsonnet_test_file test.jsonnet
 
 ../target/wasm32-wasi/release/jsonnet.wasm:
-	cd jsonnet && cargo wasi build --release -p jsonnet && cd ..
+	cd jsonnet && cargo wasi build --release -p libjsonnet && cd ..
 
 test-js: ../target/wasm32-wasi/release/jsonnet.wasm
 	node --experimental-wasi-unstable-preview1 --experimental-wasm-bigint js/index
modifiedbindings/README.mddiffbeforeafterboth
5Headers are described in `c/libjsonnet.h`, this file is exact copy from `C` implementation of jsonnet, plus additional jrsonnet-specific methods5Headers are described in `c/libjsonnet.h`, this file is exact copy from `C` implementation of jsonnet, plus additional jrsonnet-specific methods
66
7Bindings should work as drop-in replacement for standard impl7Bindings should work as drop-in replacement for standard impl
8
9## Building Linux .so library on MacOS
10
11You can use `cross-rs` to do so:
12
13```console
14cargo install cross --git https://github.com/cross-rs/cross
15cross build --release -p libjsonnet --target x86_64-unknown-linux-gnu
16```
817