Move spec interpreter fuzzing behind a Cargo feature (#3871)
* Move spec interpreter fuzzing behind a Cargo feature Building the spec interpreter requires a local installation of Ocaml and now libgmp which isn't always available, so this enables the ability to disable building the spec interpreter by using `cargo +nightly fuzz build --no-default-features`. The spec interpreter is still built by default but if fuzzers are being built locally and the spec interpreter isn't needed then this should enable it to be relatively easily opted-out of. * Tweak manifest directives
This commit is contained in:
@@ -22,7 +22,7 @@ wasmtime-wast = { path = "../wast" }
|
||||
wasm-encoder = "0.10.0"
|
||||
wasm-smith = "0.9.0"
|
||||
wasm-mutate = "0.2"
|
||||
wasm-spec-interpreter = { path = "./wasm-spec-interpreter" }
|
||||
wasm-spec-interpreter = { path = "./wasm-spec-interpreter", optional = true }
|
||||
wasmi = "0.7.0"
|
||||
|
||||
# We rely on precompiled v8 binaries, but rusty-v8 doesn't have a precompiled
|
||||
@@ -35,7 +35,11 @@ v8 = "0.33"
|
||||
[dev-dependencies]
|
||||
wat = "1.0.37"
|
||||
|
||||
# We only build the library containing the OCaml spec interpreter if the OCaml
|
||||
# toolchain is available--which is assumed here to be the case when fuzzing.
|
||||
# Only enable the `build-libinterpret` feature when fuzzing is enabled, enabling
|
||||
# commands like `cargo test --workspace` or similar to not need an ocaml
|
||||
# installation and only fuzzers need it by default.
|
||||
[target.'cfg(fuzzing)'.dependencies]
|
||||
wasm-spec-interpreter = { path = "./wasm-spec-interpreter", features = ["build-libinterpret"] }
|
||||
wasm-spec-interpreter = { path = "./wasm-spec-interpreter", optional = true, features = ['build-libinterpret'] }
|
||||
|
||||
[features]
|
||||
fuzz-spec-interpreter = ['wasm-spec-interpreter']
|
||||
|
||||
Reference in New Issue
Block a user