fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.29k stars 301 forks source link

codegen uses old syn version #2368

Closed anlumo closed 2 weeks ago

anlumo commented 4 weeks ago

Describe the bug

When running flutter_rust_bridge_codegen with the -c option, it uses syn v1 to parse the source code. This doesn't support some of the modern features of Rust and thus fails for my code.

The concrete error message in my case is:

Unrecognized literal: c"vkCreateInstance"

This works fine in syn v2.

This can be fixed by updating cbindgen, strum, and strum_macros to the latest versions in the codegen Cargo.toml. I've tried compiling the tool with that and I didn't run into any issues with API changes etc.

syn v1 is still a dependency due to four year old derivative dependency, but that one doesn't really matter for this.

Version of flutter_rust_bridge_codegen

2.5.1

fzyzcjy commented 4 weeks ago

That looks pretty reasonable. Feel free to PR for what you have already modified!

github-actions[bot] commented 3 days ago

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.