- Rust must be installed
- Set wasm target
rustup target add wasm32v1-none - Wasm optimizer
cargo install wasm-opt
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install target `wasm32v1-none`, for rust
# to be capable of compiling to wasm32
rustup target add wasm32v1-none
cargo install wasm-opt --version 0.116.1 --locked --force
cargo install wasm-tools --version 1.240.0 --locked --forceUse the script ./build.sh
./build.shObs: make sure you are in the root of the project
# Compiles project `wasm-runtime` to WASM
set CARGO_ENCODED_RUSTFLAGS=$'-Clink-arg=-zstack-size=65536\037-Clink-arg=--import-memory\037-Ctarget-feature=+mutable-globals,-atomics,-bulk-memory,-crt-static,-exception-handling,-extended-const,-multivalue,-nontrapping-fptoint,-reference-types,-relaxed-simd,-sign-ext,-simd128,-tail-call,-wide-arithmetic';\
set SOURCE_DATE_EPOCH='1600000000';\
set TZ='UTC';\
set LC_ALL='C';\
cargo build --package=wasm-runtime --profile=release --target=wasm32v1-none --no-default-features
# Copy runtime to the root of the project
cp ./target/wasm32v1-none/release/wasm_runtime.wasm ./Copy the file wasm_runtime to the folder "frontend" Open the image_processor.html file