Commit e45d36e
authored
Ungate procedures from the
# Description of Changes
Graduate **procedures** (and the outgoing HTTP client used from
procedures) out of the `unstable` feature gate /
`SPACETIMEDB_UNSTABLE_FEATURES` across all module libraries. The
`procedure` macro, `ProcedureContext`, `with_tx`/`try_with_tx`,
scheduled procedures, and `ctx.http` are now available without opting
into `unstable`.
**Still gated** (unchanged): HTTP handlers/webhooks, views, RLS /
`client_visibility_filter`, and immediate-scheduling
(`volatile_nonatomic_schedule_immediate`).
Per library:
- **`bindings-sys`**: ungate the `procedure` host-call module + raw ABI
imports (`procedure_start/commit/abort_mut_tx`,
`procedure_http_request`) and `call_no_ret`. Scheduling ABI stays gated.
- **`bindings` (Rust)**: ungate the `procedure` macro,
`ProcedureContext`, `TxContext`/`with_tx`/`try_with_tx`,
`db_read_only`/`get_read_only`, the procedure traits,
`register_procedure`, `__call_procedure__`, and procedure RNG. The
`http` module (previously gated as a unit) now has fine-grained gating
so the outgoing `HttpClient` is exposed while
`HandlerContext`/`Router`/handler macros stay gated.
- **`bindings-csharp`**: drop `[Experimental("STDB_UNSTABLE")]` from
`ProcedureContext.WithTx/TryWithTx` (runtime + codegen) and the
generated `ProcedureTxContext`; 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`),
and `procedure_context.h`.
`handler_context.h`/`router.h`/`http_handler_macros.h` still `#error`
without `SPACETIMEDB_UNSTABLE_FEATURES`.
- **docs**: remove the procedures beta notices (HTTP handlers stay
marked beta for a later release); regenerate `static/llms.md`.
- **`sdk-test-procedure`**: no longer needs `features = ["unstable"]`.
# API and ABI breaking changes
Not breaking. This is purely additive to the stable surface: procedures
become available **without** the `unstable` feature, while modules that
already opt into `unstable` are 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:
- The Rust `http` module went from "gated as a whole" to fine-grained
per-item gating; the outgoing `HttpClient` is exposed while handler
types/macros stay behind `unstable`.
- The `unstable` cut reaches the ABI crate (`bindings-sys`), which is
the only way procedures can compile without the feature.
- C++ separation of the outgoing HTTP client from HTTP handlers across
several headers.
# Testing
- [x] Rust: `cargo check -p spacetimedb` passes in default, `--features
unstable`, and `--no-default-features --features unstable`.
- [x] Rust end-to-end: `sdk-test-procedure` (uses procedures,
`with_tx`/`try_with_tx`, `ctx.http.get`, `new_uuid_v7`, scheduled
procedures) builds **without** `unstable`.
- [x] C#: Codegen + Runtime build; `Codegen.Tests` pass (6/6) after FFI
snapshot regen.
- [x] C++: host syntax-check confirms procedures + `ctx.http.send()`
compile **without** the flag, full headers compile **with** it, and
`handler_context.h` still `#error`s without it. (Not built for the real
wasm/emscripten target locally — relying on CI.)
- [x] `cargo ci lint` components reproduced locally: rustfmt, clippy
(`-D warnings`, default + `unstable`), csharpier, and `cargo doc --deny
warnings`.
- [ ] Reviewer: confirm the wasm bindings + C#/C++ test suites pass in
CI (especially the C++ wasm build, which couldn't run locally).unstable feature (#5164)1 parent cb92b6f commit e45d36e
24 files changed
Lines changed: 74 additions & 138 deletions
File tree
- crates
- bindings-cpp/include/spacetimedb
- abi
- internal
- bindings-csharp
- Codegen.Tests/fixtures
- diag/snapshots
- explicitnames/snapshots
- server/snapshots
- Codegen
- Runtime
- bindings-sys/src
- bindings/src
- docs
- docs
- 00100-intro/00100-getting-started
- 00200-core-concepts
- 00200-functions
- 00600-clients
- static
- modules/sdk-test-procedure
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| |||
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
| |||
302 | 298 | | |
303 | 299 | | |
304 | 300 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | 301 | | |
309 | 302 | | |
310 | | - | |
311 | 303 | | |
312 | 304 | | |
313 | 305 | | |
| |||
317 | 309 | | |
318 | 310 | | |
319 | 311 | | |
320 | | - | |
| 312 | + | |
321 | 313 | | |
322 | 314 | | |
323 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | 284 | | |
286 | 285 | | |
287 | | - | |
288 | 286 | | |
289 | 287 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
146 | | - | |
147 | | - | |
148 | 144 | | |
149 | 145 | | |
150 | 146 | | |
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | | - | |
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | | - | |
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
| |||
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
176 | | - | |
177 | 172 | | |
178 | 173 | | |
179 | | - | |
| 174 | + | |
180 | 175 | | |
181 | 176 | | |
182 | 177 | | |
| |||
238 | 233 | | |
239 | 234 | | |
240 | 235 | | |
241 | | - | |
242 | 236 | | |
243 | 237 | | |
244 | 238 | | |
| |||
Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | 154 | | |
156 | 155 | | |
157 | | - | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
161 | | - | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
| |||
252 | 249 | | |
253 | 250 | | |
254 | 251 | | |
255 | | - | |
256 | 252 | | |
257 | 253 | | |
258 | 254 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | 596 | | |
598 | 597 | | |
599 | | - | |
600 | 598 | | |
601 | 599 | | |
602 | 600 | | |
603 | | - | |
604 | 601 | | |
605 | 602 | | |
606 | 603 | | |
| |||
694 | 691 | | |
695 | 692 | | |
696 | 693 | | |
697 | | - | |
698 | 694 | | |
699 | 695 | | |
700 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2545 | 2545 | | |
2546 | 2546 | | |
2547 | 2547 | | |
2548 | | - | |
2549 | 2548 | | |
2550 | | - | |
2551 | | - | |
| 2549 | + | |
2552 | 2550 | | |
2553 | 2551 | | |
2554 | | - | |
2555 | | - | |
| 2552 | + | |
2556 | 2553 | | |
2557 | 2554 | | |
2558 | 2555 | | |
| |||
2643 | 2640 | | |
2644 | 2641 | | |
2645 | 2642 | | |
2646 | | - | |
2647 | 2643 | | |
2648 | 2644 | | |
2649 | 2645 | | |
| |||
0 commit comments