refactor: Split out clap_builder for faster derive builds #4791
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For now, we are still treating
clap
as the user facing API for both builder and derive, making this an internal change as we don't expect this to negatively impact builder build times all that much. We can re-evaluate at a later time and consider having distinct top-level crates for builder and derive.Looking at
--timings
on my machineclap
only took 0.04s to build and it happened in parallel toclap_builder
codegenclap_builder
building in parallel tosyn
andclap_builder
andclap_derive
finishing around the same time.This was discussed some at https://rust-lang.zulipchat.com/#narrow/stream/220302-wg-cli/topic/clap.20build.20times.20and.20.60clap_derive.60.3A.20a.20crazy.20idea