Skip to content

Releases: clockworklabs/SpacetimeDB

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

v0.11.1-beta

26 Aug 23:16
Compare
Choose a tag to compare

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:

  • Bugfix: Dedup schedueler queue (#1587)
  • Add volatile_nonatomic_schedule_immediate (#1612)

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

09 Aug 18:48
Compare
Choose a tag to compare

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 --server and --identity args consistently instead of anonymous args (#1482)
  • We have a new subscribe subcommand! (#1343)
  • Bugfix: Update help text suggesting spacetime server fingerprint to have the correct -s param (#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_schema clone-on-write (#1530)
  • Fix running 'cargo test' in crates/lib (#1478)
  • Move db module from spacetimedb_sats to spacetimedb_lib (#1479)
  • Move schemas to schema crate, rename Def to RawDefV8 (#1498)
  • core: Simplify custom bootstrap (#1404)
  • TableDef: clarify generated_* 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 on list.push(..) (#1474)
  • HACK: Tweak schema_updates to 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

Read more

v0.10.1-beta

28 Jun 16:18
Compare
Choose a tag to compare

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

v0.10.0-beta

13 Jun 22:36
Compare
Choose a tag to compare

Yes, the rumors are true - it's release day! ๐ŸŽ‰ ๐ŸŽ‰

We're gearing up for our big 1.0 release later this year, so this release has some great foundational API improvements, improves consistency across ours APIs, and adds some other fantastic foundational features!

Highlights

  • Bumped to Rust 1.78
  • We now regularly capture a snapshot of the database state, and restore from it when restarting the Database
  • Tables are now private by default, and must be explicitly marked as public via #[spacetimedb(table(public))] or [SpacetimeDB.Table(Public = true)]
  • Our SDKs now have consistent filter_by_* functions that return a collection of results, and find_by_* functions that return a single result
  • Implement a new rand api which fixes bugs in our previous random number generator
  • Bugfix: When the database is restarted, we properly treat all clients as disconnected

Big ones!

  • Module hotswapping - You can now update your server logic with a new module without disconnecting existing clients! Players will keep on playing and clients will keep on clienting without being any the wiser!
  • Recv-style ABI - We've improved the performance of passing data into your module from the host substantially by eliminating several allocations and copies.

CLI changes

  • spacetime build uses the --project-path param instead of an anonymous param
  • spacetime publish -c requires confirmation (can be overridden with --force)
  • spacetime logs -f does not start from the very beginning

What's Changed

Read more

v0.9.2-beta

28 May 20:49
Compare
Choose a tag to compare

Yes, we just released 0.9.1 ๐ŸŽ‰, but we just love releasing the latest and greatest things to the community!

And in this case, the latest and greatest thing is an ๐Ÿ”’ important security patchfix! Private tables are now properly protected.

Thank you to ๐Ÿ“ฃ @Chippy in our Discord server for pointing this out so we were able to fix it quickly!

Changelog

22dd786 Apply open PR #1224: Bump version to 0.9.2
e4f1021 Apply open PR #1274: execution_set.check_auth(...) on initial subscription

Full Changelog: v0.9.1-beta...v0.9.2-beta

v0.9.1-beta

22 May 22:34
Compare
Choose a tag to compare

v0.9.1

Today's a good day - we have a new release for you! It's not the fanciest, shiniest release - but it includes some nice cleanups and important fixes.

As a reminder you can upgrade from the previous release with the spacetime upgrade command.
If you are on macOS and you've installed through brew we recommend using brew install clockworklabs/tap/spacetime to upgrade.

Highlights

๐Ÿ—‘๏ธ Removed repeating reducers

โš ๏ธ We have removed repeating reducers (#[spacetimedb(reducer, repeat = _)]) in favor of just using schedule!.

There are a lot of nuances to what exactly "repeating" means. It's easier for everyone to understand code that schedules what it wants, when it wants.

๐Ÿ’ป CLI updates

โš ๏ธ The default server is now testnet instead of local!

The meaning of -s and -S are more consistent between CLI commands (-s is for --server, -S is for --skip_clippy). spacetime build, spacetime identity, and spacetime server have been tweaked.

๐Ÿ› ๏ธ Bugfixes

  • Fix select * from *
  • Atomically downgrade lock when committing tx to prevent deadlock
  • fix(1170): Use scope guard to decrement reducer queue length
  • fix(1173): Record wait time for all reducers

Changelog

New Contributors

Full Changelog: v0.9.0-beta...v0.9.1-beta