-
Hi there, I'm newbie to rust.
// api/hid/mod.rs
pub mod hid_api; // api/hid/hid_api.rs
#[cfg(not(target_arch = "wasm32"))]
#[path ="os_hid.rs"] mod platform_hid;
#[cfg(target_arch = "wasm32")]
#[path ="web_hid.rs"] mod platform_hid; // api/mod.rs
pub mod hid; In
I tried making the following changes and it worked, // api/hid/hid_api.rs
#[cfg(not(target_arch = "wasm32"))]
#[path ="os_hid.rs"] pub mod platform_hid;
#[cfg(target_arch = "wasm32")]
#[path ="web_hid.rs"] pub mod platform_hid; Much thanks for any helps. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Looks like a bug due to refactor of dev.38 to support scanning third party crates. Could you please provide a minimal reproducible sample and create an issue, then I can fix that. Without more info, I guess maybe it is because you have some function that points to this, or more possibly, do you have EDIT: It worked before possibly because frb did not handle EDIT: Another way may be https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/multi-input modify |
Beta Was this translation helpful? Give feedback.
With a new flutter_rust_bridge_codegen project
add
api/internal_mod.rs
add
api/external_mod.rs
modify
api/mod.rs
flutter_rust_bridge_codegen generate
andbuild(web or windows)
then get