uniffi-rs
uniffi-rs copied to clipboard
Adding ADR on UniffiTag handling
We've discussed this is various issues, most recently #1865. I think it's time that we have an ADR and discuss the question directly and by itself.
There's a lot more complex cases, for example structs/enums that contain fields with types from another crate. I don't think that affects the decision, but please tell me if I'm missing anything here.
Pushed an edit to this that:
- Uses
Uuidand custom type handling as the example. I think this is closer to a real-world scenario. - Added an option for removing the tags altogether.
I still think that Option 1 would be extremely annoying for larger projects consisting of multiple crates that don't need much or any bindings of independent external libraries.
Option 3 actually seems very interesting to me but involves a lot of extra work for reducing the boilerplate so I don't know how realistic it is short-term. If somebody wants to look more into boilerplate reduction for that option, I think #[serde(remote = "...")] could be an interesting case study.
Overall, especially because I don't have that much time to put into this, I (still) strongly prefer option 2.