Rust and WebAssembly.
The deciding core with no proxy and no network: a pure state machine you can call directly, or compile to wasm and run at the edge.
Install from crates.io
cargo add gubernaut-coreAdoption
let mut ctl = Controller::default();
let posture = ctl.tick(intensity, valence, repetition);The Rust core is the deciding state machine, not a proxy. There is no base_url to set and no HTTP client: you call tick() and act on the posture it returns.
Free and Apache-2.0, version 1.0.1, running entirely on your machine. View on crates.io Read the source
01 · Quickstart
How do I use it once it is installed?
Point your existing client at the local proxy and change nothing else. Every turn then passes the controller, which reads intensity, valence, repetition and holds a posture. A saturating loop is hard-stopped at turn 4.
use gubernaut_core::Controller;
// the controller holds meta-state across turns and decides a posture.
// no allocation in the hot path, no network, no tokens.
let mut ctl = Controller::default();
let posture = ctl.tick(intensity, valence, repetition);
match posture {
Posture::Default => forward(request),
Posture::Inhibit => forward(request.with_clamped_temperature()),
Posture::Reground => local_fallback(), // zero upstream tokens
}02 · Notes
Rust / WASM specifics
How fast is one decision?
One controller tick measured p99 2.8 microseconds as an in-process microbenchmark over 100,000 iterations on Windows 11 AMD64. Compiled to wasm the same logic runs at ~125 ns per tick inside Cloudflare workerd, with 200 ns p99 measured on the identical binary in a Node worker.
Does the Rust core agree with the Python reference?
Yes, and it is checked rather than assumed. The compiled Rust core reproduces the Python controller bit-exactly. The repository ships the golden traces, so parity is something you can reproduce locally rather than take on trust.
Is it safe to run at the edge?
A 10,000-tick soak in Cloudflare workerd was bit-exact against the reference with flat memory and no latency degradation, and the same held in a Node worker and on the Node main thread. The crate carries a deny-unsafe-code attribute, scoped-allowed only for the export attribute on the FFI shim.
Why is the crate now called gubernaut-core?
The crate was renamed from gcc-core to gubernaut-core because the old name was unsearchable: typing "gcc" into any developer search returns the GNU Compiler Collection. crates.io cannot rename a crate, so gcc-core was given a forwarding address rather than being abandoned. It is still published, it still installs, and it re-exports gubernaut-core, so an existing build keeps working with no change. The compiled controller is byte-identical across the rename, which means every measured figure on this site describes the same binary it did before.
Can I run the same controller from JavaScript?
@gubernaut/core is the same controller compiled to WebAssembly and bound for JavaScript, installed with npm install @gubernaut/core. It runs in-process with no proxy hop and no dependencies, which is what makes it usable in a serverless function, an edge worker or a browser, where a local proxy process cannot run. It decides, it does not intercept. Acting on a REGROUND posture is the caller's job, which is the one thing the proxy does that this does not.
03 · Why bother
What does the governor actually save?
On a saturating loop the governed arm cut upstream spend by up to 95.9%. That ceiling is one measured run: gpt-5.6-sol at $0.1669 ungoverned, down to $0.0068 governed. Over seven measured configurations across four model families the reduction ranged 79.8% to 95.9%. Both arms made the same number of attempts, so the delta is the measurement.
Source: Pre-registered receipts benchmark, 2026-07-19. Scored output of harness/report.py.
04 · Other runtimes
Other languages
The same controller ships for three runtimes. They share the deciding core, so a posture decision is identical whichever one you run.
- Pythongubernaut-sdkThe reference implementation. A local OpenAI-compatible proxy you launch in front of the upstream you already call, plus the controller itself.
- Node / on-chain@gubernaut/plugin-gccAn ElizaOS plugin for autonomous on-chain agents, where a retry loop does not just cost tokens. It costs gas, every lap, until the wallet is empty.
Last reviewed 2026-08-07 · paper arXiv 2607.24339, DOI 10.5281/zenodo.21303518