Skip to content

Compilation guard && tokio::sync re-export from runtime crate.#5255

Open
Shubham8287 wants to merge 2 commits into
masterfrom
shub/runtime-base
Open

Compilation guard && tokio::sync re-export from runtime crate.#5255
Shubham8287 wants to merge 2 commits into
masterfrom
shub/runtime-base

Conversation

@Shubham8287

Copy link
Copy Markdown
Contributor

Description of Changes

Runtime specific changes from #5113.

  • spacetimedb-runtime enforces exactly one feature at compile time: tokio or simulation. It rejects both-enabled and neither-enabled builds explicitly.

  • This also keeps tokio::sync re-exported from runtime, look at code comment for reasoning.

API and ABI breaking changes

NA

Expected complexity level and risk

1

@Shubham8287 Shubham8287 changed the title Shub/runtime base Compilation guard && tokio::sync re-export from runtime crate. Jun 9, 2026
Comment thread crates/runtime/src/lib.rs
@@ -1,3 +1,11 @@
#[cfg(all(feature = "tokio", feature = "simulation"))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[cfg(all(feature = "tokio", feature = "simulation"))]
#[cfg(or(all(feature = "tokio", feature = "simulation"), not(any(feature = "tokio", feature = "simulation")))]

Not that this is much clearer, feel free to ignore 😅

Comment thread crates/runtime/src/lib.rs
// executor-agnostic, so driving them from the deterministic simulation runtime
// remains deterministic.
//
// Callers must avoid APIs that block or park OS threads on their own, such as

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are there any other known besides blocking_send? We should at least be documenting those very loudly to avoid surprises down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants