Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for recursive enums #4248

Closed
data-sync-user opened this issue Jun 23, 2021 · 0 comments
Closed

Add support for recursive enums #4248

data-sync-user opened this issue Jun 23, 2021 · 0 comments

Comments

@data-sync-user
Copy link
Collaborator

data-sync-user commented Jun 23, 2021

In mozilla/uniffi-rs#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 Box the values in the recursive fields.
  • In the swift binding, we'll need to use indirect keyword to support recursive enums.

┆Issue is synchronized with this Jira Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants