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

Modern-Apps.git / Cargo.toml

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