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
This commit is contained in:
Andrew Brown
2022-09-23 11:35:59 -07:00
committed by GitHub
parent bb6a8a717a
commit 5a288c2c40
2 changed files with 25 additions and 13 deletions

View File

@@ -31,6 +31,6 @@ cap-std = "0.26.0"
wat = "1.0.45"
[features]
default = ["shuffling-allocator"]
default = ["shuffling-allocator", "wasi-nn"]
wasi-crypto = ["wasmtime-wasi-crypto"]
wasi-nn = ["wasmtime-wasi-nn"]