You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using cargo workspaces the built Linux application crashes on startup because it is unable to locate the .so built from the bridge Rust crate. I followed the Cargo workspace How-to.
The Android build with workspaces and the Linux build without workspaces both work fine on my system.
Changing ioDirectory: 'rust/target/release/', to ioDirectory: '../target/release/', in frb_generated.dart can fix the issue, but I don't want to modify the generated code.
However, I would prefer a proper fix on the build system level. Or at least a mention in the docs for this problem. But the priority of these things is up to you.
I am going to keep the issue open in case you do want to address this, otherwise it can be closed.
However, I would prefer a proper fix on the build system level. Or at least a mention in the docs for this problem. But the priority of these things is up to you.
That looks reasonable! The most complete solution may be checking where is cargo workspaces and find out the target directory. But since this may not be of top priority, I guess the second way - mentioning in doc - is great.
Describe the bug
When using cargo workspaces the built Linux application crashes on startup because it is unable to locate the
.so
built from the bridge Rust crate. I followed the Cargo workspace How-to.The Android build with workspaces and the Linux build without workspaces both work fine on my system.
Changing
ioDirectory: 'rust/target/release/',
toioDirectory: '../target/release/',
infrb_generated.dart
can fix the issue, but I don't want to modify the generated code.Steps to reproduce
mkdir workspace_test && cd workspace_test
echo [workspace]\nmembers = ["my_flutter_bridge"] > Cargo.toml
flutter_rust_bridge_codegen create my_flutter_project --rust-crate-dir ../my_flutter_bridge
How-tocargo build --release
cd my_flutter_project
flutter run
Logs
Expected behavior
No response
Generated binding code
No response
OS
NixOS
Version of
flutter_rust_bridge_codegen
2.7.0
Flutter info
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: