I tried using the alpha 6 of block2, which lead me to objc2_encode which asked me to implement Encode and RefEncode
- It is bothersome to implement for the default case (a struct/union) with no particular semantics, in which case a derive proc macro could be provided.
- When using types from
libc, e.g. stat, I either have to stop and not implement the traits or I have to go deep to find if there are pointers/members to other structs where I have to do the same until I reach only base types. In the case of pointers I don't even know how I would do it ? A mimic struct defined locally which implements Encode ?
I don't know if there is a good solution to 2. sadly, because adding a dep in libc on objc2_encode is certainly not going to work.