-
Notifications
You must be signed in to change notification settings - Fork 770
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
Support exporting Rust enums to Python (old school / without data) #834
Comments
I have some messy code that you can use as a reference (originally mentioned in #417): https://salsa.debian.org/Kazan-team/simple-soft-float/-/blob/e19291a0b8eb17e9b52c09b8e670bf0fe3244989/src/python_macros.rs |
I'm nominating this for |
Jake's code looks like a good starting place. Has anyone had a go at it? Happy to test out PRs. I could have a crack at it myself but I think the PR would need a fair bit of hand holding... |
I haven't had a go yet, but I plan to have a go soon unless someone else claims this issue sooner! |
I made an attempt (#1045), but I got frustrated by the amount of boilerplate and traits required. |
As we've got a fair bit to release in 0.12 I'm going to move this to the 0.13 milestone |
Are there any recommended workarounds for the time being? I was considering just adding a python implementation, but I really don't want to have to maintain two copies of the same code in my project :) |
You could construct a It's worth pointing out that #1045 is nearly there, just needs a willing person to rebase and finish it off. |
Following suggestion this is a subset of #417 to focus just on exporting Rust enums without data to Python. These should be fairly straightforward to support - we could borrow inspiration from C++'s
boost.Python
andpybind11
. We might also want compatibility with the Pythonenum
library.The text was updated successfully, but these errors were encountered: