[build] Include crypto-primitives in workspace #9561
Merged
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.
crypto-primitives was not included in the cargo workspace, unlike the rest of the crates. This caused issues with F-Droid builds as the output directory is separate from the workspace. The crate also did not benefit from shared dependency resolution and build caching.
We fixed it by including crypto-primitives in the workspace. We had to work around the rustc profile issue: for wasm target we want to build with size optimizations, but it's not possible to define it for one target for one crate in the workspace. Instead, we've added a new profile called
release-wasm
for the workspace and we specify it when buildingcrypto-primitives
for wasm. To use the new profile we had to change the version ofwasm-pack
as the one that's distributed via npm does not include the--profile
argument, even though the source code for it is there. We use our own fork that is compiled at the install time.