rust-diplomat / diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code
https://rust-diplomat.github.io/book/
Other
480 stars 45 forks source link

Improve CPP2 enum ergonomics, fix some HIR code #488

Closed robertbastian closed 1 month ago

robertbastian commented 1 month ago

Using the structure proposed in https://stackoverflow.com/a/53284026, where the enum implicitly converts to its ::Value and back, enabling things like switch, comparisons, and construction through Foo::Value::Bar.