spacetimedb-rust
OfficialDevelop deterministic SpacetimeDB modules in Rust
Authorclockworklabs
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill guides developers to author correct, deterministic WebAssembly server modules for SpacetimeDB using Rust, reducing runtime errors and misuses of the SpacetimeDB 2.0 API surface such as incorrect table attributes, mutable reducer contexts, or unsafe side effects.
Core Features & Use Cases
- Table and Index Patterns: Clear guidance for declaring tables, primary keys, auto-increment, and single- or multi-column indexes so data is stored and queried correctly.
- Reducer and Procedure Rules: Rules for writing reducers with an immutable ReducerContext, deterministic RNG usage via ctx.rng(), safe error handling via Result, and when to use procedures for network I/O.
- Lifecycle, Scheduled, and Event Patterns: Examples for init, client connect/disconnect, scheduled reducers, and event tables with on_insert subscription patterns.
- Operational Best Practices: Transactional semantics, no global state, no filesystem/network in reducers, CLI build/publish commands, and common pitfalls to avoid.
Quick Start
Create a new Rust module that defines a public table and at least one reducer, build it with the spacetime CLI, and publish it to your target database.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: spacetimedb-rust Download link: https://github.com/clockworklabs/SpacetimeDB/archive/main.zip#spacetimedb-rust Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.