Closed dragazo closed 2 weeks ago
I've updated the command to:
flutter_rust_bridge_codegen generate \
--rust-root native/ \
--rust-input crate::api \
--dart-output lib/bridge_generated.dart \
--c-output ios/Runner/bridge_generated.h \
--duplicated-c-output macos/Runner/ \
--enable-lifetime
(I guess lifetimes are not supported by default anymore?)
This fixes the warnings, but I still get a mysterious file exists error:
flutter_rust_bridge_codegen generate --rust-root native/ --rust-input crate::api --dart-output lib/bridge_generated.dart --c-output ios/Runner/bridge_generated.h --duplicated-c-output macos/Runner/ --enable-lifetime
[0.4s] Parse
└── [0.4s] Cargo expand & syn parse
└── [0.0s] Parse HIR
└── [0.0s] Parse MIR
[0.0s] Generate
Error: File exists (os error 17)
Hi, upgrade guide: https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/upgrade/v2
Feel free to ping me if you have any questions after reading it!
Close since this seems to be solved, but feel free to reopen if you have any questions!
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.
Hi, I've had a flutter app I've been maintaining since pre 2.0 of this package. I'm trying to upgrade to the latest version, but I'm having some issues.
I was previously using this command to generate bindings:
In the latest version, I noticed it's switched to a sub-command
flutter_rust_bridge_codegen generate
, which I did. However, there have apparently been a few arg changes. I saw that--extra-c-output-path
was renamed to--duplicated-c-output
, which I also applied. It looks like--rust-input
has also changed, but it conveniently gives directions for updating that part.However, I cannot seem to find equivalents for
--dart-decl-output
or--wasm
. Do you have an info about this?I've tried just removing
--dart-decl-output
and--wasm
, which will get past the arg parser, but I then get aFile exists (os error 17)
error from building:I don't have a minimal example, but here's my code (just master branch) if needed: https://github.com/dragazo/phone-iot-2