Commit 52b6c66
Add C++ Bindings (#3544)
# Description of Changes
This adds C++ server bindings (/crate/bindings-cpp) to allow writing C++
20 modules.
- Emscripten WASM build system integration with CMake
- Macro-based code generation (SPACETIMEDB_TABLE, SPACETIMEDB_REDUCER,
etc)
- All SpacetimeDB types supported (primitives, Timestamp, Identity,
Uuid, etc)
- Product types via SPACETIMEDB_STRUCT
- Sum types via SPACETIMEDB_ENUM
- Constraints marked with FIELD* macros
# API and ABI breaking changes
None
# Expected complexity level and risk
2 - Doesn't heavily impact any other areas but is complex macro C++
structure to support a similar developer experience, did have a small
impact on init command
# Testing
- [x] modules/module-test-cpp - heavily tested every reducer
- [x] modules/benchmarks-cpp - tested through the standalone (~6x faster
than C#, ~6x slower than Rust)
- [x] modules/sdk-test-cpp
- [x] modules/sdk-test-procedure-cpp
- [x] modules/sdk-test-view-cpp
- [x] Wrote several test modules myself
- [x] Quickstart smoketest [Currently in progress]
- [ ] Write Blackholio C++ server module
---------
Signed-off-by: Jason Larabie <jason@clockworklabs.io>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>1 parent f8ce1ed commit 52b6c66
File tree
264 files changed
+38853
-727
lines changed- .github/workflows
- crates
- bindings-cpp
- include
- spacetimedb
- abi
- bsatn
- internal
- autogen
- src
- abi
- internal
- tests
- client-comparison
- scripts
- type-isolation-test
- test_modules
- cli/src
- subcommands
- tasks
- codegen
- examples
- src
- schema/src
- testing
- src
- tests
- docs/docs/00300-resources/00200-reference/00100-cli-reference
- modules
- benchmarks-cpp
- src
- module-test-cpp
- src
- sdk-test-connect-disconnect-cpp
- src
- sdk-test-cpp
- src
- sdk-test-procedure-cpp
- client
- src
- module_bindings
- src
- sdk-test-view-cpp
- src
- sdks
- rust/tests
- unreal/src/SpacetimeDbSdk/Source/SpacetimeDbSdk/Public/BSATN/Core
- templates/basic-cpp
- spacetimedb
- src
- src
- tools/upgrade-version/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
264 files changed
+38853
-727
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
305 | 315 | | |
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
| 319 | + | |
309 | 320 | | |
310 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
311 | 324 | | |
312 | 325 | | |
313 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments