Skip to content

Move RelationalDB to spacetimedb-engine crate.#5113

Open
Shubham8287 wants to merge 9 commits into
shub/runtime-basefrom
shub/engine
Open

Move RelationalDB to spacetimedb-engine crate.#5113
Shubham8287 wants to merge 9 commits into
shub/runtime-basefrom
shub/engine

Conversation

@Shubham8287

@Shubham8287 Shubham8287 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Moves RelationalDB and related database code into a new spacetimedb-engine crate.
The main motivation is to tighten dependency control around the engine layer and isolate RelationalDB
behind a crate boundary.

  • Majority of this PR is code-motion.
  • Removes direct production dependence on tokio from spacetimedb-engine.
  • Keeps tokio only as a dev-dependency for test-only code in spacetimedb-engine.
  • This is intended to be a structural refactor only and should not result in any functional change in
    production.
  • Adds a CI check to ensure spacetimedb-engine continues to compile in simulation mode

API and ABI breaking changes

NA

Expected complexity level and risk

Testing

Existing tests should be enough.

@cloutiertyler

Copy link
Copy Markdown
Contributor

Why is "Expected complexity level and risk" unspecified? Could you please update. I assume you're saying it's low risk because it's just mechanical?

@Shubham8287

Copy link
Copy Markdown
Contributor Author

Why is "Expected complexity level and risk" unspecified? Could you please update. I assume you're saying it's low risk because it's just mechanical?.

No, I would have come to back it, when asked someone to review it. It is draft rn. (I should have marked).

@Shubham8287 Shubham8287 marked this pull request as draft May 29, 2026 17:59
Base automatically changed from shub/sim to master June 4, 2026 15:46
@Shubham8287 Shubham8287 force-pushed the shub/engine branch 4 times, most recently from 312d9d7 to 59e77cf Compare June 9, 2026 12:30
@Shubham8287 Shubham8287 changed the base branch from master to shub/runtime-base June 9, 2026 13:58
description = "Traits and single-node implementation of durability for SpacetimeDB."

[features]
default = ["tokio"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the crates, which are directly or in-directly depend on "runtime" crate, now have to do this "feature forwarding".

To be able to compiled with simulated runtime when "simulated" feature is on.

Not a fan of doing it this way, but not sure about better ways.

@Shubham8287 Shubham8287 marked this pull request as ready for review June 10, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants