Rust SDK: group all codegen'd names exported from the SDK under pub mod __codegen
#1900
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
Based on #1897 . While writing that PR, I moved a definition from
db_connection.rs
toclient_cache.rs
. This needlessly broke codegen.Rather than having the codegen rely on a whole bunch of different
#[doc(hidden)] pub mod
s in the SDK library by path, group every name the codegen refers to underspacetimedb_sdk::__codegen
. This has several benefits:__codegen
module.In a similar vein, the unstable interface Cloud use(s|d) to set its client address is moved to
spacetimedb_sdk::unstable
. This may end up getting removed anyways; I'm not sure what the plan is going forward for how cloud nodes will identify themselves.API and ABI breaking changes
Breaks codegen. Minor user-facing breakage:
u256, i256
are now re-exported from the SDK root rather than via thespacetimedb_sdk::sats::{u256, i256}
. Thesats
crate is no longer fully re-exported, so users who want it will need a separate dependency.Expected complexity level and risk
1
Testing