v0.1.0 · 2 tests · no_std Rust · $3 chip

The cell model, on a microcontroller.

A simulated ESP32 board with a temperature sensor, an LED, and the Quilt engine running on it. The reactive graph runs on bare metal.

🪛 simulated board
ESP32
240MHz
320KB
🌡
DHT22 → GPIO4
3V3
GND
▦ engine on chip
temperature
22.0°C
humidity
50%
flash used
3.2 KB
ram used
12 KB

cells on this device

sensor.tempsensor22.0
sensor.humidsensor50
fahrenheitformula71.6
heat_indexformula24.5
comfortformulacool
led.greeniotrue
led.rediofalse
led.blueiofalse
The cell model on bare metal

What runs on the chip

// src/main.rs — runs forever on the ESP32 use quilt_esp32::{{QuiltEngine, CellKind, CellValue, Sensor, Actuator}}; fn main() -> ! { let mut engine = QuiltEngine::new(); // 3 cells: sensor, formula, output engine.define("sensor.temp", CellKind::Sensor, CellValue::None); engine.define("led.on", CellKind::Formula, CellValue::None); engine.define("led.gpio", CellKind::Io, CellValue::Bool(false)); engine.add_dep("led.on", "sensor.temp"); loop { let t = dht22.read(); engine.set("sensor.temp", t); let on = t > 25.0; engine.set("led.on", on); led_pin.set_high(on); delay.delay_ms(1000); } }

3 cells. 3.2 KB flash. 12 KB RAM. A complete reactive system on a $3 chip.

Everything in a static memory block

No allocator. No heap. The cell graph lives in a fixed-size static array. Deep sleep is just `core::arch::wasm32::unreachable!()`. Wake on a timer or a GPIO interrupt, run the engine, sleep again.

  • Up to 64 cells per device (configurable)
  • 8 cells per dependency (configurable)
  • 32-byte cell id limit
  • Total footprint: 3-5 KB flash, 8-16 KB RAM

WiFi + BLE for the mesh

Connect to the Quilt mesh via esp-wifi (TCP/IP) or esp-ble (BLE). Sync cells with other devices. Run a tiny HTTP server (the cell graph) so a phone can read or write cells.

  • esp-wifi: full TCP/IP, mDNS, HTTP server
  • esp-ble: GATT server exposing cells as characteristics
  • LoRa: long-range mesh (separate crate)
  • Quilt mesh: peer-to-peer CRDT sync
View source → See all 11 repos