`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>
51 lines
2.5 KiB
TOML
51 lines
2.5 KiB
TOML
# makepad-wm-engine — the engine of the Android super-app as ONE Rust `dylib`.
|
|
#
|
|
# `apps/wm-dyn` hosts apps compiled on demand to `dylib`s. Those must bind
|
|
# the host's widgets/platform/std, not a copy: rustc links an rlib that is
|
|
# already inside an upstream dylib as `IncludedFromDylib` instead of
|
|
# embedding it again. This crate is that upstream dylib: it re-exports the
|
|
# union of everything the twelve tile apps and `makepad-wm` use, so the host
|
|
# (`makepad-wm-dyn`) and every app dylib share one engine `.so`. Build the
|
|
# whole super-app graph with `RUSTFLAGS="-C prefer-dynamic"`.
|
|
#
|
|
# Only the super-app graph depends on this crate; desktop/APK builds of the
|
|
# apps keep their rlib/cdylib shape. `rlib` is here so a build without
|
|
# prefer-dynamic still links (statically).
|
|
|
|
[package]
|
|
name = "makepad-wm-engine"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "makepad_wm_engine"
|
|
path = "src/lib.rs"
|
|
crate-type = ["dylib", "rlib"]
|
|
|
|
[dependencies]
|
|
# Superset of every feature an app or the WM asks of a shared crate. The
|
|
# packaged workspace unifies features across all of its members (the dyn-pack
|
|
# stage writes `feature-unification = "workspace"`), so an on-device `-p <app>`
|
|
# build resolves the same engine units as the host's cross-build whatever an
|
|
# app asks for; naming the union here keeps a plain desktop build of wm-dyn
|
|
# (selected-package unification) on the same units too.
|
|
makepad-widgets = { path = "../../../widgets", features = ["maps"] }
|
|
makepad-app-module = { path = "../../../libs/app_module" }
|
|
makepad-ai-services = { path = "../../../libs/ai/services" }
|
|
makepad-wm-theme = { path = "../../../libs/wm_theme" }
|
|
makepad-strict-json = { path = "../../../libs/strict_json" }
|
|
makepad-wm-api = { path = "../../../libs/wm_api" }
|
|
makepad-civil-time = { path = "../../../libs/civil_time" }
|
|
makepad-base64 = { path = "../../../libs/base64" }
|
|
makepad-converse = { path = "../../../libs/converse", default-features = false }
|
|
makepad-diskmap = { path = "../../../libs/diskmap" }
|
|
makepad-geodata = { path = "../../../libs/geodata" }
|
|
makepad-html = { path = "../../../libs/html" }
|
|
makepad-image-tiles = { path = "../../../libs/image_tiles" }
|
|
makepad-map-nav = { path = "../../../libs/map_nav" }
|
|
makepad-micro-serde = { path = "../../../libs/micro_serde" }
|
|
makepad-network = { path = "../../../platform/network" }
|
|
makepad-search = { path = "../../../libs/search" }
|
|
makepad-sqlite = { path = "../../../libs/sqlite_query" }
|
|
makepad-studio-protocol = { path = "../../../platform/studio" }
|
|
libloading = { path = "../../../libs/vulkan/libloading" }
|