uniffi-rs
uniffi-rs copied to clipboard
Add support for recursive enums
In https://github.com/mozilla/uniffi-rs/pull/381 we added support for enums with associated data, but it doesn't properly support recursive enums, like the classic "tree" example where the enum variants are Tree::Leaf and Tree::Branch(left: Tree, right: Tree). Some notes on what we'd need in order to support such:
- In the rust code, we'll need to be prepared to
Boxthe values in the recursive fields. - In the swift binding, we'll need to use
indirectkeyword to support recursive enums.
┆Issue is synchronized with this Jira Task ┆Issue Number: UNIFFI-49
Still necessary :-). Any idea if we are close to get something, or should I try?
I've not heard of anyone with plans to do this soon.