DEV Community

Cover image for Rotifer v0.1: CLI Framework & Rust Core — Building the Gene Lifecycle from Scratch
Rotifer Protocol
Rotifer Protocol

Posted on • Originally published at rotifer.dev

Rotifer v0.1: CLI Framework & Rust Core — Building the Gene Lifecycle from Scratch

The first alpha of the Rotifer Playground is here. This release establishes the full gene development lifecycle in a single CLI, backed by a Rust core that takes WASM sandboxing, fitness computation, and algebraic composition seriously from day one.

10 CLI Commands

The CLI covers the entire gene lifecycle out of the box:

rotifer init          # scaffold a project with genesis genes
rotifer scan          # discover candidate functions from source
rotifer wrap          # wrap functions as genes (phenotype generation)
rotifer test          # L2 sandbox testing
rotifer compile       # phenotype validation + fingerprinting
rotifer arena submit  # submit to local Arena with admission gate
rotifer arena list    # view rankings: F(g), V(g), Fidelity
rotifer arena watch   # placeholder for live ranking updates
rotifer agent create  # create Agents with gene genomes
rotifer agent list    # view all registered Agents
Enter fullscreen mode Exit fullscreen mode

Rust Core

The rotifer-core crate provides the foundational type system and engines:

  • Type System — Context, GeneResult, Phenotype, Gene, Agent, AlgebraExpr
  • WASM Sandbox — wasmtime-based with resource limits, fuel consumption, and epoch interruption
  • Arena Engine — local ranking with fitness-based sorting
  • Algebra Executor — Seq, Par, Cond, Try, Transform composition operators
  • Fitness Computation — simplified fitness score (F(g)) model with admission threshold
  • SQLite Storage — persistent genes, agents, and arena entries

5 Genesis Genes

Every new project ships with 5 pre-installed genes:

Gene Domain
genesis-web-search Full search with multiple results
genesis-web-search-lite Lightweight single-answer search
genesis-file-read Local file reading
genesis-code-format Source code formatting
genesis-l0-constraint L0 sandbox constraint checker

Developer Experience

Following the "Three-Act Demo" design pattern:

  1. Wow (30s)rotifer init scaffolds a working project with Arena preview
  2. Aha (5min) — wrap your own function, submit to Arena, see it ranked
  3. Hooked (30min) — compose genes, create Agents, explore fitness dynamics

Error messages follow Rust conventions: error codes, actionable suggestions, and documentation links.

By the Numbers

  • 10 CLI commands
  • 29 tests (unit + E2E)
  • 5 genesis genes
  • napi-rs bridge connecting Rust core to TypeScript CLI

Get Started

npm install -g @rotifer/playground@alpha
rotifer init my-project
Enter fullscreen mode Exit fullscreen mode

This article was originally published on rotifer.dev. Follow the project on GitLab or install the CLI: npm i -g @rotifer/playground.

Top comments (0)