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

Respect the workspace if it exists #38

Open
brunoproduit opened this issue Aug 15, 2023 · 2 comments
Open

Respect the workspace if it exists #38

brunoproduit opened this issue Aug 15, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@brunoproduit
Copy link
Collaborator

When ziggy builds his targets, the used folder is $PWD/target. When in a workspace, the target directory will be at the root of the workspace. This makes that we cannot use things like cargo clean -p to clean a single crate instead of recompiling everything.

The idea is either to implement cargo ziggy clean or use the same target directory as the workspace

@louismerlin louismerlin self-assigned this Sep 26, 2023
@louismerlin louismerlin added the enhancement New feature or request label Sep 26, 2023
@louismerlin louismerlin added this to the 1.0.0 Stable Release milestone Sep 26, 2023
@louismerlin
Copy link
Collaborator

Started working on this in https://github.com/srlabs/ziggy/tree/respect-workspace.

There are multiple problems when doing this:

  1. By default, AFL++ and our runner both build a binary file in ${target}/debug/${name}.
    This means that they will overwrite themselves. I have not yet found a workaround.
    On the positive side: both react in the correct way to cargo clean -p package_name, so once this is solved, we're good to go.

  2. honggfuzz-rs does build-directory shenanigans of it's own, and cargo clean -p package_name does not work.
    TBD whether we can fix this.

@brunoproduit
Copy link
Collaborator Author

brunoproduit commented Sep 27, 2023

Couldn't we follow the same idea as cargo targets with multiples "bin" targets. Runner, afl, honggfuzz? Kind of same as now, but in the workspace target directory? The only incompatible thing would be that those targets are not included in the Cargo.toml. Or does that break cargo clean -p as its not canonical?

Or we could add ourselves as binary targets in the workspace, but that would imply changing the targeted codebase. That is not too much of an issue IMO

@louismerlin louismerlin removed this from the 1.0.0 Stable Release milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants