Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove fuzz target from workspace #175

Closed
wants to merge 1 commit into from
Closed

Conversation

domodwyer
Copy link
Contributor

@domodwyer domodwyer commented Aug 29, 2022

Removes the fuzz target from the workspace, this fixes #174.

This is actually the default setup when you cargo fuzz init:

[package]
name = "blah-fuzz"
version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"

[package.metadata]
cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"

[dependencies.blah]
path = ".."

# Prevent this from interfering with workspaces
[workspace]
members = ["."]

[[bin]]
name = "fuzz_target_1"
path = "fuzz_targets/fuzz_target_1.rs"
test = false
doc = false

Running cargo fuzz ... still works as usual, and that's what CI does so this should not cause any problems.


  • build: remove fuzz target from workspace (9b85cb2)

    This prevents the fuzz target from being run accidentally / run when compiled
    without instrumentation.
    

This prevents the fuzz target from being run accidentally / run when
compiled without instrumentation.
@domodwyer domodwyer self-assigned this Aug 29, 2022
@domodwyer domodwyer requested a review from crepererum August 29, 2022 10:16
@crepererum
Copy link
Collaborator

This now excludes the fuzz target from all other workspace-wide actions (fmt, clippy, docs) just because cargo test --workspace --bins is broken. To me this seems like the wrong fix.

@crepererum
Copy link
Collaborator

Ref rust-lang/cargo#8338

@domodwyer domodwyer closed this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fuzz target tries to run when not instrumented
2 participants