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

Proposal to split afl.rs into two packages #335

Closed
smoelius opened this issue May 13, 2023 · 4 comments
Closed

Proposal to split afl.rs into two packages #335

smoelius opened this issue May 13, 2023 · 4 comments

Comments

@smoelius
Copy link
Member

smoelius commented May 13, 2023

I propose that afl.rs be split into two package, cargo-afl and afl.

Moreover:

  • Users install cargo-afl via cargo install cargo-afl, instead of cargo install afl like now.
  • A compile error is generated when a user runs cargo install afl (similar to what cargo install rg does).
  • A warning is generated when a user runs cargo build instead of cargo afl build on a crate that depends on afl.

The last bullet would be accomplished by a build script. Note that there is no easy way to accomplish this with the current one-package setup, because there is no easy way to tell why a build script is run (see rust-lang/cargo#4001).

Pros for these changes:

Cons:

  • Maintaining a multi-package project is more difficult.
  • User accustomed to running cargo install afl will have to adjust.
  • CI that runs cargo install afl will break. (It may be possible to have a transition period where we generate a warning.)

Does anyone have strong opinions on this? If so, could you please voice them?

@smoelius smoelius changed the title Proposed changes to afl.rs Proposal to split afl.rs into two packages May 13, 2023
@louismerlin
Copy link
Contributor

That sounds like a great idea!

Another way to achieve cargo-afl's dependencies (e.g. clap) will not need to be built. is through features, like we do here.

The only difference in workflow this would create is that the afl package would have to be imported like this:

afl = { version = "*", default-features = false }

@smoelius
Copy link
Member Author

smoelius commented Jun 9, 2023

Another way to achieve cargo-afl's dependencies (e.g. clap) will not need to be built. is through features, like we do here.

That's a very good point, @louismerlin. Thank you for raising it.

@smoelius
Copy link
Member Author

I've received two positive responses (one here and one offline) and no negative responses.

So in about a week, I'm going to implement a transitional message to let users know this change is coming.

@smoelius
Copy link
Member Author

smoelius commented Sep 6, 2023

Completed by #375

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

No branches or pull requests

2 participants