Package the Rust mobile core and generated Kotlin API for Android (#92)
Dependency security audit / rustsec (push) Failing after 24s

This commit is contained in:
hugo committed 2026-10-08 12:34:09 +02:00
1 parent e079b82b15
commit fcb36a0684
42 files changed
+1586 -172

No files matched your search

+34 -1
View File
@@ -3,6 +3,10 @@
use ironstorage::mobile::{MobileShell, MobileShellState};
use std::{env, error::Error, fs, path::Path};
mod bindings;
mod native;
mod toolchain;
fn main() -> Result<(), Box<dyn Error>> {
let args: Vec<_> = env::args_os().collect();
match args.as_slice() {
@@ -12,9 +16,38 @@ fn main() -> Result<(), Box<dyn Error>> {
fs::write(path, fixtures())?;
}
[_, command, path] if command == "check" => check(Path::new(path))?,
[_, command, input, output] if command == "prepare-bindings" => {
bindings::prepare(Path::new(input), Path::new(output))?;
}
[_, command, input, output] if command == "package-native" => {
native::package_directory(Path::new(input), Path::new(output))?;
}
[_, command, path, abi] if command == "audit-elf" => {
native::audit_elf(&fs::read(path)?, abi.to_str().ok_or("invalid ABI")?)?;
}
[_, command, path, abi] if command == "audit-apk-split" => {
native::audit_split(Path::new(path), abi.to_str().ok_or("invalid ABI")?)?;
}
[_, command, paths @ ..] if command == "audit-package" && !paths.is_empty() => {
for path in paths {
native::audit_package(Path::new(path))?;
}
}
[_, command, directory] if command == "audit-native" => {
native::audit_directory(Path::new(directory))?
}
[_, command, cargo, rust, ndk, ndk_version, cargo_ndk] if command == "check-toolchain" => {
toolchain::check(
Path::new(cargo),
rust.to_str().ok_or("invalid Rust version")?,
Path::new(ndk),
ndk_version.to_str().ok_or("invalid NDK version")?,
cargo_ndk.to_str().ok_or("invalid cargo-ndk version")?,
)?;
}
_ => {
return Err(
"usage: ironstorage-android-build <fixtures output.kt | check android-dir>".into(),
"usage: ironstorage-android-build <fixtures output.kt | check android-dir | prepare-bindings input output | package-native input output | audit-elf path abi | audit-native jniLibs | audit-apk-split apk abi | audit-package apk-or-aab | check-toolchain cargo rust ndk ndk-version cargo-ndk-version>".into(),
);
}
}