mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-03-20 09:01:05 +08:00
# Description of Changes - Updated the Unreal SDK and generated Unreal bindings for the websocket 2.0 protocol/model - Reworked DbConnectionBase to handle the updated message shapes - Switched subscription handling over to new message types and QuerySetId - Updated reducer to ReducerResult, removal of callbacks, and set reducer flags - Added event table support - Baked in multi-module support replacing [the old PR](<https://github.com/clockworklabs/SpacetimeDB/pull/3417>) - Added functionality to generate module support for multiple folders in the Unreal project (add <module>.Build.cs, <module>.h, <module>.cpp) using the --module-name - Add new configuration option for spacetime generate to handle module prefix - Regenerated Unreal Blackholio/TestClient/QuickstartChat bindings - Rebuilt Unreal Blackholio's consume entity to use event tables - Updated migration documentation - Updated the version bump tool to impact C++ # API and ABI breaking changes - Unreal websocket/message handling updated to the new protocol - Unreal generation now expects a real .uproject target and will stop immediately if project metadata is invalid instead of continuing past setup issues. # Expected complexity level and risk 3 - A large set of changes to update the websocket/message handling along with heavy codegen changes to handle multi-module support # Testing Test coverage of the Unreal SDK will need expansion in a future ticket once our issues with flakiness on CI is resolved. - [x] Updated Unreal Blackholio - [x] Ran full Unreal SDK test suite - [x] Built new test project using the new `--module-prefix` - [x] Run through Unreal Blackholio (C++ and Blueprint) - [x] Rebuilt Unreal Blackholio with multi-module, and duplicate generated module testing side-by-side modules that would overlap # Review Question(s) - [x] Updates to `spacetime init` have made the tutorial a little confusing with pathing for the Unreal Blackholio tutorial. To fix though we'd have to update all the commands to be more explicit, or update the tutorial `spacetime init` to use `--project-path .` to keep pathing simpler, thoughts? --------- Signed-off-by: Jason Larabie <jason@clockworklabs.io> Co-authored-by: Ryan <r.ekhoff@clockworklabs.io>
sdk-test-cpp C++ test module
Exercise the functionality of the SpacetimeDB C++ bindings API surface, modeling all combinations of types, with several examples of tables, indexes, and reducers.
Used to validate C++ bindings functionality and ensure parity with Rust/C# implementations.
Note: Mirrors functionality from
modules/sdk-testandmodules/sdk-test-cs.
Building
cd modules/sdk-test-cpp
spacetime build -p .
The built WASM module will be at build/lib.wasm.
Testing
# Start SpacetimeDB
spacetime start
# Publish the module
spacetime publish . test-db --delete-data
# Verify module schema
spacetime describe test-db
# Call example reducer
spacetime call test-db add_player '"Alice"'
# View logs
spacetime logs test-db -f
Module Contents
lib.cpp contains comprehensive testing of:
- All primitive types (integers, floats, bool, string)
- Special types (Identity, ConnectionId, Timestamp, TimeDuration)
- Collections (vectors, optionals)
- Custom structs and enums
- Table constraints (PrimaryKey, Unique, AutoInc, indexes)
- Lifecycle reducers (init, connect, disconnect)
- CRUD operations
For C++ bindings usage documentation, see crates/bindings-cpp/.