Open
Conversation
c96550a to
57cc9a5
Compare
cloutiertyler
commented
Feb 6, 2026
f9bb16a to
c13a4b1
Compare
# Description of Changes Switch Wasm module to `__describe_module_v10__` from `__describe_module__` to expose `RawModuleDefV10` # API and ABI breaking changes 2.0 breaking change. # Expected complexity level and risk 1 # Testing Exising smoketests should be enough.
Each validated schema type (TableDef, IndexDef, ReducerDef, etc.) now has its own From impl for the corresponding V10 raw type, mirroring the existing V9 conversions. The main From<ModuleDef> for RawModuleDefV10 is simplified to use .into() calls.
c13a4b1 to
07d57a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Changes
Adds event tables support to SpacetimeDB (Rust server bindings only, V10 ABI).
Event tables are write-only tables whose rows persist to the commitlog but are NOT merged into committed state. Their rows are ephemeral in memory — only visible to V2 subscribers in the transaction that inserted them.
Schema & ABI:
is_event: booltoRawTableDefV10,TableDef, andTableSchemast_event_tablesystem table (TableId 17) tracks which tables are event tables, avoiding migration ofStTableRowis_eventis reconstructed fromst_event_tableinschema_for_table_raw()Rust bindings macro:
eventkeyword:#[spacetimedb::table(name = my_events, public, event)]const IS_EVENT: bool = true;onTableInternalregister_table()to V10 builder's.with_event()Core behavior:
merge_apply_inserts(): event table rows are recorded in TxData (for commitlog + subscriptions) but skip merging into committed statereplay_insert(): event table rows return early — no committed state rebuilt on restartCompile-time semi-join validation:
CanBeLookupTablemarker trait inquery-builder— event tables don't implement itR: CanBeLookupTable, giving a compile error if an event table is used as the lookup sideCherry-picks
joshua/shub/raw-module-def-v10(#4153) as a prerequisite. V9 is completely untouched.Deferred: V2 subscription evaluation, runtime SQL semi-join validation, view validation.
API and ABI breaking changes
New field
is_event: booladded toRawTableDefV10(appended at end for ABI compat). Defaults tofalse, so existing modules are unaffected.CanBeLookupTabletrait bound replacesHasIxColson semi-join methods in the query builder. All non-event tables implementCanBeLookupTable, so existing code compiles unchanged.Expected complexity level and risk
3 — The changes touch the schema pipeline end-to-end (raw def → validated def → runtime schema → system table → committed state merge/replay), but each individual change is straightforward. The main risk area is the merge skip logic in
committed_state.rs, which is on the hot path and must correctly distinguish event tables from persistent ones. The system table approach avoids any migration risk for existing databases.Testing
cargo checkpasses (verified locally)