diff --git a/Cargo.lock b/Cargo.lock index 432ba03404..a194fa3cff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4185,7 +4185,7 @@ dependencies = [ [[package]] name = "spacetimedb-vm" -version = "0.1.0" +version = "0.5.0" dependencies = [ "anyhow", "spacetimedb-lib", diff --git a/LICENSE.txt b/LICENSE.txt index 44f2e997b5..3a3f409223 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -7,9 +7,11 @@ Licensed Work: SpacetimeDB 0.5.0 The Licensed Work is (c) 2023 Clockwork Laboratories, Inc. -Additional Use Grant: You may make use of the Licensed Work, provided that - you may not use the Licensed Work for a Database - Service. +Additional Use Grant: You may make use the Licensed Work provided your + application or service uses the Licensed Work with no + more than one server instance in production and + provided that you do not use the Licensed Work for a + Database Service. A “Database Service” is a commercial offering that allows third parties (other than your employees and @@ -17,12 +19,12 @@ Additional Use Grant: You may make use of the Licensed Work, provided that Licensed Work by creating tables whose schemas are controlled by such third parties. -Change Date: 2028-07-31 +Change Date: 2028-08-03 Change License: Apache License, Version 2.0 For information about alternative licensing arrangements for the Software, -please visit: https://surrealdb.com +please visit: https://spacetimedb.com Notice diff --git a/README.md b/README.md index ef1dd81c23..5a125c3c5f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # SpacetimeDB -Bringing smart-contracts and data-oriented design to relational database systems +Multiplayer at the speed of light.
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index ba030f35e5..b36e220497 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -55,7 +55,7 @@ fn get_command() -> Command { │ 888 │ │ 888 │ │ 888 │ -│ "Smart contracts without the blockchain" │ +│ "Multiplayer at the speed of light" │ │ │ ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ SpacetimeDB Command Line Tool │ diff --git a/crates/cli/src/subcommands/generate/rust.rs b/crates/cli/src/subcommands/generate/rust.rs index 7ebd497a29..3fc29bdebc 100644 --- a/crates/cli/src/subcommands/generate/rust.rs +++ b/crates/cli/src/subcommands/generate/rust.rs @@ -171,7 +171,7 @@ const ALLOW_UNUSED: &str = "#[allow(unused)]"; const SPACETIMEDB_IMPORTS: &[&str] = &[ ALLOW_UNUSED, - "use spacetimedb_client_sdk::{", + "use spacetimedb_sdk::{", "\tglobal_connection::with_connection,", "\tsats::{ser::Serialize, de::Deserialize},", "\ttable::{TableType, TableIter, TableWithPrimaryKey},", @@ -344,7 +344,7 @@ fn find_product_type(ctx: &GenCtx, ty: AlgebraicTypeRef) -> &ProductType { } /// Generate a file which defines a `struct` corresponding to the `table`'s `ProductType`, -/// and implements `spacetimedb_client_sdk::table::TableType` for it. +/// and implements `spacetimedb_sdk::table::TableType` for it. pub fn autogen_rust_table(ctx: &GenCtx, table: &TableDef) -> String { let mut output = CodeIndenter::new(String::new()); let out = &mut output; @@ -536,7 +536,7 @@ fn print_table_filter_methods( } /// Generate a file which defines a struct corresponding to the `reducer`'s arguments, -/// implements `spacetimedb_client_sdk::table::Reducer` for it, and defines a helper +/// implements `spacetimedb_sdk::table::Reducer` for it, and defines a helper /// function which invokes the reducer. pub fn autogen_rust_reducer(ctx: &GenCtx, reducer: &ReducerDef) -> String { let func_name = reducer.name.to_case(Case::Snake); @@ -620,7 +620,7 @@ pub fn autogen_rust_reducer(ctx: &GenCtx, reducer: &ReducerDef) -> String { /// /// 3. `fn handle_table_update`, which dispatches on table name to find the appropriate type /// to parse the rows and insert or remove them into/from the -/// `spacetimedb_client_sdk::client_cache::ClientCache`. The other SDKs avoid needing +/// `spacetimedb_sdk::client_cache::ClientCache`. The other SDKs avoid needing /// such a dispatch function by dynamically discovering the set of table types, /// e.g. using C#'s `AppDomain`. Rust's type system prevents this. /// @@ -635,7 +635,7 @@ pub fn autogen_rust_reducer(ctx: &GenCtx, reducer: &ReducerDef) -> String { /// reducers. /// /// 7. `fn connect`, which invokes -/// `spacetimedb_client_sdk::background_connection::BackgroundDbConnection::connect` +/// `spacetimedb_sdk::background_connection::BackgroundDbConnection::connect` /// to connect to a remote database, and passes the `handle_row_update` /// and `handle_event` functions so the `BackgroundDbConnection` can spawn workers /// which use those functions to dispatch on the content of messages. @@ -692,12 +692,12 @@ pub fn autogen_rust_globals(ctx: &GenCtx, items: &[GenItem]) -> Vec<(String, Str /// Extra imports required by the `mod.rs` file, in addition to the [`SPACETIMEDB_IMPORTS`]. const DISPATCH_IMPORTS: &[&str] = &[ - "use spacetimedb_client_sdk::client_api_messages::{TableUpdate, Event};", - "use spacetimedb_client_sdk::client_cache::{ClientCache, RowCallbackReminders};", - "use spacetimedb_client_sdk::background_connection::BackgroundDbConnection;", - "use spacetimedb_client_sdk::identity::Credentials;", - "use spacetimedb_client_sdk::callbacks::{DbCallbacks, ReducerCallbacks};", - "use spacetimedb_client_sdk::reducer::AnyReducerEvent;", + "use spacetimedb_sdk::client_api_messages::{TableUpdate, Event};", + "use spacetimedb_sdk::client_cache::{ClientCache, RowCallbackReminders};", + "use spacetimedb_sdk::background_connection::BackgroundDbConnection;", + "use spacetimedb_sdk::identity::Credentials;", + "use spacetimedb_sdk::callbacks::{DbCallbacks, ReducerCallbacks};", + "use spacetimedb_sdk::reducer::AnyReducerEvent;", "use std::sync::Arc;", ]; @@ -772,7 +772,7 @@ fn print_handle_table_update_defn(ctx: &GenCtx, out: &mut Indenter, items: &[Gen } writeln!( out, - "_ => spacetimedb_client_sdk::log::error!(\"TableRowOperation on unknown table {{:?}}\", table_name),", + "_ => spacetimedb_sdk::log::error!(\"TableRowOperation on unknown table {{:?}}\", table_name),", ).unwrap(); }, "}\n", @@ -827,7 +827,7 @@ fn print_handle_resubscribe_defn(out: &mut Indenter, items: &[GenItem]) { } writeln!( out, - "_ => spacetimedb_client_sdk::log::error!(\"TableRowOperation on unknown table {{:?}}\", table_name)," , + "_ => spacetimedb_sdk::log::error!(\"TableRowOperation on unknown table {{:?}}\", table_name)," , ).unwrap(); }, "}\n", @@ -848,7 +848,7 @@ fn print_handle_event_defn(out: &mut Indenter, items: &[GenItem]) { |out| { out.delimited_block( "let Some(function_call) = &event.function_call else {", - |out| writeln!(out, "spacetimedb_client_sdk::log::warn!(\"Received Event with None function_call\"); return None;") + |out| writeln!(out, "spacetimedb_sdk::log::warn!(\"Received Event with None function_call\"); return None;") .unwrap(), "};\n", ); @@ -868,7 +868,7 @@ fn print_handle_event_defn(out: &mut Indenter, items: &[GenItem]) { } writeln!( out, - "unknown => {{ spacetimedb_client_sdk::log::error!(\"Event on an unknown reducer: {{:?}}\", unknown); None }}", + "unknown => {{ spacetimedb_sdk::log::error!(\"Event on an unknown reducer: {{:?}}\", unknown); None }}", ).unwrap(); }, "}\n", @@ -897,8 +897,8 @@ fn print_connect_defn(out: &mut Indenter) { out.delimited_block( "pub fn connect(host: Host, db_name: &str, credentials: Option) -> Result<()> where -\tHost: TryInto, -\t>::Error: std::error::Error + Send + Sync + 'static, +\tHost: TryInto, +\t>::Error: std::error::Error + Send + Sync + 'static, {", |out| out.delimited_block( "with_connection(|connection| {", diff --git a/crates/core/src/db/commit_log.rs b/crates/core/src/db/commit_log.rs index 55f3c09e05..0f34d06967 100644 --- a/crates/core/src/db/commit_log.rs +++ b/crates/core/src/db/commit_log.rs @@ -76,7 +76,6 @@ impl CommitLog { const COMMIT_SIZE: usize = 1; - let tx = datastore.begin_mut_tx(); if unwritten_commit.transactions.len() >= COMMIT_SIZE { { let mut guard = self.odb.lock().unwrap(); @@ -98,8 +97,6 @@ impl CommitLog { unwritten_commit.min_tx_offset += unwritten_commit.transactions.len() as u64; unwritten_commit.transactions.clear(); - datastore.rollback_mut_tx(tx); - Some(bytes) } else { None diff --git a/crates/vm/Cargo.toml b/crates/vm/Cargo.toml index 225c0ac031..83ef310332 100644 --- a/crates/vm/Cargo.toml +++ b/crates/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacetimedb-vm" -version = "0.1.0" +version = "0.5.0" edition = "2021" license-file = "LICENSE" description = "A VM for SpacetimeDB"