Tins · Execution
restate
Durable execution in Mojo, via Restate. A Rust shim embeds the official Restate SDK — Rust owns the HTTP/2 endpoint, the event loop and the journal — while your handlers are Mojo, driven by a synchronous loop where every durable operation crosses one C-ABI call.
Install
plain pixi:
pixi init app -c https://conda.modular.com/max -c conda-forge && cd app
sed -i.bak 's/^\[workspace\]/[workspace]\npreview = ["pixi-build"]/' pixi.toml
pixi add "mojo-compiler==1.2.0"
# Without mojoshelf: the tin as a git dependency at its published commit.
# Transitive dependencies may be wrong: pixi takes the tin's own git deps as
# pinned in its pixi.toml, which may not match what other tins pin, and then
# fails with "duplicate records". mojoshelf picks revisions that agree.
pixi add restate-mojo --git https://github.com/magmalake/restate.mojo --rev e391b04b0de1f0c1f5f1b5ab736d43d171e4d1f8 No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.
Version
0.4.1 on mojoshelf
What it does
Works today
- State, sleep, run and awakeables from handle_* functions App.run finds by name
- app.serve(num_workers) runs that loop on N threads via threads-mojo's WorkerPool
- Self-calls need two or more workers: one worker has no second thread to run the callee
- Payloads are raw bytes — parse and serialize in your handler
Correctness
Checked against Two end-to-end suites against a real restate-server booted per run, on macOS and Linux