Expand description
The server-side Chromium: found, started once with a profile of its own and a CDP pipe, shared by the panes, and stopped when the last pane has been gone a while. docs/specs/SPEC_STREAMED_BROWSER_PANE_DEMO_2026_11_15.md §2 and §3.
Structs§
- Lease
- A pane’s hold on the browser; letting go of it frees its place.
- Pool 🔒
- Slots
- How many panes are open, held to a limit.
Constants§
- BINARY_
ENV - A path to the Chromium binary, when it is not on the PATH under a usual name.
- ENV_
KEEP 🔒 - The environment variables Chromium gets, and nothing else: it opens pages from the web, so it gets none of srv’s own (the key, the local address) and none of the platform’s (cloud credentials, injected secrets).
- IDLE_
STOP 🔒 - How long Chromium is kept after its last pane closed.
- MAX_
PANES - At most this many panes at once: a CPU budget, not a memory one (report finding 4).
- NO_
SANDBOX_ ENV 1in the environment asks--no-sandbox(the demo only).- TAIL_
LINES 🔒 - How many of Chromium’s last stderr lines are kept, and how long each may be.
- TAIL_
LINE_ 🔒CHARS - USUAL_
NAMES 🔒
Statics§
- HOST_
PROFILE 🔒 - The profile folder a browser host was given: it has no data directory, and its profile is one fresh folder.
Functions§
- allowed_
env varscut down to the ones Chromium may have.- args
- The Chromium arguments: headless, its own profile, its pipe, nothing it does not need, and the one way out it
has: the address proxy on
proxy_port(address_proxy). Every connection goes through it, names are resolved by it (a local lookup is made to fail), and no route around it is left: no QUIC (UDP), no WebRTC over UDP that is not proxied, no DNS prefetch. - find_
binary 🔒 - keep_
child 🔒 - Hold the process until the browser’s pipe closes, then reap it.
- keep_
stderr_ 🔒tail - Drain Chromium’s stderr (so the pipe never fills), keeping the last few lines for a start that fails.
- lease
- A place in the shared browser, starting it when it is not running.
- pipe_
pair 🔒 - A pipe, both ends close-on-exec and above descriptor 4, so
dup2onto 3 and 4 never lands on one. - pool 🔒
- profile_
dir 🔒 - The profile folder: under srv’s data directory, never a desktop profile.
- profile_
under - The profile folder under a data directory: nothing else is ever a profile of this browser.
- route_
windows 🔒 - The browser’s new and ended pages are told to the pane that owns them (
popups): a window a pane’s page opens is shown by that pane. A page no pane lists is closed as it appears, with an opener or without one. The page the browser started with (blank) is srv’s own and is kept, so it is marked before news of pages is asked for. - running 🔒
- start 🔒
- starting 🔒
- Starting the browser is one at a time: two panes opened together must not start two Chromiums on one profile.
- use_
profile_ root