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 gcc-core@1.0.0Adoption
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.0, running entirely on your machine. View on crates.io
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 gcc_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 roughly ~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.
03 · Why bother
What does the governor actually save?
On a saturating loop the governed arm cut upstream spend by up to 96%: the best measured case was gpt-5.6-sol at $0.1669 ungoverned to $0.0068 governed, a 95.9% reduction. Across seven 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.
- Web3 (npm)@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-02 · paper arXiv 2607.24339, DOI 10.5281/zenodo.21303518