Skip to content

Releases: clockworklabs/SpacetimeDB

Release 1.2.0

17 Jun 16:41
Compare
Choose a tag to compare

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 and GetHashCode 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 in getrandom 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 in Serialize for ValueWithType<ArrayValue> by @Centril in #2708
  • PagePool::{default -> new_for_test} + temporary hack for IN_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-memory Sequences 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 DbUpdates 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...
Read more

Release 1.1.2

14 May 17:33
Compare
Choose a tag to compare

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

Full Changelog: v1.1.1...v1.1.2

v1.1.1

22 Apr 20:59
Compare
Choose a tag to compare

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

Full Changelog: v1.1.0...v1.1.1

Release 1.1.0

16 Apr 01:51
Compare
Choose a tag to compare

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, where x 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 a TimeDuration 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

Full Changelog: v1.0.1...v1.1.0

Release 1.0.1

24 Mar 16:55
Compare
Choose a tag to compare

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:

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.0.1

v1.0.0

03 Mar 19:01
Compare
Choose a tag to compare
Version 1.0 Illustration

🎉 SpacetimeDB 1.0 🎉

Today we're incredibly excited to officially release SpacetimeDB 1.0!

Watch the keynote!

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! Discordhttps://discord.gg/spacetimedb

What's Changed

Read more

v1.0.0 Release Candidate 3

14 Jan 18:08
Compare
Choose a tag to compare

🥇 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! and eprintln macros in favor of log::info! and log::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 now spacetime rename
    • When updating the cli.toml config file, comments and formatting are preserved
  • 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

Read more

v1.0.0 Release Candidate 2

14 Dec 02:23
Compare
Choose a tag to compare

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

06 Nov 20:36
Compare
Choose a tag to compare

🚀 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 same Identity across multiple SpacetimeDB clusters by logging into the website. This includes introducing new CLI login flow, including login show and logout 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 with spacetime 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

New Contributors

Full Changelog: v0.12.0-beta-hotfix3...v1.0.0-rc1-hotfix1

v0.12.0-beta

04 Oct 05:19
Compare
Choose a tag to compare

🌟 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 called spacetime server clear
  • spacetime build --skip_clippy/-S is now more explicitly --skip-println-checks
  • spacetime logs database 10 is now spacetime logs database -n 10
  • spacetime publish and spacetime 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 now spacetime energy balance for clarity
  • spacetime publish --clear-database has been renamed to spacetime publish --delete-data for clarity
  • spacetime 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)

Read more