https://pantsbuild.org/ logo
#development
Title
# development
a

average-vr-56795

05/09/2019, 6:31 PM
@witty-crayon-22786 Can you talk me through the enum python-to-rust thing?
⁉️ 1
w

witty-crayon-22786

05/09/2019, 6:34 PM
sure
Danny added cbindgen
cbindgen generates a useful struct for enums
with a tag field
and constants for each enum member
as demonstrated in the link, you access the constant to set the relevant tag
and in the case of an enum without any fields... then i think you're done?
a

average-vr-56795

05/09/2019, 6:37 PM
Very cool! Ok, I will have a play with that tomorrow! Thanks 🙂