Optionally compile wasmtime-bench-api with wasi-nn and wasi-crypto (#2677)
This adds the ability to add feature flags (e.g. `--features wasi-nn`) when compiling `wasmtime-bench-api` to allow benchmarking Wasmtime with WASI proposals included. Note that due to https://github.com/rust-lang/cargo/issues/5364, these features are only available: - in the `crates/bench-api` directory, e.g. `pushd crates/bench-api; cargo build --features wasi-crypto` - or from the top-level project directory using `-Zpackage-features`, e.g. `OPENVINO_INSTALL_DIR=/opt/intel/openvino cargo +nightly build -p wasmtime-bench-api -Zpackage-features --features wasi-nn`
This commit is contained in:
@@ -19,6 +19,8 @@ anyhow = "1.0"
|
||||
shuffling-allocator = { version = "1.1.1", optional = true }
|
||||
wasmtime = { path = "../wasmtime", default-features = false }
|
||||
wasmtime-wasi = { path = "../wasi" }
|
||||
wasmtime-wasi-crypto = { path = "../wasi-crypto", optional = true }
|
||||
wasmtime-wasi-nn = { path = "../wasi-nn", optional = true }
|
||||
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync" }
|
||||
cap-std = "0.13"
|
||||
|
||||
@@ -27,3 +29,6 @@ wat = "1.0"
|
||||
|
||||
[features]
|
||||
default = ["shuffling-allocator"]
|
||||
wasi-crypto = ["wasmtime-wasi-crypto"]
|
||||
wasi-nn = ["wasmtime-wasi-nn"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user