Install additional toolchains.
- Arm64:
rustup target add aarch64-unknown-linux-gnu
- Wasm32:
Install Wasmtime.
rustup target add wasm32-wasi
Run tests without saving result images as files in ./data
directory:
DONT_SAVE_RESULT=1 cargo test
Run benchmarks to compare with other crates for image resizing and write results into
report files, such as ./benchmarks-x86_64.md
:
WRITE_COMPARE_RESULT=1 cargo bench -- Compare
Specify build target in .cargo/config.toml
file.
[build]
target = "wasm32-wasi"
Run tests:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --" cargo test
Run tests without saving result images as files in ./data
directory:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --env DONT_SAVE_RESULT=1 --" cargo test
Run a specific benchmark in quick
mode:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --" cargo bench --bench bench_resize -- --color=always --quick
Run benchmarks to compare with other crates for image resizing and write results into
report files, such as ./benchmarks-x86_64.md
:
CARGO_TARGET_WASM32_WASI_RUNNER="wasmtime --dir=. --env WRITE_COMPARE_RESULT=1 --" cargo bench -- --color=always Compare