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 two commands — build this project’s own recipe, and accept bytes a litz build --push already produced — and never a command string, so the link is not a shell.

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.