Quickstart
This walks from an app’s crate to a method call on a local cluster. An app is
a calimero:app component, written with the Rust SDK (calimero-sdk) and
built with calimero-app-build; the tutorial is the long
form, checking output at every step.
-
Rust with the
wasm32-wasip2target (core’srust-toolchain.tomllists it):Terminal window rustup target add wasm32-wasip2 -
Test the app on the real engine, with no node (
TestApp, incalimero-sdk’stestingmodule):Terminal window cargo test --manifest-path apps/kv-store/Cargo.toml -
Build the component:
Terminal window scripts/install-mero-app-build.sh # once: puts mero-app-build on PATHmero-app-build apps/kv-store --out kv_store.wasm -
Start a development cluster and sign in (mock attestation, a passkey in a file):
Terminal window cargo run -p merod -- localmeroctl node add local http://127.0.0.1:2501/ --allow-mockmeroctl login --dev-passkey ./dev-passkey.json --name alice -
Create an instance and call it:
Terminal window meroctl context create --name my-kv --path kv_store.wasm --alias my-kvmeroctl call -c my-kv set --args '{"key": "hello", "value": "world"}'meroctl call -c my-kv get --args '{"key": "hello"}' --view -
Package it for a real cluster: a signed
.mpk(Packaging & signing):Terminal window python3 -I scripts/pack-component.py --wasm kv_store.wasm --package com.example.kv \--app-version 0.1.0 --out dist/com.example.kv-0.1.0.mpk
Next steps
Section titled “Next steps”Build your first appThe guided long-form walkthrough, checking output at every step.
Example appsA tour of the in-repo apps under apps/ and what each teaches.
Writing apps for a clusterWhat an app sees once it runs on a cluster.