-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flutter_rust_bridge_codegen
panics: system cannot find the file specified.
when executing dart
command using Rust's Command
#81
Comments
Hi! Thanks for opening your first issue here! 😄 |
let me have a look |
|
rust_log debug outputs
|
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.0) [√] Android Studio (version 4.1) [√] VS Code (version 1.53.2) [√] Connected device (3 available) ! Doctor found issues in 1 category.
|
let me have a look |
flutter_rust_bridge_codegen
panics: system cannot find the file specified.
Sounds like you do not have
|
I am using Rust's |
flutter_rust_bridge_codegen
panics: system cannot find the file specified.flutter_rust_bridge_codegen
panics: system cannot find the file specified.
when executing dart
command using Rust's Command
Yes, I did the steps on the main github page, And running dart pub global run ffigen gives Running in Directory: 'C:\Users\mohamed\projects\lom' Tried the rust code, And execute command: "dart" "pub" "global" "run" "ffigen" |
Aha, so that is problem of Rust's builtin
This means the
This means Rust's builtin It seems to be the setup problem of your computer. |
So what should I do? Reinstall rust? |
No. I guess it is problem of environment variables. Search for things like, e.g., Rust's |
I do not have a windows computer at my hand. You may also look at the CI: https://github.com/fzyzcjy/flutter_rust_bridge/blob/master/.github/workflows/codegen.yml it runs code generator on windows (as well as mac and linux) and it works
|
I suspect how you install |
Alright, I see now, It seems since I was using the dart installation used with flutter, It was erroring for some reason, So I replaced the flutter dart with the dart from the official site and it works, Thanks for the help. |
You are welcome! Glad you find out the solution. |
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. |
When trying to generate using flutter_rust_bridge, The bridge_generated.rs file gets created, However, It scene to crash after doing that with a not foudn file panic.
I ran the command like this
flutter_rust_bridge_codegen --rust-input src/api.rs --dart-output fastengine.dart --c-output fastengine.h
The error is this
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Picked config: Opts { rust_input_path: "C:\Users\mohamed\projects\lom\fastengine\src/api.rs", dart_output_path: "C:\Users\mohamed\projects\lom\fastengine\fastengine.dart", c_output_path: "C:\Users\mohamed\projects\lom\fastengine\fastengine.h", rust_crate_dir: "C:\Users\mohamed\projects\lom\fastengine", rust_output_path: "C:\Users\mohamed\projects\lom\fastengine\src\bridge_generated.rs", class_name: "Fastengine", dart_format_line_length: 80 }
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Parse source code to AST
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Parse AST to IR
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Transform IR
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Generate Rust code
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Generate Dart code
[2021-10-15T12:54:22Z INFO flutter_rust_bridge_codegen] Phase: Other things
thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', C:\Users\mohamed.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\flutter_rust_bridge_codegen-1.1.0\src\commands.rs:20:35note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceflutter_rust_bridge_codegen
: 1.1.0clang++
: 11.0.0cbindgen
: 0.2.0.0The text was updated successfully, but these errors were encountered: