1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! UI-6: **the engine** — the host interface `engine/1` of UI-4's contract.
//!
//! The engine owns what lives across swaps: the socket, the cache, the
//! signals, the registry. A component owns only its tree and its folds; it
//! never touches the DOM, the socket or another component.
//!
//! | module | what it holds |
//! |---|---|
//! | [`signals`] | a signal runtime: [`signals::Signal`], bindings re-run only when a signal they read changes |
//! | [`tree`] | the compiled view tree (UI-4's schema), its interpreter over a [`tree::Renderer`]; the recording renderer (native tests) and, with `dom`, the DOM one |
//! | [`live`] | `live()`: a collection `{ rows, status }` folded from a snapshot and a changes stream, shared by method and params, kept 5 s past its last reader |
//! | [`folds`] | a component's handlers in Rhai — `(state, event) → state`, only `call` and `navigate` registered, `call` held to the component's `uses` |
//! | [`swap`] | the bundle's manifest, the module registry (name → hashes), mounting, hot-swap, and the sections (slots and their assignments) |
//! | [`html`] | UI-10: `{@html}` and `markdown()` — an allow-list sanitizer to a tree the renderer draws |
//! | [`router`] | `manifest.routes`: a hash route to a component, its `:name` segments the props |
//! | [`transport`] | the wire seam ([`transport::Wire`]): the one socket on wasm32, a fake for the tests |
//! | [`bus`] | FRAME-12: what every mounted component is handed — `call` and `live` held to its `uses`, `emit` / `on`, `navigate`, `slots_set` |
//! | [`keys`] | FRAME-36: every mounted component's shortcuts — chords and sequences, matched on the window's capture phase, the `?` overlay |
//! | [`marks`] | FRAME-17: the host's steps on the page's clock, `performance.mark` `plexus-ui:*` |
//! | [`module`] | FRAME-12: the module contract every profile implements, `mount(target, { props, bus }) → { update, destroy }` |
//!
//! FRAME-12 cuts it in two: the **host** — [`transport`], [`live`],
//! [`swap`] (versions, hot-swap, sections), [`router`], [`bus`],
//! [`module`] and the signals they publish on — and the **rhx runtime**,
//! the first profile (`rhx/1`): [`tree`], [`folds`], [`html`]. A module of
//! any other profile is an ES module the page imports; `js/host.js` is the
//! host's JS face, beside `engine.js` in every bundle.
//!
//! The wasm entry (`boot`) is [`entry`], behind the `dom` feature.
/// The host interface this engine implements; a manifest's `abi`.
pub const ABI: &str = "engine/1";