Skip to content

Async IDC: rust outbox macro - #6376

Open
Shubham8287 wants to merge 10 commits into
shub/idc-receiver-bindings-splitfrom
shub/idc-rust-outbox-macro-split
Open

Shubham8287 wants to merge 10 commits into
shub/idc-receiver-bindings-splitfrom
shub/idc-rust-outbox-macro-split

Conversation

@Shubham8287

@Shubham8287 Shubham8287 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Description of Changes

Macro side changes taken out from: #6001.
Based on #6375

Adds Rust outbox declarations for intermodule reducer calls using generated receiver bindings.

It can be reviewed through commits:

  • Add outbox macros and runtime registration as described in the proposal.
  • Map outbox columns to receiver parameters using #[param(name = ...)], with compile-time type checking.
  • Make outbox tables insert-only by removing update and delete APIs.
  • Accept receiver dependencies in publish configuration.
  • Add end-to-end smoke tests covering generation, publishing, delivery, callbacks, receiver updates, and two dependencies with identical type names.

API and ABI breaking changes

Additive module API. Update and delete APIs are unavailable on outbox tables.

No host ABI changes.

Rollback safety impact

N/A.

Expected complexity level and risk

Proposal drift

The outbox! convenience macro is not implemented yet.

Source-based local reducer references and self-referential outboxes are handled in a separate PR.

Testing

  • Compile-pass and compile-fail tests for parameter mapping, receiver types, table shape, and mutation restrictions.
  • Generated receiver-bindings fixture validation.
  • End-to-end IDC delivery smoke tests.

@Shubham8287 Shubham8287 changed the title Shub/idc rust outbox macro split Async IDC: rust outbox macro split Oct 25, 2026
@Shubham8287 Shubham8287 changed the title Async IDC: rust outbox macro split Async IDC: rust outbox macro Oct 25, 2026
@Shubham8287 Shubham8287 mentioned this pull request Oct 26, 2026
2 tasks
@Shubham8287
Shubham8287 force-pushed the shub/idc-receiver-bindings-split branch from 1469023 to 4dc0fa6 Compare October 27, 2026 14:54
@Shubham8287
Shubham8287 force-pushed the shub/idc-rust-outbox-macro-split branch from e657762 to 9d87560 Compare October 27, 2026 14:55
Comment on lines -440 to +449
fn delete(&self, row: Self::Row) -> bool {
fn delete(&self, row: Self::Row) -> bool
where
Self: MutableTable,
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this a breaking change? Table is technically part of the public api.

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.

You mean, If someone were doing:

fn do_something<T: spacetimedb::Table>(table: &T) {
    table.clear();
}

that would break?

Comment on lines -457 to +469
fn clear(&self) -> u64 {
fn clear(&self) -> u64
where
Self: MutableTable,
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here.

This branch has not been deployed

No deployments
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