DEV Community

Cover image for Rotifer v0.2: IR Compiler & Algebra — Genes Learn to Compose
Rotifer Protocol
Rotifer Protocol

Posted on • Originally published at rotifer.dev

Rotifer v0.2: IR Compiler & Algebra — Genes Learn to Compose

v0.2 turns genes into first-class WASM citizens with content-addressable identity, adds true parallelism to the algebra engine, and publishes the Rust core as an independent crate.

IR Compiler Pipeline

The new rotifer-core::compiler module brings full Intermediate Representation support:

  • Custom WASM sectionsrotifer.version, rotifer.phenotype, rotifer.constraints, rotifer.metering
  • Content-addressable identity — every gene gets an irHash computed via SHA-256 over its IR content. Identity is derived from what a gene is, not what it's called.
  • IR verifier — static validation of exports, prohibited instructions, and memory limits
  • 5 genesis WASM genesecho, wrap, search, summarize, translate compiled to real IR
rotifer compile --wasm   # full IR compilation with phenotype update
Enter fullscreen mode Exit fullscreen mode

Algebra Parallelism

The Par operator now uses true CPU parallelism via std::thread::scope instead of sequential execution. When your genome says "run these genes in parallel," they actually run in parallel.

crates.io

rotifer-core is now published as an independent Rust crate with full rustdoc coverage on all 150+ public API items. Rust developers can build on the Rotifer type system and engines directly.

CLI Upgrades

  • rotifer compile — full IR compilation with --wasm flag, phenotype update, and compile-result.json output
  • rotifer arena watch — real-time ranking diff monitoring with summaries

Fixes

  • Try operator now correctly returns the primary result on success (was re-executing the primary gene)

By the Numbers

  • 22 → 180 tests across 10 modules
  • New dependencies: rmp-serde, wasm-encoder, wasmparser

Get Started

npm install -g @rotifer/playground@alpha
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)