chore: add hakari workspace-hack to stabilize feature unification#6291
Closed
baszalmstra wants to merge 2 commits into
Closed
chore: add hakari workspace-hack to stabilize feature unification#6291baszalmstra wants to merge 2 commits into
baszalmstra wants to merge 2 commits into
Conversation
Introduces a cargo-hakari managed 'workspace-hack' crate that unifies the features of all third-party dependencies across the workspace. This keeps the resolved feature set identical between 'cargo build', 'cargo test -p <crate>' and 'cargo nextest run', so switching between them no longer rebuilds shared dependencies. - Add crates/workspace-hack and .config/hakari.toml (platforms mirror the ones pixi develops and ships on). - Wire the workspace-hack dependency into every workspace member. - Add 'hakari-check' and 'hakari-generate' pixi tasks. - Add a 'cargo hakari' CI job that fails if the crate is out of date. - Exclude the generated Cargo.toml from taplo so its formatter does not fight 'cargo hakari generate --diff'. cargo-shear auto-detects the hakari crate, and cargo-deny ignores it as a private (publish = false) package, so no extra config is needed there.
Hofer-Julian
approved these changes
Jun 5, 2026
Contributor
Hofer-Julian
left a comment
There was a problem hiding this comment.
Let's hope that this gives us fewer rebuilds 🚀
The workspace-hack was unifying both the default rustls backend and the opt-in native-tls backend, so every build pulled in native-tls (OpenSSL) even though rustls is the default. Exclude the members that toggle the TLS backend from hakari traversal so the hack no longer forces native-tls into ordinary builds. Shared dependencies are still unified through the lower-level library crates, so the rebuild savings are preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Running
cargo test -p <crate>often rebuilds large amounts of shared dependencies because the resolved feature set differs fromcargo buildandcargo nextest run. This adds aworkspace-hackcrate so all of these commands resolve the same feature set, which removes the repeated rebuilds and makes local Rust iteration noticeably faster.A CI check keeps the
workspace-hackcrate in sync, and pixi tasks are provided to regenerate and verify it locally.How Has This Been Tested?
AI Disclosure
Tools: Claude
Checklist: