Skip to content

Commit 086436d

Browse files
committed
move engine into its own crate
1 parent 0fd6c69 commit 086436d

44 files changed

Lines changed: 885 additions & 611 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ jobs:
261261
262262
wasm-bindgen --version
263263
264+
- name: Check engine simulation build
265+
run: cargo check -p spacetimedb-engine --no-default-features --features simulation
266+
264267
# Source emsdk environment to make emcc (Emscripten compiler) available in PATH.
265268
- name: Run tests
266269
run: |

Cargo.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ members = [
1414
"crates/data-structures",
1515
"crates/datastore",
1616
"crates/durability",
17+
"crates/engine",
1718
"crates/execution",
1819
"crates/expr",
1920
"crates/guard",
@@ -132,6 +133,7 @@ spacetimedb-core = { path = "crates/core", version = "=2.4.1" }
132133
spacetimedb-data-structures = { path = "crates/data-structures", version = "=2.4.1" }
133134
spacetimedb-datastore = { path = "crates/datastore", version = "=2.4.1" }
134135
spacetimedb-durability = { path = "crates/durability", version = "=2.4.1" }
136+
spacetimedb-engine = { path = "crates/engine", version = "=2.4.1" }
135137
spacetimedb-execution = { path = "crates/execution", version = "=2.4.1" }
136138
spacetimedb-expr = { path = "crates/expr", version = "=2.4.1" }
137139
spacetimedb-guard = { path = "crates/guard", version = "=2.4.1" }
@@ -143,6 +145,7 @@ spacetimedb-pg = { path = "crates/pg", version = "=2.4.1" }
143145
spacetimedb-physical-plan = { path = "crates/physical-plan", version = "=2.4.1" }
144146
spacetimedb-primitives = { path = "crates/primitives", version = "=2.4.1" }
145147
spacetimedb-query = { path = "crates/query", version = "=2.4.1" }
148+
spacetimedb-runtime = { path = "crates/runtime", version = "=2.4.1" }
146149
spacetimedb-sats = { path = "crates/sats", version = "=2.4.1" }
147150
spacetimedb-schema = { path = "crates/schema", version = "=2.4.1" }
148151
spacetimedb-standalone = { path = "crates/standalone", version = "=2.4.1" }
@@ -152,7 +155,6 @@ spacetimedb-fs-utils = { path = "crates/fs-utils", version = "=2.4.1" }
152155
spacetimedb-snapshot = { path = "crates/snapshot", version = "=2.4.1" }
153156
spacetimedb-subscription = { path = "crates/subscription", version = "=2.4.1" }
154157
spacetimedb-query-builder = { path = "crates/query-builder", version = "=2.4.1" }
155-
spacetimedb-runtime = { path = "crates/runtime", version = "=2.4.1" }
156158

157159
# Prevent `ahash` from pulling in `getrandom` by disabling default features.
158160
# Modules use `getrandom02` and we need to prevent an incompatible version

crates/core/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ spacetimedb-client-api-messages.workspace = true
2222
spacetimedb-commitlog.workspace = true
2323
spacetimedb-datastore.workspace = true
2424
spacetimedb-durability.workspace = true
25+
spacetimedb-engine.workspace = true
2526
spacetimedb-memory-usage.workspace = true
2627
spacetimedb-metrics.workspace = true
2728
spacetimedb-primitives.workspace = true
2829
spacetimedb-paths.workspace = true
2930
spacetimedb-physical-plan.workspace = true
3031
spacetimedb-query.workspace = true
31-
spacetimedb-runtime = { workspace = true, features = ["tokio"] }
32+
spacetimedb-runtime.workspace = true
3233
spacetimedb-sats = { workspace = true, features = ["serde"] }
3334
spacetimedb-schema.workspace = true
3435
spacetimedb-table.workspace = true
@@ -144,7 +145,7 @@ allow_loopback_http_for_tests = []
144145
# Enable timing for wasm ABI calls
145146
spacetimedb-wasm-instance-env-times = []
146147
# Enable test helpers and utils
147-
test = ["spacetimedb-commitlog/test", "spacetimedb-datastore/test"]
148+
test = ["spacetimedb-commitlog/test", "spacetimedb-datastore/test", "spacetimedb-engine/test"]
148149
# Perfmaps for profiling modules
149150
perfmap = []
150151
# Enables core pinning.

crates/core/src/database_logger.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,12 @@ impl SystemLogger {
674674
}
675675
}
676676

677+
impl spacetimedb_engine::db::update::UpdateLogger for SystemLogger {
678+
fn info(&self, msg: &str) {
679+
self.info(msg);
680+
}
681+
}
682+
677683
#[cfg(test)]
678684
mod tests {
679685
use std::{ops::Range, sync::Arc};

0 commit comments

Comments
 (0)