prototype.rs
rustc 1.84.0-nightly · build #2913 · passing
v0.7.2-alpha MIT / Apache-2.0
Phase 01 / 05 · the abstract promise

Declare

trait.rs L · 1-14
01pub trait Prototype<T> where
02    T: Compilable + Send + Sync,
03{
04    type Output;
05    type Error: std::error::Error;
06
07    fn declare(&self) -> Spec<T>;
08    fn scaffold(spec: Spec<T>) -> Frame;
09    fn compile(frame: Frame) -> Build;
10    fn test(build: &Build) -> Report;
11    fn ship(self) -> Result<
12        Self::Output, Self::Error
13    >;
14}
a workspace for ideas that want to become real

The prototype
is the product.

prototype.rs is a Rust-first scaffold for turning rough sketches into running software in five disciplined moves: declare, scaffold, compile, test, ship. Every panel below is the same code at a different stage of becoming.

❯_ cargo install prototype 12.4 MB · 2.1s cold read the manifesto 4 minute read
// in flight 14 builds
// resident memory 3.1 MB
Phase 02 / 05 · structure emerging

Scaffold

scaffold.toml L · 1-12
01[workspace]
02members = [
03    "core",
04    "surface",
05    "runtime",
06]
07
08[prototype]
09shape = "split"
10depth = 3
11finish = "frosted"
12iterate-on-save = true
[1] declare a contract
[2] sketch the surface
[3] wire the runtime
module · core

A surface that’s honest about what’s underneath.

Translucent panels show the load-bearing geometry — types, lifetimes, ownership — without burying it in chrome. You see the prototype thinking.

async no_std-friendly zero-alloc fast path
module · surface

Glass over scaffold, not glass instead of it.

Every UI primitive carries a debug trail. Hold ⌥ on any element to peel back the polish and see the wire underneath.

module · runtime

Hot-reload that respects your invariants.

The runtime keeps a typed snapshot of every state your prototype has ever been in — so iteration never costs you the last working version.

Phase 03 / 05 · the moment of transformation

Compile

build.log streaming
 resolving 142 crates from registry
 compiling proc-macro2 v1.0.86
 compiling syn v2.0.79
 compiling tokio v1.40.0
 compiling prototype-core v0.7.2
 compiling prototype-surface v0.7.2
 linking _
// transformation in progress

Translucent panels harden into polished surface as the sweep passes.

parse resolve type-check borrow-check codegen link
0.412s incremental rebuild
2,981 lines of IR emitted
0 warnings strict.lints = deny
codegen · aarch64-apple-darwin · opt-level=3 · lto=thin
Phase 04 / 05 · under pressure

Test

#[tokio::test]
async fn stress_glass() {
    let p = Prototype::new();
    for _ in 0..10_000 {
        p.tick().await?;
    }
    assert_eq!(p.cracks(), 0);
}

The prototype under pressure.

10,000 iterations across the surface API. No allocations on the hot path. No cracks in the glass.

PASS 0.84 ms
surface::render::isolation 1,000 frames · p99 = 1.2ms
PASS 12 ms
core::ownership::fuzz 500k inputs · quickcheck
WARN 203 ms
runtime::reload::loop drift 0.4% · under threshold
PASS 3.1 ms
surface::glass::backdrop visual diff < 0.001
PASS 61 ms
runtime::snapshot::roundtrip 2,300 prototype states
PASS 7 ms
core::scheduler::backpressure 10k tasks · no starve
96passed 1warning 0failed 2.4stotal
Phase 05 / 05 · glass becomes mirror

Ship

$ cargo prototype ship
 signed
 notarized
 published
  — live in 0.3s
build passed · ready to leave the workshop

From rough sketch to running software,
without ever leaving the page.

The same five panels — declare, scaffold, compile, test, ship — are how you start, iterate, and release. The prototype doesn’t get thrown away. It hardens into the product.

cargo prototype ship read the changelog
v0.7.2 latest release · 19 Mar 2026 incremental linker, 1.6× faster cold builds, dual-panel devtools.
12,481 prototypes shipped across CLI tools, embedded firmware, and one very small spacecraft.
~0 throwaway code the prototype hardens into the product. no rewrite, no rebuild.
prototype.rs — the prototype is the product. © 2026 prototype.rs · MIT / Apache-2.0 github · crates.io · rfc-tracker