add #fuzz devshell and make fuzzing work on nixos

This commit is contained in:
Alex Auvolat
2026-05-01 17:30:12 +02:00
committed by Alex
parent a25ad494cc
commit ddc42c89fb
4 changed files with 20 additions and 6 deletions
Generated
+1
View File
@@ -1548,6 +1548,7 @@ name = "garage-fuzz"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
"garage_db",
"garage_model", "garage_model",
"garage_table", "garage_table",
"libfuzzer-sys", "libfuzzer-sys",
+8
View File
@@ -95,6 +95,14 @@
killall killall
]; ];
}; };
# dev shell for fuzzing
fuzz = pkgs.mkShell {
buildInputs = with pkgs; [
targets.toolchainNightly
cargo-fuzz
];
};
}; };
}); });
} }
+3 -6
View File
@@ -11,12 +11,9 @@ cargo-fuzz = true
arbitrary = { workspace = true, features = ["derive"]} arbitrary = { workspace = true, features = ["derive"]}
libfuzzer-sys = { workspace = true } libfuzzer-sys = { workspace = true }
[dependencies.garage_table] garage_db.workspace = true
path = "../src/table" garage_table.workspace = true
garage_model = { workspace = true, default-features = false, features = ["arbitrary"] }
[dependencies.garage_model]
path = "../src/model"
features = ["arbitrary"]
[[bin]] [[bin]]
name = "version_crdt" name = "version_crdt"
+8
View File
@@ -148,6 +148,14 @@ let
in rec { in rec {
toolchain = toolchainFn pkgs; toolchain = toolchainFn pkgs;
toolchainNightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
targets = lib.optionals (target != null) [ rustTarget ];
extensions = [
"rust-src"
"rustfmt"
];
});
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = [ buildInputs = [
toolchain toolchain