Expand description
Runs an Eleventy site’s JavaScript data files in the site’s own Node.
One Node process per build runs a worker module embedded in this crate.
Brrrty sends it JSON requests on stdin; it answers on stdout with framed
replies, the values encoded exactly (see worker/encode.mjs) or
refused.
Re-exports§
pub use decode::decode;
Modules§
- decode
- The worker’s wire forms (see
worker/encode.mjs), decoded into Brrrty values. Anything not exactly one of the forms is an error: the worker and this file are one protocol, so a mismatch is a bug, never data. - stack
- Where a JavaScript error happened, from V8’s stack text: the first frame
inside the project and outside
node_modules, else the first frame.
Structs§
- Node
Info - A Node that can run the worker.
- Worker
- A running worker. Dropping it closes Node’s stdin, waits up to 2 s for it to exit, then kills it.
- Worker
Error - Node couldn’t be started.
Enums§
- Node
Missing - Why there is no Node to run the data with.
- RunMode
- How 11ty was started, as
ELEVENTY_RUN_MODEshows it.
Constants§
- ENCODE_
SOURCE - The worker’s value encoding, as JavaScript source.
- MIN_
NODE - 11ty 3’s own floor.
Functions§
- encode
- A Brrrty value in the worker’s wire forms.
- find_
node - Find Node:
env_override(the value ofBRRRTY_NODE) when set, elsenodeonPATH. - parse_
version v24.22.3(or24.22.3) as numbers.- stop_
all - Kill every running worker and what it started, at once: for Ctrl-C, SIGTERM and a panic. Safe to call from a signal handler thread.