Releases: clockworklabs/SpacetimeDB
Release 1.2.0
We have another release for you! 🎉
This one is quiet as far as new features go (stay tuned for those soon), but we're including a ton of performance improvements in both server code and generated client code. We've also fixed several important bugs, and made some quality of life improvements for generated code.
A few particular things that people have been asking about:
- We now use
import type
properly in generated TypeScript code - Fixed
Equals
andGetHashCode
for types containing lists and arrays in C# code - Fixed SDK bug with overlapping subscriptions
- Fix a bug where
spacetime rename
would leave the old name in place - Fix a bug where RLS would stop working after opening the web dashboard
- Added an unstable HTTP route for getting the current timestamp
What's Changed
- Replication Smoketest Cleanups by @kim in #2675
- Allocate pages using a mult-tenant lock-free pool by @Centril in #2587
- Add .DS_Store to gitignore by @rafaelGuerreiro in #2659
- Add the primary key type to typescript's
TableRuntimeTypeInfo
by @jsdt in #2671 - Split client codegen out into its own crate by @coolreader18 in #2593
- CI - Publishable crates check also checks for license file by @bfops in #2681
- Avoid reflection when validating enums by @joshua-spacetime in #2676
- Do not double compress transaction update messages by @joshua-spacetime in #2668
- Add information about the CLI version to generated code. by @jsdt in #2673
- Simple implementation of insert_or_update and try_insert_or_update by @rafaelGuerreiro in #2678
- Reduce allocations in C# when deserializing lists and arrays by @kazimuth in #2688
- Fix subscription manager metadata for joins by @joshua-spacetime in #2705
- Use spacetimedb-standalone to get schema for spacetime generate by @coolreader18 in #2644
- Prevent
ahash
from pulling ingetrandom 0.3
by @kim in #2714 - Fix SDK bug with overlapping subscriptions by @gefjon in #2711
- snapshot: Provide streaming snapshot verification. by @kim in #2691
- sdk: fix
with_light_mode
docs by @Centril in #2700 - snapshot: Improve memory utilization of snapshot fetcher by @kim in #2715
- Hash subscription queries before acquiring tx lock by @joshua-spacetime in #2712
- Log instead of panicking when missing a row from st_client by @gefjon in #2722
- Commitlog stream range fix. by @Shubham8287 in #2721
- Deal wih
AlgebraicType::Ref
inSerialize for ValueWithType<ArrayValue>
by @Centril in #2708 PagePool::{default -> new_for_test}
+ temporary hack forIN_MEMORY_CONFIG
/test_index_scans
by @Centril in #2707- Use the --ignore-matching-lines flag of git diff. by @jsdt in #2720
- Fix Equals and GetHashCode for types containing Lists and Arrays in C# by @kazimuth in #2710
- Fix index scan rewrite rule by @joshua-spacetime in #2728
- Do not evaluate subscriptions that return empty result sets by @joshua-spacetime in #2731
- Use spawn_blocking for the fallback commit in identity_dis/connected by @coolreader18 in #2730
- Move init_database out of wasm_common by @coolreader18 in #2732
- Reduce reflection use in generated C# code by @kazimuth in #2725
- Fix row count stats for multi subscription responses. by @jsdt in #2736
- Handle snapshot restore more robustly by @kim in #2735
- Call reducers on the blocking pool. by @jsdt in #2737
- Follow-up: use asyncify in ModuleHost::call by @coolreader18 in #2740
- Add counters for client connections spawned and aborted. by @jsdt in #2741
- Update quickstart-chat README.md by @Trobyss in #2727
- core: Asyncify commitlog compressor by @kim in #2743
- Reintroduce replication factor parameter by @kim in #2718
- commitlog: Include latest commit offset in segment metadata by @kim in #2733
- ci: Update dependencies for the
wasm_bindings
job by @kim in #2717 - core: Fix error handling when restoring snapshot by @kim in #2755
build_sequence_state
: clobber pre-existing in-memorySequence
s by @gefjon in #2760- cli: Add value_parser for
num-replicas
by @kim in #2759 - Cache
with_label_values
more & don't do metrics while holding lock by @Centril in #2734 - datastore: apply schema changes immediately to committed state. by @Centril in #2685
- Fix TypeScript imports codegen by @toqueteos in #2747
- Make connection metrics keyed on database identity, not replica ID by @gefjon in #2765
- Fixed compile errors and warnings on Windows by @cloutiertyler in #2646
- Bump version to 1.1.2 by @bfops in #2767
- Commitlog: handle empty offset index lookup by @Shubham8287 in #2771
- Re-enable page bool with default size of 128 pages by @joshua-spacetime in #2769
commit_and_broadcast_event
:read_tx.merge(update_metrics)
by @Centril in #2772- Bump C# versions by @bfops in #2774
- Don't yap about putting chunks into my pool by @Centril in #2777
- Cheaper
Table::clone_structure
by @Centril in #2776 - add instrumentation to remove_multi_subscription by @joshua-spacetime in #2781
- Single-threaded subscription evaluation by @joshua-spacetime in #2682
- Run reducers on tokio blocking thread instead of rayon by @joshua-spacetime in #2785
- Datastore Extraction: TxMetrics refactor, small non-functional change to make datastore extraction easier by @cloutiertyler in #2794
- Datastore Extraction: Remove reference to WORKER_METRICS inside db_metrics by @cloutiertyler in #2797
- Datastore Extraction: StVarName refactor, small non-functional change in furtherance of datastore extraction by @cloutiertyler in #2795
- Datastore Extraction: Create DatastoreError type by @cloutiertyler in #2798
Page::reset_for
: stop zeroing pages by @Centril in #2804- Consider deleted committed rows in
MutTxId::create_index
by @Centril in #2805 - Per-database incoming and outgoing queue length metrics by @gefjon in #2773
- Aggregate and broadcast
DbUpdate
s off the main thread by @gefjon in #2793 - Build indexes over TxData for subscription eval by @joshua-spacetime in #2768
- core: Make
asyncify
preserve the current span by @kim in #2790 - commitlog: Fix index truncation test. by @kim in #2792
- commitlog: Reduce log noise when offset index cannot be used by @kim in #2791
- smoketests: Bring containers back up in tear down of replication tests by @kim in #2818
- Log every second a reducer takes to run by @coolreader18 in #2738
- Fix typos by @szepeviktor in #2812
- CI - Remove outd...
Release 1.1.2
Hello again everyone! This release is primarily to fix an issue related to building rust modules where a dependency of SpacetimeDB was updated and is causing compilation issues for some users.
What's Changed
- Typescript Generation: Wrap union types in parens if for arrays by @jsdt in #2615
- CI - Do some basic checks that crates are publishable by @bfops in #2660
- Implement OnUnhandledReducerError in C# by @kazimuth in #2636
- Do not double compress subscribe messages by @joshua-spacetime in #2665
- Prune queries from subscription evaluation by @joshua-spacetime in #2641
- Remove redundant rows from subscription updates by @joshua-spacetime in #2654
Full Changelog: v1.1.1...v1.1.2
v1.1.1
We're releasing a small collection of performance improvements and bugfixes!
Most notable is that we've fixed two outstanding TypeScript code generation bugs.
What's Changed
- Allocate fewer vecs in
eval_updates
by @coolreader18 in #2567 - CI - Fix job that packages the CLI for release by @bfops in #2617
- core: Restore calling the
on_panic
hook when a reducer call panics by @kim in #2624 tools/publish-crates.sh
- Automatically find list of dependencies by @bfops in #2595- Fix building and publishing the auth crate by @bfops in #2622
- Count bytes_written for updates by @jsdt in #2616
- Monotonic timestamps by @coolreader18 in #2618
- datastore: fix two inserts in tx state with unique idx by @Centril in #2610
- Fix error with the install script by @jdetter in #2635
- CI - Test
spacetimedb-update self-install
by @bfops in #2637 - Use camel case for typescript unique indexes by @jsdt in #2628
spacetimedb-update self-install
fails if the install fails. by @bfops in #2642- Do not publish RLS rules on private tables by @joshua-spacetime in #2645
- Fix filter pushdowns in the presence of rls by @joshua-spacetime in #2653
- Return the query text with subscription errors by @mamcx in #2609
Full Changelog: v1.1.0...v1.1.1
Release 1.1.0
We're releasing our first version bump since 1.0! 🎉
Row-level security
This release includes public access for row-level security.
See https://spacetimedb.com/docs/rls for more info on how to use it!
Improved usability for timestamps and durations
From the PR #2502:
Specifically, we add methods and trait impls for
T x U -> V
, wherex
is a binary operator, either + or -:
Timestamp x TimeDuration -> Timestamp
Timestamp x Duration -> Timestamp
.
- This one is kind of weird, since we convert the
Duration
into aTimeDuration
before doing math with it, which may be a lossy conversion depending on platform.TimeDuration x TimeDuration -> TimeDuration
.
Other notable improvements
- Features to save disk space and reduce memory usage
- Support for enums as index keys
- Restore CLI functionality for printing the number of rows affected by an operation
What's Changed
- Use jemalloc in standalone and add stats. by @jsdt in #2470
- Add sql support for
:sender
parameter by @joshua-spacetime in #2483 - commitlog: Streaming by @kim in #2492
- smoketests: Adjust clear_database test by @kim in #2501
- Remove trailing slashes from isser when looking up oidc configs. by @jsdt in #2499
- Add .cargo/config.toml to spacetime init Rust project with default target to wasm by @mamcx in #2328
- Bump versions to 1.1.0 by @bfops in #2518
- Install tls dependencies in standalone dockerfile by @coolreader18 in #2484
- CI - Containerize linux x86_64 GNU builds by @bfops in #2466
- Print back the # of rows affected (ins, upd, del) with timings by @mamcx in #2462
- Add [ClientVisibilityFilter] to csharp module library by @kazimuth in #2481
- CI - Make Test Suite check for dirty
git diff
by @bfops in #2531 - commitlog: Open stream writer with metadata by @kim in #2530
- Add endpoints for heap profiling by @jsdt in #2517
- Update data size metrics periodically, not on every transaction. by @jsdt in #2532
- Fix C# SDK Tests by @kazimuth in #2533
- Commitlog compression by @coolreader18 in #2504
- Add utility for rls resolution by @joshua-spacetime in #2519
- Feature gate #[client_visibility_filter] by @joshua-spacetime in #2528
- Followup to #2504 by @coolreader18 in #2534
- Repair transactionality of
st_client
removals after disconnect by @Centril in #2446 - Update PR template by @coolreader18 in #2395
- commitlog: Derive serde for
Commit
by @kim in #2535 - core: Export the snapshot watcher / commitlog compressor by @kim in #2536
- Update formatting of timestamps and identities in PsqlFormatter by @mamcx in #2486
- Add rls to the sql api by @joshua-spacetime in #2526
- Update tungstenite to 0.26 by @coolreader18 in #2539
- Static feature flag for generating perfmaps by @gefjon in #746
- Add some tokio runtime metrics. by @jsdt in #2537
- Add CI job to run
cargo doc
on the bindings crate by @gefjon in #2548 - Various methods and trait impls for time arithmetic by @gefjon in #2502
- Remove standalone energy monitor. by @jsdt in #2550
- Remove some testing logs statements. by @jsdt in #2553
- Add rls to the subscription api by @joshua-spacetime in #2546
- Add more subscription stats by @jsdt in #2560
- Do not send empty subscription updates to clients by @joshua-spacetime in #2562
- snapshot: Remote synchronization by @kim in #2559
- Add stats for incremental query evaluation hitrate by @jsdt in #2564
- Add integration test for commitlog compression by @coolreader18 in #2538
- Feature gate [ClientVisibilityFilter] in C# by @joshua-spacetime in #2556
- Compute variable positions for explicit projections by @joshua-spacetime in #2573
- Add tests asserting add_multi_subscription return errors to clients by @joshua-spacetime in #2571
- Return error for unqualified columns instead of panic by @joshua-spacetime in #2572
- Add some more tokio metrics. by @jsdt in #2555
- Plain enums as index keys with specialized indices by @Centril in #2506
- Use Offset Index on Meta extract by @Shubham8287 in #2549
- Remove spacetimedb-core as a dep of cli by @coolreader18 in #2244
- fix expression canonicalization by @joshua-spacetime in #2584
- Remove unused file by @bfops in #2582
- Compress the snapshot by @mamcx in #2034
- Impose limits on the heap usage of
ChunkPool
by @gefjon in #2585 - Update rand by @coolreader18 in #2568
- Make clockworklabs/spacetime docker image build from source by @coolreader18 in #2521
- Check validity of modules before control DB modifications during initial publish by @gefjon in #2580
- Bump a missed version by @bfops in #2607
- Add docs for
FilterableValue
to rust bindings crate by @gefjon in #2547
Full Changelog: v1.0.1...v1.1.0
Release 1.0.1
Release 1.0.1
This is a collection of small bugfixes on top of 1.0.0. Thank you to everyone who reported issues and helped us hunt these down! 🎉
In particular, we fixed an issue with primary keys not working properly in generated typescript code.
Among other issues reported in Discord and elsewhere by our wonderful users, we fixed these:
- --build-options doesn't seem to work
Identity
andConnectionId
should implementIComparable
- CLI - Fix: SQL
update
anddelete
are throwing exceptions - Remove row deduplication in incremental update
- Bug on generated typescript from c# module
- OIDC JWT handling: accept tokens where
aud
is a string, rather than an array - alpine linux install, no elf download
What's Changed
- sdk: Client ping on idle connections by @kim in #2309
- Fix self-replace on windows by @coolreader18 in #2294
- hacky auth check for database creation. by @jsdt in #2308
- Update Rust client quickstart example to match tutorial document by @gefjon in #2310
- Removed the EULA check in the CLI by @cloutiertyler in #2315
- Add dockerfile for cli by @coolreader18 in #2312
- Install dotnet-sdk-8 instead of 9 in Dockerfile by @coolreader18 in #2323
- Update
insert
docs to reflect actual behavior on set-semantic duplicates by @gefjon in #2322 - Update comment to reflect the new internals of the subscription api by @joshua-spacetime in #2313
- Add link to documentation of SEQUENCES by @mamcx in #2321
- Add missing LICENSE by @mamcx in #2319
- test: set semantics in datastore by @joshua-spacetime in #2324
- Bump Rust and C# package versions to 1.0.0 by @bfops in #2283
- Print a message with a shell line to add bindir to PATH by @coolreader18 in #2327
- set names atomic by @kim in #2325
- Minor updates to the Rust client quickstart by @gefjon in #2318
- Remove errant backslash that got into the 'please add to path' message by @coolreader18 in #2333
- commitlog: Use
fdatasync
by @kim in #2338 - This works on both arm and x86 by @jdetter in #2337
- Post Release Fixes by @jdetter in #2330
- handle offset index empty by @Shubham8287 in #2344
- Fix quickstart link by @jdetter in #2346
- Add @jdetter back to CLI codeowners by @bfops in #2350
- CLI - Fix helptext for
--build-options
by @bfops in #2349 - Update bytes_sent_to_clients when merging metrics by @joshua-spacetime in #2352
- Add readmes to all implementation crates specifying that they do no offer stable interfaces by @mamcx in #2320
- Support RFC 3339 timestamp values in sql by @joshua-spacetime in #2242
- Implements
IComparable
forIdentity
andConnectionId
by @rekhoff in #2354 - Update README.md by @cloutiertyler in #2361
- Clarify what is a valid module name by @coolreader18 in #2386
- CLI - Fix
sql --interactive
case where returned rows are 0 by @bfops in #2359 - Make the
tools/merge-docker-images.sh
script more generic by @bfops in #2334 - CI - Only tag extra docker images on tag refs by @bfops in #2335
- fix: bag semantics for joins by @joshua-spacetime in #2398
- Bump versions to 1.0.1 by @bfops in #2431
- update install instructions in readme by @joshua-spacetime in #2435
- Fix subs when clients use variying compression by @Centril in #2434
- Fix outdated advice in
getrandom
warning by @gefjon in #2444 - Implement IEquatable for all [SpacetimeDB.Type]s by @kazimuth in #2396
- When generating for typescript, convert the primary key to camel case. by @jsdt in #2409
- Allow a single string to be passed as the audience by @jsdt in #2460
- Bring over Rust module doc fixes from the C# module docs by @kazimuth in #2360
- Add install from source instructions to README by @jdetter in #2443
- CI - Fix docker jobs failing by @bfops in #2471
- Close scheduler on module exit by @coolreader18 in #2477
- commitlog: Fix open flags for read-only offset index by @kim in #2468
- Allow databases from 1.0.1 to be run on 1.0.0 by @coolreader18 in #2472
- smoketests: Test database deletion by @kim in #2480
- Build for musl by @coolreader18 in #2418
New Contributors
Full Changelog: v1.0.0...v1.0.1
v1.0.0

