-
Notifications
You must be signed in to change notification settings - Fork 289
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 build-web
errors, WASM can't compile
#2161
Comments
Hi! Thanks for opening your first issue here! 😄 |
Firstly, what is your rust version? IIRC someone mentioned -> #2157 too old rust may have problems Secondly, it runs well on CI windows/macos/linux, thus maybe we can debug by checking what's different from CI. |
Currently it's this cargo 1.81.0-nightly (bc89bffa5 2024-06-22) I thought it might be a rust/flutter version issue, so I did an upgrade before hand. I think those are the latest versions |
Hmm could you please google a bit about the error messages etc (e.g. a quick search gives fathyb/carbonyl#133 but maybe different) - This looks like a general "why my Rust code does not compile" problem, since there is no frb or dart in this step, and it is only executing a pure cargo command:
Also try to execute that command directly on a terminal and see what happens |
hmmmm. Just to check I deleted the target directory in the |
That's weird, I would guess it may be something related to env variable. What about this: cargo build is auto run by the following command. When run it directly (after deleting target dir) does it work?
|
Did a bit more testing.
|
I can also see the same command it's using when it launches the codegen. And it works fine by itself. So yea... I can only think my env variables are messed up for some reason. And it's not building the project properly when launched through the codegen. |
I think so, probably because of some unknown env var issues... I do not have a reproducible environment, so cannot debug for this. If you like to test more, maybe clone frb repo and modify the ./frb_dart code related to building web to print out things etc to debug. |
Yea, well it's good to know that it's an isolated issue at least. Easy enough to get around anyway in the short term. |
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. |
Reopen because of #2236 |
Close since #2236 (comment) |
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. |
Describe the bug
I'm using the default project created from doing the
flutter_rust_bridge_codegen create my_app
, and I'm trying to get the web working in my environment.And following the docs I've installed the necessary toolchains, nightly build switch and the wasm-pack.
But when I run the command for
build-web
I just get a heap of errors all relating to linking issues, making me think I don't have the correct libraries. But I'm pretty sure I've installed everything it's complaining about. (attached is the last one error, but they're all related to the same type of issue)
Steps to reproduce
Hint: A simple way to reproduce is to clone and modify the https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_example/dart_minimal example package according to your needs.
flutter_rust_bridge_codegen create my_app
flutter_rust_bridge_codegen build-web
inmy_app
Logs
Expected behavior
Generates the output wasm files for flutter
Generated binding code
No response
OS
Pop OS 22 (linux)
Version of
flutter_rust_bridge_codegen
No response
Flutter info
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: