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 #396

Open
rfk opened this issue Feb 19, 2021 · 2 comments
Open

Add support for recursive enums #396

rfk opened this issue Feb 19, 2021 · 2 comments

Comments

@rfk
Copy link
Collaborator

rfk commented Feb 19, 2021

In #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
┆Issue Number: UNIFFI-49

@Hywan
Copy link
Contributor

Hywan commented Feb 5, 2024

Still necessary :-). Any idea if we are close to get something, or should I try?

Hywan added a commit to Hywan/matrix-rust-sdk that referenced this issue Feb 5, 2024
This patch implements the `all` and `any` filters in `matrix-sdk-ffi`.
The `not` filter cannot be implemented because recursive enum isn't
supported by UniFFI (see mozilla/uniffi-rs#396).
@mhammond
Copy link
Member

mhammond commented Feb 5, 2024

I've not heard of anyone with plans to do this soon.

Hywan added a commit to Hywan/matrix-rust-sdk that referenced this issue Feb 7, 2024
This patch implements the `all` and `any` filters in `matrix-sdk-ffi`.
The `not` filter cannot be implemented because recursive enum isn't
supported by UniFFI (see mozilla/uniffi-rs#396).
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

3 participants