Skip to main content

Crate sim_web_shell

Crate sim_web_shell 

Source
Expand description

sim-web-shell: the binary that serves the SIM WebUI shell.

The crate embeds its web/ browser assets and serves cookbook APIs through the shared server/cookbook libraries. The browser shell is a thin Scene painter and Intent emitter with an Atelier cache view over the generated Site graph, constellation index, Retrieval Radar, and Guideline Firewall reports. The shell ships no second data model and no second semantics.

Structs§

Asset
A static asset resolved for an HTTP path: its bytes and MIME content type.
AtelierCliLib
Loadable lib that claims the atelier command-line verb.
AtelierWebResponse
HTTP response generated by the Atelier cache adapter.
AtelierWebState
Atelier state loaded by sim-web-shell at startup.
BrowseCliLib
Loadable lib that claims the browse command-line verb.
LiveSession
A server-held live session: a Session over a deterministic in-memory FixtureTransport, its LensRegistry (with the universal default lens registered), and the runtime Cx used to render Scenes.
ServeConfig
Configuration for the shell server.

Constants§

DEFAULT_PANE
The default pane the shell opens the demo resource into. The shipped app.js posts Intents for this pane.
DEFAULT_RESOURCE
The default resource seeded into the live session for the demo shell.

Functions§

asset_for
Resolve a request path to an embedded asset, or None for a 404.
decode_intent_body
Decode an Intent from an untagged-JSON request body and lift its envelope back to faithful Exprs. Returns a structured error string on malformed JSON or a non-object body; it never panics.
encode_patches
Encode a batch of Scene updates as the untagged-JSON { "patches": [...] } response the browser’s patch listener consumes.
encode_scene
Encode a Scene as the untagged-JSON { "scene": ... } response the open route returns.
error_json
Encode a structured { "error": message } JSON body.
serve
Bind and serve the shell until the process is terminated.