makepad/apps/wm-android/Cargo.toml
Admin a8bf0e4dcf wm on Android: every app is its own process -- the plain makepad-wm now ships as an Android APK (cargo makepad android ... proc-pack -p makepad-wm-android) whose phone apps run as real child processes instead of dylibs loaded into the WM. The interface between WM and app shrinks to what the desktop WM uses: shared GPU buffers and the StudioToApp/AppToStudio protocol. The WM allocates each app's swapchain as AHardwareBuffers and hands them over a unix socket (AHardwareBuffer_sendHandleToUnixSocket, API 26); the child, started through the libmakepad_launch.so launcher in nativeLibraryDir (W^X allows it there), imports them into a windowless Vulkan device and renders its window pass into them (android_hosted.rs). Each app library links the engine statically, so the engine-dylib identity handling of wm-dyn is not needed. Children have no JVM: assets are read from the APK file, audio device lookup no longer goes through Java, and the startup/resize extra draw of the Activity build is repeated so the first frame carries its text. On a phone the WM asks for the soft keyboard only while the child reports a focused text field. Proven on a Pixel 11 Pro XL: all twelve phone apps launch as processes (first frame 1.6-2.4 s cold), taps reach them. Not yet: HTTP in children (the Activity build borrows Java's), clipboard/permission/file-picker relays, idle-app reclaim, and on-device builds of app libraries
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 22:34:44 +02:00

41 lines
1.4 KiB
TOML

# wm-android — the plain window manager as an Android app, hosting every app
# as a real child PROCESS, the way the desktop WM does: each app is its own
# library (its `app_main!`, the engine linked statically), run by a small
# launcher in a process of its own, talking the desktop hosting protocol over
# the WM's hub and drawing into shared AHardwareBuffer frames
# (platform/src/os/linux/android/android_hosted.rs). No shared engine dylib.
#
# cargo makepad android --abi=aarch64 --package-name=nl.makepad.wm \
# --app-label=wm proc-pack -p makepad-wm-android --release
# (tools/cargo_makepad/src/android/proc_pack) builds this crate's APK, the
# launcher (`launch/`) and one library per app listed below, and packs them.
[package]
name = "makepad-wm-android"
version = "0.1.0"
edition = "2021"
# What `proc-pack` builds as hosted child libraries: [package, bin] pairs,
# bin being the WM registry's binary name (apps/wm/src/clients.rs).
[package.metadata.makepad.proc]
apps = [
"makepad-calculator calculator",
"makepad-calendar calendar",
"makepad-clock clock",
"makepad-files files",
"makepad-finance finance",
"makepad-mail mail",
"makepad-notes notes",
"makepad-photos photos",
"makepad-reminders reminders",
"makepad-app-route makepad-app-route",
"makepad-sheets sheets",
"makepad-weather weather",
]
[lib]
name = "makepad_wm_android"
path = "src/lib.rs"
[dependencies]
makepad-wm = { path = "../wm" }