diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:20:02 +0000 |
commit | 58daab21cd043e1dc37024a7f99b396788372918 (patch) | |
tree | 96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /fluent-bit/examples/filter_rust_clib/Makefile | |
parent | Releasing debian version 1.43.2-1. (diff) | |
download | netdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz netdata-58daab21cd043e1dc37024a7f99b396788372918.zip |
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/examples/filter_rust_clib/Makefile')
-rw-r--r-- | fluent-bit/examples/filter_rust_clib/Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fluent-bit/examples/filter_rust_clib/Makefile b/fluent-bit/examples/filter_rust_clib/Makefile new file mode 100644 index 000000000..c8d7f4292 --- /dev/null +++ b/fluent-bit/examples/filter_rust_clib/Makefile @@ -0,0 +1,25 @@ +WASI_SDK_ROOT ?= /opt/wasi-sdk +STACK_SIZE ?= 8192 +INITIAL_MEMORY_SIZE ?= 65536 + +rustclib: + cargo build --target wasm32-unknown-unknown --release + +build: wasm rustclib + +wasm: rustclib rust_clib_filter.h + ${WASI_SDK_ROOT}/bin/clang -O3 -nostdlib \ + -z stack-size=${STACK_SIZE} -Wl,--initial-memory=${INITIAL_MEMORY_SIZE} \ + -o rust_clib_filter.wasm rust_clib_filter.c \ + -L ./target/wasm32-unknown-unknown/release -lfilter_rust_clib \ + -Wl,--export=__heap_base -Wl,--export=__data_end -Wl,--export=rust_clib_filter \ + -Wl,--no-entry -Wl,--strip-all -Wl,--allow-undefined + +rust_clib_filter.h: + cbindgen --crate filter_rust_clib --output filter_rust_clib.h --lang c + + +clean: + rm -f *.wasm + rm -f *.h + cargo clean |