Serialisation as a macro?
Like https://github.com/serde-rs/serde - the serialisation API surface area is known and well defined
I'll take a look at this at some point :P
Assigned 😛
Is this still worth looking into this in the future?
Would swap the parts of the code generation from T4Rust to Rust macro syntax - not sure the tangible benefits of this
I'm not sure doing serialization as a macro makes sense, at least not with how we handle schema data in the SDK right now. Using a macro (specifically a custom derive procedural macro) would make sense if we wanted to define our component types in Rust code and then generate the schema file and related types from there.
I spoke with an engineer at Improbable a while back who mentioned that something similar to this was being investigated for the Unity GDK, so it may be worth investigating for Rust, too. I know I would certainly like to write my types in Rust instead of schemalang 😅
Regardless of whether we're defining our schema types in Rust or schemalang, I think it will make sense to move away from T4Rust and towards something better supported by the Rust community. Specifically, syn and quote are the de facto standards for code generation in Rust right now.
Regardless of whether we're defining our schema types in Rust or schemalang, I think it will make sense to move away from T4Rust and towards something better supported by the Rust community. Specifically, syn and quote are the de facto standards for code generation in Rust right now.
I 100% agree with migrating off T4Rust. Its hard to read and hard to debug.
I know I would certainly like to write my types in Rust instead of schemalang
This could be a fun experiment. :smile: