-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Labels
gen-rustRelated to bindings for Rust-compiled-to-WebAssemblyRelated to bindings for Rust-compiled-to-WebAssembly
Description
Currently custom derive applies to all struct and enum definitions. Understandably, the resource struct doesn't use the custom derive. The problem is that when the struct/enum type contains a resource type, the derive trait will not work. We can use additional-derive-ignore to opt-out such types individually, but that's not very convenient.
I can see several ways to fix it, but not sure which one makes more sense:
- Only apply custom derive to struct and enum that doesn't contain resource types. This is equivalent to manually opt-out those types with
additional-derive-ignore. - Apply the custom derive to resource struct as well. But many traits don't make sense for resource types.
- Have a flag to define custom derive for individual types, similar to
with, we can have awith-derive.
Maybe in the short term, we can apply the first option, which is also easy to implement?
Metadata
Metadata
Assignees
Labels
gen-rustRelated to bindings for Rust-compiled-to-WebAssemblyRelated to bindings for Rust-compiled-to-WebAssembly