Synoema on IoT

From LLM prompt to Raspberry Pi in one command

Three deployment tiers. Six vertical MVPs. 30 rules across 6 verticals. WASM artifacts measured at 200 B mean. 30/30 sno check • 29/30 WASM • 100% GBNF. Formal requires/ensures contracts on safety rules — checked at compile time, not asserted in prose.

Try cloud_compile.py See the tiers

What this is

Synoema is a programming language designed for LLM code generation. The IoT track brings that design to the edge: a small model writes a Synoema rule, the toolchain compiles it to .wasm, and the artifact runs on a Raspberry Pi, an STM32, or an nRF5340 wearable — with the compiler proving it meets the contract the prompt declared.

This page reports what is measured as of 2026-04-18. No marketing claims, no roadmap teases. Numbers below all trace back to context/METRICS.md in the repository.

Three deployment tiers

Synoema programs can land on an IoT device three ways, ordered by "like a normal computer":

  Tier 2                       Tier 1                        Tier 0
  ──────                       ──────                        ──────
  Linux IoT                    Bare-MCU via wasm3            Native AOT to MCU
  (shipped)                    (shipped)                     (deferred)

  Synoema → Cranelift →        Synoema → WASM v2 →           Synoema → Cranelift →
  AArch64 / x64 ELF →          wasm3 interpreter on MCU →    Thumb2 ELF → flash
  scp or flash onto            firmware links wasm3          directly, no interpreter
  the device                   and loads the .wasm module

  Targets:                     Targets:                      Status:
  Raspberry Pi (aarch64)       Cortex-M0/M3/M4/M7            Blocked on Cranelift 0.104
  Jetson                       RP2040                        lacking an ARM32 backend.
  BeagleBone                   ESP32                         When upstream merges it,
  x86 edge gateway             any RTOS or bare metal        ~200 LOC to integrate.

Tier 2 is the native AOT path: sno build --native produces an ELF. Tier 1 is the WASM path: sno wasm produces a module, and a thin C host links wasm3 to execute it inside ~64 KiB flash and ~16–32 KiB RAM. Tier 0 is real bare-metal Thumb2 — we ship the CLI target name and the static preflight, but the backend is deferred pending upstream.

Six vertical MVPs, measured

Each vertical is 5 rules compiled end-to-end from a Synoema source. 30 rules total, 30/30 sno check pass rate, 29/30 WASM, 100% GBNF validation. Byte counts are from research/finetune/eval/results/2026-04-18-iot-platform-v1/wasm_sizes.json.

Home Automation — Raspberry Pi

Fan, night-light, humidity pump, thermostat hysteresis, occupancy lights.

Mean 74.2 B · max 87 B · min 71 B
5 rules, wasm+c-host target, Tier 1 deployment path.

Industrial Safety — STM32

Pump overpressure, flow min alarm, valve interlock, temperature envelope, emergency stop. Contract coverage 5/5 rules.

Mean 87.4 B · max 107 B · min 73 B
3 of 5 rules have both requires and ensures; the remaining 2 carry one side of the contract.

Wearable — nRF5340

Heart-rate alert, step milestone, inactivity timer, low battery, sleep detection. Budget 300 B; we use ~28 %.

Mean 84.6 B · max 102 B · min 74 B
5 rules, pure WASM target, fits comfortably inside the wearable budget.

Automotive — STM32

Speed limits, brake pressure, tire monitoring, EV battery guard — safety-critical rules for STM32 automotive controllers.

5 rules · 82–102 B · STM32

Agriculture — ESP32/RPi

Soil moisture irrigation, frost protection, CO₂ enrichment, NPK alerts — precision farming rules for ESP32/RPi edge nodes.

5 rules · moisture/frost/CO₂ · ESP32/RPi

Healthcare — nRF5340/RPi

SpO₂ alarms, blood pressure alerts, fever detection, heart rate monitoring — IEC 62443 safety contracts for medical IoT.

