Key takeaways
- Methods are logged calls that read and write state, capped at 2 seconds and a 1 MiB log entry.
- Timers run on an interval. Actions run multi-step outbound work off the log.
- Compute runs handle minutes of CPU over large sealed files on attested job nodes, and pipelines chain them.
What is a method?
An app is a Rust crate built withcalimero-sdk into a calimero:app WebAssembly component. Its public methods are what clients call. A call runs on the instance's leader on wasmtime, and its outcome is written to the app's log.
A call stops at 2 seconds, and its log entry stays under 1 MiB. Use methods for anything that reads or writes state. Views read without writing. A method marked #[app::confirm] needs a fresh passkey confirmation from the caller every time.
How do scheduled jobs work?
A method marked#[app::every("1m")] is a timer. The node runs it on that interval as a logged write, with intervals in seconds, minutes or hours.
Missed slots aren't replayed. After a gap, the leader runs only the latest due slot once and tells the method how far back the last run was. That keeps a timer that sweeps expired bookings from running a hundred times after a restart.
What about work that calls other services?
An action does what a call can't: several HTTP requests, or seconds of waiting, without holding up the log. A call or timer starts one withenv::start_action. The leader then runs it outside the log, within a 10-second budget, as the account that started it.
From inside, an action can read state, make outbound requests through the same approval gates as calls, and write its results back with a normal call. Each start is logged, so a leader change never loses an action. An app can have up to 1,000 pending actions at once.
How does Calimero Network run heavy, private compute?
A compute run is for minutes of CPU over large files that must stay private. You mark a compute method in the same crate, and Calimero Network builds it into a separate compute component that goes into the same signed package.
The leader attests a job node, sends it the component, a signed assignment and the input files, and gets back a signed report. Each method sets caps for fuel, memory and wall time, within the host's limits. When the run ends, a result method on the app receives the outcome and stores what it needs.
A pipeline chains compute steps in YAML, for example one run per document and then one that joins the results. You can validate it before you pack.
Frequently asked questions
What language are Calimero Network functions written in?
Rust, using calimero-sdk, compiled to a calimero:app WebAssembly component that runs on wasmtime inside attested Intel TDX nodes.
Can a function call an external API?
Yes, once per call or from an action, but only to HTTPS URL prefixes declared in the signed release and approved for the app. Secrets are filled in by the node and never visible to the app.
What is the difference between an action and a compute run?
An action runs short outbound work (up to 10 seconds) on the leader. A compute run handles long CPU work over large sealed files on an attested job node.
