jerel / membrane

Membrane is an opinionated crate that generates a Dart package from a Rust library. Extremely fast performance with strict typing and zero copy returns over the FFI boundary via bincode.
Apache License 2.0
89 stars 12 forks source link

Add support for both native Dart enums and class enums at the same time #18

Closed jerel closed 2 years ago

jerel commented 2 years ago

Previously a project would generate all classes if project.with_c_style_enums(false) was set or all Dart enums if it was true. This change makes project.with_c_style_enums(true) (the default) behave such that it generates Dart enums for simple Rust enums and generates classes for Rust enums that contain data.

jerel commented 2 years ago

Fixes #9