Chapter 11 · agent-neuron · Lab
The same wrapper, in Rust
The typing demo with its tracks neuron written in Rust: the same rule, the same answers, another language inside the wrapper.
A small Rust program, same rule
The typing demo’s tracks neuron is replaced by a small Rust program, run through the shell adapter like any other program. It keeps the same rule and the same made-up catalogue as the JavaScript neuron it stands in for, so the answers agree; the neuron id, tracks (rust), shows where each answer came from, and stale work is still aborted and printed as dropped.
The rule it proves
The contract is language-neutral (SPEC 3.1): the wrapper starts the program, hands it one JSON value and reads one back, so a neuron can hold a shell script, a compiled binary, a model call, anything that reads and writes JSON on its standard streams.
Run it
npm run demo:rustWhat it is not
Not a free crossing: the shell adapter starts a process per signal, so the program pays a start each time it is asked, and the demo needs a Rust toolchain to build its one file.
