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

don't include all of libafl for symcc_runtime by default #320

Merged
merged 2 commits into from
Oct 11, 2021

Conversation

julihoh
Copy link
Collaborator

@julihoh julihoh commented Oct 10, 2021

Just to avoid adding unnecessary dependencies. It's quite annoying when the build takes very long for dependencies that are not even used...

@domenukk
Copy link
Member

What features in default take very long? If you do use default libafl, the way it is now means libafl will be built twice, right?

@julihoh
Copy link
Collaborator Author

julihoh commented Oct 10, 2021

To be honest, I saw quite a large dependency tree when I built a project with libafl and jumped to the conclusion that I don't need it all. For example, libafl-derive or llmp-compression and things like that. In fact, I was only using the concolic infrastructure without the actual fuzzing parts of libafl, so I wanted to get rid of any unnecessary dependencies.
I haven't benchmarked anything here and you're probably right, that I would compile libafl twice if I were to include it with default features in a project that also includes symcc_runtime. In my case, I don't need full libafl in any of my crates, but I could see how that's not really the intended use-case 😅
We can also just drop this PR, I'm not really that eager to change it

@domenukk
Copy link
Member

Nah it's the use case of libafl to have flexibility and only pick the parts you need. I just don't know what the best way is here. Would be best to have libafl always with exactly the same feature set, but I guess that's not something cargo can do (?)

@julihoh
Copy link
Collaborator Author

julihoh commented Oct 10, 2021

Now that you say it... I could actually imagine cargo merging feature flags across the dependency tree. I'll check it tomorrow :)

@julihoh
Copy link
Collaborator Author

julihoh commented Oct 11, 2021

When a dependency is used by multiple packages, Cargo will use the union of all features enabled on that dependency when building it. This helps ensure that only a single copy of the dependency is used.

src

I think the default features can therefore be safely deactivated :)

@domenukk
Copy link
Member

okay sweet

@domenukk domenukk merged commit b778f22 into main Oct 11, 2021
@domenukk domenukk deleted the symcc_runtime_optimized_dependencies branch December 9, 2021 12:57
khang06 pushed a commit to khang06/LibAFL that referenced this pull request Oct 11, 2022
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.

None yet

2 participants