Skip to main content

Crate whisker_runtime

Crate whisker_runtime 

Source
Expand description

Core runtime for Whisker.

Public surface, after the Phase 6.5a A3 cleanup:

  • element — the ElementTag enum that the macro emit and the C bridge agree on.
  • reactive — Leptos-style fine-grained reactivity: signals, effects, memos, owner tree, component lifecycle, context.
  • view — element-handle + type-erased renderer (DynRenderer) the render! macro emits against. Includes Show / For control flow.
  • host_wake — host’s “wake up” callback, registered by whisker-driver::bootstrap and pinged by the reactive scheduler when new work appears.
  • main_threadrun_on_main_thread, the worker-thread → TASM-thread marshaling primitive used to update signals from background work (HTTP fetch, channels, etc.).

Pre-A3 the crate also exposed an Element value tree + diff/patch pipeline; that retired when the macro switched to emitting imperative view::* calls driven by reactive effects.

Modules§

element
Element tag enum, shared between the render! macro emit and the bridge tag-mapping table.
event
Typed event objects deserialized from the WhiskerValue body Lynx hands an event handler.
host_wake
Host wake-up bridge — the C callback the iOS / Android shell registers so the runtime can ask the host to schedule another whisker_tick.
main_thread
Post a closure to the Lynx TASM thread (= Whisker’s main thread).
reactive
Leptos-style fine-grained reactivity.
tasks
Single-threaded async task host.
value
WhiskerValue — the universal tagged-union value model shared by the whole framework.
view
View layer — element handles, type-erased renderer, IntoView.