Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

restate-rust

Sterne4
Forks0
Aktualisiert29. Juni 2026 um 20:14

How to AUTHOR a Restate handler in Rust (`restate-sdk` 0.10) without breaking durability — the determinism and error-handling contract that makes `workflows-service` replay-safe. Distilled from Restate's own `building-restate-services` skill (https://github.com/restatedev/skills), retargeted from its TS/Python/Java/Go examples to this workspace's Rust SDK and grounded in `workflows-service/src` (the only `restate-sdk` consumer). THE ONE RULE, load-bearing: every non-deterministic act — clock (`Utc::now`), randomness, UUIDs, a DB write, object storage, any network/IO call — must happen INSIDE `ctx.run(...)`, which journals the outcome so a replay reuses the recorded value instead of re-executing. Bare non-determinism in handler body = a replay that diverges from the journal = corrupted durable state. Trigger when adding or editing a handler in `workflows-service`, reaching for `#[restate_sdk::object]` / `#[restate_sdk::workflow]` / `#[restate_sdk::service]`, calling `ctx.run` / `ctx.get` / `ctx.set` / `ctx.sle

Installation

Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.

SKILL.md
readonly