clockworklabs / clockworklabs/SpacetimeDB
Perf: allow annotating SpaceTimeTypes to generate structs client-side
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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