Crate stream
Expand description
A web page as a layered display list.
The engine runs where the session lives (the host): it owns the JS heap,
cookies and storage, and none of that leaves it. What every client receives
is a Frame — what the page looks like, as paint-ordered items — and
afterwards only Patches. Each client draws the frame with its own Vello
and text stack, exactly like every other Tilo surface, so a WASM client
renders a page the same way it renders Notes.
Layers keep patches small. A scroll container, a fixed or a sticky box is a
Layer with its own origin and scroll offset, and its items are stored
relative to it, so scrolling the page or a sidebar, or a sticky header
sliding, changes one layer header instead of every item beneath it. The
client scrolls the root layer locally and tells the host afterwards.
Modules§
- snapshot
- Frame from a
DevToolsDOMSnapshot.captureSnapshotresult. - svg
- SVG images as vector drawings (feature
svg): a page’s logos reach a client as paths it draws at any scale, not as bytes it cannot decode. Without the feature (the WASM client, which only draws) nothing converts. - wire
- The paint stream as a
tilo-paintsurface stream.
Structs§
- Color
- Straight-alpha sRGB.
- Font
Spec - The font a text run asks for. The family is the page’s CSS list; the client resolves it against the fonts it has.
- Frame
- A whole page at one moment.
- ItemKey
- Identity of an item across frames: the element and which of its fragments (text line, box decoration) it is. Patches key on it.
- Layer
- Layer
Change - One layer’s change.
headercarries every field but the items (itsitemsare empty);itemsreplaces the run between an unchanged prefix and an unchanged suffix. - Patch
- The change from one
Frameto the next. - Point
- Rect
- Shape
- One filled and/or stroked SVG shape.
Enums§
- Anchor
- What a layer’s origin is relative to.
- BlobRef
- Content an item references by value rather than inline: an image’s bytes. The host resolves the page URL to a content hash before a frame leaves it, so a client never learns, and never fetches, the authenticated URL.
- Item
- One paint operation, in its layer’s content coordinates.
- Patch
Error
Constants§
- ROOT
- The root layer: the document, scrolled by the page’s scroll offset.
Functions§
Type Aliases§
- LayerId
- Stable identity of a layer: the engine’s id for the element that roots it.