makepad/apps/wm-dyn/Cargo.toml
Admin d86cbfe23e cargo-makepad: the super-app APK is packed by android dyn-pack, in Rust
`cargo makepad android dyn-pack` stages the relocatable checkout,
cross-builds host + engine from it through the ordinary Android build,
proves every tile's on-device command against that target/, packs the
APK with the phone toolchain, the checkout and target/ as streamed LZ4
tar parts, and rehearses the phone's first tile open from the packed
APK; `dyn-rehearse` runs that last gate alone. This replaces the
Python and shell pipeline that lived outside the tree. The stage
directory is tool-owned, every cargo phase runs under one controlled
environment recorded in the target's marker, rustc runs through
cargo-makepad itself as the remapping wrapper, and the APK is renamed
into place only after signing and the rehearsal. The host package
names its engine and tiles in [package.metadata.makepad.dyn]. Only the
three /system/bin/sh templates that run on the phone stay shell.

libs/rmeta is the rustc metadata header reader apps/wm used, now shared
with cargo-makepad; libs/tar gains a streaming ustar writer with GNU
long names; the zip writer streams to any sink so a 900 MB APK never
sits in memory.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 19:02:50 +02:00

59 lines
2.1 KiB
TOML

# wm-dyn — Android super-app: the same desk as wm-all (iOS skin), but apps
# are not linked in. Opening a tile runs `cargo rustc --crate-type dylib`
# against the packaged checkout and `dlopen`s the result into ModuleHost.
#
# The whole graph is built with `RUSTFLAGS="-C prefer-dynamic"` so that the
# engine (`engine/`, one Rust dylib) is shared by the host and every app
# dylib. Desktop check: `MAKEPAD_WM_ROOT=<checkout> RUSTFLAGS="-C
# prefer-dynamic" cargo run -p makepad-wm-dyn --release`.
#
# Android: the whole pack (stage the tree, cross-build, prove every tile,
# pack the APK with the phone toolchain, rehearse from the packed APK) is
# cargo makepad android --abi=aarch64 --package-name=nl.makepad.wmdyn
# --app-label=wmdyn dyn-pack --dyn-toolchain=<musl rustc tree>
# -p makepad-wm-dyn --release --no-default-features
# (tools/cargo_makepad/src/android/dyn_pack). The packaged workspace unifies
# features across all of its members, so an app built on the phone resolves
# the same engine units (apps/wm/src/dylib_host.rs); `--no-default-features`
# there and here keeps every app's `standalone` graph out of that union.
# The `[lib]` is the Android cdylib (cargo_makepad wraps bin-only packages
# in a generated workspace under target/, which breaks the relocatable
# fingerprints the on-device cargo needs).
[package]
name = "makepad-wm-dyn"
version = "0.1.0"
edition = "2021"
default-run = "wm-dyn"
# What `cargo makepad android dyn-pack` stages, proves and packs: the engine
# dylib every tile binds, and the tile packages the phone may compile.
[package.metadata.makepad.dyn]
engine = "makepad-wm-engine"
apps = [
"makepad-calculator",
"makepad-calendar",
"makepad-clock",
"makepad-files",
"makepad-finance",
"makepad-mail",
"makepad-notes",
"makepad-photos",
"makepad-reminders",
"makepad-app-route",
"makepad-sheets",
"makepad-weather",
]
[lib]
name = "makepad_wm_dyn"
path = "src/lib.rs"
[[bin]]
name = "wm-dyn"
path = "src/main.rs"
[dependencies]
makepad-wm = { path = "../wm" }
makepad-widgets = { path = "../../widgets" }
makepad-wm-engine = { path = "engine" }