Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
main ▾

Modern-Apps.git / Cargo.toml

Cargo.toml347 lines · 13.7 KiBRaw
1[workspace]
2members = [
3 "astronomy/src/main/rust",
4 "photos/src/main/rust",
5 "office/src/main/rust",
6 "weather/src/main/rust",
7 "pdf/src/main/rust",
8 "camera/src/main/rust",
9 "maps/src/main/rust",
10 "networklocation/src/main/rust",
11 "euicc/src/main/rust",
12 "passwords/src/main/rust",
13 "appstore/src/main/rust",
14 "vpn/src/main/rust",
15 "library/e2ee-p2p/src/main/rust",
16 "library/e2ee-openpgp/src/main/rust",
17 "library/jni-http/src/main/rust",
18 "library/jni-bridge/src/main/rust",
19 "library/map/src/main/rust",
20 "library/ml/src/main/rust",
21 "library/vision/src/main/rust",
22 "measure/src/main/rust",
23 "communicate-dev/src/main/rust",
24 "communicate-dev/src/main/rust-mls",
25 "youpipe/src/main/rust",
26 "web/src/main/rust",
27 "share/src/main/rust",
28 "games/voxels/src/main/rust",
29 "games/kart/src/main/rust",
30 "library/avatar/src/main/rust",
31 "code/src/main/rust",
32 "library/tilecodec/src/main/rust",
33 "scripts/maps/dem_ingest",
34 "scripts/maps/gtfs_ingest",
35 "scripts/maps/mamaps_build",
36 "scripts/maps/osm_ingest",
37 "scripts/maps/tile_build",
38 "scripts/maps/wikidesc",
39 "scripts/networklocation/geodb_build",
40 "scripts/networklocation/wps_harvest",
41 "third_party/betocore/ldt/fuzz",
42 "third_party/betocore/ldt_np_adv/fuzz",
43 "third_party/betocore/np_adv/fuzz",
44 "third_party/betocore/ukey2_connections/fuzz",
45 "third_party/betocore/xts_aes/fuzz",
46 "third_party/om-file-format-sys",
47 "third_party/betocore/array_view",
48 "third_party/betocore/array_ref",
49 "third_party/betocore/sink",
50 "third_party/betocore/ldt_tbc",
51 "third_party/betocore/xts_aes",
52 "third_party/betocore/ldt",
53 "third_party/betocore/np_hkdf",
54 "third_party/betocore/ldt_np_adv",
55 "third_party/betocore/np_adv",
56 "third_party/betocore/rand_ext",
57 "third_party/betocore/test_helper",
58 "third_party/betocore/test_vector_hkdf",
59 "third_party/betocore/crypto_provider",
60 "third_party/betocore/crypto_provider_rustcrypto",
61 "third_party/betocore/crypto_provider_default",
62 "third_party/betocore/ukey2_rs",
63 "third_party/betocore/ukey2_proto",
64 "third_party/betocore/ukey2_connections",
65]
66# `tilecodec` is a workspace root of its own, because it is consumed both by this
67# workspace's `map_renderer` cdylib and by the detached host tool
68# `scripts/maps/tile_build`. It lives inside this tree, so it has to be excluded
69# explicitly or cargo reports "multiple workspace roots found in the same workspace"
70# as soon as a member depends on it.
71# `personal/uniflix_strem` is likewise a workspace root of its own (see its
72# Cargo.toml), for a different reason: it lives under gitignored personal/ and
73# may not exist in a given checkout, and cargo has no conditional members — a
74# missing member fails resolution of the whole workspace. Excluded entries may
75# match nothing, so this keeps the root workspace resolvable with and without
76# personal/ present.
77exclude = ["library/tilecodec/src/main/rust", "personal/uniflix_strem/src/main/rust"]
78resolver = "2"
79
80[workspace.package]
81version = "0.1.0"
82edition = "2021"
83publish = false
84license = "Apache-2.0"
85
86[workspace.lints.rust]
87missing_docs = "deny"
88trivial_casts = "deny"
89trivial_numeric_casts = "deny"
90unsafe_code = "deny"
91unsafe_op_in_unsafe_fn = "deny"
92unused_extern_crates = "deny"
93unused_import_braces = "deny"
94unused_results = "deny"
95unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)', 'cfg(rust_analyzer)', 'cfg(blaze)'] }
96# Lint sweep (warn-then-error): rustdoc link/tag hygiene lands as warnings
97# first, promotes to deny with the rest of the comment sweep at promotion.
98# (Table is `workspace.lints.rustdoc`, not dotted keys under `rust` — cargo
99# rejects `lints.rust.rustdoc::X` as an invalid lint name.)
100[workspace.lints.rustdoc]
101broken_intra_doc_links = "warn"
102invalid_html_tags = "warn"
103
104[workspace.lints.clippy]
105expect_used = "deny"
106indexing_slicing = "deny"
107panic = "deny"
108unwrap_used = "deny"
109# Lint sweep (warn-then-error): catches TODO!/unimplemented!/dbg! left in the
110# tree plus doc-comment drift; promotes to deny at promotion.
111todo = "warn"
112dbg_macro = "warn"
113empty_line_after_doc_comments = "warn"
114doc_markdown = "warn"
115# Lint sweep: conservative warn set. missing_panics_doc keeps `# Panics`
116# sections honest on public fns; needless_borrow and len_without_is_empty are
117# mechanical. All promote to deny at promotion once the inheriting slices are
118# green. Existing deny set above is unchanged.
119missing_panics_doc = "warn"
120needless_borrow = "warn"
121len_without_is_empty = "warn"
122
123# Centralized Rust versions – armv8-only (aarch64-linux-android)
124
125[workspace.dependencies]
126# Upstream jni from crates.io, not a vendored fork.
127#
128# 0.22 API: native methods now receive `EnvUnowned` and must adapt it via
129# `with_env` plus an `ErrorPolicy`; `GlobalRef`/`AutoLocal` renamed. All 31
130# native entry points migrated in this bump.
131jni = "0.22.4"
132jni-sys = "0.3.1"
133cesu8 = "1.1.0"
134thiserror = { version = "2" }
135log = "0.4.34"
136cfg-if = "1.0.5"
137
138serde = { version = "1.0.229", features = ["derive"] }
139serde_core = "1.0.229"
140proc-macro2 = "1.0.92"
141quote = "1.0.40"
142syn = "2.0.101"
143itoa = "1.0.15"
144memchr = "2.8.3"
145# XML pull parsing for the OOXML/ODF importers. Only transitive dep is memchr, pinned above.
146quick-xml = { version = "0.42", default-features = false }
147serde_json = "1.0.154"
148
149# Brave Shields engine (:web). default-features off drops `single-thread` so `Engine` is
150# Send + Sync, which the WebView render thread requires.
151adblock = { version = "0.13.3", default-features = false, features = ["embedded-domain-resolver", "full-regex-handling"] }
152
153# Imaging – image crate 0.25->moxcms/pxfm removed, use tiny jpeg-encoder/decoder (1 function per your rule)
154jpeg-decoder = { version = "0.3.2", default-features = false }
155jpeg-encoder = { version = "0.7.1", default-features = false }
156# AVIF still encoding (camera): ravif is the pure-Rust AV1/AVIF encoder (rav1e
157# under it). default-features off drops `asm` (needs nasm on x86 hosts and
158# prebuilt asm objects on device) and keeps `threading` (rayon, already in the
159# workspace). No C toolchain, no bindgen: libavif-sys/libaom rejected for that
160# reason. Offline at runtime, so no SUPPLY_CHAIN_RISKS.md fetch entry.
161ravif = { version = "0.13", default-features = false, features = ["threading"] }
162flate2 = "1.1.10"
163
164# Crypto / PQC (features preserved – no feature loss)
165sha2 = { version = "0.11.1", features = ["oid"] }
166# SHAKE256 for FindFamily link-seed expansion. Already in the lock file transitively
167# via fips203/fips204, so this only promotes it to a direct dependency.
168sha3 = "0.12"
169shake = "0.1"
170aes = "0.9.3"
171# `aes09` kept for the keepass dual-stack rationale: keepass 0.15.x needs aes
172# 0.9.x (cipher 0.5 stack). Now redundant with the default `aes` 0.9.3 pin but
173# retained so `aes09.workspace` edges in passwords keep resolving.
174aes09 = { package = "aes", version = "=0.9.3" }
175md-5 = "0.11.0"
176# keepass 0.15.x (cipher 0.5 / cbc 0.2 / aes 0.9 stack, matching the workspace
177# default aes 0.9.3 pin). Only passwords uses keepass.
178keepass = { version = "=0.15.2", default-features = false, features = ["save_kdbx4"] }
179# Classic Signal protocol (WhatsApp bridge) – X25519/XEdDSA + AES-CBC + HMAC.
180curve25519-dalek = { version = "5.0.0", default-features = false, features = ["alloc", "precomputed-tables", "zeroize"] }
181# MLS (RFC 9420) for the RCS line — OpenMLS + RustCrypto provider + memory storage.
182openmls = { version = "0.9.1", default-features = false }
183openmls_rust_crypto = "0.6.0"
184openmls_memory_storage = "0.6.0"
185openmls_basic_credential = "0.6.0"
186openmls_traits = "0.6.0"
187tls_codec = "0.5.0"
188x25519-dalek = { version = "3.0.0", default-features = false, features = ["static_secrets"] }
189hmac = "0.13.0"
190subtle = "2.6.1"
191fips203 = "0.4.3"
192fips204 = "0.4.6"
193# OpenPGP (RFC 9580) for SecureMail via :library:e2ee-p2p — replaces BouncyCastle.
194# rPGP: pure-Rust packet armor/keyring/encrypt/decrypt. BouncyCastle stays removed.
195pgp = { version = "0.21.0" }
196rand_core = { version = "0.10.1" }
197rand = { version = "0.10.3", default-features = true }
198# rand 0.8 for rPGP (`pgp` 0.21 uses rand 0.8 / rand_core 0.6; workspace default
199# is rand 0.10). Same alias pattern as `aes09` for keepass.
200rand08 = { package = "rand", version = "=0.8.6" }
201getrandom = "0.4.3"
202# x509-cert / cms / spki / rsa removed with the PDF signature-creation feature.
203der = { version = "0.8.2", features = ["alloc", "oid"] }
204const-oid = { version = "0.9.6", features = ["db"] }
205ttf-parser = { version = "0.25.1", default-features = false, features = ["std", "glyph-names"] }
206# weezl, cbc removed – std LZW + own CBC in pdf_cbc.rs (single function, prefer stdlib)
207fax = "0.3.0"
208hayro = "0.8.0"
209hayro-jbig2 = { version = "0.3.0", default-features = false, features = ["std"] }
210openjp2 = "0.6.1"
211lopdf = { version = "0.45", default-features = false, features = ["serde"] }
212libc = "0.2.190"
213indexmap = { version = "2.14.2" }
214hashbrown = "0.14.5"
215byteorder = "1.5.0"
216smallvec = "1.14.0"
217
218# No HTTP client crate anywhere: Rust reaches the network through library:network via
219# the flat-framed JNI bridge in library/jni-http, so no .so links its own TLS.
220# omfiles / memmap2 / ndarray removed – weather uses its own sync src/om.rs on top of
221# the vendored om-file-format-sys C lib (see weather/src/main/rust/Cargo.toml).
222
223# Build. `cc = "1"` (not 1.8): tree-sitter-javascript's build-dep requires
224# `cc ~1.0.90` (<1.1.0), so the single workspace lockfile resolves cc to the
225# newest 1.0.x for everyone including om-file-format-sys.
226cc = { version = "1" }
227
228# Minimal platform
229chrono = { version = "0.4.39", default-features = false, features = ["clock", "std"] }
230iana-time-zone = "0.1.64"
231crossbeam-utils = "0.8.21"
232crossbeam-epoch = "0.9.18"
233crossbeam-deque = "0.8.6"
234either = "1.19.0"
235rayon = "1.11.0"
236rayon-core = "1.13.0"
237# nalgebra removed – camera now uses its own src/linalg.rs (see camera Cargo.toml)
238
239
240# --- BetoCore vendored crates (third_party/betocore) — Apache-2.0 ---
241# Local path crates (so `xxx.workspace = true` in vendored Cargo.tomls resolves)
242tilecodec = { path = "library/tilecodec/src/main/rust" }
243array_view = { path = "third_party/betocore/array_view" }
244array_ref = { path = "third_party/betocore/array_ref" }
245sink = { path = "third_party/betocore/sink" }
246ldt_tbc = { path = "third_party/betocore/ldt_tbc" }
247xts_aes = { path = "third_party/betocore/xts_aes" }
248ldt = { path = "third_party/betocore/ldt" }
249np_hkdf = { path = "third_party/betocore/np_hkdf" }
250ldt_np_adv = { path = "third_party/betocore/ldt_np_adv" }
251np_adv = { path = "third_party/betocore/np_adv" }
252rand_ext = { path = "third_party/betocore/rand_ext" }
253test_helper = { path = "third_party/betocore/test_helper" }
254test_vector_hkdf = { path = "third_party/betocore/test_vector_hkdf" }
255crypto_provider = { path = "third_party/betocore/crypto_provider", default-features = false }
256crypto_provider_default = { path = "third_party/betocore/crypto_provider_default", default-features = false }
257crypto_provider_rustcrypto = { path = "third_party/betocore/crypto_provider_rustcrypto" }
258ukey2_rs = { path = "third_party/betocore/ukey2_rs" }
259ukey2_proto = { path = "third_party/betocore/ukey2_proto" }
260ukey2_connections = { path = "third_party/betocore/ukey2_connections" }
261# crates.io deps required by vendored betocore crates (pins from nearby/Cargo.toml)
262tinyvec = { version = "1.13.3", features = ["rustc_1_55"] }
263nom = { version = "8.0.0", default-features = false }
264strum = { version = "0.28.0", default-features = false }
265strum_macros = { version = "0.28.0", default-features = false }
266lazy_static = { version = "1.5.1", features = ["spin_no_std"] }
267itertools = { version = "0.15.0", default-features = false, features = ["use_alloc"] }
268hex = "0.4.3"
269rand_pcg = "0.10.2"
270base64 = "0.23.1"
271ctr = "0.10.1"
272cbc = { version = "0.2.1", features = ["block-padding"] }
273hkdf = "0.13.0"
274aes-gcm = { version = "0.11.1", default-features = false, features = ["aes", "alloc"] }
275aes-gcm-siv = { version = "0.12.1", features = ["aes"], default-features = false }
276aead = "0.6.1"
277cipher = "0.5"
278chacha20poly1305 = "0.11.0"
279protobuf = "=3.7.2"
280protobuf-codegen = "=3.7.2"
281sec1 = "0.8.1"
282ed25519-dalek = { version = "3.0.0", default-features = false, features = ["rand_core"] }
283ed25519 = "2.2.3"
284p256 = { version = "0.14.0", default-features = false }
285rand_chacha = { version = "0.10.0", default-features = false }
286xts-mode = "0.6.0"
287wycheproof = "0.7.0"
288blake2 = "0.11.0"
289hdrhistogram = "7.6.0"
290regex = "1.13.1"
291criterion = { version = "0.8.2", features = ["html_reports"] }
292clap = { version = "4.6.7", features = ["derive"] }
293anyhow = "1.0.104"
294num-bigint = "0.5.1"
295bytes = "1.12.1"
296hex-literal = "1.1.0"
297prost = "0.14"
298parking_lot = "0.12.5"
299zerocopy = { version = "0.8.63", features = ["derive", "std"] }
300constant_time_eq = "0.6.1"
301typed-builder = "0.23.2"
302bitfield-struct = "0.13.0"
303duplicate = "2.0.1"
304eyre = "0.6.14"
305tracing = { version = "0.1.44", default-features = false, features = ["std"] }
306ruzstd = "0.9"
307diff = "0.1.13"
308ab_glyph = "0.2.32"
309png = "0.18"
310memmap2 = "0.9"
311ash = { version = "0.38", default-features = false, features = ["loaded"] }
312glam = { version = "0.27", features = ["serde"] }
313miniz_oxide = "0.8"
314tiff = "0.9"
315mimalloc = { version = "0.1", default-features = false }
316zstd = "0.13"
317zstd-rs = "0.1"
318ureq = { version = "3", default-features = false, features = ["rustls"] }
319tree-sitter = "0.22"
320tree-sitter-kotlin = "0.3"
321tree-sitter-java = "0.21"
322tree-sitter-javascript = "0.21"
323tree-sitter-typescript = "0.21"
324tree-sitter-python = "0.21"
325tree-sitter-rust = "0.21"
326tree-sitter-go = "0.21"
327tree-sitter-json = "0.21"
328tree-sitter-c = "0.21"
329tree-sitter-cpp = "0.22"
330arbitrary = { version = "1.3.2", features = ["derive"] }
331derive_fuzztest = "0.1.4"
332libfuzzer-sys = "0.4.7"
333# keep existing pins for sha2/aes/hmac/subtle/x25519-dalek/rand etc — betocore uses compatible versions
334
335[profile.release]
336opt-level = 3
337lto = true
338codegen-units = 1
339strip = true
340panic = "abort"
341
342# Fast profile for dev/agent builds: skips fat LTO for quicker iteration.
343[profile.fast]
344inherits = "release"
345opt-level = 2
346lto = false
347codegen-units = 16