fzyzcjy / flutter_rust_bridge

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

[cli] unexpected argument '--template' found #2165

Open AlexV525 opened 5 days ago

AlexV525 commented 5 days ago

Describe the bug

https://cjycode.com/flutter_rust_bridge/quickstart#2-create-new-projects--add-to-existing-projects The doc suggested creating the plugin template using --template option, but it throws when calling like that.

image

Steps to reproduce

  1. cargo install flutter_rust_bridge_codegen
  2. flutter_rust_bridge_codegen create my_plugin --template plugin

Logs

 flutter_rust_bridge_codegen create my_package --template plugin
error: unexpected argument '--template' found                                                                                                                                                                                                     tip: to pass '--template' as a value, use '-- --template'

Usage: flutter_rust_bridge_codegen.exe create <NAME>

For more information, try '--help'.

Expected behavior

No response

Generated binding code

No response

OS

Windows 11 23H2 (22631.3737)

Version of flutter_rust_bridge_codegen

2.0.0

Flutter info

No response

Version of clang++

No response

Additional context

The create helping messages also do not show anything about templates.

 flutter_rust_bridge_codegen create -h
Create a new Flutter + Rust project

Usage: flutter_rust_bridge_codegen.exe create [OPTIONS] <NAME>

Arguments:
  <NAME>  Name of the new project

Options:
      --org <ORG>
          The organization responsible for your new Flutter project, in reverse domain name notation
      --rust-crate-name <RUST_CRATE_NAME>
          The name of the generated Rust crate
      --rust-crate-dir <RUST_CRATE_DIR>
          The directory of the generated Rust crate
  -h, --help
          Print help
fzyzcjy commented 5 days ago

Yes, because it is on master, not released yet!

Before it is released, feel free to try master (at least for this "generate a template directory" functionality)

AlexV525 commented 5 days ago

Before it is released, feel free to try master (at least for this "generate a template directory" functionality)

Will do. :)

fzyzcjy commented 4 days ago

(awaiting for next release since there is no other op needed)