Copyright (c) 2022-2023 Antmicro
Wasibox is a collection of utilities targetted mainly at the wasi architecture.
You will need a custom Rust nightly toolchain that builds wasi_ext_lib.
Get the custom Rust compiler by following the intructions in build and Rust library sections.
After completing the previous steps, you need to define CC with WASI_SDK_PATH environment variable before you start building the project:
export CC="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
cargo +wasi_extended build --target wasm32-wasip1 --release
If you want to compile for wasm32-wasip1-threads instead, you need to add required flags:
RUSTFLAGS="-C target-feature=-crt-static,+atomics,+bulk-memory,+mutable-globals -C link-arg=--max-memory=4294967296" cargo +wasi_extended build --target wasm32-wasip1-threads --release