Replies: 2 comments 3 replies
-
hmm, frb has a auto generated plugin template. Does that work for your case? ![]() |
Beta Was this translation helpful? Give feedback.
2 replies
-
I've solved it. The issue was a mistake on my end with an incorrect directory structure in my plugin. My apologies for the noise. After fixing my local setup to match the standard template, everything works perfectly as described in the blog post you shared. Thank you again for your time and for pointing me to that resource – it was key to finding my error. I'm closing this discussion now. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
First, thank you for creating and maintaining this amazing library!
I'm trying to create a reusable Flutter plugin that contains a Rust core, with the goal of using it as a dependency in other Flutter applications. However, I'm running into persistent path-related issues when the plugin is compiled as a dependency, specifically on Windows.
My Goal
To create a Flutter plugin (let's call it my_rust_plugin) that can be reliably included in a main application (e.g., my_app) via pubspec.yaml (using a path or git dependency).
Project Structure (Simplified)
My plugin my_rust_plugin:
My main app
my_app
:The Problem
When I build
my_app
, Flutter creates a symlinked directory for the plugin atmy_app/build/windows/flutter/ephemeral/.plugin_symlinks/my_rust_plugin/
.The
CMakeLists.txt
inside this symlinked directory then fails to locate therust
source folder because simple relative paths like../rust
are no longer valid from this temporary build location.Original Error Log
Before I started modifying the CMakeLists.txt to try and fix the path, this was the original error from the build system. It clearly shows the build tool trying to find Cargo.toml via a long and incorrect relative path (../../../../../../rust).
My Questions
Environment:
OS:
Windows 11
Flutter Version:
3.6.2
Rust Version:
1.88.0
flutter_rust_bridge Version:
2.11.1
Thank you so much for any guidance you can provide!
Beta Was this translation helpful? Give feedback.
All reactions