Damascene on Android
damascene-android runs a normal damascene_core::App inside
Android's NativeActivity. The split matches the desktop and iOS
hosts — the host (through damascene-winit-wgpu) owns the event loop,
wgpu surface, device/queue, and input translation; the app owns state,
build, and on_event — so one App implementation covers all of
them.
A downstream app is a cdylib that exports android_main:
What the host wires up:
- Accessibility. The AccessKit delegate is injected into
NativeActivity's content view — no Gradle or Java changes; TalkBack roles, scroll actions, and scroll-into-view included, verified with TalkBack on a device (August 2026). System accessibility settings are sniffed at resume and surface asAccessibilityPreferences(e.g. animations off → reduced motion). NeedsminSdk 26for the embedded-dex loader. - Input. Touch (multi-contact registry, two-finger pinch, long-press), the soft keyboard — shown and hidden from focus state, text arriving through the platform IME — and physical keyboards.
- Safe area.
content_rectbecomes safe-area insets — display cutouts, system bars, and the soft-keyboard band — which placement uses to keep popovers and menus on screen. - Logging. The
logfacade routes to logcat (tagdamascene) before the loop starts; GPU-setup failures on odd devices would otherwise die invisibly. - GPU. wgpu over Vulkan where the device has it, GLES 3.1 otherwise
(the reference manifest's floor); surfaces without
COPY_SRCdegrade (backdrop sampling off, with a log line) instead of panicking.
Font features pass through to damascene-core, so an APK can drop the
~10.7 MB color-emoji bundle with default-features = false plus the
faces it wants.
The showcase APK (reference packaging)
The repository's android/ Gradle project packages
crates/damascene-android-showcase as a NativeActivity APK. The
Activity loads libmain.so; the Rust android_main entry point starts
the Damascene showcase through the native wgpu host.
Build and install the debug APK:
The APK is debuggable, but the Rust libmain.so is built with
cargo build --release; unoptimized Rust makes first render far too
slow for this GPU-heavy showcase. The build currently targets
arm64-v8a only.