GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C# Async IDC by lisandroct · Pull Request #6620 · clockworklabs/SpacetimeDB

Conversation

@lisandroct

@lisandroct lisandroct commented Nov 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description of Changes

Follows Rust and TypeScript implementation of asynchronous inter-database communication in C#.

  • spacetime generate now generates C# module bindings, both from --bindings module --lang csharp and from spacetime.json dependencies.

  • You can declare outbox tables with [Table(Outbox = typeof(Gw.Reducers.X))] or [Outbox(typeof(...)] on an empty struct.

  • You can remap parameters with [Param].

  • [OnResult(typeof(Row))] marks the reducer that gets each call's result.

  • Outbox tables are only allowed in the root assembly.

  • To have schema parity with module-test, I also made it so a single-column index declared on a unique column now becomes that column's unique index, as in Rust.

API and ABI breaking changes

One breaking change for C# modules that declare [Index.BTree] on a [Unique] or [PrimaryKey] column: before the table had two accessors, the column-named unique index and the declared index; now the one declared accessor remains, and it is the unique index, with Find/Update/Delete and no Filter.

Rollback safety impact

n/a

Expected complexity level and risk

3/5. It has the breaking change I mentioned above and modifies source generation quite extensively.

Testing

I added:

  • Codegen.Tests snapshots and diagnostics:

    • outbox tables declared with [Table(Outbox)] and with [Outbox];
    • [OnResult];
    • every new error;
    • outbox tables in a referenced assembly;
    • snake-case conversion checked against Rust's convert_case.
  • Codegen crate tests:

    • a snapshot of the C# receiver bindings;
    • dependency-scoped type names;
    • the checked-in module-test-cs/Receiver bindings stay up to date.
  • CLI tests: namespace defaults, overrides and rejections.

  • module-test-cs: a port of module-test's IDC fixtures. The existing ensure_same_schema test checks its schema matches Rust's.

  • Smoketest: a C# sender calls a Rust receiver, and checks:

    • plain and nested-type calls;
    • a rejected call reaching OnResult with its error;
    • one transaction calling both dependencies;
    • enums from both dependencies surviving NativeAOT.
  • All of the tests above are passing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lisandroct
lisandroct force-pushed the lisandro/csharp-async-idc branch from 658a5f2 to 14d0d63 Compare November 19, 2026 13:10
JasonAtClockwork
JasonAtClockwork reviewed Nov 20, 2026
View reviewed changes
Comment thread crates/smoketests/tests/cluster/idc.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

JasonAtClockwork
JasonAtClockwork approved these changes Nov 23, 2026
View reviewed changes

@JasonAtClockwork JasonAtClockwork left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested end to end with a throw away project and looks solid!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lisandroct
lisandroct force-pushed the lisandro/csharp-async-idc branch from 14d0d63 to ebdd095 Compare November 25, 2026 13:55
lisandroct added 23 commits November 25, 2026 07:57
@lisandroct
Mock up plan
ec0a00a
@lisandroct
Add Name to Type
4444791
@lisandroct
Outbox registration
a6f03ed
@lisandroct
Parse typeof of Outbox Table
93539fc
@lisandroct
Compile tests
abc862d
@lisandroct
CLI
16132de
@lisandroct
Outbox tables
2c7fc1f
@lisandroct
OnResult
bb14257
@lisandroct
Reject idc declarations in dependencies
f29b7ff
@lisandroct
Rename IdcDeclarations to OutboxTables
0bc1065
@lisandroct
File I forgot to stage for the previous commit
f3fe6ce
@lisandroct
Fold indexes on unique columns into their unique index, like Rust
b37a949
@lisandroct
Smoketests (C# -> C#, C# -> TypeScript, C# -> Rust)
680dd05
@lisandroct
Update and clean docs
54e0f73
@lisandroct
Add [Outbox(...)]
4f738c5
@lisandroct
Fix naming conflicts
188b926
@lisandroct
Improve source generator performance a little bit
c651aa1
@lisandroct
Fix comment about enums
115ed2e
@lisandroct
Improve CI performance
db6b39c
@lisandroct
Clean
067ca30
@lisandroct
Add smoketest with C# receiver
97e9f1f
@lisandroct
Clean
63d7cb1
@lisandroct
Test outbox tables
3cf1ce0
@lisandroct
lisandroct force-pushed the lisandro/csharp-async-idc branch from ebdd095 to 3cf1ce0 Compare November 25, 2026 13:58
@lisandroct
Lint
f4c2c57
@lisandroct
lisandroct enabled auto-merge November 25, 2026 16:16
@lisandroct
lisandroct disabled auto-merge November 25, 2026 16:24
@lisandroct
lisandroct added this pull request to the merge queue Nov 25, 2026
Merged via the queue into master with commit 6497b05 Nov 25, 2026
86 of 87 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@clockwork-labs-bot clockwork-labs-bot mentioned this pull request Nov 26, 2026
docs: complete catch-up audit for storage, modules and SDKs #6621
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JasonAtClockwork JasonAtClockwork JasonAtClockwork approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lisandroct @JasonAtClockwork
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.