Expand description
The backend-agnostic interactive Quarb session.
The session logic — the &N / &N! / &N# macro history, its
resolution, and rendering coordination — is pure and depends on
two pluggable seams:
- an
Executor: where the arbor materializes and queries run.LocalExecutorruns in-process (the native full fleet, or the wasm text-format subset); a daemon executor (native, elsewhere) proxies to a resident process. - a
Store: where the session’s durable state persists — a file store on native, a browser store (localStorage) on wasm, orMemStorefor none.
Results cross those seams as Cells — node results already
rendered to their locator string, value results keeping their
type — because a raw NodeId is meaningless across a socket or
the JS boundary.
Re-exports§
Modules§
- doc
- Opening a source into a queryable adapter, and running queries against it.
Structs§
- Daemon
Executor - File
Store - A store persisting the macro history to a file under
~/.quarb, keyed by the source set — so restartingquaiover the same sources restores its&Nhistory. (Native only; the wasm build persists to localStorage instead.) - Local
Executor - MemStore
- The ephemeral store: no persistence, a fresh session every time.
- Session
- Session
State - The persistable part of a session: the macro history and the line counter. Frozen snapshots stay in memory for now — they regenerate on re-run, so persisting them is a later refinement.
Enums§
- Cell
- One result row, rendered so it can cross a process or JS boundary: a node as its locator string, a value keeping its type.
Traits§
- Executor
- The materialization + query substrate. Implementations run a query
against a standing arbor and return rendered
Cells. - Store
- A place to load and save
SessionState.MemStorekeeps nothing (a fresh session each run); a file store (native) or a browser store (wasm, localStorage) persists. The caller keys the store by the session’s source identity.