Enable running Rust smoketests against a remote server instead of
spawning local servers, similar to Python smoketests --remote-server.
- Add SPACETIME_REMOTE_SERVER env var support to skip local server spawn
- Add --server CLI option to cargo smoketest
- Add skip_if_remote!() macro for tests requiring local server control
- Mark restart tests with skip_if_remote!() since they need local server
- Build CLI/standalone in release mode for faster test execution
- Run tests in release mode (faster SpacetimeDB server)
- Remove redundant WASM cache warmup (precompiled modules already warm it)
- Increase default parallelism to 16 (optimal based on benchmarks)
This reduces fresh build time by ~16 seconds and test execution
time by ~5x compared to debug mode.
Extract static smoketest modules into a nested workspace at
crates/smoketests/modules/ that is pre-compiled during warmup.
This eliminates per-test WASM compilation overhead.
Key changes:
- Add 38 precompiled module crates in nested workspace
- Add module registry (src/modules.rs) for WASM path lookup
- Add precompiled_module() builder and use_precompiled_module() method
- Update xtask warmup to build nested workspace
- Migrate all static tests to use precompiled modules
- Tests using precompiled modules run in ~0.5-3s vs ~4-7s before
Tests that need runtime compilation (auto_migration, detect_wasm_bindgen,
intentionally-broken modules) continue to use module_code().
- Add warmup_wasm_cache() to pre-compile dependencies before tests run
- Use shared target directory for all tests to reuse compiled deps
- Limit parallelism to 8 jobs to reduce cargo lock contention
- Add --no-fail-fast to run all tests even if some fail
Results: 329s total (vs 378s before), 13 slow tests (vs 35 before)
- Rename tools/xtask to tools/xtask-smoketest
- Add USE_SHARED_TARGET_DIR flag to control caching behavior
- When true: tests share target/smoketest-modules/ and global CARGO_HOME
- When false: each test gets isolated CARGO_HOME (no sharing)
- Shared mode is 1.68x faster (378s vs 636s for all tests)
- Add detailed build timing instrumentation