1bit.systems

Why Rust above, C++ below?

One-line answer: kernels that win on specific hardware live in C++/HIP because the GPU toolchains + intrinsics are there. Everything above the kernel — orchestration, HTTP, CLI, agents, file formats, clients — lives in Rust because we want memory safety, async runtimes, serde, and first-class binaries without a runtime dep.

The split

 ┌────────────────────────────────────────────────────────┐
 │  Rust (halo-workspace, 11 crates, 121+ tests)          │
 │  1bit-cli · 1bit-server · 1bit-router · 1bit-mcp       │
 │  1bit-agents · 1bit-lemonade · 1bit-helm · 1bit-landing│
 │  1bit-core (mmap + tokenizer + sampler) · halo-bitnet-*│
 └──────────────────────────┬─────────────────────────────┘
                            │ extern "C" FFI via 1bit-hip
 ┌──────────────────────────▼─────────────────────────────┐
 │  C++ / HIP (rocm-cpp, bong-water-water-bong canonical)             │
 │  ternary_gemv_halo · ternary_gemv_sherry · ternary_tq1 │
 │  kv_cache_attn_fd · kv_cache_attn_i8 · rotorquant_*    │
 │  h1b_loader · tokenizer                                │
 └────────────────────────────────────────────────────────┘

Why kernels in C++ / HIP

Why everything else in Rust

Why not pure Rust end-to-end?

Tried considering it. Vetoed because:

Why not pure C++ end-to-end?

Rejected for the orchestration layer. Reasons:

Not Python (ever, at runtime)

Rule A. See Why-No-Python.md.

Callers are free to use Python — DSPy, lemonade-python-sdk, jupyter. That's the user's box, not ours. The service side (anything under a systemd unit, anything serving an HTTP request) is Rust or C++.

The inherited trade-off

We pay:

We get:

That trade has paid for itself four times in four months.