Files
wasmtime/crates/bench-api/Cargo.toml
Andrew Brown 5a288c2c40 bench-api: configure WASI modules based on passed flags (#4207)
* bench-api: configure WASI modules based on passed flags

When benchmarking in Sightglass, @brianjjones has found it necessary to
enable the wasi-nn module. The current way to do so is to alter the
engine build script to pass `--features wasi-nn` so that this crate can
run code relying on these imports. This change allows the user to
instead pass the WASI modules using the engine flags added in #4096.
This could look something like the following in Sightglass:

```
sightglass-cli benchmark ... --engine-flags '--wasi-modules experimental-wasi-nn'
```

* fix: disable wasi-crypto as a default feature
2022-09-23 11:35:59 -07:00

37 lines
1.0 KiB
TOML

[package]
name = "wasmtime-bench-api"
version = "0.19.0"
authors = ["The Wasmtime Project Developers"]
description = "Exposes a benchmarking API for the Wasmtime runtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2021"
publish = false
[lib]
name = "wasmtime_bench_api"
crate-type = ["cdylib"]
test = false
doctest = false
[dependencies]
anyhow = "1.0"
shuffling-allocator = { version = "1.1.1", optional = true }
target-lexicon = "0.12"
wasmtime = { path = "../wasmtime", default-features = true }
wasmtime-cli-flags = { path = "../cli-flags", default-features = true }
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.26.0"
[dev-dependencies]
wat = "1.0.45"
[features]
default = ["shuffling-allocator", "wasi-nn"]
wasi-crypto = ["wasmtime-wasi-crypto"]
wasi-nn = ["wasmtime-wasi-nn"]