Skip to content

Conversation

charlag
Copy link
Contributor

@charlag charlag commented Aug 28, 2025

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 building crypto-primitives for wasm. To use the new profile we had to change the version of wasm-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.

charlag and others added 2 commits August 28, 2025 16:06
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
building `crypto-primitives` for wasm. To use the new profile we had to
change the version of `wasm-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.

Co-authored-by: vis <[email protected]>
Co-authored-by: paw <[email protected]>
Add a mobileBuild parameter to webapp build script to avoid trying to
copy wasm file that would be already deleted by the scandelete of
F-Droid.

Co-authored-by: vis <[email protected]>
@tutao-jenkins tutao-jenkins merged commit 148766e into master Aug 28, 2025
7 checks passed
@tutao-jenkins tutao-jenkins deleted the crypto-primitives-workspace branch August 28, 2025 14:50
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.

2 participants