Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,6 @@ jobs:

wasm-bindgen --version

- name: Check engine simulation build
run: cargo check -p spacetimedb-engine --no-default-features --features simulation

# Source emsdk environment to make emcc (Emscripten compiler) available in PATH.
- name: Run tests
run: |
Expand Down
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ members = [
"crates/bindings-typescript/test-app/server",
"crates/bindings-typescript/test-react-router-app/server",
"crates/bindings-typescript/test-solid-router/server",
"crates/query-builder",
"crates/query-builder", "crates/dst",
]
default-members = ["crates/cli", "crates/standalone", "crates/update"]
# cargo feature graph resolver. v3 is default in edition2024 but workspace
Expand Down
8 changes: 3 additions & 5 deletions crates/datastore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rust-version.workspace = true
spacetimedb-data-structures.workspace = true
spacetimedb-lib = { workspace = true, features = ["serde", "metrics_impls"] }
spacetimedb-commitlog.workspace = true
spacetimedb-durability = { path = "../durability", default-features = false }
spacetimedb-durability.workspace = true
spacetimedb-metrics.workspace = true
spacetimedb-primitives.workspace = true
spacetimedb-paths.workspace = true
spacetimedb-sats = { workspace = true, features = ["serde"] }
spacetimedb-schema.workspace = true
spacetimedb-table.workspace = true
spacetimedb-snapshot = { path = "../snapshot", default-features = false }
spacetimedb-snapshot.workspace = true
spacetimedb-execution.workspace = true

anyhow = { workspace = true, features = ["backtrace"] }
Expand All @@ -39,9 +39,7 @@ thin-vec.workspace = true
[features]
# Print a warning when doing an unindexed `iter_by_col_range` on a large table.
unindexed_iter_by_col_range_warn = []
default = ["unindexed_iter_by_col_range_warn", "tokio"]
tokio = ["spacetimedb-durability/tokio", "spacetimedb-snapshot/tokio"]
simulation = ["spacetimedb-durability/simulation", "spacetimedb-snapshot/simulation"]
default = ["unindexed_iter_by_col_range_warn"]
# Enable test helpers and utils
test = ["spacetimedb-commitlog/test", "spacetimedb-schema/test"]

Expand Down
24 changes: 24 additions & 0 deletions crates/dst/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "spacetimedb-dst"
version.workspace = true
edition.workspace = true
rust-version.workspace = true

[dependencies]
anyhow.workspace = true
clap.workspace = true
spacetimedb-datastore.workspace = true
spacetimedb-commitlog.workspace = true
spacetimedb-durability.workspace = true
spacetimedb-engine.workspace = true
spacetimedb-lib.workspace = true
spacetimedb-primitives.workspace = true
spacetimedb-runtime = { workspace = true, features = ["simulation"] }
spacetimedb-sats.workspace = true
spacetimedb-schema.workspace = true
spacetimedb-table.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true

[lints]
workspace = true
20 changes: 20 additions & 0 deletions crates/dst/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SpacetimeDB DST

Deterministic Simulation Testing framework for SpacetimeDB.

## Test

```sh
cargo test -p spacetimedb-dst
```

## Run

```sh
cargo run -p spacetimedb-dst -- run --seed 42 --max-interactions 1000
```

Options:

- `--seed <u64>` — RNG seed (defaults to wall-clock nanos)
- `--max-interactions <usize>` — interaction budget
Loading
Loading