nano.rust

A pure-Rust, semantics-first NanoAOD analysis framework for high-energy physics — built for the agentic-coding era.

CI docs repo

The thesis: agents now write analysis code faster than anyone can review it, so correctness has to move out of soft guidance and into a hard, mechanical gate. The division of labour: physicists review the physics semantics; agents generate the implementation; the Rust compiler and a validation layer reject any inconsistent state — a branch that doesn't exist for the era, a histogram filled before selection, a cross-section added to a luminosity (fb vs fb⁻¹), an incomplete set of systematics. The analysis is modelled as a typed state machine that makes invalid states unrepresentable.

This doesn't reinvent the agent harness — it confines one: the action space is gated by the compiler and the validator, so the orchestrator proposes and the compiler disposes (over a CLI and an MCP server). And the guarantee pays a dividend — a per-event kernel that compiles has no hidden shared state, which is exactly the condition for safe parallelism: if it compiles, it's safe to parallelize. On top sit Rust's systems strengths — performance, FFI to legacy libraries, SIMD per-event execution, and TUI-friendly orchestration.

API docs →

rustdoc for the workspace crates.

nano_spec · nano_analysis · nano_inference · nano_io · nano_core

Notes / blog →

Design notes, screencasts, and essays — including a spec→code walkthrough and the "compiler rejects a data race" demo.

Source →

Code, design docs, and roadmap on GitHub.

What works today

CMS Higgs to ZZ to 4 leptons discovery plot reconstructed by nano.rust from open data: ZZ background, m_H=125 signal, and 2012 data

The CMS Higgs→ZZ→4ℓ discovery plot, reconstructed by nano.rust from CMS Open Data and bit-identical to ROOT's df103 — signal + ZZ background stacked, 2012 data overlaid (11.6 fb⁻¹).