Implement the shared-Rust-core leg of the Android Stage-1 prototype
(docs/superpowers/specs/2026-06-27-android-stage1-prototype-plan.md).
android/rust/catacomb_core is a cdylib that reuses the pure desktop
modules (vtt, error_class, platform) verbatim via #[path] includes — no
logic fork — and exposes them to Kotlin over JNI as String-in/String-out
entry points:
RustCore.vttParse(vtt) -> JSON [{start,text},...]
RustCore.classifyError(log) -> JSON {class,label,hint}
RustCore.platformFromUrl(url) -> JSON {dir_name,display_name,icon}
RustCore.platformDirName(url) -> folder name
Built with panic=abort + per-entry catch_unwind so a Rust panic can never
unwind into the JVM. build.sh locates the NDK portably and cross-compiles
to arm64-v8a + x86_64, depositing the .so into app/src/main/jniLibs/.
Verified: cargo test (38 pass), llvm-readelf confirms all 4 JNI symbols
exported in the arm64 .so, and an end-to-end host-JVM round-trip
(System.load + call each native method) returns correct JSON.
Phases 2/3/5 (WebView-BotGuard anti-bot) remain device-only and untouched.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
315 lines
8.2 KiB
TOML
315 lines
8.2 KiB
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "bytes"
|
|
version = "1.12.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
|
|
|
|
[[package]]
|
|
name = "catacomb_core"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"jni",
|
|
"serde",
|
|
"serde_json",
|
|
]
|
|
|
|
[[package]]
|
|
name = "cesu8"
|
|
version = "1.1.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
|
|
|
[[package]]
|
|
name = "cfg-if"
|
|
version = "1.0.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
|
[[package]]
|
|
name = "combine"
|
|
version = "4.6.7"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
|
|
dependencies = [
|
|
"bytes",
|
|
"memchr",
|
|
]
|
|
|
|
[[package]]
|
|
name = "itoa"
|
|
version = "1.0.18"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
|
[[package]]
|
|
name = "jni"
|
|
version = "0.21.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
|
|
dependencies = [
|
|
"cesu8",
|
|
"cfg-if",
|
|
"combine",
|
|
"jni-sys 0.3.1",
|
|
"log",
|
|
"thiserror",
|
|
"walkdir",
|
|
"windows-sys 0.45.0",
|
|
]
|
|
|
|
[[package]]
|
|
name = "jni-sys"
|
|
version = "0.3.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"
|
|
dependencies = [
|
|
"jni-sys 0.4.1",
|
|
]
|
|
|
|
[[package]]
|
|
name = "jni-sys"
|
|
version = "0.4.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
|
|
dependencies = [
|
|
"jni-sys-macros",
|
|
]
|
|
|
|
[[package]]
|
|
name = "jni-sys-macros"
|
|
version = "0.4.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
|
|
dependencies = [
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "log"
|
|
version = "0.4.33"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
|
|
|
[[package]]
|
|
name = "memchr"
|
|
version = "2.8.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
|
|
|
|
[[package]]
|
|
name = "proc-macro2"
|
|
version = "1.0.106"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
dependencies = [
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "quote"
|
|
version = "1.0.46"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "same-file"
|
|
version = "1.0.6"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
dependencies = [
|
|
"winapi-util",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
dependencies = [
|
|
"serde_core",
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_core"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
dependencies = [
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_derive"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_json"
|
|
version = "1.0.150"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
|
|
dependencies = [
|
|
"itoa",
|
|
"memchr",
|
|
"serde",
|
|
"serde_core",
|
|
"zmij",
|
|
]
|
|
|
|
[[package]]
|
|
name = "syn"
|
|
version = "2.0.118"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror"
|
|
version = "1.0.69"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
dependencies = [
|
|
"thiserror-impl",
|
|
]
|
|
|
|
[[package]]
|
|
name = "thiserror-impl"
|
|
version = "1.0.69"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "unicode-ident"
|
|
version = "1.0.24"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
|
[[package]]
|
|
name = "walkdir"
|
|
version = "2.5.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
|
dependencies = [
|
|
"same-file",
|
|
"winapi-util",
|
|
]
|
|
|
|
[[package]]
|
|
name = "winapi-util"
|
|
version = "0.1.11"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
|
dependencies = [
|
|
"windows-sys 0.61.2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "windows-link"
|
|
version = "0.2.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
|
|
[[package]]
|
|
name = "windows-sys"
|
|
version = "0.45.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
|
dependencies = [
|
|
"windows-targets",
|
|
]
|
|
|
|
[[package]]
|
|
name = "windows-sys"
|
|
version = "0.61.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
dependencies = [
|
|
"windows-link",
|
|
]
|
|
|
|
[[package]]
|
|
name = "windows-targets"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
|
dependencies = [
|
|
"windows_aarch64_gnullvm",
|
|
"windows_aarch64_msvc",
|
|
"windows_i686_gnu",
|
|
"windows_i686_msvc",
|
|
"windows_x86_64_gnu",
|
|
"windows_x86_64_gnullvm",
|
|
"windows_x86_64_msvc",
|
|
]
|
|
|
|
[[package]]
|
|
name = "windows_aarch64_gnullvm"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
|
|
|
[[package]]
|
|
name = "windows_aarch64_msvc"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
|
|
|
[[package]]
|
|
name = "windows_i686_gnu"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
|
|
|
[[package]]
|
|
name = "windows_i686_msvc"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
|
|
|
[[package]]
|
|
name = "windows_x86_64_gnu"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
|
|
|
[[package]]
|
|
name = "windows_x86_64_gnullvm"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
|
|
|
[[package]]
|
|
name = "windows_x86_64_msvc"
|
|
version = "0.42.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
|
|
|
[[package]]
|
|
name = "zmij"
|
|
version = "1.0.21"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|