Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
47 lines (41 loc) · 2.09 KB
/
Copy pathCargo.toml
File metadata and controls
47 lines (41 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# The Rust workspace: one core for the web app (WASM), the iOS app (static library, Swift through UniFFI) and the
# connector. Every dependency is pinned: exact versions here for OpenMLS and its providers, the committed Cargo.lock for
# the rest (build with --locked), the compiler in rust-toolchain.toml.
[workspace]
resolver = "2"
members = ["core/wire", "core/protocol", "core/client", "core/bindings/wasm", "core/bindings/swift", "core/bindings/swift/bindgen", "core/io", "hub", "connector", "tests", "tests/shipped"]
exclude = ["tests/fuzz"]
[workspace.package]
edition = "2021"
license-file = "LICENSE.md"
publish = false
[workspace.dependencies]
# OpenMLS and its provider crates are pinned to exact versions: an upgrade is a deliberate change of this file.
openmls = { version = "=0.9.1", default-features = false }
openmls_rust_crypto = "=0.6.0"
openmls_basic_credential = "=0.6.0"
openmls_traits = "=0.6.0"
openmls_memory_storage = "=0.6.0"
[profile.release]
lto = true
codegen-units = 1
# The browser build: small before fast.
[profile.wasm]
inherits = "release"
opt-level = "s"
strip = true
# Tests and local builds: the dependencies (OpenMLS, the ciphers) as they ship, optimised and without their debug
# assertions, the workspace's own crates not. The scenario tests with hundreds of Commits then run in seconds, and a
# damaged stored state meets the error a shipped build returns where OpenMLS has a debug assertion in front of it.
[profile.dev.package."*"]
opt-level = 2
debug-assertions = false
# What a release ships of the hub and the connector (connector/build-plugin.mjs): the release
# profile with thin LTO, which links in parallel. Measured against `release` (fat LTO) on 4 cores, October 2026: the
# rebuild after a change 73 s instead of 105 s; the binaries (stripped) hub 10.3 MB instead of 9.5, connector 17.0
# instead of 15.0; the hub's 1000-device scenario as fast (27 s, a request at 1000 leaves 44 ms). More code units
# (4, 16) built no faster here and made the hub slower (16: that request 75 ms). The browser (wasm) and the iOS core
# keep `release`.
[profile.dist]
inherits = "release"
lto = "thin"