Closed fmeef closed 2 months ago
Hi! Thanks for opening your first issue here! :smile:
Have a commandline argument and/or a config option to enable features (pass --features to cargo expand) during codegen
That looks reasonable, and https://github.com/fzyzcjy/flutter_rust_bridge/pull/2284 looks great!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Is your feature request related to a problem? Please describe. I have a crate that has a "flutter" feature, than when enabled adds the required dependencies and enables some flutter specific apis. This is because my crate is designed to be used both with and without flutter. Since feature flags are suppose to be additive I can't have it enabled by default.
Describe the solution you'd like Have a commandline argument and/or a config option to enable features (pass --features to cargo expand) during codegen
Describe alternatives you've considered Alternatives include making features default (and therefore subtractive) and using a dedicated 2nd crate. Because RUSTFLAGS isn't passed to cargo expand alone in the right place,
also fails with
error: Unrecognized option: 'features'
Additional context I have a branch https://github.com/fmeef/flutter_rust_bridge/tree/cargo_features that adds this, making PR soon