Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
150 lines (125 loc) · 4.61 KB
/
Copy pathCargo.toml
File metadata and controls
150 lines (125 loc) · 4.61 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[workspace]
resolver = "2"
members = [
"crates/prism-sync-crypto",
"crates/prism-sync-core",
"crates/prism-sync-ffi",
"crates/prism-sync-relay",
"crates/prism-sync-bench",
]
[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/prismplural/prism-sync"
rust-version = "1.88"
# ── Workspace dependencies ───────────────────────────────────────────────────
[workspace.dependencies]
# Internal crates
prism-sync-crypto = { path = "crates/prism-sync-crypto", version = "0.1.1" }
prism-sync-core = { path = "crates/prism-sync-core", version = "0.1.1" }
prism-sync-relay = { path = "crates/prism-sync-relay", version = "0.1.1" }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Crypto
chacha20poly1305 = "0.10"
crypto_secretbox = "0.1"
argon2 = "0.5"
hkdf = "0.12"
sha2 = "0.10"
hmac = "0.12"
x25519-dalek = { version = "2", features = ["static_secrets"] }
ed25519-dalek = { version = "2", features = ["rand_core"] }
bip39 = { version = "2", features = ["rand"] }
ml-kem = { version = "=0.3.0-rc.2", features = ["zeroize"] }
ml-dsa = { version = "=0.1.0-rc.8", features = ["zeroize", "rand_core"] }
x-wing = { version = "=0.1.0-rc.0", features = ["zeroize"] }
subtle = "2"
# Randomness
rand = "0.8"
rand_chacha = "0.3"
rand_core = { version = "0.10", default-features = false }
getrandom = { version = "0.4", features = ["sys_rng"] }
# Error handling
thiserror = "2"
anyhow = "1"
# Encoding
hex = "0.4"
base64 = "0.22"
# Memory safety
zeroize = { version = "1", features = ["derive"] }
hybrid-array = "0.2"
# Async runtime
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time", "macros"] }
tokio-stream = { version = "0.1", features = ["sync"] }
tokio-util = { version = "0.7", features = ["io"] }
tokio-tungstenite = "0.24"
async-trait = "0.1"
futures = "0.3"
futures-util = "0.3"
# HTTP / networking
reqwest = { version = "0.12", default-features = false }
axum = "0.8"
axum-extra = { version = "0.10", features = ["typed-header"] }
tower = { version = "0.5", features = ["limit"] }
tower-http = { version = "0.6", features = ["cors", "trace", "timeout", "request-id", "limit"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "tls12"] }
# OS primitives (safe wrappers; no `unsafe` in relay code)
# `fs` gives us `statvfs` for the resumable-upload free-space gate and
# `open(O_NOFOLLOW)` for symlink-resistant candidate opens.
rustix = { version = "1", features = ["fs"] }
# Database
rusqlite = "0.37"
# Date/time
chrono = { version = "0.4", features = ["serde"] }
# Observability
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
# IDs
uuid = { version = "1", features = ["v4"] }
# FFI
flutter_rust_bridge = "=2.12.0"
# CLI / bench utilities
clap = { version = "4", features = ["derive"] }
hdrhistogram = "7"
humantime = "2"
# Relay-specific
x509-parser = { version = "0.16", features = ["verify"] }
simple_asn1 = "0.6"
num-traits = "0.2"
ciborium = "0.2"
tempfile = "3"
# Testing
criterion = { version = "0.5", features = ["html_reports"] }
rcgen = "0.13"
# Compression
zstd = "0.13"
# ── Build profiles ────────────────────────────────────────────────────────────
# Dev: optimise for fast incremental compilation while keeping the app usable.
# codegen-units=256 maximises parallelism; incremental=true skips unchanged code.
# opt-level=1 avoids unoptimised crypto (Argon2id/XChaCha20 are 5-10× slower
# at level 0); the crypto crate gets level 2 to keep unlock times reasonable.
[profile.dev]
opt-level = 1
debug = true
incremental = true
codegen-units = 256
[profile.dev.package.prism-sync-crypto]
opt-level = 2
# Release: maximise performance and binary size.
# lto="thin" gives significant size reduction with faster link time than "fat".
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
# ── Workspace lints ──────────────────────────────────────────────────────────
[workspace.lints.clippy]
# Keep clippy's default lint set fatal via `just lint`. These policy-heavy
# lints are too noisy for the current workspace and should be tightened by area.
pedantic = { level = "allow", priority = -1 }
unwrap_used = "allow"
expect_used = "allow"
too_many_arguments = "allow"
[workspace.lints.rust]
unreachable_pub = "warn"
unsafe_code = "deny"