Skip to content

Build Calimero Apps

A Calimero app is a sandboxed WebAssembly component that defines a shared, replicated state machine — its data types and the methods that mutate them. You write it in Rust against calimero-sdk, build it with meroctl app build into a component of the calimero:app world, and ship it as a signed .mpk package. Each running copy of it (an app instance) lives in an organization and has its own Raft log: the cluster runs each call once on the instance’s leader, on wasmtime, and replicates what it wrote.

from a Rust crate to a running app1 · Rust cratecdylib + calimero-sdk#[app::state] struct#[app::logic] impl#[app::event] / errorcargo test: TestAppon the real engine2 · componentmeroctl app buildcargo build --release wasm32-wasip2lift calimero:abi→ app.wasm(+ compute.wasm)3 · signed .mpkmeroctl app packmanifest.json: package, appVersion, sha256 of app.wasmsigned: JCS+Ed25519→ pkg-1.0.0.mpk4 · on the clusterinstall the package: signature, digest imports ⊆ world prepare (wasmtime)create an app: init as the owner, in an organizationdevelopment cluster only: meroctl context create --path app.wasmevery call, at run timeclient → any node → app's leader: handle(kind, method, args) on the componentOk → writes + events become one entry in the app's Raft log; followers apply the diff, never re-runErr or trap → nothing written, no events; a view reads state and writes nothing
  1. Quickstart — build an example app, run a local cluster, call a method, pack a release.
  2. Build your first app — scaffold → state → methods → test → build → run → share, end to end.
  3. Ship the next release — change the state, test it against what you shipped, upgrade.
  4. Pick a how-to guide for the task in front of you.
  5. Keep the Reference open as you go.