Files
wasmtime/crates/fuzzing/Cargo.toml
Saúl Cabrera a1732b2906 winch(fuzz): Initial support for differential fuzzing (#6281)
* winch(fuzz): Initial support for differential fuzzing

This commit introduces initial support for differential fuzzing for Winch. In
order to fuzz winch, this change introduces the `winch` cargo feature. When the
`winch` cargo feature is enabled the differential fuzz target uses `wasmi` as
the differential engine and `wasm-smith` and `single-inst` as the module sources.

The intention behind this change is to have a *local* approach for fuzzing and
verifying programs generated by Winch and to have an initial implementation that
will allow us to eventually enable this change by default. Currently it's not
worth it to enable this change by default given all the filtering that needs to
happen to ensure that the generated modules are supported by Winch.

It's worth noting that the Wasm filtering code will be temporary, until Winch
reaches feature parity in terms of Wasm operators.

* Check build targets with the `winch` feature flag

* Rename fuzz target feature to `fuzz-winch`
2023-04-25 03:56:24 +00:00

50 lines
1.8 KiB
TOML

[package]
authors.workspace = true
description = "Fuzzing infrastructure for Wasmtime"
edition.workspace = true
name = "wasmtime-fuzzing"
publish = false
version = "0.0.0"
license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
anyhow = { workspace = true }
arbitrary = { version = "1.1.0", features = ["derive"] }
component-test-util = { workspace = true }
component-fuzz-util = { workspace = true }
env_logger = { workspace = true }
log = { workspace = true }
rayon = "1.2.1"
target-lexicon = { workspace = true }
tempfile = "3.3.0"
wasmparser = { workspace = true }
wasmprinter = { workspace = true }
wasmtime = { workspace = true, features = ['default'] }
wasmtime-wast = { workspace = true }
wasm-encoder = { workspace = true }
wasm-smith = { workspace = true }
wasm-mutate = { workspace = true }
wasm-spec-interpreter = { path = "./wasm-spec-interpreter", optional = true }
wasmi = "0.20.0"
# We rely on precompiled v8 binaries, but rusty-v8 doesn't have a precompiled
# binary for MinGW which is built on our CI. It does have one for Windows-msvc,
# though, so we could use that if we wanted. For now though just simplify a bit
# and don't depend on this on Windows. The same applies on s390x and riscv.
[target.'cfg(not(any(windows, target_arch = "s390x", target_arch = "riscv64")))'.dependencies]
v8 = "0.44.3"
[dev-dependencies]
wat = { workspace = true }
rand = { version = "0.8.0", features = ["small_rng"] }
# 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", optional = true, features = ['build-libinterpret'] }
[features]
fuzz-spec-interpreter = ['wasm-spec-interpreter']
winch = ["wasmtime/winch"]