render prysm chunks
A rune program renders UI by evaluating to a chunk-noun, which
rune-prysm decodes into tape::Chunks — the wire format prysm draws to wgpu,
ansi, or html. rune eval shows the decoded chunks.
All commands run from rs/.
constructors
| call | makes | output sigil |
|---|---|---|
text("…") |
a text chunk | (# t) |
error("…") |
an error chunk | (! e) |
anno("…") |
an annotation | |
log("…") |
a log line | |
button("label", "target") |
a button | |
col(a, b, …) |
a column — one chunk per element |
a single chunk
(# t) hello
several chunks in a column
(# t) first
(# t) second
col yields one chunk per element, in order.
emitting versus returning
A chunk can be the program's value (as above) or it can be emitted as
the program runs, through the emit act:
Emitted chunks appear first, then the final value's chunks. Both feed the same
prysm::dispatch. The difference matters once a program emits many chunks over
time — see acts and the ward.
non-UI values
A program whose value is not a chunk-noun — plain arithmetic, say — prints as a noun instead:
42