-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to use: https://github.com/serialport/serialport-rs #1905
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hi, IMHO generate directly on the whole serialport codebase without modification may not work. This is because, though flutter_rust_bridge understands a lot of Rust syntax, Rust is so flexible that there are still scenarios that is not supported. As for your specific case, I guess it may be something like To debug this, one way is to add |
I remove Into from the code and now I get this error:
|
I succeeded in generating the code but now the problem is that the types are no translated e.g. u8 is translated as:
|
Hi, it would be great to provide a minimal reproducible sample to see what is going on. |
I am using simple template with 2 files (https://github.com/berkowski/tokio-serial/tree/master/src). with lib.rs renamed to serialport.rs
mod.rs:
|
Briefly checked it, and I suspect it is As a workaround, you can try to modify it manually to |
@mpep2 how did you solve this error?
I get this as well, having changed from v2.0.0-dev.32 to v2.0.0-dev.33. |
Solved it.
from my cargo.toml |
Close since the question seems to be answered. Feel free to reopen if needed! |
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
I got the following error when trying to generate for the above mentioned package:
Steps to reproduce
rust/src/api
Logs
$ flutter_rust_bridge_codegen generate [7.3s] Parse └── [7.1s] Run cargo expand └── [0.2s] Parse source graph Error: function=Ident { sym: new, span: bytes(48557..48560) } Caused by: 0: when trying to parse DartFn 1: Unknown ident: Into
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
2.0.0-dev.32
Flutter info
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: