iris/android-app is the concrete app RUST.md's I2 is judged against: JNI_OnLoad, a Client implementing AndroidAppState, and new_view_peer wrapping iris::android::new_peer's generic function in the plain function pointer register_view_class needs. Its UI is tabs-ui::build, unchanged from the winit example. Deliberately excluded from the iris workspace (iris/Cargo.toml's new `exclude`): android-view needs the NDK sysroot to link, so folding this crate in would break `cargo build --workspace --all-targets` on the host. It resolves as its own single-crate workspace instead, built with `cd iris/android-app && cargo ndk -t x86_64 -P 26 build`. Verified: cross-compiles and clippys clean for x86_64-linux-android API 26; the host iris workspace (build/clippy/fmt/19 tests) is unaffected. Not yet built: the Gradle shell (IrisView.java, MainActivity, AndroidManifest) to actually install and run this on the emulator -- next in RUST.md's I2. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
30 lines
927 B
TOML
30 lines
927 B
TOML
[package]
|
|
name = "iris-android-app"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
# Deliberately outside the `iris` workspace (see that Cargo.toml's
|
|
# `[workspace] exclude`): this crate exists only to be cross-compiled with
|
|
# `cargo ndk` for the emulator/a phone, and pulls in android-view, which
|
|
# needs the NDK sysroot to link. Folding it into the main workspace would
|
|
# make `cargo build --workspace --all-targets` -- the host command RUST.md
|
|
# and AGENTS.md both require to stay clean -- try to link a cdylib against
|
|
# libraries that do not exist on this machine. See RUST.md's I2.
|
|
|
|
[lib]
|
|
name = "main"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
iris = { path = "../" }
|
|
tabs-ui = { path = "../tabs-ui" }
|
|
android-view = { git = "https://github.com/rust-mobile/android-view.git", rev = "bec6c62a96cef8239b0fd7fedeef9b184d02e3a1" }
|
|
android_logger = "0.15.0"
|
|
log = "0.4.28"
|
|
|
|
[profile.release]
|
|
panic = "abort"
|
|
|
|
[profile.dev]
|
|
panic = "abort"
|