What problem does it solve?
This guide removes ambiguity and prevents common mistakes when building C# server modules and client integrations for SpacetimeDB 2.0 by documenting correct attributes, project layout, deterministic reducer patterns, and client subscription behavior.
Core Features & Use Cases
- Server module patterns: rules for partial types, table attributes, primary keys, auto-increment semantics, sum types, and deterministic reducers required for WASI modules.
- Client SDK integration: connection setup, subscription management, event callbacks, FrameTick usage, reducer calls, and authentication/token handling for C# clients.
- Project and build requirements: .NET 8 SDK, wasi-experimental workload, StdbModule.csproj naming, SpacetimeDB.Runtime package conventions, and tooling commands to generate client bindings.
- Common pitfalls & hard requirements: lists of frequently hallucinated APIs to avoid, index attribute qualification, collection types, lifecycle reducer conventions, and recommended error handling.
Quick Start
Create a net8.0 StdbModule.csproj with partial tables and deterministic reducers, install the wasi-experimental workload, build the WASI module, and run spacetime generate --lang csharp to produce client bindings and examples.