Is building for web in the build.rs file supported? Has anyone tried it? #2315
Unanswered
CollinDietz
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I personally suggest not to use the build.rs for such complex scenarios, since when in build.rs, currently we do not expand macros (to avoid cargo's deadlock). And, for your question, when you call |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Making a new project with
flutter_rust_bridge_codegen create my_app
and adding abuild.rs
like https://github.com/fzyzcjy/flutter_rust_bridge/blob/4f5cf68f56ed56df62264227d81891744c356403/frb_example/dart_build_rs/rust/build.rs works right out of the box 👍build.rs
But I see that the
lib_flutter_rust_bridge_codegen
includes functions callable for building for web as well which would be nice to include in that build pipelineediting the build.rs like so
does not seem to work immediately though
I see an error like so
which is the same error I see if I run
flutter_rust_bridge_codegen build-web
before I run (or after I remove the nightly)rustup component add rust-src --toolchain nightly-aarch64-apple-darwin
However running that command then rerunning the build has no effect on the results.
My first guess is just that I simply can't do this for some reason, but wasn't sure if people had done it and there was an example I could reference, or if I had messed something up
Full output from build
Beta Was this translation helpful? Give feedback.
All reactions