resonate-basic-debugging-rust
Installation
SKILL.md
Resonate Basic Debugging — Rust
SDK note. This SDK is in active development (v0.6.0, published on crates.io), and documented behaviors may shift between releases. Failure modes listed here are what the documented surface produces; new ones will appear as the SDK grows.
Overview
Rust's failure modes differ from TS's and Python's. Compile-time type errors catch many bugs the other SDKs only discover at runtime; the remaining runtime failures are usually serde, tokio, or registration-name related. This skill covers the shapes you'll actually see.
For the language-agnostic replay + recovery mental model, read durable-execution first.
Triage flow
- Does it compile? If
cargo buildfails, you're in type-error territory (likely: missingResult<T>return, wrong first-parameter type, forgotten&on Context/Info, missing?on an await) - Does it register?
resonate.register(fn)returns aResult; unwrap it and look at the error (duplicate name, bad signature) - Does the function kind match expectations? The SDK infers kind from the first parameter —
&Contextvs&Infovs a value type - Is serde happy? Input/output types need
Serialize+Deserializederives; stack traces mentioningserde_json::Errormean a type doesn't derive correctly - Is the tokio runtime correct?
#[tokio::main]or#[tokio::test(flavor = "multi_thread")]needed; single-threaded runtime can deadlock on SDK internals - Check server + SDK compatibility. The SDK version in
Cargo.tomlmust align with the server version you're testing against; check the SDK CHANGELOG for compatibility notes