Modern Apps git

← Modern-Apps.git

various fixes

Commit
c69b6186fb9c931efb2b5176b04954a662268ad8
Author
vayun-mathur <[email protected]>
When
2026-09-17 03:59 UTC (2 months ago)
Parents
bb23f4f

Diff

Cargo.lock
diff --git a/Cargo.lock b/Cargo.lockindex 0f328bf618..4dda10cb2f 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -27,7 +27,7 @@ dependencies = [  "addr",  "arrayvec",  "base64 0.22.1",- "bitflags 2.13.1",+ "bitflags 2.13.2",  "flatbuffers",  "idna",  "itertools 0.14.0",@@ -35,7 +35,7 @@ dependencies = [  "percent-encoding",  "precomputed-hash",  "regex",- "rustc-hash 2.1.3",+ "rustc-hash",  "seahash",  "serde",  "serde_json",@@ -89,7 +89,7 @@ checksum = "f8eb277bec05f56a0e0591f155a484cbd0f4f07ff2905051a48c72f004f7ed58" dependencies = [  "cipher 0.5.2",  "cpubits",- "cpufeatures 0.3.0",+ "cpufeatures 0.3.1", ]  [[package]]@@ -147,9 +147,9 @@ dependencies = [  [[package]] name = "android_system_properties"-version = "0.1.5"+version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [  "libc", ]@@ -233,12 +233,6 @@ version = "0.1.0" name = "array_view" version = "0.1.0" -[[package]]-name = "arrayref"-version = "0.3.9"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"- [[package]] name = "arrayvec" version = "0.7.8"@@ -291,27 +285,6 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" -[[package]]-name = "beef"-version = "0.5.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"--[[package]]-name = "bit-set"-version = "0.10.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d"-dependencies = [- "bit-vec",-]--[[package]]-name = "bit-vec"-version = "0.9.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"- [[package]] name = "bitfield-struct" version = "0.12.1"@@ -331,9 +304,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"  [[package]] name = "bitflags"-version = "2.13.1"+version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" dependencies = [  "serde_core", ]@@ -349,11 +322,10 @@ dependencies = [  [[package]] name = "blake2b_simd"-version = "1.0.4"+version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b79834656f71332577234b50bfc009996f7449e0c056884e6a02492ded0ca2f3"+checksum = "3560a7b1951efe814fcd721938313adc56753ca39f4b23847d7e9a2402f5dbff" dependencies = [- "arrayref",  "arrayvec",  "constant_time_eq", ]@@ -444,13 +416,13 @@ dependencies = [  [[package]] name = "bytemuck_derive"-version = "1.12.0"+version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f"+checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [  "proc-macro2",  "quote",- "syn 3.0.3",+ "syn 3.0.6", ]  [[package]]@@ -507,9 +479,9 @@ dependencies = [  [[package]] name = "cc"-version = "1.4.5"+version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80"+checksum = "a3eb0f42d6c360dc3f8a821f6bf2fdea7f72bfd36b3076eb0e6d1e9e0752fff4" dependencies = [  "find-msvc-tools",  "shlex",@@ -523,15 +495,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"  [[package]] name = "cfg-if"-version = "1.0.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"--[[package]]-name = "cfg_aliases"-version = "0.2.2"+version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"  [[package]] name = "chacha20"@@ -546,13 +512,13 @@ dependencies = [  [[package]] name = "chacha20"-version = "0.10.1"+version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"+checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [  "cfg-if",  "cipher 0.5.2",- "cpufeatures 0.3.0",+ "cpufeatures 0.3.1", ]  [[package]]@@ -631,9 +597,9 @@ dependencies = [  [[package]] name = "clap"-version = "4.6.6"+version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" dependencies = [  "clap_builder",  "clap_derive",@@ -641,9 +607,9 @@ dependencies = [  [[package]] name = "clap_builder"-version = "4.6.6"+version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" dependencies = [  "anstream",  "anstyle",@@ -653,21 +619,21 @@ dependencies = [  [[package]] name = "clap_derive"-version = "4.6.4"+version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"+checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" dependencies = [  "heck",  "proc-macro2",  "quote",- "syn 3.0.3",+ "syn 3.0.6", ]  [[package]] name = "clap_lex"-version = "1.1.0"+version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"  [[package]] name = "cmov"@@ -675,15 +641,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" -[[package]]-name = "codespan-reporting"-version = "0.13.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"-dependencies = [- "unicode-width 0.2.2",-]- [[package]] name = "color" version = "0.3.3"@@ -701,9 +658,9 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"  [[package]] name = "combine"-version = "4.6.7"+version = "4.6.8" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"+checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" dependencies = [  "bytes",  "memchr",@@ -747,6 +704,12 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]]+name = "core_detect"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"+ [[package]] name = "cpubits" version = "0.1.1"@@ -764,18 +727,18 @@ dependencies = [  [[package]] name = "cpufeatures"-version = "0.3.0"+version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"+checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [  "libc", ]  [[package]] name = "crc32fast"-version = "1.5.0"+version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"+checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" dependencies = [  "cfg-if", ]@@ -818,9 +781,9 @@ dependencies = [  [[package]] name = "crossbeam-channel"-version = "0.5.16"+version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e"+checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" dependencies = [  "crossbeam-utils", ]@@ -895,7 +858,7 @@ dependencies = [  "criterion",  "crypto_provider_default",  "hex-literal 0.4.1",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "tinyvec", ]@@ -926,7 +889,7 @@ dependencies = [  "hkdf",  "hmac 0.12.1",  "p256",- "rand 0.8.7",+ "rand 0.8.8",  "rand_chacha 0.3.1",  "rand_core 0.6.4",  "sec1",@@ -1035,7 +998,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [  "proc-macro2",  "quote",- "syn 3.0.3",+ "syn 3.0.6", ]  [[package]]@@ -1138,11 +1101,17 @@ dependencies = [  [[package]] name = "encoding_rs"-version = "0.8.35"+version = "0.8.41" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"+checksum = "7b5ef0006ac9ab233c38522f5ae99cae3625151de8f706cacee1cba4b8e2832a" dependencies = [  "cfg-if",+ "core_detect",+ "multiversion",+ "multiversion_no_op",+ "rustversion",+ "scopeguard",+ "simdutf8", ]  [[package]]@@ -1264,19 +1233,13 @@ dependencies = [  "zeroize", ] -[[package]]-name = "fixedbitset"-version = "0.5.7"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"- [[package]] name = "flatbuffers" version = "25.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2",  "rustc_version", ] @@ -1291,18 +1254,6 @@ dependencies = [  "zlib-rs", ] -[[package]]-name = "fnv"-version = "1.0.7"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"--[[package]]-name = "foldhash"-version = "0.1.5"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"- [[package]] name = "foldhash" version = "0.2.0"@@ -1329,21 +1280,21 @@ dependencies = [  [[package]] name = "futures-core"-version = "0.3.33"+version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"  [[package]] name = "futures-task"-version = "0.3.33"+version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"  [[package]] name = "futures-util"-version = "0.3.33"+version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [  "futures-core",  "futures-task",@@ -1415,8 +1366,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d99fc21d493812643aae86d53b7bbd02f376434a90317e8a790bc209fdd6605e" dependencies = [  "bytemuck",- "foldhash 0.2.0",- "hashbrown 0.17.1",+ "foldhash",+ "hashbrown",  "log",  "peniko",  "png",@@ -1425,18 +1376,6 @@ dependencies = [  "vello_common 0.0.9", ] -[[package]]-name = "gpu-allocator"-version = "0.28.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"-dependencies = [- "ash",- "log",- "presser",- "thiserror 2.0.20",-]- [[package]] name = "group" version = "0.13.0"@@ -1465,26 +1404,16 @@ checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [  "cfg-if",  "crunchy",- "num-traits",  "zerocopy", ] -[[package]]-name = "hashbrown"-version = "0.15.5"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"-dependencies = [- "foldhash 0.1.5",-]- [[package]] name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [- "foldhash 0.2.0",+ "foldhash", ]  [[package]]@@ -1523,13 +1452,13 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2613d0406898995042d0794c4245b2f2fba1246490c8ac593769bba6551129d" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2",  "hayro-cmap",  "hayro-syntax",  "kurbo",  "moxcms",  "phf",- "rustc-hash 2.1.3",+ "rustc-hash",  "siphasher",  "skrifa",  "smallvec",@@ -1572,7 +1501,7 @@ dependencies = [  "hayro-jbig2",  "hayro-jpeg2000",  "memchr",- "rustc-hash 2.1.3",+ "rustc-hash",  "smallvec",  "zune-jpeg", ]@@ -1599,9 +1528,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"  [[package]] name = "hermit-abi"-version = "0.5.2"+version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"+checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284"  [[package]] name = "hex"@@ -1659,9 +1588,9 @@ dependencies = [  [[package]] name = "hybrid-array"-version = "0.4.13"+version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c"+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" dependencies = [  "typenum", ]@@ -1692,9 +1621,9 @@ dependencies = [  [[package]] name = "icu_collections"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"+checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" dependencies = [  "displaydoc",  "potential_utf",@@ -1706,9 +1635,9 @@ dependencies = [  [[package]] name = "icu_locale_core"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"+checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" dependencies = [  "displaydoc",  "litemap",@@ -1719,9 +1648,9 @@ dependencies = [  [[package]] name = "icu_normalizer"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"+checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" dependencies = [  "icu_collections",  "icu_normalizer_data",@@ -1733,16 +1662,17 @@ dependencies = [  [[package]] name = "icu_normalizer_data"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"+checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0"  [[package]] name = "icu_properties"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"+checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" dependencies = [+ "displaydoc",  "icu_collections",  "icu_locale_core",  "icu_properties_data",@@ -1753,15 +1683,15 @@ dependencies = [  [[package]] name = "icu_properties_data"-version = "2.2.0"+version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"+checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa"  [[package]] name = "icu_provider"-version = "2.2.0"+version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"+checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" dependencies = [  "displaydoc",  "icu_locale_core",@@ -1819,7 +1749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [  "equivalent",- "hashbrown 0.17.1",+ "hashbrown",  "serde",  "serde_core", ]@@ -1959,9 +1889,9 @@ checksum = "b454d911ac55068f53495488d8ccd0646eaa540c033a28ee15b07838afafb01f"  [[package]] name = "js-sys"-version = "0.3.103"+version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"+checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" dependencies = [  "cfg-if",  "futures-util",@@ -1988,7 +1918,7 @@ dependencies = [  "block-modes",  "byteorder",  "cbc 0.2.1",- "chacha20 0.10.1",+ "chacha20 0.10.2",  "chrono",  "cipher 0.5.2",  "flate2",@@ -2049,7 +1979,7 @@ dependencies = [  "hdrhistogram",  "hex",  "ldt_tbc",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "rand_pcg",  "serde_json",@@ -2074,7 +2004,7 @@ dependencies = [  "ldt",  "ldt_tbc",  "np_hkdf",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "rand_pcg",  "serde_json",@@ -2106,12 +2036,6 @@ dependencies = [  "windows-link", ] -[[package]]-name = "libm"-version = "0.2.16"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"- [[package]] name = "linebender_resource_handle" version = "0.1.1"@@ -2132,9 +2056,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"  [[package]] name = "litemap"-version = "0.8.2"+version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"  [[package]] name = "lock_api"@@ -2151,72 +2075,6 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" -[[package]]-name = "logos"-version = "0.15.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ff472f899b4ec2d99161c51f60ff7075eeb3097069a36050d8037a6325eb8154"-dependencies = [- "logos-derive 0.15.1",-]--[[package]]-name = "logos"-version = "0.16.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "eb2c55a318a87600ea870ff8c2012148b44bf18b74fad48d0f835c38c7d07c5f"-dependencies = [- "logos-derive 0.16.1",-]--[[package]]-name = "logos-codegen"-version = "0.15.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "192a3a2b90b0c05b27a0b2c43eecdb7c415e29243acc3f89cc8247a5b693045c"-dependencies = [- "beef",- "fnv",- "lazy_static",- "proc-macro2",- "quote",- "regex-syntax",- "rustc_version",- "syn 2.0.119",-]--[[package]]-name = "logos-codegen"-version = "0.16.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "58b3ffaa284e1350d017a57d04ada118c4583cf260c8fb01e0fe28a2e9cf8970"-dependencies = [- "fnv",- "proc-macro2",- "quote",- "regex-automata",- "regex-syntax",- "syn 2.0.119",-]--[[package]]-name = "logos-derive"-version = "0.15.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "605d9697bcd5ef3a42d38efc51541aa3d6a4a25f7ab6d1ed0da5ac632a26b470"-dependencies = [- "logos-codegen 0.15.1",-]--[[package]]-name = "logos-derive"-version = "0.16.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "52d3a9855747c17eaf4383823f135220716ab49bea5fbea7dd42cc9a92f8aa31"-dependencies = [- "logos-codegen 0.16.1",-]- [[package]] name = "lopdf" version = "0.36.0"@@ -2224,7 +2082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59fa2559e99ba0f26a12458aabc754432c805bbb8cba516c427825a997af1fb7" dependencies = [  "aes 0.8.4",- "bitflags 2.13.1",+ "bitflags 2.13.2",  "cbc 0.1.2",  "ecb",  "encoding_rs",@@ -2292,28 +2150,6 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" -[[package]]-name = "miette"-version = "7.6.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7"-dependencies = [- "cfg-if",- "miette-derive",- "unicode-width 0.1.14",-]--[[package]]-name = "miette-derive"-version = "7.6.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b"-dependencies = [- "proc-macro2",- "quote",- "syn 2.0.119",-]- [[package]] name = "minimal-lexical" version = "0.2.1"@@ -2341,15 +2177,11 @@ dependencies = [ ]  [[package]]-name = "ml_vulkan"+name = "modelrunner" version = "0.1.0" dependencies = [- "anyhow",  "ash",  "jni",- "log",- "onnx-vulkan",- "thiserror 2.0.20", ]  [[package]]@@ -2363,48 +2195,31 @@ dependencies = [ ]  [[package]]-name = "multimap"-version = "0.10.1"+name = "multiversion"+version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084"+checksum = "b4ca4bea16ffc3f443cf7d866912118196bfef4c6a1556ca00f9f9b00bb43f7c"+dependencies = [+ "multiversion-macros",+]  [[package]]-name = "naga"-version = "30.0.1"+name = "multiversion-macros"+version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130"+checksum = "0d416831a7317ef4b08bee00b69cbbb9c8763da7959a7026244d6266869f9c83" dependencies = [- "arrayvec",- "bit-set",- "bitflags 2.13.1",- "cfg-if",- "cfg_aliases",- "codespan-reporting",- "half",- "hashbrown 0.17.1",- "indexmap",- "libm",- "log",- "naga-types",- "num-traits",- "once_cell",- "rustc-hash 1.1.0",- "spirv",- "thiserror 2.0.20",- "unicode-ident",+ "proc-macro2",+ "quote",+ "rustversion",+ "syn 3.0.6", ]  [[package]]-name = "naga-types"-version = "30.0.1"+name = "multiversion_no_op"+version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49"-dependencies = [- "hashbrown 0.17.1",- "indexmap",- "rustc-hash 1.1.0",- "thiserror 2.0.20",-]+checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"  [[package]] name = "network_location_position_estimation_rust"@@ -2414,7 +2229,7 @@ dependencies = [  "jni",  "libc",  "log",- "rand 0.8.7",+ "rand 0.8.8",  "ruzstd", ] @@ -2465,7 +2280,7 @@ dependencies = [  "ldt_np_adv",  "nom 7.1.3",  "np_hkdf",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "serde",  "serde_json",@@ -2489,7 +2304,7 @@ dependencies = [  "crypto_provider_default",  "hex",  "ldt",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "serde_json",  "test_helper",@@ -2523,7 +2338,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [  "autocfg",- "libm", ]  [[package]]@@ -2566,49 +2380,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]]-name = "onnx-vulkan"-version = "0.0.1"-dependencies = [- "log",- "onnx-vulkan-core",- "onnx-vulkan-frontend",- "onnx-vulkan-tune",- "vk-compute",-]--[[package]]-name = "onnx-vulkan-core"-version = "0.0.1"-dependencies = [- "anyhow",- "log",- "sha2 0.11.0",- "vk-compute",-]--[[package]]-name = "onnx-vulkan-frontend"-version = "0.0.1"-dependencies = [- "log",- "onnx-vulkan-core",- "prost 0.14.4",- "prost-build",- "protox",-]--[[package]]-name = "onnx-vulkan-tune"-version = "0.0.1"-dependencies = [- "onnx-vulkan-core",- "onnx-vulkan-frontend",- "serde",- "serde_json",- "sha2 0.11.0",-]- [[package]] name = "oorandom" version = "11.1.5"@@ -2706,7 +2477,7 @@ dependencies = [  "lopdf",  "md-5 0.11.0",  "openjp2",- "rand 0.8.7",+ "rand 0.8.8",  "sha2 0.11.0",  "ttf-parser", ]@@ -2739,17 +2510,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]]-name = "petgraph"-version = "0.8.3"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455"-dependencies = [- "fixedbitset",- "hashbrown 0.15.5",- "indexmap",-]- [[package]] name = "phf" version = "0.13.1"@@ -2801,9 +2561,9 @@ dependencies = [  [[package]] name = "pic-scale"-version = "0.7.11"+version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d4c80d88d5c31215ceec2862abb2504860c715b8e2545a5ab15b62a3d097f30d"+checksum = "6edb0ff645d35accaec252de081d55984a0d6c952cb1e5dc2b9afa7c78f07288" dependencies = [  "num-traits",  "pxfm",@@ -2859,7 +2619,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2",  "crc32fast",  "fdeflate",  "flate2",@@ -2900,9 +2660,9 @@ dependencies = [  [[package]] name = "potential_utf"-version = "0.1.5"+version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [  "zerovec", ]@@ -2922,22 +2682,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]]-name = "presser"-version = "0.3.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"--[[package]]-name = "prettyplease"-version = "0.2.37"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"-dependencies = [- "proc-macro2",- "syn 2.0.119",-]- [[package]] name = "primeorder" version = "0.13.6"@@ -2975,36 +2719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [  "bytes",- "prost-derive 0.13.5",-]--[[package]]-name = "prost"-version = "0.14.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1"-dependencies = [- "bytes",- "prost-derive 0.14.4",-]--[[package]]-name = "prost-build"-version = "0.14.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042"-dependencies = [- "heck",- "itertools 0.14.0",- "log",- "multimap",- "petgraph",- "prettyplease",- "prost 0.14.4",- "prost-types",- "regex",- "syn 2.0.119",- "tempfile",+ "prost-derive", ]  [[package]]@@ -3020,40 +2735,6 @@ dependencies = [  "syn 2.0.119", ] -[[package]]-name = "prost-derive"-version = "0.14.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf"-dependencies = [- "anyhow",- "itertools 0.14.0",- "proc-macro2",- "quote",- "syn 2.0.119",-]--[[package]]-name = "prost-reflect"-version = "0.16.5"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "01b80ea363c31af2de2b92e3c07ed1156628f7838c4afb4df75ee78a37fedbd1"-dependencies = [- "logos 0.16.1",- "miette",- "prost 0.14.4",- "prost-types",-]--[[package]]-name = "prost-types"-version = "0.14.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a"-dependencies = [- "prost 0.14.4",-]- [[package]] name = "protobuf" version = "3.7.2"@@ -3105,38 +2786,11 @@ dependencies = [  "thiserror 1.0.69", ] -[[package]]-name = "protox"-version = "0.9.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4f25a07a73c6717f0b9bbbd685918f5df9815f7efba450b83d9c9dea41f0e3a1"-dependencies = [- "bytes",- "miette",- "prost 0.14.4",- "prost-reflect",- "prost-types",- "protox-parse",- "thiserror 2.0.20",-]--[[package]]-name = "protox-parse"-version = "0.9.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "072eee358134396a4643dff81cfff1c255c9fbd3fb296be14bdb6a26f9156366"-dependencies = [- "logos 0.15.1",- "miette",- "prost-types",- "thiserror 2.0.20",-]- [[package]] name = "psl"-version = "2.1.223"+version = "2.1.232" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c0dedad316e05de220cbf3fd8bfb69f3df8755dde2d7d479211827b595168a93"+checksum = "62834e308cc83aea5e30cd8c80b8aa82cdb104a3240c7f210d4f68d46e29f308" dependencies = [  "psl-types", ]@@ -3195,9 +2849,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"  [[package]] name = "rand"-version = "0.8.7"+version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a"+checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" dependencies = [  "libc",  "rand_chacha 0.3.1",@@ -3258,7 +2912,7 @@ version = "0.1.0" dependencies = [  "crypto_provider",  "log",- "rand 0.8.7",+ "rand 0.8.8",  "rand_pcg", ] @@ -3273,9 +2927,9 @@ dependencies = [  [[package]] name = "rangemap"-version = "1.7.1"+version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68"+checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d"  [[package]] name = "rayon"@@ -3313,7 +2967,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2", ]  [[package]]@@ -3367,12 +3021,6 @@ dependencies = [  "crossbeam-utils", ] -[[package]]-name = "rustc-hash"-version = "1.1.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"- [[package]] name = "rustc-hash" version = "2.1.3"@@ -3394,7 +3042,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2",  "errno",  "libc",  "linux-raw-sys 0.4.15",@@ -3403,11 +3051,11 @@ dependencies = [  [[package]] name = "rustix"-version = "1.1.4"+version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"+checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" dependencies = [- "bitflags 2.13.1",+ "bitflags 2.13.2",  "errno",  "libc",  "linux-raw-sys 0.12.1",@@ -3516,7 +3164,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [  "proc-macro2",  "quote",- "syn 3.0.3",+ "syn 3.0.6", ]  [[package]]@@ -3550,7 +3198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [  "cfg-if",- "cpufeatures 0.3.0",+ "cpufeatures 0.3.1",  "digest 0.11.3", ] @@ -3579,7 +3227,7 @@ dependencies = [  "jni",  "np_adv",  "p256",- "prost 0.13.5",+ "prost",  "rand_core 0.6.4",  "sha2 0.11.0",  "ukey2_connections",@@ -3607,6 +3255,12 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]]+name = "simdutf8"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"+ [[package]] name = "sink" version = "0.1.0"@@ -3648,15 +3302,6 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" -[[package]]-name = "spirv"-version = "0.4.0+sdk-1.4.341.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"-dependencies = [- "bitflags 2.13.1",-]- [[package]] name = "spki" version = "0.7.3"@@ -3739,9 +3384,9 @@ dependencies = [  [[package]] name = "syn"-version = "3.0.3"+version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"+checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" dependencies = [  "proc-macro2",  "quote",@@ -3750,13 +3395,13 @@ dependencies = [  [[package]] name = "synstructure"-version = "0.13.2"+version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"+checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [  "proc-macro2",  "quote",- "syn 2.0.119",+ "syn 3.0.6", ]  [[package]]@@ -3768,7 +3413,7 @@ dependencies = [  "fastrand",  "getrandom 0.4.3",  "once_cell",- "rustix 1.1.4",+ "rustix 1.1.5",  "windows-sys 0.61.2", ] @@ -3826,7 +3471,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [  "proc-macro2",  "quote",- "syn 3.0.3",+ "syn 3.0.6", ]  [[package]]@@ -3838,9 +3483,9 @@ dependencies = [  [[package]] name = "tinystr"-version = "0.8.3"+version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"+checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" dependencies = [  "displaydoc",  "zerovec",@@ -3858,18 +3503,9 @@ dependencies = [  [[package]] name = "tinyvec"-version = "1.13.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4cf0ded5c4e56918d8f8a339e1bb67d038d3bc6d144ac407904015ba2e4cde9b"-dependencies = [- "tinyvec_macros",-]--[[package]]-name = "tinyvec_macros"-version = "0.1.1"+version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"+checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"  [[package]] name = "tracing"@@ -3951,7 +3587,7 @@ dependencies = [  "crypto_provider_default",  "crypto_provider_rustcrypto",  "nom 7.1.3",- "rand 0.8.7",+ "rand 0.8.8",  "thiserror 2.0.20",  "ukey2_proto",  "ukey2_rs",@@ -3974,7 +3610,7 @@ dependencies = [  "crypto_provider_default",  "log",  "num-bigint",- "rand 0.8.7",+ "rand 0.8.8",  "sha2 0.11.0",  "ukey2_proto", ]@@ -3987,9 +3623,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"  [[package]] name = "unicode-ident"-version = "1.0.24"+version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"+checksum = "ab72a15cf68d77cb0987d3684aa8a45c5ef827e8cb49ee2f30bfd7ba2feb519f"  [[package]] name = "unicode-normalization"@@ -4006,18 +3642,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" -[[package]]-name = "unicode-width"-version = "0.1.14"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"--[[package]]-name = "unicode-width"-version = "0.2.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"- [[package]] name = "universal-hash" version = "0.5.1"@@ -4054,9 +3678,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"  [[package]] name = "uuid"-version = "1.24.0"+version = "1.26.1" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239"+checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [  "getrandom 0.4.3",  "js-sys",@@ -4073,7 +3697,7 @@ dependencies = [  "bytemuck",  "fearless_simd",  "guillotiere",- "hashbrown 0.17.1",+ "hashbrown",  "log",  "peniko",  "png",@@ -4090,7 +3714,7 @@ dependencies = [  "bytemuck",  "fearless_simd",  "guillotiere",- "hashbrown 0.17.1",+ "hashbrown",  "log",  "peniko",  "png",@@ -4106,7 +3730,7 @@ checksum = "6d8ded630e8316bb94a55881256506d1f3b9947b5f66db8a7d32ca7ba02decd0" dependencies = [  "bytemuck",  "glifo",- "hashbrown 0.17.1",+ "hashbrown",  "png",  "vello_common 0.0.8", ]@@ -4124,17 +3748,6 @@ dependencies = [  "jpeg-decoder", ] -[[package]]-name = "vk-compute"-version = "0.0.1"-dependencies = [- "anyhow",- "ash",- "gpu-allocator",- "log",- "naga",-]- [[package]] name = "vpn_wireguard" version = "0.1.0"@@ -4155,7 +3768,7 @@ dependencies = [  "jni",  "libc",  "parking_lot",- "rand 0.8.7",+ "rand 0.8.8",  "rand_core 0.6.4",  "thiserror 2.0.20",  "tracing",@@ -4191,9 +3804,9 @@ dependencies = [  [[package]] name = "wasm-bindgen"-version = "0.2.126"+version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"+checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" dependencies = [  "cfg-if",  "once_cell",@@ -4204,9 +3817,9 @@ dependencies = [  [[package]] name = "wasm-bindgen-macro"-version = "0.2.126"+version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"+checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" dependencies = [  "quote",  "wasm-bindgen-macro-support",@@ -4214,22 +3827,22 @@ dependencies = [  [[package]] name = "wasm-bindgen-macro-support"-version = "0.2.126"+version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"+checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" dependencies = [  "bumpalo",  "proc-macro2",  "quote",- "syn 2.0.119",+ "syn 3.0.6",  "wasm-bindgen-shared", ]  [[package]] name = "wasm-bindgen-shared"-version = "0.2.126"+version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"+checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" dependencies = [  "unicode-ident", ]@@ -4245,9 +3858,9 @@ dependencies = [  [[package]] name = "web-sys"-version = "0.3.103"+version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141"+checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" dependencies = [  "js-sys",  "wasm-bindgen",@@ -4504,9 +4117,9 @@ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"  [[package]] name = "writeable"-version = "0.6.3"+version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"  [[package]] name = "wycheproof"@@ -4553,7 +4166,7 @@ dependencies = [  "crypto_provider_default",  "hex",  "ldt_tbc",- "rand 0.8.7",+ "rand 0.8.8",  "rand_ext",  "rand_pcg",  "regex",@@ -4575,13 +4188,13 @@ dependencies = [  [[package]] name = "yoke-derive"-version = "0.8.2"+version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"+checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78" dependencies = [  "proc-macro2",  "quote",- "syn 2.0.119",+ "syn 3.0.6",  "synstructure", ] @@ -4626,13 +4239,13 @@ dependencies = [  [[package]] name = "zerofrom-derive"-version = "0.1.7"+version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"+checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [  "proc-macro2",  "quote",- "syn 2.0.119",+ "syn 3.0.6",  "synstructure", ] @@ -4658,9 +4271,9 @@ dependencies = [  [[package]] name = "zerotrie"-version = "0.2.4"+version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" dependencies = [  "displaydoc",  "yoke",@@ -4669,9 +4282,9 @@ dependencies = [  [[package]] name = "zerovec"-version = "0.11.6"+version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"+checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" dependencies = [  "yoke",  "zerofrom",@@ -4680,20 +4293,20 @@ dependencies = [  [[package]] name = "zerovec-derive"-version = "0.11.3"+version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"+checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [  "proc-macro2",  "quote",- "syn 2.0.119",+ "syn 3.0.6", ]  [[package]] name = "zlib-rs"-version = "0.6.7"+version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12"+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"  [[package]] name = "zmij"
Cargo.toml
diff --git a/Cargo.toml b/Cargo.tomlindex 554f8aa696..5453120dd3 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -146,7 +146,7 @@ subtle = "2.6.1" fips203 = "0.4.3" fips204 = "0.4.6" rand_core = { version = "0.6.4", features = ["getrandom"] }-rand = "0.8.5"+rand = { version = "0.8.5", default-features = true } getrandom = "0.2.15" # x509-cert / cms / spki / rsa removed with the PDF signature-creation feature. der = { version = "0.7.10", features = ["alloc", "oid"] }@@ -245,13 +245,3 @@ lto = true codegen-units = 1 strip = true panic = "abort"--# vk-compute c_char fix (ash 0.38): cargo only honours [patch] in the-# workspace root, so the override lives here; the member manifest documents-# it alongside the vendored tree per library/ml/src/main/rust/VENDORING.md.-[patch."https://github.com/automataIA/onnx-vulkan-rs"]-vk-compute = { path = "library/ml/src/main/rust/vendor/vk-compute" }-onnx-vulkan = { path = "library/ml/src/main/rust/vendor/onnx-vulkan" }-onnx-vulkan-core = { path = "library/ml/src/main/rust/vendor/onnx-vulkan-core" }-onnx-vulkan-frontend = { path = "library/ml/src/main/rust/vendor/onnx-vulkan-frontend" }-onnx-vulkan-tune = { path = "library/ml/src/main/rust/vendor/onnx-vulkan-tune" }
astronomy/src/main/rust/Cargo.toml
diff --git a/astronomy/src/main/rust/Cargo.toml b/astronomy/src/main/rust/Cargo.tomlindex 8f72db977c..0be44695f2 100644--- a/astronomy/src/main/rust/Cargo.toml+++ b/astronomy/src/main/rust/Cargo.toml@@ -11,10 +11,3 @@ crate-type = ["cdylib", "rlib"]  [dependencies] jni.workspace = true--[profile.release]-opt-level = 3-lto = true-codegen-units = 1-strip = true-panic = "abort"
build-logic/src/main/kotlin/RustNative.kt
diff --git a/build-logic/src/main/kotlin/RustNative.kt b/build-logic/src/main/kotlin/RustNative.ktindex 827dcd7501..1b92a64097 100644--- a/build-logic/src/main/kotlin/RustNative.kt+++ b/build-logic/src/main/kotlin/RustNative.kt@@ -164,8 +164,8 @@ fun Project.rustNativeLib(             // to date and the old bindings ship.             file("src/main/rust/schema").takeIf { it.isDirectory }?.let { inputs.dir(it) }             // Whole-crate safety net: track every source under src/main/rust so ANY-            // rust change invalidates cargoBuild - crucially the vendored dependency-            // crates under vendor/ (e.g. :library:ml's vendor/onnx-vulkan-core), which+            // rust change invalidates cargoBuild - crucially vendored dependency+            // crates under vendor/, which             // the path-specific inputs above do NOT cover. Before this, editing a             // vendored crate left the task UP-TO-DATE and shipped a stale .so. Exclude             // target/ because cargo writes this task's own .so there; folding build
camera/build.gradle.kts
diff --git a/camera/build.gradle.kts b/camera/build.gradle.ktsindex aed0520e70..a69c953393 100644--- a/camera/build.gradle.kts+++ b/camera/build.gradle.kts@@ -15,11 +15,10 @@ android {         applicationId = "com.vayunmathur.camera"     }     androidResources {-        // The ExecuTorch Vulkan model is staged the same way: ExecutorchSessions-        // copies it out of the APK before Module.load, so it must not be deflated.-        // Quantised weights barely deflate, and a compressed asset would have to-        // be inflated into a heap buffer first.-        noCompress += "pte"+        // selfie_segmentation.maml is read straight out of the APK by SelfieSegmenter, so+        // leave it uncompressed: fp16 weights barely deflate, and a compressed asset would+        // have to be inflated into a heap buffer before it could be uploaded.+        noCompress += "maml"     } } 
camera/src/main/assets/README.md
diff --git a/camera/src/main/assets/README.md b/camera/src/main/assets/README.mdindex a3566055c4..d2586175c6 100644--- a/camera/src/main/assets/README.md+++ b/camera/src/main/assets/README.md@@ -16,16 +16,6 @@ Run at 256×256 RGB, rescale 1/255 and **no** mean/std (`do_normalize: false` upstream), output a single 256×256 alpha channel through a sigmoid. Consumed by `SelfieSegmenter` from `BokehAnalyzer` and `PortraitBokeh.StillBokehRenderer`. -## `selfie_segmentation_vulkan_fp16.pte`--ExecuTorch export of the same MediaPipe family for the Vulkan delegate (fp16, ~275 KB):-`forward` takes `[1,3,256,256]` NCHW float32 — the planar buffer `stretchPlanar` already-produces, so there is no CHW→NHWC interleave — and returns `[1,1,256,256]`.-From https://huggingface.co/software-mansion/react-native-executorch-selfie-segmentation-(Apache-2.0; staged under `analysis/et-selfie/`, gitignored). This is the only selfie-runtime: a missing file, an unlinked Vulkan delegate, or a failed run fails closed-(no mask), with no `.tflite` fallback.- This replaces `erdnet.{param,bin}`, which was added in `72dde80df` with no upstream URL, license or conversion recipe. It was Caffe-derived from nihui's ncnn demo family, had no obtainable ONNX, and so could not be attributed or rebuilt — see
camera/src/main/assets/selfie_segmentation.maml
diff --git a/camera/src/main/assets/selfie_segmentation_vulkan_fp16.pte b/camera/src/main/assets/selfie_segmentation.mamlsimilarity index 73%rename from camera/src/main/assets/selfie_segmentation_vulkan_fp16.pterename to camera/src/main/assets/selfie_segmentation.mamlindex 3388e451b3..3c62b9472d 100644Binary files a/camera/src/main/assets/selfie_segmentation_vulkan_fp16.pte and b/camera/src/main/assets/selfie_segmentation.maml differ
camera/src/main/rust/Cargo.toml
diff --git a/camera/src/main/rust/Cargo.toml b/camera/src/main/rust/Cargo.tomlindex f12252bc74..a022032197 100644--- a/camera/src/main/rust/Cargo.toml+++ b/camera/src/main/rust/Cargo.toml@@ -24,10 +24,3 @@ jpeg-encoder = { version = "0.6.1", default-features = false } # crates (simba, wide, safe_arch, bytemuck, approx, paste, num-rational, # num-iter, nalgebra-macros). # rayon removed – was 6 crates (crossbeam-deque/epoch/utils/either/rayon-core) for par_iter in bundle/matching/stitch – now std iter (prefer stdlib)--[profile.release]-opt-level = 3-lto = true-codegen-units = 1-strip = true-panic = "abort"
cast/src/main/java/com/vayunmathur/cast/platform/CastController.kt
diff --git a/cast/src/main/java/com/vayunmathur/cast/platform/CastController.kt b/cast/src/main/java/com/vayunmathur/cast/platform/CastController.ktindex e48958e633..03264925ef 100644--- a/cast/src/main/java/com/vayunmathur/cast/platform/CastController.kt+++ b/cast/src/main/java/com/vayunmathur/cast/platform/CastController.kt@@ -131,7 +131,7 @@ object CastController {     internal val _device = MutableStateFlow<CastDevice?>(null)     val device: StateFlow<CastDevice?> = _device.asStateFlow() -    internal val _sessionState = MutableStateFlow<ClientState>()+    internal val _sessionState = MutableStateFlow(ClientState())     val sessionState: StateFlow<ClientState> = _sessionState.asStateFlow()      /** True from the moment a device is tapped until it is paired or refuses. */
cast/src/main/java/com/vayunmathur/cast/platform/remotedisplay/MaRemoteDisplayProvider.kt
diff --git a/cast/src/main/java/com/vayunmathur/cast/platform/remotedisplay/MaRemoteDisplayProvider.kt b/cast/src/main/java/com/vayunmathur/cast/platform/remotedisplay/MaRemoteDisplayProvider.ktindex 5fc0aa0dee..c6bd4b1f7d 100644--- a/cast/src/main/java/com/vayunmathur/cast/platform/remotedisplay/MaRemoteDisplayProvider.kt+++ b/cast/src/main/java/com/vayunmathur/cast/platform/remotedisplay/MaRemoteDisplayProvider.kt@@ -11,6 +11,9 @@ import com.vayunmathur.cast.domain.ClientState import com.vayunmathur.cast.platform.CastController import com.vayunmathur.cast.platform.CastPairActivity import com.vayunmathur.cast.platform.MirrorPhase+import com.vayunmathur.cast.platform.connect+import com.vayunmathur.cast.platform.disconnect+import com.vayunmathur.cast.platform.startDesktopMode import com.vayunmathur.library.ui.ExternalIntents import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers
cast/src/main/java/com/vayunmathur/cast/service/CastService.kt
diff --git a/cast/src/main/java/com/vayunmathur/cast/service/CastService.kt b/cast/src/main/java/com/vayunmathur/cast/service/CastService.ktindex 39d0c5db84..52706e71bd 100644--- a/cast/src/main/java/com/vayunmathur/cast/service/CastService.kt+++ b/cast/src/main/java/com/vayunmathur/cast/service/CastService.kt@@ -17,9 +17,13 @@ import androidx.core.content.IntentCompat import androidx.core.content.getSystemService import com.vayunmathur.cast.MainActivity import com.vayunmathur.cast.R+import com.vayunmathur.cast.domain.CastDevice import com.vayunmathur.cast.domain.ClientPhase+import com.vayunmathur.cast.domain.ClientState import com.vayunmathur.cast.platform.CastController import com.vayunmathur.cast.platform.MirrorPhase+import com.vayunmathur.cast.platform.disconnect+import com.vayunmathur.cast.platform.startMirroring import com.vayunmathur.library.util.ensureNotificationChannel import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers@@ -116,8 +120,12 @@ class CastService : Service() {             // instead of freezing on whatever was true when it started.             scope.launch {                 CastController.device-                    .combine(CastController.sessionState) { device, state -> device to state }-                    .combine(CastController.mirrorPhase) { pair, mirror -> Triple(pair.first, pair.second, mirror) }+                    .combine(CastController.sessionState) { device: CastDevice?, state: ClientState ->+                        device to state+                    }+                    .combine(CastController.mirrorPhase) { pair: Pair<CastDevice?, ClientState>, mirror: MirrorPhase ->+                        Triple(pair.first, pair.second, mirror)+                    }                     .collect { (device, state, mirror) ->                         if (device == null) return@collect                         getSystemService<NotificationManager>()
cast/src/main/java/com/vayunmathur/cast/service/ContentCastService.kt
diff --git a/cast/src/main/java/com/vayunmathur/cast/service/ContentCastService.kt b/cast/src/main/java/com/vayunmathur/cast/service/ContentCastService.ktindex 3af4fe3684..413af0b77c 100644--- a/cast/src/main/java/com/vayunmathur/cast/service/ContentCastService.kt+++ b/cast/src/main/java/com/vayunmathur/cast/service/ContentCastService.kt@@ -13,6 +13,11 @@ import android.os.RemoteException import android.util.Log import com.vayunmathur.cast.platform.CastController import com.vayunmathur.cast.platform.ContentSessionResult+import com.vayunmathur.cast.platform.playMedia+import com.vayunmathur.cast.platform.reportPlaybackState+import com.vayunmathur.cast.platform.sendPlaybackCommand+import com.vayunmathur.cast.platform.setNowPlaying+import com.vayunmathur.cast.platform.startContentSession import com.vayunmathur.cast.protocol.LyricLine import com.vayunmathur.cast.protocol.NowPlaying import com.vayunmathur.cast.protocol.PlayMedia
code/src/main/java/com/vayunmathur/code/ui/CodeEditorContent.kt
diff --git a/code/src/main/java/com/vayunmathur/code/ui/CodeEditorContent.kt b/code/src/main/java/com/vayunmathur/code/ui/CodeEditorContent.ktindex 7d5911044b..f7973b00e4 100644--- a/code/src/main/java/com/vayunmathur/code/ui/CodeEditorContent.kt+++ b/code/src/main/java/com/vayunmathur/code/ui/CodeEditorContent.kt@@ -1,5 +1,6 @@ package com.vayunmathur.code.ui +import androidx.compose.ui.text.drawText import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.drawscope.DrawScope
communicate/src/main/rust/Cargo.toml
diff --git a/communicate/src/main/rust/Cargo.toml b/communicate/src/main/rust/Cargo.tomlindex 69b2c4057e..f8dbc50cb5 100644--- a/communicate/src/main/rust/Cargo.toml+++ b/communicate/src/main/rust/Cargo.toml@@ -18,10 +18,3 @@ aes.workspace = true subtle.workspace = true rand_core.workspace = true jni.workspace = true--[profile.release]-opt-level = 3-lto = true-codegen-units = 1-panic = "abort"-strip = true
emergency/src/main/java/com/vayunmathur/emergency/ui/ViewInfoScreen.kt
diff --git a/emergency/src/main/java/com/vayunmathur/emergency/ui/ViewInfoScreen.kt b/emergency/src/main/java/com/vayunmathur/emergency/ui/ViewInfoScreen.ktindex c4eec91a71..4b972d7b17 100644--- a/emergency/src/main/java/com/vayunmathur/emergency/ui/ViewInfoScreen.kt+++ b/emergency/src/main/java/com/vayunmathur/emergency/ui/ViewInfoScreen.kt@@ -1,7 +1,6 @@ package com.vayunmathur.emergency.ui  import android.os.Bundle-import android.os.UserManager import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge@@ -23,7 +22,6 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.vayunmathur.emergency.R import com.vayunmathur.emergency.data.AllergyCriticality import com.vayunmathur.emergency.data.EmergencyInfo-import com.vayunmathur.emergency.data.EmergencyKeys import com.vayunmathur.emergency.platform.EmergencyUiState import com.vayunmathur.emergency.platform.EmergencyViewModel import com.vayunmathur.library.ui.Card@@ -53,10 +51,7 @@ class ViewInfoActivity : ComponentActivity() {         setContent {             DynamicTheme {                 val state by viewModel.state.collectAsStateWithLifecycle()-                ViewInfoScreen(-                    state = state,-                    ownerName = ownerName(),-                )+                ViewInfoScreen(state = state)             }         }     }@@ -65,18 +60,11 @@ class ViewInfoActivity : ComponentActivity() {         super.onResume()         viewModel.refresh()     }--    private fun ownerName(): String =-        runCatching { getSystemService(UserManager::class.java)?.userName.orEmpty() }-            .getOrDefault("") }  /** The read-only info + contacts view. Stateless; the activity wires the ViewModel. */ @Composable-fun ViewInfoScreen(-    state: EmergencyUiState,-    ownerName: String,-) {+fun ViewInfoScreen(state: EmergencyUiState) {     // Resolved up front: the LazyListScope content below is not itself @Composable,     // so stringResource() calls must happen here or inside item {} blocks.     val ownerLabel = stringResource(R.string.group_owner)@@ -84,7 +72,9 @@ fun ViewInfoScreen(     val allergiesLabel = stringResource(R.string.section_allergies)     val conditionsLabel = stringResource(R.string.section_conditions)     val medicationsLabel = stringResource(R.string.section_current_medications)-    val ownerRows = ownerRows(state.info, ownerName)+    val allergyHigh = stringResource(R.string.allergy_high)+    val allergyLow = stringResource(R.string.allergy_low)+    val ownerRows = ownerRows(state.info)     LazyListScaffold(         // No title and no actions: the scaffold draws no bar, so the content starts         // at the top. scrollBehavior is still required for the nested-scroll wiring.@@ -124,8 +114,8 @@ fun ViewInfoScreen(                     allergiesLabel,                     state.health.allergies.map { allergy ->                         val severity = when (allergy.criticality) {-                            AllergyCriticality.High -> stringResource(R.string.allergy_high)-                            AllergyCriticality.Low -> stringResource(R.string.allergy_low)+                            AllergyCriticality.High -> allergyHigh+                            AllergyCriticality.Low -> allergyLow                             AllergyCriticality.Unknown -> null                         }                         allergy.displayName to listOfNotNull(allergy.reaction, severity)@@ -209,15 +199,14 @@ private fun Segment(value: String, detail: String? = null, index: Int, count: In }  /**- * Owner group rows: lock-screen owner name first, then stored name/address when set.+ * Owner group rows: stored name/address when set. The group title already says+ * who this is, so rows carry just values (address keeps its detail line).  * Blood type / organ donor stay out: those live on the medical side, not the identity.  */ @Composable-private fun ownerRows(info: EmergencyInfo, ownerName: String): List<Pair<String, String?>> {+private fun ownerRows(info: EmergencyInfo): List<Pair<String, String?>> {     val rows = mutableListOf<Pair<String, String?>>()-    if (ownerName.isNotBlank()) rows += ownerName to null-    val nameLabel = stringResource(R.string.field_name)-    if (info.name.isNotBlank() && info.name != ownerName) rows += info.name to nameLabel+    if (info.name.isNotBlank()) rows += info.name to null     val addressLabel = stringResource(R.string.field_address)     if (info.address.isNotBlank()) rows += info.address to addressLabel     return rows
emergency/src/main/res/values/strings.xml
diff --git a/emergency/src/main/res/values/strings.xml b/emergency/src/main/res/values/strings.xmlindex 90888ad91e..01fbf7c5e6 100644--- a/emergency/src/main/res/values/strings.xml+++ b/emergency/src/main/res/values/strings.xml@@ -27,8 +27,6 @@     <!-- View screen: shown when neither medical info nor contacts are set. -->     <string name="no_info">No emergency information provided.</string> -    <!-- Edit screen: owner's name row. Noun. -->-    <string name="field_name">Name</string>     <!-- Edit screen: address row. Noun. -->     <string name="field_address">Address</string>     <!-- Edit screen: heading above the owner's picked identity. Noun phrase. -->
emergency/src/screenshotTest/kotlin/com/vayunmathur/emergency/ui/MetadataPreviews.kt
diff --git a/emergency/src/screenshotTest/kotlin/com/vayunmathur/emergency/ui/MetadataPreviews.kt b/emergency/src/screenshotTest/kotlin/com/vayunmathur/emergency/ui/MetadataPreviews.ktindex 94ab6fec89..825155f020 100644--- a/emergency/src/screenshotTest/kotlin/com/vayunmathur/emergency/ui/MetadataPreviews.kt+++ b/emergency/src/screenshotTest/kotlin/com/vayunmathur/emergency/ui/MetadataPreviews.kt@@ -48,7 +48,6 @@ class MetadataPreviews {                     loading = false,                     health = sampleHealthConnect(),                 ),-                ownerName = "Sam Rivera",             )         }     }
euicc/src/main/rust/Cargo.toml
diff --git a/euicc/src/main/rust/Cargo.toml b/euicc/src/main/rust/Cargo.tomlindex 1159f873db..81ea986239 100644--- a/euicc/src/main/rust/Cargo.toml+++ b/euicc/src/main/rust/Cargo.toml@@ -19,10 +19,3 @@ serde_json.workspace = true # Rust reaches the SM-DP+ over HTTP through the flat-framed JNI bridge in # library:network, so no TLS is linked into libeuicc.so. jni_http = { path = "../../../../library/jni-http/src/main/rust" }--[profile.release]-opt-level = 3-lto = true-codegen-units = 1-strip = true-panic = "abort"
games/chess/build.gradle.kts
diff --git a/games/chess/build.gradle.kts b/games/chess/build.gradle.ktsindex 886f4ddae3..7963be58e7 100644--- a/games/chess/build.gradle.kts+++ b/games/chess/build.gradle.kts@@ -14,10 +14,10 @@ android {         applicationId = "com.vayunmathur.games.chess"     }     androidResources {-        // The ExecuTorch Vulkan model is staged the same way: ExecutorchSessions-        // copies it out of the APK before Module.load, so it must not be deflated.-        // Quantised weights barely compress, so this costs nothing on download size.-        noCompress += "pte"+        // Maia3's weights are read in place through an `AssetFileDescriptor`, and+        // `AssetManager.openFd` throws for a deflated entry. Costs nothing on download size:+        // fp16 weights barely compress.+        noCompress += "maml"     } } 
games/chess/src/main/assets/README.md
diff --git a/games/chess/src/main/assets/README.md b/games/chess/src/main/assets/README.mdindex 30600e61fc..a8ff0f5eb9 100644--- a/games/chess/src/main/assets/README.md+++ b/games/chess/src/main/assets/README.md@@ -1,22 +1,69 @@-# `maia3_vulkan_int8wo.pte`+# `maia3-5m.maml`+ Maia3-5M, the chess AI. Converted from **[`UofTCSSLab/Maia3-5M`](https://huggingface.co/UofTCSSLab/Maia3-5M)**-(`maia3-5m.pt`, 20.0 MB fp32) to an ExecuTorch export for the Vulkan delegate-(int8 weight-only, 6.3 MB, torch-level cos ≥ 0.9990 vs the ship w4 rung):-`tokens [1,64,97]` (square-major), `self_elo`/`oppo_elo [1]` in, `moves [1,4352]`-out. Exported with executorch 1.5.0+cpu — see `analysis/et-maia/export_maia.py`-(gitignored staging, not shipped). This is the only Maia runtime: a missing file,-an unlinked Vulkan delegate, or a failed run fails closed (no move), with no-`.tflite` fallback.+(`maia3-5m.pt`, 20.0 MB fp32) to 6.8 MiB of int8.++Rebuild it byte for byte with:++    python scripts/ml/fetch_maia.py++which pins the upstream revision and the checkpoint's SHA-256, asserts the parameter inventory,+and writes this file. Committed rather than gitignored, for the same reason `:speech`'s voice+bundle is: a fresh checkout that silently ships a chess app with no opponent is worse than the+history.+ ## What it is-An encoder-only transformer over 64 square tokens - width 256, 8 blocks, 8 heads, 5,230,084++An encoder-only transformer over 64 square tokens — width 256, 8 blocks, 8 heads, 5,230,084 parameters. Upstream calls the architecture "Chessformer"; the code is [CSSLab/maia3](https://github.com/CSSLab/maia3).+ It **predicts human moves** rather than searching for good ones. One forward pass per move, no tree. Strength is a model input (`SelfElo` / `OppoElo`, 0..5000), so this one file covers all-four difficulty levels - see `Difficulty` in+four difficulty levels — see `Difficulty` in `games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.kt`.+ It replaces Stockfish and its 86 MB `nn-71d6d32cb962.nnue`, which is where the APK's ~79 MB-reduction comes from.+reduction comes from. It also removed the last personal JitPack fork from the tree; see+`SUPPLY_CHAIN_RISKS.md`.++## Precision++Every `1x1` convolution is int8, quantised per output channel; the norms, the biases and the+two elo embeddings stay fp16 and are 1% of the parameters. Worst per-tensor correlation against+fp32 is 0.999941.++That was chosen on **move agreement**, not on the cosine gate, because a cosine says nothing+about whether the model still picks the same move:++| | size | move agreement vs fp32 | disagreements wider than fp16 rounding |+|---|---|---|---|+| fp16 | 13.3 MiB | — | — |+| **int8, per channel** | **6.8 MiB** | **99.0–99.5%** | **0** |+| int4, per 16 | 4.2 MiB | 91.2% | 14 |+| int4, per channel | 3.5 MiB | 88.0% | 29 |++int4 is rejected: its disagreements are the model changing its mind, not losing a coin flip,+and sub-row grouping gives back most of the saving without fixing it. 5.2M parameters have no+redundancy to spare. Re-measure any of this with `python scripts/ml/maia_quant_eval.py`.++## How it is checked++* `scripts/ml/test/test_maia.py` — the converter's tensor order, the int8 triple, and the two+  structural rewrites (the fused q/k/v split, the eight-fold attention-bias replication),+  against a toy model.+* `scripts/ml/maia_parity.py` — the real weights through the Rust interpreter against the+  PyTorch reference, over `maia_parity_fixture.json`. Agreement on the best **legal** move as+  well as on the numbers, because a wrong board encoding still plays legal chess.+* `scripts/ml/maia_quant_eval.py` — what the quantisation costs, in moves, over hundreds of+  positions at every shipping rating.+* `MaiaEncodingTest` in `src/test/` — the board planes, the move vocabulary and perft.++The forward pass is `library/ml/src/main/rust/src/nets/maia.rs`, which documents the parts that+fail silently: the post-norm block order, the RMS norms, and why the attention bias is a grouped+convolution.+ ## Licence+ Maia3's weights are released by the University of Toronto's Computational Social Science Lab. See the model card at the link above for terms.
games/chess/src/main/assets/maia3-5m.maml
diff --git a/games/chess/src/main/assets/maia3-5m.maml b/games/chess/src/main/assets/maia3-5m.mamlnew file mode 100644index 0000000000..604f2827f4Binary files /dev/null and b/games/chess/src/main/assets/maia3-5m.maml differ
games/chess/src/main/assets/maia3_vulkan_int8wo.pte
diff --git a/games/chess/src/main/assets/maia3_vulkan_int8wo.pte b/games/chess/src/main/assets/maia3_vulkan_int8wo.ptedeleted file mode 100644index c7df58e7f4..0000000000Binary files a/games/chess/src/main/assets/maia3_vulkan_int8wo.pte and /dev/null differ
games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.kt
diff --git a/games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.kt b/games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.ktindex 74691fee44..3f9a9a38f7 100644--- a/games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.kt+++ b/games/chess/src/main/java/com/vayunmathur/games/chess/util/MaiaEngine.kt@@ -142,7 +142,7 @@ class MaiaEngine(private val context: Context) {         model?.let { return it }         if (closed || attempts >= MAX_ATTEMPTS) return null         attempts++-        val handle = MaiaHandle.inContext(context)+        val handle = MaiaHandle.inAssets(context.assets)         if (!handle.isAvailable) {             handle.close()             return null
games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/InventoryBlessings.kt
diff --git a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/InventoryBlessings.kt b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/InventoryBlessings.ktindex a09e0f6cee..1c1c3d318a 100644--- a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/InventoryBlessings.kt+++ b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/InventoryBlessings.kt@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding
gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 252bc6f080..fbf315e3b0 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -80,7 +80,6 @@ androidxTestCore = "1.7.0" androidxTestExtJunit = "1.3.0"  # Google libraries-# One key for the entire protobuf toolchain # One key for the entire protobuf toolchain — protobuf-java, protobuf-javalite and the protoc # compiler. Generated sources and the runtime that parses them must come from the same release, # so these are deliberately not separable: a bump here moves compiler and runtime together.@@ -108,15 +107,6 @@ apksig = "8.7.3" # JavaScript engines & HTML quickjs = "1.0.15" -# On-device AI-onnxruntimeAndroid = "1.27.0"-onnxruntimeReduced = "1.27.0-r1"-litertlmAndroid = "0.14.0"-litert = "2.1.0"-# ExecuTorch (XNNPACK-lowered .pte models, e.g. selfie segmentation). Maven Central-# latest stable; verified 1.4.0 on 2026-09-16 (org.pytorch:executorch-android).-executorch = "1.4.0"- # Git jgit = "7.8.0.202609011348-r" @@ -298,30 +288,6 @@ apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" } # JavaScript engines & HTML quickjs-kt = { module = "io.github.dokar3:quickjs-kt", version.ref = "quickjs" } -# On-device AI: reduced-operator ORT rebuild (arm64-only). Version tracks upstream plus an-# -rN suffix for the operator-set revision, so a rebuild with different ops gets a new version.-# CURRENTLY UNUSED: 1.27.0-r1 lacks Conv(11) and other vision ops. Kept pinned so the -r2-# rebuild has a base to extend. :library:ml uses the full build until then.-onnxruntime-reduced-android = { module = "io.github.vayun-mathur:onnxruntime-reduced-android", version.ref = "onnxruntimeReduced" }-# Full ONNX Runtime: every op, ~28 MB native. Temporary until the -r2 reduced rebuild.-onnxruntime-android = { module = "com.microsoft.onnxruntime:onnxruntime-android", version.ref = "onnxruntimeAndroid" }-# Conversational LLM (Gemma) via LiteRT-LM. litertlm 0.14.0 is compiled against coroutines-# 1.11.0 (close$default moved onto the SendChannel interface via -Xjvm-default=all); older-# versions crash its JNI callback with NoSuchMethodError, so keep kotlinxCoroutines at 1.11.0.-litertlm-android = { module = "com.google.ai.edge.litertlm:litertlm-android", version.ref = "litertlmAndroid" }-# LiteRT (TFLite) runtime for the quantized .tflite ladder (ladder_v2 ship rungs).-# Google Maven, single self-contained `litert` artifact (CompiledModel API +-# libLiteRt.so; no litert-api split yet at 2.1.0, so no duplicate-namespace clash).-litert-android = { module = "com.google.ai.edge.litert:litert", version.ref = "litert" }-# ExecuTorch runtime for XNNPACK-lowered .pte models. Single `executorch-android` AAR-# (org.pytorch.executorch.Module API + libexecutorch.so; fbjni/soloader come transitively).-executorch-android = { module = "org.pytorch:executorch-android", version.ref = "executorch" }-# fbjni + soloader: transitive deps of executorch-android above, pinned to the versions in its-# POM (0.7.0 / 0.10.5). Needed explicitly because :library:ml consumes the custom Vulkan AAR-# (library/ml/libs/) as a file dep, which carries no POM.-fbjni = { module = "com.facebook.fbjni:fbjni", version = "0.7.0" }-soloader-nativeloader = { module = "com.facebook.soloader:nativeloader", version = "0.10.5" }- # Git jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version.ref = "jgit" } 
install
diff --git a/install b/installindex 1e407461bf..9d55046d21 100755--- a/install+++ b/install@@ -23,8 +23,9 @@ Description:   - Installs via adb package sessions with the .idsig sidecar staged, so     updates to preinstalled MAOS system apps get fs-verity (plain     installDev/installRelease and `adb install` never stage it and always fail-    those updates). Auto-bumps -PversionCodeOverride when the on-device system-    package is at the same versionCode as the build.+    those updates). Auto-passes -PversionCodeOverride when the on-device+    package is at the same versionCode as the build: +1 for system apps,+    exactly the on-device version for user apps.  Examples:   ./install dev contacts                    -> :contacts:assembleDev + session install@@ -452,6 +453,12 @@ device_version_code() {     | sed -nE 's/^package:\S+[[:space:]]+versionCode:([0-9]+).*/\1/p' | head -1 } +# exit 0 when the package is installed as a system app.+is_system_app() {+  "$ADB_BIN" -s "$TARGET_SERIAL" shell pm list packages -s "$1" 2>/dev/null \+    | tr -d '\r' | grep -qFx "package:$1"+}+ install_apk_via_session() {   local apk="$1" package_id="$2"   local apk_name apk_size session device_apk idsig device_idsig commit_out@@ -523,9 +530,9 @@ fi  # --- versionCodeOverride: MAOS refuses to update a system package to the same # versionCode, so an APK built from the same version.txt as the on-device OS image-# can never be installed over it. Query the device once; if any requested package-# is installed at >= the repo version, bump every built APK by one (version.txt-# itself stays untouched).+# can never be installed over it. Query the device once; for system apps bump to+# one above the on-device version, for user apps just match it exactly+# (version.txt itself stays untouched). REPO_VERSION="$(sed -n '1p' "$ROOT/version.txt" | tr -d '\r' | xargs)" NEED_BUMP="$REPO_VERSION" if [[ -n "$TARGET_SERIAL" ]]; then@@ -535,8 +542,17 @@ if [[ -n "$TARGET_SERIAL" ]]; then     if [[ -n "$pkg" ]]; then       dev_v="$(device_version_code "$pkg")"       if [[ -n "$dev_v" && "$dev_v" -ge "$NEED_BUMP" ]]; then-        echo "Info: $pkg is at versionCode $dev_v on-device (>= repo $REPO_VERSION); will build with -PversionCodeOverride=$((dev_v + 1))."-        NEED_BUMP=$((dev_v + 1))+        if is_system_app "$pkg"; then+          target=$((dev_v + 1))+          kind="system app"+        else+          target=$dev_v+          kind="user app"+        fi+        if [[ "$target" -gt "$NEED_BUMP" ]]; then+          NEED_BUMP=$target+          echo "Info: $pkg is a $kind at versionCode $dev_v on-device (>= repo $REPO_VERSION); will build with -PversionCodeOverride=$target."+        fi       fi     fi     idx=$((idx + 1))
install.ps1
diff --git a/install.ps1 b/install.ps1index b89406afa4..c364ca180b 100644--- a/install.ps1+++ b/install.ps1@@ -39,8 +39,9 @@ Description:   - Installs via adb package sessions with the .idsig sidecar staged, so     updates to preinstalled MAOS system apps get fs-verity (plain     installDev/installRelease and `adb install` never stage it and always fail-    those updates). Auto-bumps -PversionCodeOverride when the on-device system-    package is at the same versionCode as the build.+    those updates). Auto-passes -PversionCodeOverride when the on-device+    package is at the same versionCode as the build: +1 for system apps,+    exactly the on-device version for user apps.  Examples:   ./install dev contacts                    -> :contacts:assembleDev + session install@@ -431,7 +432,7 @@ function Get-DeviceVersions([string]$adbBin, [string]$serial, [string[]]$package         $listed = Invoke-Adb $adbBin @('-s', $serial, 'shell', 'pm', 'list', 'packages', '--show-versioncode')         $out = @($listed.Output)         foreach ($line in $out) {-            $m = [regex]::Match($line, '^package:(\S+)\s+versionCode:(\d+)')+            $m = [regex]::Match($line.Trim(), '^package:(\S+)\s+versionCode:(\d+)')             if ($m.Success -and ($packageIds -contains $m.Groups[1].Value)) {                 $versions[$m.Groups[1].Value] = [int]$m.Groups[2].Value             }@@ -443,6 +444,25 @@ function Get-DeviceVersions([string]$adbBin, [string]$serial, [string[]]$package     return $versions } +function Get-DeviceSystemApps([string]$adbBin, [string]$serial, [string[]]$packageIds) {+    $systemApps = @()+    if (-not $adbBin -or -not $serial) { return $systemApps }+    try {+        $listed = Invoke-Adb $adbBin @('-s', $serial, 'shell', 'pm', 'list', 'packages', '-s')+        $out = @($listed.Output)+        foreach ($line in $out) {+            $m = [regex]::Match($line.Trim(), '^package:(\S+)$')+            if ($m.Success -and ($packageIds -contains $m.Groups[1].Value)) {+                $systemApps += $m.Groups[1].Value+            }+        }+    }+    catch {+        Write-Host 'Warning: could not query device system packages; treating all as user apps.'+    }+    return $systemApps+}+ function Install-ApkViaSession([string]$adbBin, [string]$serial, [string]$apk, [string]$packageId) {     $apkSize = (Get-Item -LiteralPath $apk).Length     $apkName = Split-Path -Leaf $apk@@ -519,10 +539,11 @@ if ($allExpanded) {  # --- versionCodeOverride: MAOS refuses to update a system package to the same # versionCode, so an APK built from the same version.txt as the on-device OS image-# can never be installed over it. Query the device once; if any requested package-# is installed at >= the repo version, bump every built APK by one (version.txt-# itself stays untouched).-$repoVersion = Get-RepoVersionCode+# can never be installed over it. Query the device once; for system apps bump to+# one above the on-device version, for user apps just match it exactly+# (version.txt itself stays untouched).+$baseVersion = Get-RepoVersionCode+$repoVersion = $baseVersion $packageIds = @() $packageByModule = @{} foreach ($mod in $normalizedModules) {@@ -533,11 +554,23 @@ foreach ($mod in $normalizedModules) {     } } $deviceVersions = Get-DeviceVersions $adb $target $packageIds+$systemApps = Get-DeviceSystemApps $adb $target $packageIds $needBump = $false foreach ($pkg in $packageIds) {     if ($deviceVersions.ContainsKey($pkg) -and $deviceVersions[$pkg] -ge $repoVersion) {-        Write-Host "Info: $pkg is at versionCode $($deviceVersions[$pkg]) on-device (>= repo $repoVersion); will build with -PversionCodeOverride=$($deviceVersions[$pkg] + 1)."-        if (($deviceVersions[$pkg] + 1) -gt $repoVersion) { $repoVersion = $deviceVersions[$pkg] + 1; $needBump = $true }+        if ($systemApps -contains $pkg) {+            $targetVersion = $deviceVersions[$pkg] + 1+            $kind = 'system app'+        }+        else {+            $targetVersion = $deviceVersions[$pkg]+            $kind = 'user app'+        }+        if ($targetVersion -gt $repoVersion) {+            $repoVersion = $targetVersion+            $needBump = $true+            Write-Host "Info: $pkg is a $kind at versionCode $($deviceVersions[$pkg]) on-device (>= repo $baseVersion); will build with -PversionCodeOverride=$targetVersion."+        }     } } if ($needBump) {
library/downloadservice/src/main/java/com/vayunmathur/library/downloadservice/ModelUrls.kt
diff --git a/library/downloadservice/src/main/java/com/vayunmathur/library/downloadservice/ModelUrls.kt b/library/downloadservice/src/main/java/com/vayunmathur/library/downloadservice/ModelUrls.ktindex 916c3ee6f6..12e328f7ff 100644--- a/library/downloadservice/src/main/java/com/vayunmathur/library/downloadservice/ModelUrls.kt+++ b/library/downloadservice/src/main/java/com/vayunmathur/library/downloadservice/ModelUrls.kt@@ -6,90 +6,126 @@ package com.vayunmathur.library.downloadservice  * The server must host each file under https://data.vayunmathur.com/models/  * and set Content-Length + ETag.  *- * # Gemma 4 is one file on LiteRT-LM+ * # Gemma 4 is five files, not one  *- * The chat LLM is `litert-community/gemma-4-E2B-it-litert-lm` (Apache-2.0),- * the `gemma-4-E2B-it.litertlm` bundle (~2.6 GB, CPU backend), run on the- * LiteRT-LM runtime via `Gemma4Engine` in `:openassistant`. It must be present- * before the assistant will start.+ * The single `.litertlm` was replaced by this repo's own `.maml` format when `:openassistant`+ * moved off `com.google.ai.edge.litertlm` onto `:library:ml`. Several files rather than one because+ * they have different lifetimes and different readers:+ *+ *   * the decoder, which the GPU binds,+ *   * the embedding, which only the host reads a row at a time and which is therefore its own+ *     graph rather than tensors inside the decoder,+ *   * the tokenizer table, which is tiny and is read once into memory,+ *   * the vision tower and the audio tower, each of which is a separate encoder that produces+ *     soft tokens in the decoder's embedding space.+ *+ * The first three must be present before the assistant will start - see `Gemma4Handle.FILES`.+ * The two encoders are optional at load: a device that never sends a picture or a clip still+ * answers text.+ *+ * To populate the mirror, produce the files from the ONNX export and upload them:+ *+ *   models/gemma4_text.maml+ *     <- python3 scripts/ml/maml_convert.py decoder_model_merged_fp16.onnx \+ *          --graph gemma4_text -o gemma4_text.maml+ *   models/gemma4_embed.maml+ *     <- python3 scripts/ml/maml_convert.py embed_tokens_fp16.onnx \+ *          --graph gemma4_embed -o gemma4_embed.maml+ *   models/gemma4_tokenizer.spm1+ *     <- python3 scripts/ml/gemma4_tokenizer.py --tokenizer tokenizer.json \+ *          -o gemma4_tokenizer.spm1+ *   models/gemma4_vision.maml+ *     <- python3 scripts/ml/maml_convert.py vision_encoder_fp16.onnx \+ *          --graph gemma4_vision -o gemma4_vision.maml+ *   models/gemma4_audio.maml+ *     <- python3 scripts/ml/maml_convert.py audio_encoder_fp16.onnx \+ *          --graph gemma4_audio -o gemma4_audio.maml+ *+ * The ONNX inputs are `onnx-community/gemma-4-E2B-it-ONNX`, which is Apache-2.0 and ungated.  */ object ModelUrls {     const val MIRROR_BASE = "https://data.vayunmathur.com/models/" -    /** The litertlm bundle (CPU; vision/audio towers included in the bundle). */-    const val GEMMA_LITERTLM_FILE = "gemma-4-E2B-it.litertlm"-    const val GEMMA_LITERTLM_URL = "${MIRROR_BASE}gemma-4-E2B-it.litertlm"-    const val GEMMA_LITERTLM_SHA256 =-        "181938105e0eefd105961417e8da75903eacda102c4fce9ce90f50b97139a63c"+    /** The decoder: 35 layers at int4 with per-block scales. */+    const val GEMMA_TEXT_FILE = "gemma4_text.maml"+    const val GEMMA_TEXT_URL = "${MIRROR_BASE}gemma4_text.maml"+    const val GEMMA_TEXT_SHA256 =+        "f9043d69180c209ac57db30179bbca75342991a8a2fa6899916cff05cc155620"++    /** The two embedding tables, gathered on the host. */+    const val GEMMA_EMBED_FILE = "gemma4_embed.maml"+    const val GEMMA_EMBED_URL = "${MIRROR_BASE}gemma4_embed.maml"+    const val GEMMA_EMBED_SHA256 =+        "b1ca4f34c3f2a05a71cb231e8b1e3795267b2550b87dd51d49ea15f84c0ef90a" -    val GEMMA_LITERTLM =-        ModelDownloadItem(GEMMA_LITERTLM_URL, GEMMA_LITERTLM_FILE, "Gemma 4", GEMMA_LITERTLM_SHA256)+    /** The BPE table: 262144 pieces, 514906 merges, byte fallback. */+    const val GEMMA_TOKENIZER_FILE = "gemma4_tokenizer.spm1"+    const val GEMMA_TOKENIZER_URL = "${MIRROR_BASE}gemma4_tokenizer.spm1"+    const val GEMMA_TOKENIZER_SHA256 =+        "bfb34775a267c98b4062edbd91848865fdf05583b9df3a49e6eab7a0ee251383"      /**-     * The ExecuTorch SpinQuant `.pte` (Vulkan 8da4w, text-only) plus its BPE table, served-     * by `Gemma4EtEngine` when present.+     * The vision tower: 16 layers at int4, with the patch and output projections left at fp16.      *-     * SHAs verified against the staged files in `analysis/et-gemma/`; `GEMMA_LITERTLM`-     * untouched. Neither file is in [INITIAL] — first launch must not gate on them.-     * `ensureLoaded` resolves them opportunistically; absent means "litertlm serves",-     * never a throw.+     * Optional, and deliberately not in the same download as the decoder. It is 93 MB on top of+     * 2.8 GB, a device that never sends a picture never needs it, and the assistant answers text+     * perfectly well without it - see `Gemma4Engine.canSeeImages`.      */-    const val GEMMA_ET_FILE = "gemma-4-e2b-vulkan-8da4w.pte"-    const val GEMMA_ET_URL = "${MIRROR_BASE}openassistant/gemma-4-e2b-vulkan-8da4w.pte"-    const val GEMMA_ET_SHA256 =-        "f57a627f9fc487003913be05c1d4d5ac75f6473550809c0a345e91c10a428e2a"+    const val GEMMA_VISION_FILE = "gemma4_vision.maml"+    const val GEMMA_VISION_URL = "${MIRROR_BASE}gemma4_vision.maml"+    const val GEMMA_VISION_SHA256 =+        "4c53c0a8383f2ea99f8beed50bd5eac203565436313d0c2dd77b389ea1cf38e3" -    const val GEMMA_ET_TOKENIZER_FILE = "gemma4_et_tokenizer.json"-    const val GEMMA_ET_TOKENIZER_URL = "${MIRROR_BASE}openassistant/gemma_tokenizer.json"-    const val GEMMA_ET_TOKENIZER_SHA256 =-        "4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795"+    /**+     * The audio tower: a 12-layer conformer at int4, with the three end projections, the two+     * subsampling convolutions, the twelve depthwise convolutions and the twelve+     * relative-position tables all left at fp16.+     *+     * Optional on the same terms as the vision tower. 166 MB, and a device that never sends a+     * clip never needs it.+     */+    const val GEMMA_AUDIO_FILE = "gemma4_audio.maml"+    const val GEMMA_AUDIO_URL = "${MIRROR_BASE}gemma4_audio.maml"+    const val GEMMA_AUDIO_SHA256 =+        "be3ac4f968835fa257291f0845be642750f71e63e197a6e199ad5210316cb4f2" -    val GEMMA_ET = ModelDownloadItem(GEMMA_ET_URL, GEMMA_ET_FILE, "Gemma 4 ET", GEMMA_ET_SHA256)-    val GEMMA_ET_TOKENIZER = ModelDownloadItem(-        GEMMA_ET_TOKENIZER_URL, GEMMA_ET_TOKENIZER_FILE, "Gemma 4 ET tokenizer",-        GEMMA_ET_TOKENIZER_SHA256,+    val GEMMA_TEXT =+        ModelDownloadItem(GEMMA_TEXT_URL, GEMMA_TEXT_FILE, "Model", GEMMA_TEXT_SHA256)+    val GEMMA_EMBED =+        ModelDownloadItem(GEMMA_EMBED_URL, GEMMA_EMBED_FILE, "Embeddings", GEMMA_EMBED_SHA256)+    val GEMMA_TOKENIZER = ModelDownloadItem(+        GEMMA_TOKENIZER_URL,+        GEMMA_TOKENIZER_FILE,+        "Tokenizer",+        GEMMA_TOKENIZER_SHA256,     )-+    val GEMMA_VISION =+        ModelDownloadItem(GEMMA_VISION_URL, GEMMA_VISION_FILE, "Vision", GEMMA_VISION_SHA256)+    val GEMMA_AUDIO =+        ModelDownloadItem(GEMMA_AUDIO_URL, GEMMA_AUDIO_FILE, "Audio", GEMMA_AUDIO_SHA256)      /**-     * Everything downloaded on OpenAssistant first launch: the single litertlm bundle.+     * Everything downloaded on OpenAssistant first launch.+     *+     * Smallest first, so a user on a slow connection sees progress early and so the two large+     * files are the ones a resume is most likely to land in the middle of. The two encoders go+     * after the tokenizer and before the two large ones: together they are 259 MB, they are what+     * make the assistant able to answer about a photograph or a recording, and a resume that+     * stalls in the decoder should not leave them unfetched.      */-    val INITIAL = listOf(-        GEMMA_LITERTLM,-    )+    val INITIAL = listOf(GEMMA_TOKENIZER, GEMMA_VISION, GEMMA_AUDIO, GEMMA_TEXT, GEMMA_EMBED)      /**      * Files an earlier build downloaded and this one does not use.      *-     * Deleted on startup rather than left to rot: the ONNX set alone was ~3.4 GB, and a-     * user upgrading would otherwise carry both copies forever. (The `gemma-4-E2B-it.litertlm`-     * name stays listed because pre-ONNX builds predated it; the current bundle reuses the-     * name, so a fresh download lands after this cleanup runs — order matters, and-     * `InitialModelDownloadChecker` runs after `cleanupLegacyModelFile`.)-     *-     * The ET pair (`GEMMA_ET_FILE`, `GEMMA_ET_TOKENIZER_FILE`) is deliberately NOT listed:-     * they are opportunistically resolved, never required, so a partial download must not-     * be deleted out from under a future `ensureLoaded`.+     * Deleted on startup rather than left to rot: the litertlm bundle alone was several+     * gigabytes, and a user upgrading would otherwise carry both copies forever.      */     val OBSOLETE = listOf(         "gemma4-2b.litertlm",+        "gemma-4-E2B-it.litertlm",         "gemma4.litertlm",         "gemma4-4b.litertlm",-        "gemma4_text.maml",-        "gemma4_embed.maml",-        "gemma4_tokenizer.spm1",-        "gemma4_vision.maml",-        "gemma4_audio.maml",-        "gemma4_prefix.kv",-        "decoder_model_merged_q4f16.onnx",-        "decoder_model_merged_q4f16.onnx_data",-        "embed_tokens_q4f16.onnx",-        "embed_tokens_q4f16.onnx_data",-        "tokenizer.json",-        "vision_encoder_q4f16.onnx",-        "vision_encoder_q4f16.onnx_data",-        "audio_encoder_q4f16.onnx",-        "audio_encoder_q4f16.onnx_data",     ) } 
library/e2ee-p2p/src/main/rust/Cargo.toml
diff --git a/library/e2ee-p2p/src/main/rust/Cargo.toml b/library/e2ee-p2p/src/main/rust/Cargo.tomlindex 35d0fdb89d..50ea2a9fa0 100644--- a/library/e2ee-p2p/src/main/rust/Cargo.toml+++ b/library/e2ee-p2p/src/main/rust/Cargo.toml@@ -16,10 +16,3 @@ sha2.workspace = true sha3.workspace = true jni.workspace = true rand_core = { version = "0.6", features = ["getrandom"] }--[profile.release]-opt-level = 3-lto = true-codegen-units = 1-panic = "abort"-strip = true
library/map/src/main/java/com/vayunmathur/library/map/CameraState.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/CameraState.kt b/library/map/src/main/java/com/vayunmathur/library/map/CameraState.ktindex 0dbfe01394..b366429696 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/CameraState.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/CameraState.kt@@ -65,6 +65,30 @@ data class CameraPosition( class CameraState(initial: CameraPosition = CameraPosition()) {     var position: CameraPosition by mutableStateOf(initial) +    /**+     * Whether to draw a true-3D-sphere globe instead of the flat Mercator map.+     *+     * Off by default, so every existing host is unchanged. Set from `VectorMap`'s+     * `globeEnabled` param (itself default-off; only `maps` opts in). Transient like+     * [viewportDp]: owned by the host's composition, not persisted in the saver.+     *+     * While on, the "fill" zoom floor is bypassed (a globe is a ball with space+     * around it, not a plane that must cover the viewport) and [projection] uses+     * the orthographic-sphere branch below [GLOBE_DETAIL_ZOOM]. Past that zoom the+     * sphere is indistinguishable from flat, so the projection and the renderer+     * both use the flat path bit-identically (this mirrors the native+     * `GLOBE_FLAT_THRESHOLD`, which must stay in step).+     */+    var globeEnabled: Boolean by mutableStateOf(false)++    /**+     * Which body the globe draws once active. Earth is the vector basemap;+     * Moon is the NASA SVS raster pair. Session-scoped (owned by the host's+     * composition like [globeEnabled], never persisted) and only read while the+     * globe is active — setting Moon without the globe changes nothing.+     */+    var body: MapBody by mutableStateOf(MapBody.Earth)+     /** Viewport size in logical (dp) units; null until first layout. */     internal var viewportDp: Size? by mutableStateOf(null) @@ -91,6 +115,9 @@ class CameraState(initial: CameraPosition = CameraPosition()) {      */     internal fun setViewport(size: Size) {         viewportDp = size+        // A globe is a ball with space around it, not a plane that must cover the+        // viewport — enforcing the fill floor would forbid zooming out to the globe.+        if (globeEnabled) return         val floor = fillZoom(size)         if (position.zoom < floor) position = position.copy(zoom = floor)     }@@ -111,7 +138,11 @@ class CameraState(initial: CameraPosition = CameraPosition()) {      */     val projection: Projection? by derivedStateOf {         viewportDp?.let { vp ->-            Projection(position.target, position.zoom, vp.width, vp.height, position.pitch, position.bearing, labelQueryProvider, markerPickProvider)+            Projection(+                position.target, position.zoom, vp.width, vp.height,+                position.pitch, position.bearing, labelQueryProvider, markerPickProvider,+                globe = globeEnabled && position.zoom < GLOBE_DETAIL_ZOOM,+            )         }     } @@ -181,7 +212,9 @@ class CameraState(initial: CameraPosition = CameraPosition()) {      /** Clamps [zoom] to [minZoom]..[maxZoom], never below the "fill" floor for [vp]. */     private fun clampZoom(zoom: Double, vp: Size, minZoom: Double, maxZoom: Double): Double =-        zoom.coerceIn(maxOf(minZoom, fillZoom(vp)), maxZoom)+        // Globe: no fill floor (see `setViewport`).+        if (globeEnabled) zoom.coerceIn(minZoom, maxZoom)+        else zoom.coerceIn(maxOf(minZoom, fillZoom(vp)), maxZoom)      /**      * Applies a transform gesture, anchoring the geographic point under@@ -206,8 +239,8 @@ class CameraState(initial: CameraPosition = CameraPosition()) {         rotateEnabled: Boolean = true,     ) {         val vp = viewportDp ?: return-        // Never zoom out past a full-screen world.-        val effectiveMinZoom = maxOf(minZoom, fillZoom(vp))+        // Never zoom out past a full-screen world — unless a globe, which has space around it.+        val effectiveMinZoom = if (globeEnabled) minZoom else maxOf(minZoom, fillZoom(vp))         var zoom = position.zoom          // Pan: dragging content one way shifts the world the same way, so the
library/map/src/main/java/com/vayunmathur/library/map/MapNative.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/MapNative.kt b/library/map/src/main/java/com/vayunmathur/library/map/MapNative.ktindex ecf584a01b..e4f31841a6 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/MapNative.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/MapNative.kt@@ -82,8 +82,41 @@ internal object MapNative {         heightDp: Float,         density: Float,         frameTimeNanos: Long,+        /**+         * Nonzero draws the orthographic-sphere globe rather than the flat map.+         * A trailing `Boolean` (not a `create` argument) so toggling it never+         * rebuilds the renderer — the next frame just takes the other matrix+         * branch, exactly like `dark`/`muted` ride `setPalette`. Ignored past+         * the detail threshold, where both sides use the flat path.+         */+        globe: Boolean,+        /**+         * Nonzero draws the Moon (NASA SVS raster pair) instead of the Earth+         * vector basemap. Only read while [globe] is active — a zoomed-in Moon+         * reads as Earth. The textures arrive separately via [setMoonTextures];+         * unset textures with Moon selected draws the globe clear colour, not a+         * crash.+         */+        moon: Boolean,     ): Boolean +    /**+     * Upload the Moon raster pair: [colorRgba] is `width x height` RGBA8 (the+     * converted LROC color), [demRg] is `demWidth x demHeight` RG8 packed uint16+     * half-metres + 20000 (the converted LDEM). Called once after attach (and+     * again after any re-attach, like every other deferred state); the bytes+     * are copied to the GPU, so the caller retains nothing.+     */+    external fun setMoonTextures(+        handle: Long,+        colorRgba: ByteArray,+        width: Int,+        height: Int,+        demRg: ByteArray,+        demWidth: Int,+        demHeight: Int,+    )+     external fun resize(handle: Long, width: Int, height: Int)      /**
library/map/src/main/java/com/vayunmathur/library/map/MapOptions.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/MapOptions.kt b/library/map/src/main/java/com/vayunmathur/library/map/MapOptions.ktindex 7200bd7a75..12f16745ab 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/MapOptions.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/MapOptions.kt@@ -58,6 +58,20 @@ data class MapOptions(     val tileSource: TileSource = TileSource.Server, ) +/**+ * Which planetary body the map draws.+ *+ * Earth is the vector basemap this library has always drawn. Moon is the NASA+ * SVS CGI Moon Kit raster pair (LROC color + LOLA elevation) bent onto the same+ * globe path — maps-only, session-scoped, and only meaningful while the globe+ * is active (zoomed out). Every other host keeps the default without knowing+ * this exists.+ */+enum class MapBody {+    Earth,+    Moon,+}+ /**  * Where the renderer reads its tiles from.  */
library/map/src/main/java/com/vayunmathur/library/map/Projection.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/Projection.kt b/library/map/src/main/java/com/vayunmathur/library/map/Projection.ktindex 9a760cb5aa..094cabfc1b 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/Projection.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/Projection.kt@@ -3,8 +3,12 @@ package com.vayunmathur.library.map import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.DpRect import androidx.compose.ui.unit.dp+import kotlin.math.PI+import kotlin.math.asin+import kotlin.math.atan2 import kotlin.math.cos import kotlin.math.sin+import kotlin.math.sqrt  /**  * One tile-baked placed label hit by [Projection.queryRenderedLabels].@@ -65,6 +69,13 @@ class Projection internal constructor(     private val bearingDeg: Double = 0.0,     private val labelQuery: ((DpRect, Set<String>) -> List<PlacedLabel>)? = null,     private val markerPick: ((Float, Float) -> Long)? = null,+    /**+     * Whether this projection draws the orthographic-sphere globe rather than+     * the flat Mercator map. False for every host but `maps` with the globe+     * toggle on (and always false past [GLOBE_DETAIL_ZOOM], where the sphere is+     * indistinguishable from flat — see [CameraState.globeEnabled]).+     */+    private val globe: Boolean = false, ) {     private val halfW = widthDp / 2.0     private val halfH = heightDp / 2.0@@ -77,6 +88,7 @@ class Projection internal constructor(      /** Screen location (from the viewport top-left) of a geographic [position]. */     fun screenLocationFromPosition(position: GeoPoint): DpOffset {+        if (globe) return globeScreenLocationFromPosition(position)         val c = Mercator.project(center.longitude, center.latitude, zoom)         val p = Mercator.project(position.longitude, position.latitude, zoom)         val dx = p.x - c.x@@ -121,6 +133,7 @@ class Projection internal constructor(      * readback — both of which are terrain-correct because they read what was actually drawn.      */     fun positionFromScreenLocation(offset: DpOffset): GeoPoint {+        if (globe) return globePositionFromScreenLocation(offset)         val c = Mercator.project(center.longitude, center.latitude, zoom)         val sx: Double         val sy: Double@@ -152,8 +165,110 @@ class Projection internal constructor(         return Mercator.unproject(c.x + cos * sx - sin * sy, c.y + sin * sx + cos * sy, zoom)     } +    /**+     * Orthographic-sphere forward projection: lon/lat to the screen point, or far+     * off-screen when the point is on the far side of the planet.+     *+     * Mirrors the native `globe_project` exactly: the same [GLOBE_DETAIL_ZOOM]+     * sphere radius, the same 3D basis, so Compose overlays land where the+     * renderer drew the basemap under them. Bearing/pitch are folded in by the+     * caller's pre-rotation of the basis only insofar as the native path does —+     * the globe path is north-up level (tilt under globe is disabled at call+     * sites), so like every other globe helper this takes no bearing/pitch.+     */+    private fun globeScreenLocationFromPosition(position: GeoPoint): DpOffset {+        val (x, y, z) = globeProject(position.longitude, position.latitude)+        if (z < 0.0) return DpOffset((-1e5f).dp, (-1e5f).dp)+        return DpOffset((halfW + x).toFloat().dp, (halfH - y).toFloat().dp)+    }++    /**+     * Orthographic-sphere inverse: the lon/lat under a screen point, or the+     * limb-clamped point when the tap is off the disc (the nearest visible+     * ground, so a tap on space still reverse-geocodes to the edge in view).+     */+    private fun globePositionFromScreenLocation(offset: DpOffset): GeoPoint {+        val dx = offset.x.value - halfW+        val dy = halfH - offset.y.value+        val r = globeRadius()+        val dist = sqrt(dx * dx + dy * dy)+        // Off the disc: clamp to the limb along the same ray.+        val (nx, ny) = if (dist > r) Pair(dx / dist * r, dy / dist * r) else Pair(dx, dy)+        val nz = sqrt((r * r - nx * nx - ny * ny).coerceAtLeast(0.0))+        return globeUnproject(nx, ny, nz)+    }++    /**+     * 3D unit-sphere point for lon/lat *relative to the camera centre*: rotates+     * the ECEF-style position so the centre is at (0, 0, 1), then scales by the+     * globe radius. The far side is z < 0.+     */+    private fun globeProject(longitude: Double, latitude: Double): Triple<Double, Double, Double> {+        val (x, y, z) = globePoint(center.longitude, center.latitude, longitude, latitude)+        val r = globeRadius()+        return Triple(x * r, y * r, z * r)+    }++    private fun globeUnproject(nx: Double, ny: Double, nz: Double): GeoPoint {+        // Normalise back to the unit sphere (nx/ny/nz are in Dp), then invert.+        val r = globeRadius()+        val (lon, lat) = globeLonLat(center.longitude, center.latitude, nx / r, ny / r, nz / r)+        return GeoPoint(lon, lat)+    }++    /** Screen radius of the globe in Dp: the sphere that fits the zoom scale. */+    private fun globeRadius(): Double {+        // World width at this zoom is `worldSize`; the globe shows half the planet+        // across 2r, so r = worldSize/2 scaled to the viewport: match the native+        // `globe_radius` (screen-fit radius at the same zoom).+        val world = Mercator.worldSize(zoom)+        return world / 2.0+    }++    /**+     * Visible-ground bounds on the globe: the hemisphere cap around the centre,+     * intersected with the viewport disc. Sampled on a grid (not just corners),+     * because corners are routinely off-disc and limb-clamping them would shrink+     * the box to the wrong ground.+     */+    private fun globeVisibleBounds(): GeoBounds {+        val pts = mutableListOf(center)+        val steps = 8+        for (i in 0..steps) {+            for (j in 0..steps) {+                pts += globePositionFromScreenLocation(+                    DpOffset((widthDp * i / steps).dp, (heightDp * j / steps).dp)+                )+            }+        }+        // Antimeridian: when the disc straddles ±180 the numeric min/max spans the+        // whole planet. Detect the wrap (span > 180) and report the wrapped box.+        val lons = pts.map { it.longitude }+        val span = lons.max() - lons.min()+        val west: Double+        val east: Double+        if (span > 180.0) {+            west = pts.filter { it.longitude > 0 }.minOf { it.longitude }+            east = pts.filter { it.longitude < 0 }.maxOf { it.longitude }+        } else {+            west = lons.min()+            east = lons.max()+        }+        return GeoBounds(+            west = west,+            south = pts.minOf { it.latitude },+            east = east,+            north = pts.maxOf { it.latitude },+        )+    }+     /** The lon/lat bounds of the currently visible viewport. */     fun queryVisibleBoundingBox(): GeoBounds {+        if (globe) {+            // The visible hemisphere around the centre: corners may be off-disc, and+            // sampling them would clamp to the limb and shrink the box wrongly.+            return globeVisibleBounds()+        }         if (pitchDeg == 0.0 && bearingDeg == 0.0) {             val topLeft = positionFromScreenLocation(DpOffset(0.dp, 0.dp))             val bottomRight = positionFromScreenLocation(DpOffset(widthDp.dp, heightDp.dp))@@ -205,3 +320,70 @@ class Projection internal constructor(      */     fun pickMarker(xDp: Float, yDp: Float): Long = markerPick?.invoke(xDp, yDp) ?: 0L }++/**+ * Past this zoom the sphere is sub-pixel from flat, so both the Kotlin+ * projection and the native renderer use the flat path bit-identically.+ * Must stay in step with the native `GLOBE_FLAT_THRESHOLD`.+ *+ * Public (not internal): the maps body switch reads it to decide when the+ * chips collapse into the Earth/Moon dropdown.+ */+const val GLOBE_DETAIL_ZOOM = 8.0++/** [longitude] wrapped to -180..180. */+internal fun wrapLongitude(longitude: Double): Double {+    var lon = (longitude + 180.0) % 360.0+    if (lon < 0) lon += 360.0+    return lon - 180.0+}++/**+ * 3D unit-sphere point of ([longitude], [latitude]) in the basis facing+ * ([centerLon], [centerLat]): the centre maps to (0, 0, 1), the far side is+ * z < 0. Single implementation shared by [Projection]'s forward/inverse —+ * mirrors the native `globe_point`, which must stay in step.+ */+internal fun globePoint(+    centerLon: Double,+    centerLat: Double,+    longitude: Double,+    latitude: Double,+): Triple<Double, Double, Double> {+    // Orthonormal basis at the centre: east, north, up. The centre maps to+    // (0, 0, 1); east is +x, north is +y, up (toward the viewer) is +z.+    val latR = Math.toRadians(latitude)+    val dLon = Math.toRadians(longitude - centerLon)+    val cLatR = Math.toRadians(centerLat)+    val cosLat = cos(latR)+    val sinLat = sin(latR)+    val sy = sin(cLatR)+    val cy = cos(cLatR)+    val x = cosLat * sin(dLon)+    val y = cy * sinLat - sy * cosLat * cos(dLon)+    val z = sy * sinLat + cy * cosLat * cos(dLon)+    return Triple(x, y, z)+}++/**+ * Inverse of [globePoint]: lon/lat of a unit-sphere point in the+ * centre-facing basis. Mirrors the native `globe_lonlat`.+ */+internal fun globeLonLat(+    centerLon: Double,+    centerLat: Double,+    x: Double,+    y: Double,+    z: Double,+): GeoPoint {+    // Invert the east/north/up basis: recover ECEF, then lon/lat.+    val cLatR = Math.toRadians(centerLat)+    val sy = sin(cLatR)+    val cy = cos(cLatR)+    val ex = x+    val ey = cy * y + sy * z+    val ez = -sy * y + cy * z+    val lat = asin(ey.coerceIn(-1.0, 1.0)) * 180.0 / PI+    val lon = centerLon + atan2(ex, ez) * 180.0 / PI+    return GeoPoint(wrapLongitude(lon), lat.coerceIn(-90.0, 90.0))+}
library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt b/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.ktindex 88ed043a46..7d12744e39 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt@@ -130,6 +130,10 @@ class SurfaceMapRenderer(     private var lastPosition: CameraPosition? = null     private var lastWidthDp = 0f     private var lastHeightDp = 0f+    /** The globe flag the last frame was drawn with — part of the change backstop above. */+    private var lastGlobe = false+    /** The Moon flag the last frame was drawn with — part of the change backstop above. */+    private var lastMoon = false      /**      * Where the map is looking, and which way is up. Read once per frame on the main@@ -234,6 +238,13 @@ class SurfaceMapRenderer(     internal var railSegments: List<RouteSegment>? = null     internal var railStyle = RouteStyle() +    /**+     * The Moon raster pair, remembered so a surface attached after the push —+     * or re-attached after a recreate — still starts with the Moon available,+     * the same way [userPuck] and [routeSegments] are.+     */+    private var moonTextures: MoonTextures? = null+     /**      * The last-pushed live-traffic colour table (`component_id`s and their ARGB), remembered so      * a push that arrived before the surface existed — or that has to outlive the surface being@@ -242,6 +253,48 @@ class SurfaceMapRenderer(      */     internal var trafficSpeeds: Pair<LongArray, IntArray>? = null +    /**+     * Whether to draw the orthographic-sphere globe rather than the flat map.+     *+     * Pulled per frame out of the Compose `CameraState` (see [composeCamera]), like+     * the camera itself — a `LaunchedEffect` in `VulkanMapSurface` invalidates on+     * change, so flipping the toggle while idle still redraws. Read alongside the+     * camera in [renderFrame] and handed to the native frame as its `globe` flag.+     * Plain `var` (not Compose state): only ever written from effects, read on the+     * frame callback. Default-off; the car path never sets it.+     */+    var globeEnabled: Boolean = false++    /**+     * Which body the globe draws. Earth (default) is the vector basemap; Moon is+     * the maps-pushed raster pair (see [SurfaceMapRenderer.setMoonTextures]).+     * Plain `var` like [globeEnabled]: written from effects, read on the frame+     * callback. Only read while the globe is active.+     */+    var body: MapBody = MapBody.Earth++    /**+     * Upload the Moon raster pair after attach (and after any re-attach — the+     * native textures die with the renderer like every other GPU state, so this+     * must be replayed; see `attachSurface`). [colorRgba] is `width x height`+     * RGBA8, [demRg] is `demWidth x demHeight` RG8 packed uint16. Remembered so+     * a surface attached after the push still starts with the Moon available.+     */+    fun setMoonTextures(+        colorRgba: ByteArray,+        width: Int,+        height: Int,+        demRg: ByteArray,+        demWidth: Int,+        demHeight: Int,+    ) {+        moonTextures = MoonTextures(colorRgba, width, height, demRg, demWidth, demHeight)+        if (handle != 0L) {+            MapNative.setMoonTextures(handle, colorRgba, width, height, demRg, demWidth, demHeight)+        }+        invalidate()+    }+     /** The region to mask and which rung of the admin stack it is, or `null` for no mask. */     private var regionProbe: RegionMask? = null @@ -327,6 +380,7 @@ class SurfaceMapRenderer(         applyTraffic()         applyMarkers()         applyVehicles()+        applyMoonTextures()         renderState = MapRenderState.Rendering         syncFrameLoop()         // The whole deferred set was just replayed into a brand-new native renderer, and the@@ -413,6 +467,12 @@ class SurfaceMapRenderer(         // the basemap with it — so the basemap and everything positioned through the         // projection turn together. Tilt is honoured the same way on both paths.         val bearing: Float+        // The globe flag, pulled per frame like the camera itself (see `globeEnabled`):+        // past the detail threshold both sides use the flat path bit-identically.+        val globe: Boolean+        // The body, pulled per frame like the globe flag: Moon only reads while+        // the globe is active (past the threshold both sides use flat Earth).+        val moon: Boolean         val state = composeCamera         if (state != null) {             val viewport = state.viewportDp ?: return false@@ -420,20 +480,26 @@ class SurfaceMapRenderer(             widthDp = viewport.width             heightDp = viewport.height             bearing = position.bearing.toFloat()+            globe = state.globeEnabled && position.zoom < GLOBE_DETAIL_ZOOM+            moon = globe && state.body == MapBody.Moon         } else {             if (widthPx <= 0 || heightPx <= 0 || density <= 0f) return false             position = camera             widthDp = widthPx / density             heightDp = heightPx / density             bearing = position.bearing.toFloat()+            globe = globeEnabled && position.zoom < GLOBE_DETAIL_ZOOM+            moon = globe && body == MapBody.Moon         }         // The backstop for a camera that moved without telling us: the Compose path pulls its         // camera out of a CameraState here, and a gesture that somehow reached it without         // waking the loop would otherwise draw one frame and settle mid-movement.-        if (position != lastPosition || widthDp != lastWidthDp || heightDp != lastHeightDp) {+        if (position != lastPosition || widthDp != lastWidthDp || heightDp != lastHeightDp || globe != lastGlobe || moon != lastMoon) {             lastPosition = position             lastWidthDp = widthDp             lastHeightDp = heightDp+            lastGlobe = globe+            lastMoon = moon             lastChangeNanos = System.nanoTime()         }         val drawn = MapNative.render(@@ -447,6 +513,8 @@ class SurfaceMapRenderer(             heightDp,             density,             frameTimeNanos,+            globe,+            moon,         )         if (drawn) onFrame()         if (!regionResolved) applyRegionMask()@@ -699,6 +767,49 @@ class SurfaceMapRenderer(         MapNative.setVehicles(handle, packed.ids, packed.lonLat, packed.icons, packed.colors)     } +    private fun applyMoonTextures() {+        if (handle == 0L) return+        val moon = moonTextures ?: return+        MapNative.setMoonTextures(+            handle,+            moon.colorRgba, moon.width, moon.height,+            moon.demRg, moon.demWidth, moon.demHeight,+        )+    }++/**+ * The Moon raster pair the host pushes for the lunar globe: converted LROC+ * color (RGBA8) + converted LDEM (RG8 packed uint16). Plain holder so the+ * renderer can remember and replay it across re-attach like every other+ * deferred state.+ */+data class MoonTextures(+    val colorRgba: ByteArray,+    val width: Int,+    val height: Int,+    val demRg: ByteArray,+    val demWidth: Int,+    val demHeight: Int,+) {+    override fun equals(other: Any?): Boolean {+        if (this === other) return true+        if (other !is MoonTextures) return false+        return width == other.width && height == other.height &&+            demWidth == other.demWidth && demHeight == other.demHeight &&+            colorRgba.contentEquals(other.colorRgba) && demRg.contentEquals(other.demRg)+    }++    override fun hashCode(): Int {+        var result = width+        result = 31 * result + height+        result = 31 * result + demWidth+        result = 31 * result + demHeight+        result = 31 * result + colorRgba.contentHashCode()+        result = 31 * result + demRg.contentHashCode()+        return result+    }+}+      // `internal` (not `private`) so the frame-loop contract is testable: `IDLE_GRACE_NANOS`     // is pinned by `FrameLoopWakeTest`.@@ -729,3 +840,36 @@ class SurfaceMapRenderer(         // DEFAULT_ROUTE_COLOR lives in SurfaceMapOverlays.kt.     } }++/**+ * The Moon raster pair the host pushes for the lunar globe: converted LROC+ * color (RGBA8) + converted LDEM (RG8 packed uint16). Plain holder so the+ * renderer can remember and replay it across re-attach like every other+ * deferred state.+ */+data class MoonTextures(+    val colorRgba: ByteArray,+    val width: Int,+    val height: Int,+    val demRg: ByteArray,+    val demWidth: Int,+    val demHeight: Int,+) {+    override fun equals(other: Any?): Boolean {+        if (this === other) return true+        if (other !is MoonTextures) return false+        return width == other.width && height == other.height &&+            demWidth == other.demWidth && demHeight == other.demHeight &&+            colorRgba.contentEquals(other.colorRgba) && demRg.contentEquals(other.demRg)+    }++    override fun hashCode(): Int {+        var result = width+        result = 31 * result + height+        result = 31 * result + demWidth+        result = 31 * result + demHeight+        result = 31 * result + colorRgba.contentHashCode()+        result = 31 * result + demRg.contentHashCode()+        return result+    }+}
library/map/src/main/java/com/vayunmathur/library/map/VectorMap.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/VectorMap.kt b/library/map/src/main/java/com/vayunmathur/library/map/VectorMap.ktindex a2c6616138..d8f1db9ab5 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/VectorMap.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/VectorMap.kt@@ -53,6 +53,13 @@ import kotlin.math.roundToInt  *  * @param style [MapStyle.Standard] or [MapStyle.Muted] — muted for hosts drawing their own  *   data on top, which is what `weather` needs.+ * @param globeEnabled draw the true-3D-sphere globe (orthographic sphere) instead of the+ *   flat Mercator map. Off by default, so every existing host is unchanged — only `maps`+ *   opts in, driven by its settings toggle. Below [GLOBE_DETAIL_ZOOM] the basemap, the+ *   Compose overlays ([Projection]) and the gesture math all use the sphere; past it the+ *   sphere is sub-pixel from flat, so both paths use the flat math bit-identically.+ *   The globe path is north-up level: bearing and the two-finger tilt are ignored while+ *   it is active (tilting a planet is a separate workstream).  * @param darkBasemap which palette to paint. Defaults to the system theme. The dark colours  *   are `maps`' own contrast-checked `BasemapPalette`, so the apps agree with each other.  *   Switching is free: only a push constant changes.@@ -93,6 +100,24 @@ fun VectorMap(     style: MapStyle = MapStyle.Standard,     darkBasemap: Boolean = isSystemInDarkTheme(),     zoomRange: ClosedFloatingPointRange<Float> = 0f..20f,+    /**+     * See the KDoc above: true while `maps`' globe toggle is on. Default-off so+     * every other host keeps the flat Mercator map it always had.+     */+    globeEnabled: Boolean = false,+    /**+     * Which body to draw. Earth is the default every host keeps; maps passes+     * Moon when its session body switch says so (only read while [globeEnabled]+     * is on and the globe is active — a zoomed-in Moon reads as Earth).+     */+    body: MapBody = MapBody.Earth,+    /**+     * Moon raster pair, uploaded to the native side on attach (and re-attach).+     * Null (default) means no Moon available — a Moon frame then draws the+     * clear colour rather than failing. Only maps sets this, lazily on first+     * Moon select so Earth sessions never pay the 36MB read.+     */+    moonTextures: MoonTextures? = null,     options: MapOptions = MapOptions(),     imageOverlay: ImageOverlay? = null,     userPuck: UserPuck? = null,@@ -141,6 +166,13 @@ fun VectorMap( ) {     val density = LocalDensity.current.density +    // Own the flag into the CameraState (which the gestures, the projection and the+    // native frame all read) rather than threading it per call: one writer, many readers.+    // `false` writes are cheap state no-ops, so non-globe hosts pay nothing per frame.+    LaunchedEffect(globeEnabled) { cameraState.globeEnabled = globeEnabled }+    // Same ownership for the body: session-scoped, read only while the globe is active.+    LaunchedEffect(body) { cameraState.body = body }+     // Read through `rememberUpdatedState` so the lambda handed to `mapGestures` keeps a     // stable identity: its `pointerInput` is keyed on the camera and gesture options, not on     // the callbacks, so a fresh lambda per recomposition would sit unused behind a detector@@ -196,6 +228,9 @@ fun VectorMap(             muted = style == MapStyle.Muted,             layerOptions = options.layerOptions,             tileSource = options.tileSource,+            globeEnabled = globeEnabled,+            body = body,+            moonTextures = moonTextures,             userPuck = userPuck,             regionMask = regionMask,             trafficColors = trafficColors,
library/map/src/main/java/com/vayunmathur/library/map/VulkanMapSurface.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/VulkanMapSurface.kt b/library/map/src/main/java/com/vayunmathur/library/map/VulkanMapSurface.ktindex d468de6f2d..c519ed220a 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/VulkanMapSurface.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/VulkanMapSurface.kt@@ -57,6 +57,16 @@ internal fun VulkanMapSurface(     userPuck: UserPuck? = null,     /** Dim everything outside the administrative region this names. `null` draws no mask. */     regionMask: RegionMask? = null,+    /**+     * Mirror of `VectorMap`'s `globeEnabled`: pushed into the native frame as the+     * per-frame `globe` flag (see `MapNative.render`), so the renderer draws the+     * orthographic sphere. Default-off; the flat path is untouched.+     */+    globeEnabled: Boolean = false,+    /** Mirror of `VectorMap`'s `body`: the Moon raster path when set. Default Earth. */+    body: MapBody = MapBody.Earth,+    /** Moon textures, pushed to the native side on attach/re-attach (default null = no Moon). */+    moonTextures: MoonTextures? = null,     /**      * The live-traffic colour table. `null` or an empty table clears the overlay; otherwise its      * `component_id → ARGB` entries are pushed to the renderer. Has no visible effect unless@@ -159,6 +169,16 @@ internal fun VulkanMapSurface(     LaunchedEffect(host, cameraState) {         snapshotFlow { cameraState.position }.collect { renderer.invalidate() }     }+    // The globe flag rides the same push channel as the camera: `SurfaceMapRenderer`+    // pulls it out of the `CameraState` per frame, so flipping the settings toggle+    // while idle still wakes the loop and redraws.+    LaunchedEffect(host, cameraState) {+        snapshotFlow { cameraState.globeEnabled }.collect { renderer.invalidate() }+    }+    // The body rides the same channel: switching Earth/Moon while idle still redraws.+    LaunchedEffect(host, cameraState) {+        snapshotFlow { cameraState.body }.collect { renderer.invalidate() }+    }     // Separately, because a viewport change is rare and a camera change is per-frame: keeping     // them apart means the hot path compares one reference rather than allocating a pair.     LaunchedEffect(host, cameraState) {@@ -213,6 +233,13 @@ internal fun VulkanMapSurface(     // how the ticker stops them when the transit toggle goes off or the surface is hidden.     LaunchedEffect(vehicles, host) { renderer.setVehicles(vehicles) } +    // The Moon textures: pushed like the route, out of band from the frame loop.+    // Keyed on value equality so an identical push on recomposition does not+    // re-upload 36MB. `null` keeps whatever is there (upload-once asset).+    LaunchedEffect(moonTextures, host) {+        moonTextures?.let { renderer.setMoonTextures(it.colorRgba, it.width, it.height, it.demRg, it.demWidth, it.demHeight) }+    }+     // Live connectivity, replacing a single sample taken in onSurfaceTextureAvailable.     // Collected here rather than inside the renderer so every MapNative call stays on the     // composition dispatcher, like setPalette and setLayers.
library/map/src/main/rust/shaders/fill_globe.frag
diff --git a/library/map/src/main/rust/shaders/fill_globe.frag b/library/map/src/main/rust/shaders/fill_globe.fragnew file mode 100644index 0000000000..9ebd345e1c--- /dev/null+++ b/library/map/src/main/rust/shaders/fill_globe.frag@@ -0,0 +1,25 @@+#version 450++// Globe fill fragment: the layer colour with a limb discard and the LOD fade.+//+// `vZ` is the unit-sphere z from the vertex stage: negative (far side and the+// limb-straddling fragments past the edge) discards, so the disc reads as a+// ball rather than a filled square. Otherwise identical to `fill.frag`.++layout(location = 0) in float inZ;+layout(location = 0) out vec4 outColor;++layout(push_constant) uniform Push {+    mat4 tileToClip;+    vec4 color;+    vec4 line;+    vec4 misc;+    vec4 morph;+} push;++void main() {+    if (inZ < 0.0) discard;+    // Limb antialias: fade the last sliver so the edge is not a staircase.+    float edge = clamp(inZ * 8.0, 0.0, 1.0);+    outColor = vec4(push.color.rgb, push.color.a * push.morph.x * edge);+}
library/map/src/main/rust/shaders/fill_globe.vert
diff --git a/library/map/src/main/rust/shaders/fill_globe.vert b/library/map/src/main/rust/shaders/fill_globe.vertnew file mode 100644index 0000000000..33a4f14c58--- /dev/null+++ b/library/map/src/main/rust/shaders/fill_globe.vert@@ -0,0 +1,95 @@+#version 450++// Globe fill: bends flat tile-local triangles onto the orthographic sphere.+//+// Same inputs as `fill.vert` (position-only tile-local 0..1 in `inPosition.xy`),+// but the matrix is the globe matrix from `Camera::globe_tile_to_clip`, not the+// flat tile matrix: its linear 2x2 carries the globe radius (Dp), and its third+// row carries the tile's normalised-world origin + span (ox, oy, span). The+// vertex reconstructs its lon/lat from those, projects through `globe_point`+// (mirroring the CPU), and emits clip + a real depth (near-side nearer).+//+// Vertices on the far side (z < 0) are pulled behind the near plane (w forced+// negative-side) so the triangle clips away; straddling triangles clip at the+// limb per-fragment via the varying. Depth is `1 - z` mapped into [0, 1): the+// sub-sphere centre is deepest, the limb is nearest — coarser ancestor tiles+// drawn first lose the depth test to finer descendants drawn over them, which+// is the same coarsest-first order the flat loop relies on.++layout(location = 0) in vec3 inPosition;++layout(push_constant) uniform Push {+    mat4 tileToClip;+    vec4 color;+    vec4 line;+    vec4 misc;+    vec4 morph;+} push;++layout(location = 0) out float outZ;++const float PI = 3.141592653589793;++// `tileToClip[2]` third row: (ox, oy, span) packed by `globe_tile_to_clip`.+// Column-major: m[2] = row0-col2, m[6] = row1-col2, m[10] = row2-col2.++void main() {+    float ox = push.tileToClip[2][0];+    float oy = push.tileToClip[2][1];+    float span = push.tileToClip[2][2];+    // Tile-local (u, v) -> normalised world (0..1 across the planet).+    float wx = ox + inPosition.x * span;+    float wy = oy + inPosition.y * span;+    // Normalised world -> lon/lat (Web Mercator inverse, y down).+    float lon = wx * 360.0 - 180.0;+    float n = PI - 2.0 * PI * wy;+    // atan(sinh(n)): sinh can overflow for extreme wy; wy is in [0,1] so n in+    // [-PI, PI] and sinh is bounded — safe.+    float lat = atan((exp(n) - exp(-n)) * 0.5) * 180.0 / PI;+    // Centre-facing basis is baked CPU-side: the globe matrix's translation is+    // zero and its 2x2 is (kx*r, ky*r), so we reconstruct the unit-sphere point+    // relative to the centre here. The centre lon/lat ride in `misc.xy`+    // (degrees) — pushed per draw by the globe record path.+    float cLon = push.misc.x;+    float cLat = push.misc.y;+    float latR = radians(lat);+    float dLon = radians(lon - cLon);+    float cLatR = radians(cLat);+    float x1 = cos(latR) * cos(dLon);+    float z1 = -cos(latR) * sin(dLon);+    float y1 = sin(latR);+    float sy = sin(cLatR);+    float cy = cos(cLatR);+    float x = x1;+    float y = y1 * sy - z1 * cy;+    float z = y1 * cy + z1 * sy;+    // Globe radius in Dp is recovered from the matrix scale: m[0] = kx * r with+    // kx = 2/widthDp — but widthDp is not pushed. Instead the record path pushes+    // r (Dp) in `morph.z` (unused by the fill path otherwise).+    float r = push.morph.z;+    float sx = x * r;+    float sy2 = y * r;+    // Flat clip through the matrix 2x2 + viewport centre: clip = kx * (sx) - 0+    // with the matrix translation column zeroed, plus centre offset. The record+    // path bakes (kx, ky) into m[0]/m[5] and pushes half-viewport (Dp) in+    // `morph.xy`, so: clip = m * (sx, sy) + (kx*hw - 1, ky*hh - 1).+    float kx = push.tileToClip[0][0] / max(r, 1e-6);+    float ky = push.tileToClip[1][1] / max(r, 1e-6);+    float hw = push.morph.x;+    float hh = push.morph.y;+    float cx = kx * sx + (kx * hw - 1.0);+    float cyy = ky * sy2 + (ky * hh - 1.0);+    // Vulkan clip y is down-positive like Mercator, but NDC y-up convention in+    // the flat matrices negates through ky sign — keep the same sign here.+    // Depth: limb (z=0) -> 0, sub-camera point (z=1) -> ~1. Reversed so nearer+    // (larger z) wins LESS: depth = 1 - z mapped in.+    float depth = clamp(1.0 - z, 0.0, 1.0);+    outZ = z;+    if (z < 0.0) {+        // Far side: emit behind the camera so the triangle clips. w negative+        // flips; use a degenerate far-depth point instead.+        gl_Position = vec4(cx, cyy, 1.0, 1.0);+    } else {+        gl_Position = vec4(cx, cyy, depth, 1.0);+    }+}
library/map/src/main/rust/shaders/line_globe.frag
diff --git a/library/map/src/main/rust/shaders/line_globe.frag b/library/map/src/main/rust/shaders/line_globe.fragnew file mode 100644index 0000000000..a84a91676e--- /dev/null+++ b/library/map/src/main/rust/shaders/line_globe.frag@@ -0,0 +1,43 @@+#version 450+// Globe line fragment: `line.frag` plus the limb discard.+//+// `inZ` is the unit-sphere z from the vertex stage; past the limb the road has+// bent to the far side and must not draw. Otherwise the edge coverage and dash+// pattern are exactly `line.frag`'s.+layout(location = 0) in float inDistancePx;+layout(location = 1) in float inEdgePx;+layout(location = 2) in float inZ;+layout(location = 0) out vec4 outColor;+layout(push_constan

Diff truncated.