Releases: clockworklabs/SpacetimeDB
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, wherexis a binary operator, either + or -:
Timestamp x TimeDuration -> TimestampTimestamp x Duration -> Timestamp.
- This one is kind of weird, since we convert the
Durationinto aTimeDurationbefore 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
:senderparameter 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 diffby @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_clientremovals after disconnect by @Centril in #2446 - Update PR template by @coolreader18 in #2395
- commitlog: Derive serde for
Commitby @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 docon 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
ChunkPoolby @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
FilterableValueto 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
IdentityandConnectionIdshould implementIComparable- CLI - Fix: SQL
updateanddeleteare throwing exceptions - Remove row deduplication in incremental update
- Bug on generated typescript from c# module
- OIDC JWT handling: accept tokens where
audis 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
insertdocs 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
fdatasyncby @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-optionsby @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
IComparableforIdentityandConnectionIdby @rekhoff in #2354 - Update README.md by @cloutiertyler in #2361
- Clarify what is a valid module name by @coolreader18 in #2386
- CLI - Fix
sql --interactivecase where returned rows are 0 by @bfops in #2359 - Make the
tools/merge-docker-images.shscript 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
getrandomwarning 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-appWe 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 --versionJoin 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_bsatnhost call by @Centril in #2102 - Add
SubscriptionBuilder::subscribe_to_all_tablesby @gefjon in #2109 - Fix wording in
ReplayVisitor::visit_insertby @Centril in #2123 - commitlog: Make offset index usable externally by @kim in #2108
- Add new crates to
publish-crates.shscript by @bfops in #2125 - Rework RLS macro for amended syntax by @gefjon in #2105
- Rust SDK:
with_credentials->with_tokenby @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.indexesbeIndexIdby @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::insertnot un-deleteting by @Centril in #2156 - Set
tracingstatic 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
updateABI by @Centril in #2137 - Adds improvements & new crates to
publish-crates.shby @cloutiertyler in #2173 - Bump version to
1.0.0-rc4by @bfops in #2177 - Cache whether a
Tableis a scheduler table, avoiding fetching the schema by @Centril in #2141 - Bump to Rust 1.84 by @coolreader18 in #2001
- Switch
DeleteTableimpl to one based onFixedBitSetby @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_rowand 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_rangeby @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, usethiserrorw/ structured error types by @gefjon in #2169 - Rust client SDK: rework
EventContextinto multiple types by @gefjon in #2189 - Make
MutTxId::updatereally idempotent wrt.TxDataby @Centril in #2212 - Rewrite C# codegen to the new Lang infra + fixes by @RReverser in #2184
- add
directindices, 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 loginby @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!andeprintlnmacros in favor oflog::info!andlog::error! - Fix defining multiple tables on the same
structin Rust modules - CLI
- Fixed
spacetime energy balancenot working at all - The
spacetime dnssubcommand is nowspacetime rename - When updating the
cli.tomlconfig 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
jsonwebtokenandjwksforks from crates.io by @bfops in #1958 - Add LICENSE file to
sql-parsercrate 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_identitystuff 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 identityby @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
-hotfix1by @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::Iterby 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
bytethat ain't 0 or 1 is not a validAV::Boolby @Centril in #2026 - Add
Layout.fixed: boolfor a fast path ineq_row_in_page&row_type_visitorby @Centril in #2025 - Add
static_bsatn_validator&validate_bsatnby @Centril in #2029 - Add
Static(Bsatn)Layout::deserialize_row_intoby @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_worksby @Centril in #2027 - move unique constraint checking until after optimistic insertion by @Centril in #2037
- Allocation pool the chunked iters in
InstanceEnvby @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_lenmethod 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_APPENDby @kim in #2072 - CLI - Remove deprecated use of the
--project-pathflag 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
identityhost 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 balancenot 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.Identityfor C# by @RReverser in #2091 - Implement new C# index syntax by @RReverser in #2078
- CLI -
dnssubcommand becomesrenameby @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
Identitys work in SpacetimeDB, including allowing you to use the sameIdentityacross multiple SpacetimeDB clusters by logging into the website. This includes introducing new CLI login flow, includinglogin showandlogoutcommands. spacetime upgradeUpdate: Now uses--yesinstead of the deprecated--forceflag.- Help Text Enhancements: Added help text for
--build-options. - Server Command Stabilization: Stabilized
spacetime serversubcommands 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
DbConnectionstates. - Code Cleanup: Removed obsolete elements like
BytesWrapperand 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 upgradetakes--yesinstead of deprecated--forceby @bfops in #1805 - Renamed database instance to replica by @cloutiertyler in #1806
- offset index read integration by @Shubham8287 in #1779
- commitlog: Yield
StoredCommitin 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_compatibleto 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
Maps for you! by @Centril in #1770 - CLI - Add helptext for
--build-optionsby @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 editfailing on renames by @bfops in #1877 - CLI - Stabilize
spacetime serversubcommands by @bfops in #1845 - Redefine Address as
U128+Identityand Hash asU256by @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
BTreeIndexBoundsby @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
Lockingdatastore by @kim in #1898 - core: Expose
next_tx_offsetof theReplaydecoder by @kim in #1899 - core: Conversion from
txdata::InputstoReducerContextby @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
ExecutionContextinside 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 showandlogoutby @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 &
NoSuccessNotifyby @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 clearspacetime build --skip_clippy/-Sis now more explicitly--skip-println-checksspacetime logs database 10is nowspacetime logs database -n 10spacetime publishandspacetime generatenow accept a--build-optionsparam, e.g.spacetime publish --build-options="--debug --skip-println-checks"
Small clarity changes:
- All
--anon-identityparameters have been renamed to--anonymous spacetime energy statusis nowspacetime energy balancefor clarityspacetime publish --clear-databasehas been renamed tospacetime publish --delete-datafor clarityspacetime subscribe -nnow has a longform option--num-updatesspacetime 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
updatereducer 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 ofBuiltinTypeby @Centril in #1559 - Updating the change date in anticipation of the anniversary by @cloutiertyler in #1574
- Update README.md by @cloutiertyler in #1575
- Make
schemacrate publishable by @bfops in #1569 Typespace::is_nominal_normal_formby @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
I256andU256by @Centril in #1477 - core: Use
Programinstead 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
CollectAllErrorsto be more composable by @kazimuth in #1586 - Preliminary Identifier validation by @kazimuth in #1584
- Allow empty
ColListby @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
ColIdfromu32tou16by @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_readby @Centril in #1609 - Placate some clippy errors in
snapshotby @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
ScheduleAtspecial +Typespace::is_valid_for_client_code_generationby @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_writeby @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_closeby @Centril in #1622 - WASM ABI:
get_table_id->table_id_from_nameby @Centril in #1634 - WASM ABI: add
datastore_table_row_countby @Centril in #1636 - [WASM ABI 1.0] Fix
bytes_source_readby @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_bsatnby @Centril in #1637 - WASM ABI:
delete_by_rel->datastore_delete_all_by_eq_bsatnby @Centril in #1638 - Add edition to .rustfmt.toml by @gefjon in #1663
- bindings-csharp: pass
address_1by @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...
v0.11.1-beta
What's this? What's this? A release in the air!
This release just adds two small improvements to the timer table functionality from the last release:
Don't be fooled by this tiny release, though - our next release will be a big one! Keep an eye out for the big API improvements and upcoming stability soon! Before you know it, we'll have our big 1.0 release!
Changelog
Full Changelog: v0.11.0-beta...v0.11.1-beta
v0.11.0-beta
We have a big release for you today π π ! We're including some big performance improvements β‘ and long-awaited bugfixes π! Remember to stay tuned for our 0.12 release soon.
This release includes some major breaking changes, so you won't be able to use your old databases with this version. Run spacetime local clear to remove them.
Important changes
Major
- β‘ We removed our usage of protobuf, in favor of our own internal format (#1077) - this is a big performance improvement on the client and the server!
- β We removed the server-side
schedule!macro and its equivalents in favor of table-based timers (#1449). Please check our server module docs for more info on how to use the new system.
Here is some example code which uses the new timer tables:
// The `scheduled` attribute links this table to a reducer.
#[spacetimedb(table, scheduled(send_message))]
struct SendMessageTimer {
text: String,
}
// Reducers linked to the scheduler table should have their first argument as `ReducerContext`
// and the second as an instance of the table struct it is linked to.
#[spacetimedb(reducer)]
fn send_message(ctx: ReducerContext, arg: SendMessageTimer) -> Result<(), String> {
// ...
}
// Scheduling reducers inside `init` reducer
fn init() {
// Scheduling a reducer for a specific Timestamp
SendMessageTimer::insert(SendMessageTimer {
scheduled_id: 0,
text:"bot sending a message".to_string(),
//`spacetimedb::Timestamp` implements `From` trait to `ScheduleAt::Time`.
scheduled_at: ctx.timestamp.plus(Duration::from_secs(10)).into()
});
// Scheduling a reducer to be called at fixed interval of 100 milliseconds.
SendMessageTimer::insert(SendMessageTimer {
scheduled_id: 0,
text:"bot sending a message".to_string(),
//`std::time::Duration` implements `From` trait to `ScheduleAt::Duration`.
scheduled_at: duration!(100ms).into(),
});
}CLI changes
- CLI subcommands consistently use
--serverand--identityargs consistently instead of anonymous args (#1482) - We have a new
subscribesubcommand! (#1343) - Bugfix: Update help text suggesting
spacetime server fingerprintto have the correct-sparam (#1457) - Bugfix:
spacetime server add- Remove trailing/s from server URIs (#1552)
Web API
- Recovery code APIs are now under /identity and using POST (#1492)
- /identity GET returns an empty success if the email address is not found (#1491)
C#
- Use latest C# in BSATN.Runtime (#1548)
- Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI (#1461)
- Include BSATN.Codegen in nuget pack (#1424)
- Generate tagged enums in C# client code (#1421)
- Restructure NuGet packaging (#1440)
- Restructure C# SpacetimeDB runtime (#1455)
- Implement the module rng proposal for C# (#1425)
- Roslyn cacheability testing and fixes (#1420)
Using SpacetimeDB as a library
- table: Make
with_mut_schemaclone-on-write (#1530) - Fix running 'cargo test' in crates/lib (#1478)
- Move
dbmodule fromspacetimedb_satstospacetimedb_lib(#1479) - Move schemas to
schemacrate, renameDeftoRawDefV8(#1498) - core: Simplify custom bootstrap (#1404)
TableDef: clarifygenerated_*methods (#1419)- Make some commitlog helpers public (#1390)
- perf(1351): Add a row count metric for subscriptions (#1435)
Bugfixes
- ST sequences: respect allocated amount on restart (#1532)
- Drain scheduler Actor channel before start (#1529)
Table::is_row_present: don't panic (#1526)- Ignore some sequence allocation mismatches when checking for compatible updates (#1524)
- Fix inconsistent auth/identity creation (#735)
ColList: preserve list order onlist.push(..)(#1474)- HACK: Tweak
schema_updatesto allow adding/removing non-unique indices (#1434) - Fix index removal and additions + add smoketest (#1444)
- fix(1409): Counter metric names (#1411)
- core: Downgrade host log verbosity (#1446)
- Implement a temporary type check validation on sql compiling (#1456)
- core: Replace host scheduler on update (#1453)
Changelog
- Remove unused file table.rs by @Centril in #1417
- fix(1409): Counter metric names by @joshua-spacetime in #1411
- chore: Remove already tracked subscription counter by @joshua-spacetime in #1412
- refactor: Record txn-level metrics in a single utility by @joshua-spacetime in #1414
- Generate tagged enums in C# client code by @RReverser in #1421
- Include BSATN.Codegen in nuget pack by @kurtismullins in #1424
TableDef: clarifygenerated_*methods by @Centril in #1419- Add small 'realistic' workload benchmark integration test by @mamcx in #714
- Impl subscribe subcommand & subscription smoketests by @coolreader18 in #1343
- HACK: Tweak
schema_updatesto allow adding/removing non-unique indices by @Centril in #1434 - Update tools/publish-crates.sh by @bfops in #1426
- refactor: Reconfigure histogram buckets for certain metrics by @joshua-spacetime in #1436
- perf(1351): Add a row count metric for subscriptions by @joshua-spacetime in #1435
- Implement the module rng proposal for C# by @RReverser in #1425
- Bump version to 0.10.1 by @bfops in #1443
- Roslyn cacheability testing and fixes by @RReverser in #1420
- Restructure NuGet packaging by @RReverser in #1440
- Fix index removal and additions + add smoketest by @Centril in #1444
- core: Downgrade host log verbosity by @kim in #1446
- Smoketest auto-disconnect after restart by @kim in #1367
- core: Simplify custom bootstrap by @kim in #1404
- core: Replace host scheduler on update by @kim in #1453
- CLI - Update help text suggesting
spacetime server fingerprintto have the correct-sparam by @bfops in #1457 - Fix inconsistent auth/identity creation by @coolreader18 in #735
- Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI by @SteveBoytsun in #1461
- Ensure MacOS builds from CI are executable by @kurtismullins in #1462
- Automated Discord post when a PR merges by @bfops in #1470
- Fix C# module smoketests by @bfops in #1475
- smoketests: Add test for module hotswapping by @kim in #1403
ColList: preserve list order onlist.push(..)by @Centril in #1474- CLI: Put some common params in a central place by @bfops in #1484
- Implement a temporary type check validation on sql compiling by @mamcx in #1456
- Make some commitlog helpers public by @lcodes in #1390
- Adding benchmark for deserialize json & product value by @mamcx in #1035
- CLI: Use
--serverand--identityargs consistently instead of anonymous args by @bfops in #1482 - Fix running 'cargo test' in crates/lib by @kazimuth in #1478
- Restructure C# SpacetimeDB runtime by @RReverser in #1455
- Protobufectomy: server by @coolreader18 in #1077
- refactor(1494): Remove SQL DDL per 1.0 SQL spec by @joshua-spacetime in #1499
- C# smoketests use
nuget.configby @bfops in #1500 - CI - SpacetimeDB PRs run the C# SDK tests by @bfops in #1503
- Timer Table Implementation by @Shubham8287 in #1449
- CI - Post-to-discord workflow only fires if the PR merged to
masterby @bfops in #1520 - Return empty success from /identity GET by @lcodes in #1491
- Moving recovery code APIs under /identity and using POST by @lcodes in #1492
Table::is_row_present: don't panic by @gefjon in #1526- Move
dbmodule fromspacetimedb_satstospacetimedb_libby @kazimuth in #1479 - Ignore some sequence allocation mismatches whe...
v0.10.1-beta
This is just a tiny fix in our C# SDK. π§
Stay tuned for our upcoming 0.11 release soon! π
What's changed
- Fixed exceptions in C# SDK when someone disconnects or when a transaction originates from CLI by @SteveBoytsun in #1461
Full Changelog: v0.10.0-beta...v0.10.1-beta