Is your feature request related to a problem? Please describe.
I have an app where I have a full API in rust and a bunch of widgets I want to use in the flutter app. My directory is such:
Where the my_company module holds two different apis, and rectangles holds a bunch of iced widgets. NOTE: According to the rust docs, mod.rs is deprecated, and one should use the <module>.rs syntax going forward. Here is the makeup of my modules:
file: rust/src/api/mod.rs
pub mod my_comapny;
pub mod rectangles;
mod frb_generated;
file: rust/src/api/my_company.rs
pub mod api;
file: rectangels.rs
pub mod widgets;
file:
use my_company::api::simple;
use rectangles::widgets;
#[derive(Widget)]
pub RectanglesWidget = widgets::RectanglesWidget;
pub api = simple;
Describe the solution you'd like
I would like this to generate two files: lib/src/rust/api/my_company/api/simple.dart and lib/src/rust/api/my_company/rectangles.dart and do all the necessary bindings for bopth of them. Currently, I can only get the first one built.
Describe alternatives you've considered
I have tried all manner of adding the last one to the project, including what your documentation says to do by adding it to a list in the config yaml:
Additional context
I am a bit new to rust, but I have a few projects under my belt. I believe I am following all the documentation but it doesn't seem to work accordingly. I know there may be some things i am missing, but I can't find it anywhere.
Is your feature request related to a problem? Please describe. I have an app where I have a full API in rust and a bunch of widgets I want to use in the flutter app. My directory is such:
rust ├── Cargo.lock ├── Cargo.toml └── src ├── api │ ├── mod.rs │ ├── rectangles │ │ └── widgets.rs │ ├── rectangles.rs │ ├── my_company │ │ └── api │ │ ├── sample_doc_pic.png │ │ └── simple.rs │ │ └── full.rs │ ├── my_company.rs │ └── simple.rs ├── frb_generated.rs └── lib.rs
Where the
my_company
module holds two different apis, andrectangles
holds a bunch of iced widgets. NOTE: According to the rust docs,mod.rs
is deprecated, and one should use the<module>.rs
syntax going forward. Here is the makeup of my modules:file: rust/src/api/mod.rs
file: rust/src/api/my_company.rs
file: rectangels.rs
file:
Describe the solution you'd like I would like this to generate two files:
lib/src/rust/api/my_company/api/simple.dart
andlib/src/rust/api/my_company/rectangles.dart
and do all the necessary bindings for bopth of them. Currently, I can only get the first one built.Describe alternatives you've considered I have tried all manner of adding the last one to the project, including what your documentation says to do by adding it to a list in the config yaml:
Additional context I am a bit new to rust, but I have a few projects under my belt. I believe I am following all the documentation but it doesn't seem to work accordingly. I know there may be some things i am missing, but I can't find it anywhere.