fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.12k stars 283 forks source link

[feat] generate web file in dart if dart_decl_output = None #860

Closed huang12zheng closed 1 year ago

huang12zheng commented 1 year ago

Is your feature request related to a problem? Please describe.

generate web file in dart if dart_decl_output = None

let raw_opts = RawOpts {
        // Path of input Rust code
        rust_input: RUST_INPUTS.into_vecs(),
        // Path of output generated Dart code
        dart_output: dart_outputs,
        wasm: true,
        rust_output: Some(rust_outputs),
        // dart_decl_output: Some("../lib/bridge_definitions.dart".into()),   /// would never gen .web
        dart_format_line_length: 120,
        class_name: Some(CLASS_NAMES.into_vecs()),
        // for other options use defaults
        ..Default::default()
    };
fzyzcjy commented 1 year ago

Feel free to PR!

huang12zheng commented 1 year ago

example pure_dart_multi would no use flag dart_decl_output, and other examples like pure_dart which use flag dart_decl_output

The tests are covered here

github-actions[bot] commented 1 year ago

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.