Closed codercengiz closed 1 month ago
Yes, build.rs
currently has some limitations such as not able to parse macros to avoid deadlock (you know, when build.rs is executed, you are already running a Rust build, so if you further call cargo expand
you will trigger a nested Rust build). Thus I suggest to use the normal generate
command.
Ok, I see
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
If we want to use
rust_release
parameter withbuild.rs
,cargo build
generates without considering frb attributes. For example, even if you specify#[cfg_attr(feature = "mobile",frb(sync))]
, it generates async function. However,flutter_rust_bridge_codegen generate
generates as expected.The two method are generating different codes.
Steps to reproduce
cargo build
then you will see on generated filelib/src/rust/api/simple.dart
codegen
from git on master branchcargo install --git https://github.com/fzyzcjy/flutter_rust_bridge --branch master flutter_rust_bridge_codegen
flutter_rust_bridge_codegen generate
, then you will see on generated filelib/src/rust/api/simple.dart
Logs
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
No response
Flutter info
No response
Version of
clang++
No response
Additional context
No response