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.
warm
--release
build times of kafka-protocol crate on my machine:--no-default-features
~1.32s--no-default-features --features messages_enum
~2.00s--no-default-features
0.83s (effectively useless though)--no-default-features --features broker
~1.07s--no-default-features --features client
~1.07s--no-default-features --features broker,client
~1.32s--no-default-features --features broker,client,messages_enum
~2.00s--no-default-features --features client,messages_enum
~1.40sThe measurements show:
client
andbroker
features are enabled.There is still a small cost of extra complexity in maintenance and usage of kafka-protocol.
But I think its still definitely worth it.
I have enabled
broker
andclient
features by default since kafka-protocol is useless without at least one of these enabled. This PR is still a breaking change though, since a user could be depending on kafka-protocol withdefault-features = false
I also introduced cargo-hack to CI to ensure that all feature combinations continue to build and pass clippy lints.