From c82fa78e43b12421689bf92096a1eebfc5e419bc Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 1 Dec 2023 09:38:16 +0800 Subject: [PATCH] Add features to fuzzing build. --- Cargo.toml | 2 ++ fuzz/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fa867df0f..901918c65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,8 @@ internals = [] debugging = ["internals"] ## Features and dependencies required by `bin` tools: `decimal`, `metadata`, `serde`, `debugging` and [`rustyline`](https://crates.io/crates/rustyline). bin-features = ["decimal", "metadata", "serde", "debugging", "rustyline"] +## Enable fuzzing via the [`arbitrary`](https://crates.io/crates/arbitrary) crate. +fuzz = ["arbitrary", "rust_decimal/rust-fuzz"] #! ### System Configuration Features diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 57bf2c83f..e2045de6c 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,7 +10,7 @@ cargo-fuzz = true [dependencies] arbitrary = { version = "1.3.2", features = ["derive"] } libfuzzer-sys = "0.4" -rhai = { path = "..", features = ["arbitrary"] } +rhai = { path = "..", features = ["fuzz", "decimal", "metadata", "debugging"] } # Prevent this from interfering with workspaces [workspace]