Skip to main content

Module editor_link

Module editor_link 

Source
Expand description

litz connect-editor: the link between a build and the editor page.

The editor cannot run a firmware toolchain, and litz build cannot draw a circuit. This module is the smallest bridge between the two: one process, one loopback port, a pairing token, WebSocket text messages for commands and build output, and an in-memory artifact store the editor fetches over plain HTTP.

Nothing leaves the machine. The token is the only way in: a page that was not handed the URL printed by connect-editor gets 403 on every route. The socket accepts three commands — build this project’s own recipe, accept bytes a litz build --push already produced, and read or write the editor’s project library — and never a command string, so the link is not a shell.

The library is the only place the link touches the filesystem for the page: flat .litzproject.json files under .litz/projects, each named by a stem that cannot leave that directory.

Structs§

Options
What a link serves and who may reach it.

Constants§

DEFAULT_PORT

Functions§

push
A project’s built image, ready to hand to an editor.
serve
Serve a project to an editor page until the process is interrupted.