Ungate procedures from the unstable feature#5164
Open
cloutiertyler wants to merge 3 commits into
Open
Conversation
Procedures (and the outgoing HTTP client used from procedures) are no
longer gated behind the `unstable` feature / `SPACETIMEDB_UNSTABLE_FEATURES`
across the module libraries. HTTP handlers/webhooks, views, RLS, and
immediate-scheduling remain gated.
- bindings-sys: ungate the `procedure` host-call module + raw ABI
(start/commit/abort_mut_tx, procedure_http_request) and `call_no_ret`.
- bindings (Rust): ungate the `procedure` macro, ProcedureContext,
TxContext/with_tx/try_with_tx, db_read_only/get_read_only, procedure
traits, register_procedure, __call_procedure__, procedure RNG, and the
outgoing HttpClient. Add fine-grained gating inside http.rs so the
HttpClient is exposed while HandlerContext/Router/handler macros stay
gated.
- bindings-csharp: drop [Experimental("STDB_UNSTABLE")] from
ProcedureContext WithTx/TryWithTx (runtime + generated) and the
generated ProcedureTxContext; regenerate FFI snapshots.
- bindings-cpp: ungate the procedure ABI, tx_execution, the outgoing
HTTP client (http.h/http_convert.h), and procedure_context.h; handlers
keep requiring SPACETIMEDB_UNSTABLE_FEATURES.
- docs: remove the procedures beta notices (HTTP handlers stay beta);
regenerate static/llms.md.
- sdk-test-procedure: no longer needs features = ["unstable"].
- rustfmt: reorder the split `use` statements in http.rs/rng.rs/rt.rs. - cargo doc: fix a pre-existing broken intra-doc link in HttpClient::send (`http::request::Builder::extension`), newly surfaced now that the outgoing HTTP client is documented in the default (non-unstable) build. - clippy: gate the request_from_wire/response_into_wire test module behind `unstable`, since those functions are now gated.
The procedure module is now documented in the default (non-unstable) `cargo doc` build, surfacing three unresolved [`Errno`] intra-doc links. Qualify them as [`crate::Errno`] so they resolve from within the submodule.
gefjon
approved these changes
Jun 2, 2026
Contributor
gefjon
left a comment
There was a problem hiding this comment.
We might want to get someone else's eyes on the C# and C++ changes, but then again, we might not, 'cause these changes are pretty straightforward. From what I saw, those parts seemed reasonable. The Rust and docs changes are good. I'm ignoring llms.md, as it seems to be unrelated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Graduate procedures (and the outgoing HTTP client used from procedures) out of the
unstablefeature gate /SPACETIMEDB_UNSTABLE_FEATURESacross all module libraries. Theproceduremacro,ProcedureContext,with_tx/try_with_tx, scheduled procedures, andctx.httpare now available without opting intounstable.Still gated (unchanged): HTTP handlers/webhooks, views, RLS /
client_visibility_filter, and immediate-scheduling (volatile_nonatomic_schedule_immediate).Per library:
bindings-sys: ungate theprocedurehost-call module + raw ABI imports (procedure_start/commit/abort_mut_tx,procedure_http_request) andcall_no_ret. Scheduling ABI stays gated.bindings(Rust): ungate theproceduremacro,ProcedureContext,TxContext/with_tx/try_with_tx,db_read_only/get_read_only, the procedure traits,register_procedure,__call_procedure__, and procedure RNG. Thehttpmodule (previously gated as a unit) now has fine-grained gating so the outgoingHttpClientis exposed whileHandlerContext/Router/handler macros stay gated.bindings-csharp: drop[Experimental("STDB_UNSTABLE")]fromProcedureContext.WithTx/TryWithTx(runtime + codegen) and the generatedProcedureTxContext; FFI snapshots regenerated. Handler context members + RLS attribute stay gated.bindings-cpp: ungate the procedure ABI (abi.h/FFI.h),tx_execution.h, the outgoing HTTP client (http.h/http_convert.h), andprocedure_context.h.handler_context.h/router.h/http_handler_macros.hstill#errorwithoutSPACETIMEDB_UNSTABLE_FEATURES.static/llms.md.sdk-test-procedure: no longer needsfeatures = ["unstable"].API and ABI breaking changes
Not breaking. This is purely additive to the stable surface: procedures become available without the
unstablefeature, while modules that already opt intounstableare unaffected. The wasm host-ABI imports were already implemented host-side and merely gated module-side, so there is no ABI version change. (No breaking-change label needed.)Expected complexity level and risk
3/5. The diff itself is mostly removing
#[cfg]/#ifdef/[Experimental]guards, but the gate bundled procedures + outgoing HTTP + handlers + the ABI crate together, so the work was in separating procedures from the features that stay gated. Areas reviewers may want to scrutinize:httpmodule went from "gated as a whole" to fine-grained per-item gating; the outgoingHttpClientis exposed while handler types/macros stay behindunstable.unstablecut reaches the ABI crate (bindings-sys), which is the only way procedures can compile without the feature.Testing
cargo check -p spacetimedbpasses in default,--features unstable, and--no-default-features --features unstable.sdk-test-procedure(uses procedures,with_tx/try_with_tx,ctx.http.get,new_uuid_v7, scheduled procedures) builds withoutunstable.Codegen.Testspass (6/6) after FFI snapshot regen.ctx.http.send()compile without the flag, full headers compile with it, andhandler_context.hstill#errors without it. (Not built for the real wasm/emscripten target locally — relying on CI.)cargo ci lintcomponents reproduced locally: rustfmt, clippy (-D warnings, default +unstable), csharpier, andcargo doc --deny warnings.