Run Iris examples on desktop and Android

This commit is contained in:
iris committed 2026-09-11 11:33:04 -04:00
1 parent 37f956707e
commit b5666cdef9
25 files changed
+577 -205

No files matched your search

+13 -3
View File
@@ -4,7 +4,9 @@ My experimental attempt at a rust ui library (also my first ui library).
It's currently designed around using retained data structures (widgets), rather than diffing generated trees from data like xilem or iced. This is an experiment and I'm not sure if it's a good idea or not.
Examples are in `examples`, eg. `cargo run --example tabs`.
Examples are in `examples`, eg. `cargo run --example tabs`. Each example keeps
its widget tree in `lib.rs` and its small desktop and Android hosts in
`desktop.rs` and `android.rs`.
## Android applications
@@ -57,6 +59,14 @@ cargo iris apk --abi arm64-v8a
cargo iris run --abi x86_64 --device emulator-5554
```
Package examples use the same command with `--example`:
```sh
cargo run --example tabs
cargo iris apk --example tabs --abi arm64-v8a
cargo iris run --example tabs --abi x86_64 --device emulator-5554
```
`cargo iris` packages directly with `cargo-ndk`, `javac`, `d8`, `aapt2`,
`jar`, `zipalign`, and `apksigner`; it does not require Gradle. The caller
provides a JDK, Android SDK and NDK, and any emulator or physical device. Set
@@ -73,8 +83,8 @@ IRIS_KEYSTORE_PASSWORD=... IRIS_KEY_PASSWORD=... \
```
APK staging and output live under
`target/iris-android/<package>/<debug|release>/<abi>/`; the command's final
line is the verified APK's absolute path.
`target/iris-android/<package>[-<example>]/<debug|release>/<abi>/`; the
command's final line is the verified APK's absolute path.
Goals, in general order:
1. does what I want it to (text, images, video, animations)