clockworklabs / clockworklabs/SpacetimeDB

Perf: allow annotating SpaceTimeTypes to generate structs client-side

Open
#2,692 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request performance
Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Currently, all SpaceTime types are converted to classes in the C# SDK. We would like to generate structs for e.g. small vectors, but currently this is impossible because information about structs vs classes is lost.

We can't simply convert all types to structs, or convert only C# server-side structs to structs, because structs behave semantically different from classes in C# and this could break clients. Instead, we can provide an annotation that a type should be a client-side struct. (For 2.0, we could make more aggressive changes.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace how SpaceTime types are converted into the C# SDK and where information about server-side structs versus classes is discarded. Define the annotation and verify that annotated types generate client-side structs while unannotated types retain current class behavior, preserving existing client semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, rust
Domain
backend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.