🎉 SpacetimeDB 1.0 🎉
Today we're incredibly excited to officially release SpacetimeDB 1.0!
This is a milestone that the whole team has been working towards for years. A huge amount of engineering and effort has gone into stabilizing our APIs across all of our languages and libraries, as well as making SpacetimeDB a stable product that you can rely on in production. So today, we are leaving beta and are offering our first production-ready release!
With this release you can host your own applications with SpacetimeDB Standalone and rest assured that the data formats and APIs will not be changing until the next major version release. For future major version releases we will also provide a migration path.
Read more about the announcement at https://spacetimedb.com/blog/introducing-spacetimedb-1-0.
Maincloud
Alongside SpacetimeDB 1.0 we are also launching, Maincloud, our managed cloud service. Maincloud is just like Standalone except that you don't have to worry about any of the deployment! Just run the below command and we take care of the rest.
spacetime publish -s maincloud your-app
We use an "energy"-based cloud credit system to show you exactly how to optimize your applications. Check out the Maincloud announcement on our website to find our how to buy energy 90% off during our launch sale.
Install
Install this release now via the instructions here ➡️ https://spacetimedb.com/install
Also if you're new here please take a moment to star our repository! https://github.com/clockworklabs/SpacetimeDB
Highlights
- A new cloud hosted service called Maincloud
- Streamlined stable client SDKs in TypeScript, C#, and Rust
- Streamlined stable module APIs in C# and Rust
- Big performance improvements for certain workloads
- Brand new mutable subscription APIs allowing you to change your subscriptions incrementally
- Beautiful new version manager CLI commands
- Brand new website interface and account management
- OpenID Connect integration and APIs
Notes
- Testnet is now deprecated and is replaced by Maincloud
Upgrading from previous versions
All previous versions of the spacetime
CLI will not be able to upgrade to the new version using the previous upgrade procedure. You will need to uninstall the previous version of spacetime
and re-run the installation instructions found here: https://spacetimedb.com/install
Once you've installed the new version of spacetime
you should verify that you're on the Version 1.0.0
version via:
spacetime --version
Join the Community
Have questions on the best way to get started or just want to see what others are building on SpacetimeDB?
Join us on Discord! https://discord.gg/spacetimedb
What's Changed
- query engine integration by @joshua-spacetime in #2074
- add signature of
datastore_update_bsatn
host call by @Centril in #2102 - Add
SubscriptionBuilder::subscribe_to_all_tables
by @gefjon in #2109 - Fix wording in
ReplayVisitor::visit_insert
by @Centril in #2123 - commitlog: Make offset index usable externally by @kim in #2108
- Add new crates to
publish-crates.sh
script by @bfops in #2125 - Rework RLS macro for amended syntax by @gefjon in #2105
- Rust SDK:
with_credentials
->with_token
by @gefjon in #2118 - Split binaries by @coolreader18 in #2011
- Run smoketests on windows in ci by @coolreader18 in #2129
- CLI - Replace clippy with a manual check by @bfops in #1928
- Make the key of
Table.indexes
beIndexId
by @Centril in #2124 - Lookup lifecycle reducers by lifecycle flag, not by name by @coolreader18 in #2132
- core: Make SNAPSHOT_FREQUENCY pub by @kim in #2135
- Use actual types for api responses, not ad-hoc
json!()
objects by @coolreader18 in #1931 - Fix unique index +
MutTxId::insert
not un-deleteting by @Centril in #2156 - Set
tracing
static level for binaries only by @kim in #2144 - snapshot: Invalidate newer snapshots on creation by @kim in #2143
- Query execution updates for cpu metrics by @joshua-spacetime in #2130
- Fix & test row deletion API by @RReverser in #2146
- Fix autocomplete issues in bindings crate by @coolreader18 in #2157
- Fix sending of subscription errors. by @jsdt in #2166
- Don't create indexes during bootstrapping; wait until after replay by @gefjon in #2161
- Fix ScheduleAt in C# by @kazimuth in #2163
- Fixed issues with the Rust module quickstart-chat README.md by @cloutiertyler in #2154
- Remove the client from subscription manager on a disconnect by @jsdt in #2170
- Add the
update
ABI by @Centril in #2137 - Adds improvements & new crates to
publish-crates.sh
by @cloutiertyler in #2173 - Bump version to
1.0.0-rc4
by @bfops in #2177 - Cache whether a
Table
is a scheduler table, avoiding fetching the schema by @Centril in #2141 - Bump to Rust 1.84 by @coolreader18 in #2001
- Switch
DeleteTable
impl to one based onFixedBitSet
by @Centril in #2183 - Meter wasm memory usage by @coolreader18 in #2187
- Track query and datastore cpu usage metrics by @joshua-spacetime in #2140
- Log errmsg if reducer fails by @coolreader18 in #2186
- Fix CI on master by @coolreader18 in #2193
- Make
check_and_insert
&find_old_row
and friends do less checks by @Centril in #2192 - CLI - Just-in-time login flow by @bfops in #2158
- Track compute metrics for sql dml with new engine by @joshua-spacetime in #2190
- Implement incremental subscriptions on the client by @jsdt in #2111
- InstanceEnv: make the inspect_err closures cold by @Centril in #2197
- Data size SKU for billing by @gefjon in #2098
prop_assume!(a != b)
in some tests to fix spurious failures by @gefjon in #2199- Match datastore semantics more closely:
btree_scan
=>index_scan_range
by @Centril in #2203 - Update sql literals to match spec by @joshua-spacetime in #2196
- Fix ctrl-c handling by @coolreader18 in #2200
- Return errors for invariant violations during query planning by @joshua-spacetime in #2209
- Rust SDK: remove
anyhow
, usethiserror
w/ structured error types by @gefjon in #2169 - Rust client SDK: rework
EventContext
into multiple types by @gefjon in #2189 - Make
MutTxId::update
really idempotent wrt.TxData
by @Centril in #2212 - Rewrite C# codegen to the new Lang infra + fixes by @RReverser in #2184
- add
direct
indices, except for in datastore & C# by @Centril in #2205 - Fix multi-column index scan by @mamcx in #2208
- Register data size metrics for standalone. by @jsdt in #2216
- Handle optimization and execution errors on initial subscription by @joshua-spacetime in #2213
- Finish spacetimedb-update functionality by @coolreader18 in #2126
- CLI - Better module language inference by @bfops in #2218
- CLI - Clarify helptext for
spacetime login
by @bfops ...
v1.0.0 Release Candidate 3
🥇 We're getting close! 🥇
We're full steam ahead toward our 1.0 release soon! This release candidate brings a sneak peek at lots of upcoming changes.
This release will require a data wipe, because we restructured the SpacetimeDB directory structure.
Some highlights:
- Lots of performance improvements!
- Removed the
println!
andeprintln
macros in favor oflog::info!
andlog::error!
- Fix defining multiple tables on the same
struct
in Rust modules - CLI
- Fixed
spacetime energy balance
not working at all - The
spacetime dns
subcommand is nowspacetime rename
- When updating the
cli.toml
config file, comments and formatting are preserved
- Fixed
- C#
- New C# index syntax
- Reduce noisy C# compilation errors
- Fixed a bug where C# modules would not build if .NET 9 was installed on the system
What's Changed
- commitlog: Introduce epoch by @kim in #1851
- Remove jdetter as codeowner for now by @jdetter in #1939
- Fix benches for ia_loop, circles by @mamcx in #1922
- Logical to physical plan lowering by @mamcx in #1910
- Be more careful about endianness with Identity and Address by @kazimuth in #1926
- Simplify benchmarking wrappers by @RReverser in #1951
- Decode identity correctly by @jsdt in #1952
- Removing dead code: Relational ops and cursor by @mamcx in #1956
- Get
jsonwebtoken
andjwks
forks from crates.io by @bfops in #1958 - Add LICENSE file to
sql-parser
crate by @bfops in #1959 - Add missing LICENSE by @mamcx in #1960
- Bump version to 1.0.0-rc2 by @bfops in #1962
- Add typing context for lowering by @joshua-spacetime in #1963
- Add test for light update by @Centril in #1953
- Clean up benchmark .spacetime in CI by @kazimuth in #1968
- refactor: encode type info implicitly in the physical plan by @joshua-spacetime in #1938
- CLI - Remove unused
default_identity
stuff by @bfops in #1969 - CLI - Tell users if they're already logged in by @bfops in #1955
- CLI - Fix stale helptext instructing users to use
spacetime identity
by @bfops in #1954 - commitlog: Small tweaks by @kim in #1978
- NFC: Remove unused fsync param in benchmarks by @RReverser in #1981
- Directory structure impl by @coolreader18 in #1879
- Bump C# versions to
-hotfix1
by @bfops in #1984 - Light updates test: Ensure subcriptions have been applied before calling reducers by @Centril in #1979
- Optimize integrate_generated_columns by @coolreader18 in #1895
- Update run_standalone_temp.sh to the new folder specification by @mamcx in #1990
- Clean up auth related code with traits, and reuse existing key generation code. by @jsdt in #1988
- core: Make NDV non-zero by @kim in #1985
- test: No divide by zero for row estimation of empty index by @joshua-spacetime in #1986
- Run and test benchmarks against C# as well by @RReverser in #1965
- Preserve reducer order in schema conversion by @RReverser in #1987
- Durability Provider by @Shubham8287 in #1864
- Fix flaky oidc tests by @jsdt in #2000
- C# endianness fixes by @kazimuth in #1964
- Rip useless names out of RawDef by @kazimuth in #1918
- commitlog: Fix set_epoch by @kim in #2005
- create commitlog dir in fs::New by @Shubham8287 in #2006
- Don't autogen schedule fields by @coolreader18 in #1894
- Remove problematic debug assertions by @gefjon in #2010
- CLI should not depend on rustup by @mamcx in #1996
- Speed up
state_view::Iter
by special casing committed-with-no-deletes by @Centril in #2003 - Rust SDK: Actual client-side indices for unique constraints by @gefjon in #1909
- Decide that BSATN
byte
that ain't 0 or 1 is not a validAV::Bool
by @Centril in #2026 - Add
Layout.fixed: bool
for a fast path ineq_row_in_page
&row_type_visitor
by @Centril in #2025 - Add
static_bsatn_validator
&validate_bsatn
by @Centril in #2029 - Add
Static(Bsatn)Layout::deserialize_row_into
by @Centril in #2032 - Remove IO macros by @bfops in #1929
- Migrate C# client-side reducer enum to the new syntax by @RReverser in #2033
- Rust SDK: no more reducer args structs by @gefjon in #2036
- Fix subscription benchmarks by fixing
create_table_for_test_with_the_works
by @Centril in #2027 - move unique constraint checking until after optimistic insertion by @Centril in #2037
- Allocation pool the chunked iters in
InstanceEnv
by @Centril in #2038 - Avoid a multimap when the index is unique by @Centril in #2044
- Fix declaration order of ScheduleAt in C# by @kazimuth in #2007
- commitlog: Provide
segment_len
method for segments by @kim in #2042 - Fix some places where trying to parse an empty string could panic. by @jsdt in #2051
- Fix spacetime server clear by @coolreader18 in #2055
- query rewriter by @joshua-spacetime in #2031
- Migrate C# ModuleDef to V9 by @RReverser in #1670
- fix: filter pushdown over table scan by @joshua-spacetime in #2063
- commitlog: Fix offset index truncation by @kim in #2073
- fix: qualified projection columns by @joshua-spacetime in #2070
- commitlog: Make memory segment behave like
O_APPEND
by @kim in #2072 - CLI - Remove deprecated use of the
--project-path
flag by @bfops in #915 - Reduce noisy C# compilation errors by @RReverser in #2067
- Split Iter & IterByColRange types into Tx and MutTxId versions by @mamcx in #2043
- Tweak scheduled_at macro syntax by @coolreader18 in #2054
- Server-side implementation of incremental subscription changes by @jsdt in #2030
- Implement the
identity
host call andctx.identity()
in Rust by @gefjon in #2085 - Preserve the comments of the "cli.toml" on changes by @mamcx in #2002
- CLI - Confirm before publishing to non-local servers by @bfops in #2086
- C#: fix class names for unique column indices by @RReverser in #2088
- CLI - Fix
spacetime energy balance
not working by @bfops in #2087 - Use a spinner to show that wasm is compiling in spacetime generate by @coolreader18 in #2057
- Enforce .NET 8 SDK for new C# modules by @RReverser in #2046
- Implement
ctx.Identity
for C# by @RReverser in #2091 - Implement new C# index syntax by @RReverser in #2078
- CLI -
dns
subcommand becomesrename
by @bfops in #1694 - datastore: insert...
v1.0.0 Release Candidate 2
More improvements!
We've got a small, but important one for you today! We're fixing some of the small issues that were overlooked in release candidate 1. This release should unblock several of our customers.
Fixes:
- C# Endianness fixes: #1964
- New syntax for calling C# reducers for better consistency: #2033
- Client-side indexes: #1909
- Namespace issue fixes: #2036
- Issue with ordering of C# fields: #2007
Full Changelog: v1.0.0-rc1-hotfix1...v1.0.0-rc2-hotfix1
v1.0.0 Release Candidate 1
🚀 It's an extremely exciting day! 🚀
We are releasing the first release candidate of 1.0 SpacetimeDB!
In this version of SpacetimeDB, we do not expect to introduce any breaking changes to the user facing API. You can rest assured that if you build on this version it will be fully compatible or very nearly fully compatible with the final 1.0 release API.
While we reserve the right to add new APIs and make small changes before 1.0, this is more or less what 1.0 will look like!
NOTE! This is still a pre-release version. It is not the final 1.0 version of SpacetimeDB. As such we still suggest that developer exersize caution about using SpacetimeDB in production and be aware of the risks of pre-release software. Including the potential need to wipe their database instances or to manually migrate their data to the final 1.0 version.
SpacetimeDB identities are now OIDC compliant! This means that you'll have access to a huge host of existing tooling to create identities for your users and allow them to log in to your module through your own login flows and infrastructure.
CLI Improvements
- Login Flow Updates: We've dramatically improved how
Identity
s work in SpacetimeDB, including allowing you to use the sameIdentity
across multiple SpacetimeDB clusters by logging into the website. This includes introducing new CLI login flow, includinglogin show
andlogout
commands. spacetime upgrade
Update: Now uses--yes
instead of the deprecated--force
flag.- Help Text Enhancements: Added help text for
--build-options
. - Server Command Stabilization: Stabilized
spacetime server
subcommands and resolved issues withspacetime server edit
.
Database Enhancements
- Renaming: "Database instance" renamed to "replica" for clearer terminology.
- Row-Level Security (RLS): Added a system table for RLS along with a new filter macro.
- Optimized Querying: Added non-unique index join iterator and a physical query plan with executors for performance improvements.
- Persistent Memory Metering: Enhanced energy metering for persistent memory and improved handling for large datasets.
Compression
- New Compression Options: Introduced gzip and none compression options; SDK now selects optimal compression.
Code and Dependency Updates
- C# Bindings: Bumped C# bindings to version 1.0.0, with improved codegen for managing
DbConnection
states. - Code Cleanup: Removed obsolete elements like
BytesWrapper
and improved commit log traversal efficiency. - Dependency Upgrades: Updated Wasmtime dependency; improved resilience of ARM64/AMD64 Docker builds.
Security and Identity Management
- JWT Handling: Enhanced JWT token handling with OIDC providers.
- Endpoint and Token Updates: Removed email recovery endpoints, deprecated SendGrid, and updated token formats for ID tokens.
- Short-Lived Token Fixes: Corrected the endpoint used for short-lived tokens.
What's Changed
- CLI -
spacetime upgrade
takes--yes
instead of deprecated--force
by @bfops in #1805 - Renamed database instance to replica by @cloutiertyler in #1806
- offset index read integration by @Shubham8287 in #1779
- commitlog: Yield
StoredCommit
in iterators by @kim in #1791 - Make smoketests not log expected teardown errors by @kazimuth in #1804
- Add gzip + none compression algos and let SDK pick compression by @Centril in #1802
- Correct
Schema::check_compatible
to resolve types in a ModuleDef by @kazimuth in #1813 - Add CODEOWNERS for CLI crate by @bfops in #1834
- Make ARM64 and AMD64 docker builds more resilient by @jdetter in #1844
- Adding the system table for row level security by @mamcx in #1746
- refactor: Add TableId to relvar type by @joshua-spacetime in #1803
- Remove email and recovery related identity endpoints by @jsdt in #1833
- Energy metering for persistent memory usage by @coolreader18 in #766
- No
Map
s for you! by @Centril in #1770 - CLI - Add helptext for
--build-options
by @bfops in #1853 - Upgrade wasmtime dependency by @coolreader18 in #1857
- Remove sendgrid by @kim in #1860
- Improve bindings diagnostics and add ui tests by @coolreader18 in #1216
- Fix Build: Use default() to init custom hash based datastructures by @Shubham8287 in #1871
- RLS: Adding a new filter! macro by @mamcx in #1849
- CLI - Fix
spacetime server edit
failing on renames by @bfops in #1877 - CLI - Stabilize
spacetime server
subcommands by @bfops in #1845 - Redefine Address as
U128
+Identity
and Hash asU256
by @Centril in #1616 - Have the scheduled_id/at columns be specified in the schema, not by the column name by @coolreader18 in #1861
- Use new token format when generating new id tokens by @jsdt in #1854
- Rust modules: Revise
BTreeIndexBounds
by @gefjon in #1815 - commitlog: Fix transactions iterator by @kim in #1884
- Remove CODEOWNERS from CLI codegen by @bfops in #1886
- The banishment of Address by @cloutiertyler in #1880
- CLI - Fix helptext after #1845 by @bfops in #1889
- Handle JWT tokens with oidc providers by @jsdt in #1882
- Reorganize macro crate by @coolreader18 in #1406
- Physical query plan + executors by @joshua-spacetime in #1881
- Small naming fixes. Fixes database identity creation. by @cloutiertyler in #1892
- feat: Add non-unique index join iterator by @joshua-spacetime in #1908
- Fix the endpoint for short-lived tokens by @jsdt in #1907
- core: Expose snapshot taking on
Locking
datastore by @kim in #1898 - core: Expose
next_tx_offset
of theReplay
decoder by @kim in #1899 - core: Conversion from
txdata::Inputs
toReducerContext
by @kim in #1901 - commitlog: Improve skipping behavior of traversals by @kim in #1902
- NFC: Remove obsolete BytesWrapper by @RReverser in #1896
- Bump C# bindings to 1.0.0 by @bfops in #1913
- Put
ExecutionContext
inside the Tx context by @mamcx in #1876 - Don't redownload WASI SDK by @RReverser in #1916
- perf: Use default buffer size for brotli compression by @joshua-spacetime in #1920
- CLI - Login flow by @bfops in #1878
- Fix Find() with struct-based rows by @RReverser in #1917
- Hide "internal" datetime representation types by @RReverser in #1921
- Companion to spacetime-web#470 by @PuruVJ in #1912
- C# codegen making state relative to a DbConnection by @lcodes in #1869
- Optimise C# in a ridiculous way by @RReverser in #1924
- CLI - Add
login show
andlogout
by @bfops in #1911 - Cached query execution plan by @joshua-spacetime in #1923
- chore: remove dead code by @joshua-spacetime in #1930
- Use previous reducer context when downgrading a tx by @joshua-spacetime in #1932
- Websocket API: Light transaction updates &
NoSuccessNotify
by @Centril in #1812
New Contributors
Full Changelog: v0.12.0-beta-hotfix3...v1.0.0-rc1-hotfix1
v0.12.0-beta
🌟 It's happening! 🌟
We've got a big one for you today! We've been burning the midnight oil to bring you the cream of the SpacetimeDB crop. We are updating and improving our APIs and interfaces across the board in an effort to stabilize and polish them up for a final release!
SpacetimeDB is getting closer and closer to a final 1.0 release and this is a huge milestone on that journey. These new APIs will allow us to implement some amazing new features and vastly improve the user experience of using SpacetimeDB across multiple languages and clients.
Module API
The module API has had it's most major overhaul since the announcement of SpacetimeDB. We're reducing the amount of globals and enforcing accessing the database via a ReducerContext
.
Rust
#[reducer]
pub fn add(ctx: &ReducerContext, name: String) {
println!("Inserting {}", name);
ctx.db.person().insert(Person { name });
}
CHECK IT OUT! The
#[spacetimedb(reducer)]
macro has been simplified to just#[reducer]
!
C#
[SpacetimeDB.Reducer]
public static void Add(ReducerContext ctx, string name)
{
Log.Info($"Inserting {name}");
ctx.Db.Person.Insert(new Person { Name = name });
}
SDK API
The SDKs now share almost exactly the same API as you use to access your data inside your module.
let ctx = DbConnection.builder()
.with_url("https://testnet.spacetimedb.com")
.with_module_name("bitcraft")
.build();
...
for person in ctx.db.person().iter() {
println!("Hey, {}", person.name);
}
C#
var conn = DbConnection.Builder()
.WithUri("https://testnet.spacetimedb.com")
.WithModuleName("bitcraft")
.Build();
...
foreach (var person in ctx.Db.Person.Iter())
{
Log.Info($"Hello, {person.Name}!");
}
Now you can write your client code with the same patterns as your server code!
Migration Guide
Check out our full migration guide to update your code for v0.12 available in the docs section of our website.
CLI updates 🖊️
We've updated a lot of the args to the CLI to be more clear and consistent. If something gives you an errors, check --help
to see if it's changed.
Some of the important changes:
spacetime local clear
(to delete all local server data) is now calledspacetime server clear
spacetime build --skip_clippy
/-S
is now more explicitly--skip-println-checks
spacetime logs database 10
is nowspacetime logs database -n 10
spacetime publish
andspacetime generate
now accept a--build-options
param, e.g.spacetime publish --build-options="--debug --skip-println-checks"
Small clarity changes:
- All
--anon-identity
parameters have been renamed to--anonymous
spacetime energy status
is nowspacetime energy balance
for clarityspacetime publish --clear-database
has been renamed tospacetime publish --delete-data
for clarityspacetime subscribe -n
now has a longform option--num-updates
spacetime publish|generate --wasm-file
->spacetime publish|generate --bin-path
What's Changed (It's... uhh a lot)
- Fix flaky subscription smoketests by @bfops in #1536
- core: Start system table ids at 1 by @kim in #1544
- Remove support for the
update
reducer by @kim in #1557 - Get rid of python SDK by @Centril in #1561
- client-api: Remove publisher address by @kim in #1564
- Minor NFC improvements to C# Roslyn codegen by @RReverser in #1562
- SATS: Flatten
AlgebraicType
, getting rid ofBuiltinType
by @Centril in #1559 - Updating the change date in anticipation of the anniversary by @cloutiertyler in #1574
- Update README.md by @cloutiertyler in #1575
- Make
schema
crate publishable by @bfops in #1569 Typespace::is_nominal_normal_form
by @kazimuth in #1549- Add lib::db::{column_ordering, raw_def::v9} by @kazimuth in #1542
- Change ResolveRefs to return a Result rather than an Option by @kazimuth in #1565
- Add support for
I256
andU256
by @Centril in #1477 - core: Use
Program
instead of(Hash, Box<[u8]>)
by @kim in #1558 - Bump version to 0.12.0 by @bfops in #1578
- Fix iu BSATN implementations in C# by @RReverser in #1582
- C#: disable verbose test output in console by @RReverser in #1570
- Add helpers and change
CollectAllErrors
to be more composable by @kazimuth in #1586 - Preliminary Identifier validation by @kazimuth in #1584
- Allow empty
ColList
by @Centril in #1588 - [CI] Do not use branch names when publishing container images by @kurtismullins in #1583
- Verify Unity compatibility in the shared C# codegen by @RReverser in #1576
- Fix builds for MacOS amd64 platform by @kurtismullins in #1598
- [WASM ABI 1.0] Change
ColId
fromu32
tou16
by @Centril in #1597 - [WASM ABI 1.0]
__call_reducer__
receives Identity & Address by value by @Centril in #1607 - [WASM ABI 1.0] impl
__call_reducer__
usingbytes_source_read
by @Centril in #1609 - Placate some clippy errors in
snapshot
by @kazimuth in #1611 - fix: Always remember to release a read only tx by @joshua-spacetime in #1613
- NFC: enforce style for C# locally and on CI by @RReverser in #1567
- Make
ScheduleAt
special +Typespace::is_valid_for_client_code_generation
by @kazimuth in #1590 - Dedup schedueler queue by @Shubham8287 in #1587
- Updated docker internal port to 3000 by @jdetter in #1626
- Add volatile_nonatomic_schedule_immediate by @coolreader18 in #1612
- NFC: use record for BigInt equality and hash by @RReverser in #1633
- smoketests: Test unauthorized publish without -c by @kim in #1632
- [WASM ABI 1.0] impl
__call_reducer__
&__describe_module__
usingbytes_sink_write
by @Centril in #1615 - ABI v9 validation code by @kazimuth in #1572
- Fix ptr mutability of some new C# FFIs by @RReverser in #1645
- WASM ABI: implement
row_iter_bsatn_advance
&row_iter_bsatn_close
by @Centril in #1622 - WASM ABI:
get_table_id
->table_id_from_name
by @Centril in #1634 - WASM ABI: add
datastore_table_row_count
by @Centril in #1636 - [WASM ABI 1.0] Fix
bytes_source_read
by @kim in #1646 - Add backwards-compatible validation for RawModuleDefV8. by @kazimuth in #1606
- Allow converting new ModuleDef to old TableSchema by @kazimuth in #1630
- Fix flaky smoketest due to race condition in subscribe by @coolreader18 in #1656
- Update SQL AST in accordance with the SQL spec by @mamcx in #1623
- WASM ABI:
iter_start
->datastore_table_scan_bsatn
by @Centril in #1637 - WASM ABI:
delete_by_rel
->datastore_delete_all_by_eq_bsatn
by @Centril in #1638 - Add edition to .rustfmt.toml by @gefjon in #1663
- bindings-csharp: pass
address_1
by @Centril in #1621 - C#: split table codegen logic from type codegen logic by @RReverser in #1573
- WASM ABI:
insert
->datastore_insert_bsatn
& impl new semantics by @Centril in #1639 - WASM ABI: implement console ABIs by @Centril in #1664
- C# module benchmarks by @RReverser in #1679
- Auto-generate C# ModuleDef bindings from Rust by @RReverser in #1680
- Impl macro rework by @coolreader18 in #1314
- commitlog: Make commit module pub...