Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b3904ce
Preserve canonical names in V10 schema roundtrips
Shubham8287 Oct 25, 2026
0000e90
Use typed hashes for IDC outbox signatures
Shubham8287 Oct 25, 2026
88d1d9d
deserialization test
Shubham8287 Oct 27, 2026
4aae432
update deserializer to check with both canonical and accessor names
Shubham8287 Oct 27, 2026
6149619
Validate IDC outbox callbacks and preserve raw schema round trips
Shubham8287 Oct 24, 2026
028d9ae
Generate Rust IDC receiver bindings and reducer metadata
Shubham8287 Oct 24, 2026
0b66f6c
Wire Rust receiver binding generation into spacetime generate
Shubham8287 Oct 24, 2026
d2f9396
Scope generated receiver types by dependency
Shubham8287 Oct 24, 2026
d7c17b3
Test CLI-generated receiver types from two dependencies end to end
Shubham8287 Oct 24, 2026
5853743
address comments
Shubham8287 Oct 27, 2026
4e7dd6e
update test
Shubham8287 Oct 27, 2026
5870f22
comments
Shubham8287 Oct 27, 2026
4dc0fa6
use qualified types
Shubham8287 Oct 27, 2026
bd2f88c
fix arg type collisions
Shubham8287 Oct 27, 2026
b15b8b9
Add Rust outbox declarations and runtime registration
Shubham8287 Oct 24, 2026
667b502
Map outbox columns to receiver parameters with param attributes
Shubham8287 Oct 24, 2026
82a5bc2
Restrict mutation APIs on IDC outbox tables
Shubham8287 Oct 24, 2026
7751fe9
Accept receiver dependencies in publish configuration
Shubham8287 Oct 24, 2026
a90edec
Test generated Rust IDC bindings and remote delivery end to end
Shubham8287 Oct 24, 2026
c7dac66
Restore two-dependency IDC delivery smoketest
Shubham8287 Oct 24, 2026
f2d4aa9
lint
Shubham8287 Oct 25, 2026
77b1099
Give copied smoke test fixtures unique Cargo package names
Shubham8287 Oct 26, 2026
1204a3a
Avoid stale receiver reads when polling detailed IDC delivery
Shubham8287 Oct 26, 2026
044c00a
ui ficture update
Shubham8287 Oct 27, 2026
a268a57
make outbox table insert-only without backward compatible
Shubham8287 Oct 28, 2026
64a3a96
Regenerate Rust outbox fixture with qualified receiver builtins
Shubham8287 Oct 28, 2026
7db0c46
Apply batched suggestions from code review
Shubham8287 Oct 28, 2026
9950088
Regenerate Rust module bindings snapshot with qualified Result
Shubham8287 Oct 28, 2026
392fced
Merge branch 'shub/idc-receiver-bindings-split' into shub/idc-rust-ou…
Shubham8287 Oct 28, 2026
b5d3b83
Resolve outbox callbacks in native module test registrations
Shubham8287 Oct 28, 2026
7d7f87d
Merge master into Rust outbox macro branch
Shubham8287 Oct 28, 2026
541d1d6
ui motion
Shubham8287 Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/bindings-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ mod sym {
symbol!(repr);
symbol!(sats);
symbol!(scheduled);
symbol!(outbox);
symbol!(on_result);
symbol!(param);
symbol!(target);
symbol!(unique);
symbol!(update);
symbol!(default);
Expand Down Expand Up @@ -229,7 +233,10 @@ fn derive_table_helper_attr() -> Attribute {
///
/// Provides helper attributes for `#[spacetimedb::table]`, so that we don't get unknown attribute errors.
#[doc(hidden)]
#[proc_macro_derive(__TableHelper, attributes(sats, unique, auto_inc, primary_key, index, default))]
#[proc_macro_derive(
__TableHelper,
attributes(sats, unique, auto_inc, primary_key, target, index, default, param)
)]
pub fn table_helper(input: StdTokenStream) -> StdTokenStream {
schema_type(input)
}
Expand Down
22 changes: 22 additions & 0 deletions crates/bindings-macro/src/reducer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use syn::{FnArg, Ident, ItemFn, LitStr, PatType};
pub(crate) struct ReducerArgs {
name: Option<LitStr>,
lifecycle: Option<LifecycleReducer>,
on_result: Option<syn::Path>,
}

enum LifecycleReducer {
Expand Down Expand Up @@ -51,6 +52,12 @@ impl ReducerArgs {
check_duplicate(&args.name, &meta)?;
args.name = Some(meta.value()?.parse()?);
}
sym::on_result => {
check_duplicate(&args.on_result, &meta)?;
let content;
syn::parenthesized!(content in meta.input);
args.on_result = Some(content.parse()?);
}
});
Ok(())
})
Expand Down Expand Up @@ -101,6 +108,19 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn
assert_only_lifetime_generics(original_function, "reducers")?;

let lifecycle = args.lifecycle.iter().filter_map(|lc| lc.to_lifecycle_value());
let on_result_outbox = args.on_result.as_ref().map(|path| {
let accessor = &path.segments.last().unwrap().ident;
quote!(
const ON_RESULT_OUTBOX: Option<&'static str> =
Some(spacetimedb::rt::on_result_outbox(#path::#accessor));
)
});
let on_result_typecheck = args.on_result.as_ref().map(|path| {
let accessor = &path.segments.last().unwrap().ident;
quote! {
spacetimedb::rt::on_result_typecheck(#func_name, #path::#accessor);
}
});

let typed_args = extract_typed_args(original_function)?;

Expand Down Expand Up @@ -156,6 +176,7 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn
#(let _ = <#first_arg_ty as spacetimedb::rt::ReducerContextArg>::_ITEM;)*
#(let _ = <#rest_arg_tys as spacetimedb::rt::ReducerArg>::_ITEM;)*
#(let _ = <#ret_ty as spacetimedb::rt::IntoReducerResult>::into_result;)*
#on_result_typecheck
}
};
impl #func_name {
Expand All @@ -170,6 +191,7 @@ pub(crate) fn reducer_impl(args: ReducerArgs, original_function: &ItemFn) -> syn
type FnKind = spacetimedb::rt::FnKindReducer;
const NAME: &'static str = #reducer_name;
#(const LIFECYCLE: Option<spacetimedb::rt::LifecycleReducer> = Some(#lifecycle);)*
#on_result_outbox
const ARG_NAMES: &'static [Option<&'static str>] = &[#(#opt_arg_names),*];
const INVOKE: Self::Invoke = #func_name::invoke;
}
Expand Down
Loading
Loading