Files
alkane-os/third-party/flare-ui/docs/wapp-core.md
T
x ad31cfbafa Vendor flare-ui v0.2.9 and prove the schema-driven UI in an image
Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's
on-box pages, and what it costs.

What works:

- schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs);
- src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so
  the unified sidebar, ordering and surface filtering come from the schema
  rather than from hand-written HTML;
- the render uses the shared bf- design tokens, the same ones the rest of the
  suite uses.

Size, measured rather than assumed (armv7, release, stripped):

  ui-baseline   323 KiB   (maud + serde_json, no flare-ui)
  ui-spike      771 KiB   (flare-ui + wschema + sha2)
  marginal      448 KiB

Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in
flare-ui/flare-ui.lock (a partial archive does not compile, since the crate
include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo
directory source with the new registry dependencies (maud, sha2, typenum,
digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build
still works offline. third-party/README.md records how to re-pin.
2026-11-04 14:06:25 -06:00

46 lines
1.9 KiB
Markdown

# wapp-core and wapp-pack
One implementation of the `.wapp` package format, shared by flared, appd,
FLARE and CI.
## Modules
| Module | Does |
|---|---|
| `ustar` | Envelope reader and writer: three members, no prefix, no trailing data |
| `json` | Strict JSON (integers, ASCII, no duplicate keys) and the canonical writer |
| `manifest` | Typed manifest and field validation (step V07) |
| `perm` | Permission class table |
| `platform` | `platform.json`, the hard platform check, `select_build` |
| `surface` | Sorted capability strings and upgrade classification |
| `payload`, `elf` | Bounded inflate, per-file checks, ARM static ELF admission |
| `validate` | Steps V01 to V09 (`validate`), V15 and V16 (`validate_payload`) |
| `build` | Writer used by `wapp-pack` and the vectors |
| `appkeys`, `keys` | Key classes, `app_keys()`, load policy, release guard |
| `index` | Signed index parse, verify (`seq` freshness), build, revocation rows |
`wapp-pack` has `pack`, `verify`, `sign`, `index` and `guard`. The compiled-in
platform key set is empty until the key ceremony, so `guard` fails by design.
Steps V10 to V14 need installed state and V17 to V20 need the schema, module
verifier and FLARE crates; their callers run them.
## Checks
```
cargo test -p wapp-core -p wapp-pack
cd crates/wapp-core/fuzz && cargo +nightly fuzz run read_members -- -max_total_time=30
```
Golden archives live in `crates/wapp-core/tests/vectors/`. After a deliberate
format change, rewrite them with
`WAPP_UPDATE_VECTORS=1 cargo test -p wapp-core --test vectors`.
The signing seed in the tests is a test constant and signs nothing real.
## Limits worth knowing
- Payload paths are at most 100 bytes, because the reader refuses the ustar
`prefix` field.
- Unknown members are refused at the top level and in every block the crate
owns. `ui.native` and `flare.plugin` stay raw values for their verifiers.