ockam
ockam copied to clipboard
Stop deriving Message trait implementation for all Serialize&Deserialize structs
trafficstars
We probably want to be derive Message trait only explicitly using
#[derive(Message)]
Without that, it's very easy to send things not intended to be Messages (happened few times)
Hey @SanjoDeundiak, I could try to help with this.
After looking through the code, I think this could be approached in the following steps:
- Introduce a new crate for proc macro, something like
ockam_message_derive. - By default implement the trait for types like
ockam_core::Any,String,Vec<8u>etc. - Go through the codebase deriving
Messagefor existing custom message types.
Let me know what do you think about it. Thanks!