resonate-recursive-fan-out-pattern-rust
Installation
SKILL.md
Resonate Recursive Fan-Out Pattern — Rust
SDK note. The Rust SDK is in active development (v0.6.0, on crates.io). This pattern uses
ctx.run().spawn()andctx.rpc().spawn()— both synchronous as of 0.5.0+. Verify against current SDK source before shipping.
Overview
Recursive fan-out spawns multiple child invocations in parallel, awaits them individually, and (optionally) recurses deeper. The Rust expression uses .spawn() on a Context execution builder to get a DurableFuture, collects those futures into a Vec, then awaits each in turn.
For the language-agnostic mental model, see resonate-recursive-fan-out-pattern-typescript.
When to use
- Batch processing where items are independent
- Web crawling / tree traversal with dynamic depth
- Map-reduce shaped workflows
- Any fan-out where each leaf is a discrete, retryable unit