5 rules · 74–94 B · nRF5340/RPi

Measured

All numbers below are authoritative — they trace to context/METRICS.md and are regenerated by scripts/metrics.sh.

MetricValue
Tests passing (workspace)1855
Total IoT rules (Wave 2)30 rules across 6 verticals
sno check pass rate30 / 30 (100 %)
WASM compile pass rate29 / 30 (96.7 %)
GBNF validation pass rate100 %
WASM artifact size, Wave 2 mean200 B
WASM artifact size, Wave 2 max684 B
Wave 1 mean (home/industrial/wearable)82.1 B
Industrial contract coverage5 / 5 (100 %)
Rules with both requires and ensures3 / 5 (60 %)
factorial.sno classic benchmark (Tier 1 artifact)80 B
fizzbuzz.sno classic benchmark (Tier 1 artifact)667 B
Tier coverage3a, 3b, 3c, 4a, 4b shipped

Try it yourself

The cloud_compile pipeline ingests an English prompt, runs it through a small fine-tuned Synoema model, compiles the result to .wasm, and returns the bytes + metadata. Mock mode uses deterministic fixtures so you can inspect the round trip without a model server running.

python3 lang/tools/llm/cloud_compile.py \
  --mock \
  --prompt "Trigger pump alarm when pressure exceeds 12.0 bar for 3 seconds"

Output is a JSON envelope: source, typechecker result, WASM byte count, contract summary. Swap --mock for --model <name> once you wire a local model with MCP.

Reference documentation for each tier:

What is not claimed

The IoT track is built honestly. These items are deferred and are not currently shipped:

When the upstream ARM32 backend lands, Stage 2c flips from "CLI surface only" to a working Tier 0. Track the trigger in openspec/changes/iot-runtime-bare-mcu/roadmap.md.

Pre-trained IoT models on HuggingFace

Three fine-tuned models for Synoema IoT rule generation — ready to use with llama.cpp, Ollama, or the transformers library. All models verified on 127-example unseen test set.

🔬 IoT Nano 0.5B

Best compile rate: 97.6% on unseen test set. Q3_K_M, 339 MB. Fits any edge gateway.

delimitter/synoema-iot-nano-0.5b-v1 →

⚡ IoT Micro 360M

Smallest footprint: 259 MB Q4_K_M. 90.6% test pass rate. Designed for wearables and ultra-low-power MCUs.

delimitter/synoema-iot-micro-360m-v1 →

🏗️ IoT Lite 1.5B

Best balance of capability and size: 941 MB Q4_K_M. 85.8% test pass rate. Handles complex multi-condition rules.

delimitter/synoema-iot-lite-1.5b-v1 →

ModelBaseVal 104Test 127GGUF sizeHuggingFace
IoT Nano 0.5BQwen2.5-Coder-0.5B97.1%97.6%339 MB Q3_K_M↗ HF
IoT Micro 360MSmolLM2-360M86.5%90.6%259 MB Q4_K_M↗ HF
IoT Lite 1.5BQwen2.5-Coder-1.5B86.5%85.8%941 MB Q4_K_M↗ HF

General Synoema coder model: delimitter/synoema-coder-3b-v2 — 72.1% run_pass on general Synoema programs.

Why Synoema for IoT

LLM-native surface

Every operator is a single BPE token (cl100k_base). A 7B fine-tuned model reaches 90.5 % end-to-end correctness on the base task set. Constrained decoding via GBNF guarantees syntax. Prompts become artifacts.

Contracts as first-class

A rule can declare requires pressure > 0.0 and ensures alarm == True. The compiler enforces them at build time. On safety-critical verticals that is not a style choice, it is the point.

Tiny artifacts

200 B mean WASM across 30 rules in 6 verticals (Wave 1 baseline was 82 B on simple threshold rules). A 16 KiB flash budget holds dozens of rules with room for the wasm3 interpreter. No LLVM dependency, no 40 MB runtime.