Skip to main content

whisker_runtime/
lib.rs

1//! Core runtime for Whisker.
2//!
3//! Public surface, after the Phase 6.5a A3 cleanup:
4//!
5//! - [`element`] — the [`ElementTag`](element::ElementTag) enum that
6//!   the macro emit and the C bridge agree on.
7//! - [`reactive`] — Leptos-style fine-grained reactivity: signals,
8//!   effects, memos, owner tree, component lifecycle, context.
9//! - [`view`] — element-handle + type-erased renderer (`DynRenderer`)
10//!   the `render!` macro emits against. Includes `Show` / `For`
11//!   control flow.
12//! - [`host_wake`] — host's "wake up" callback, registered by
13//!   `whisker-driver::bootstrap` and pinged by the reactive
14//!   scheduler when new work appears.
15//! - [`main_thread`] — `run_on_main_thread`, the worker-thread →
16//!   TASM-thread marshaling primitive used to update signals from
17//!   background work (HTTP fetch, channels, etc.).
18//!
19//! Pre-A3 the crate also exposed an `Element` value tree + diff/patch
20//! pipeline; that retired when the macro switched to emitting
21//! imperative `view::*` calls driven by reactive effects.
22
23pub mod element;
24pub mod event;
25pub mod host_wake;
26pub mod main_thread;
27pub mod reactive;
28pub mod tasks;
29pub mod value;
30pub mod view;