SpacetimeDB
SpacetimeDB copied to clipboard
Implemented newtype pattern support for tuples
Description of Changes
Related issues: #2379, #2604.
To be able to do this:
#[derive(SpacetimeType)]
pub struct Position(vecmath::Vector3<f64>);
(previously, the derive macro would panic.)
This is an early attempt! I need help in figuring out all details on how to properly implement deserialization.
Also, currently this fails with errors like these:
error at typespace ref `&1`: internal codegen error: all type elements require names: (0: Array<F64>)
error at typespace ref `&2`: internal codegen error: non-special product or sum type (0: F64, 1: Array<F64>) cannot be used to generate a client type use
API and ABI breaking changes
Unknown.
Expected complexity level and risk
?…
Testing
- [x] SpacetimeDB compiles
- [x] The module builds
- [ ] ~Publishing works~
Thank you for submitting this! We'll work on getting it reviewed (along with your other PRs)
It's a bit closer now with the support for product client fields.