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

Documentation comments for the generated dart functions/classes/methods #2412

Closed ethicnology closed 1 day ago

ethicnology commented 2 days ago

Is your feature request related to a problem? Please describe. I wish a solution to display documentation comments over the generated dart files. This is really helpful for a third party user.

Describe the solution you'd like I'm creating bindings for rust libraries to dart/flutter ecosystem When the user wants to consume one of those dart function there is no documentation attached to the method/function/class.

When I'm manually wrapping the rust functions, if I add the documentation comments over these functions/struct/impl I want the doc to be replicated to the generated dart files so the users of the bindings can have access to this documentation too.

Describe alternatives you've considered I can add the doc comments to the generated dart files but it will be overwritten each time I re-generate.

fzyzcjy commented 2 days ago

Hi, firstly try to add comments /// something on rust functions and see whether it appears on the generated dart side. If it does not appear then it is a bug and feel free to create issues!

ethicnology commented 1 day ago

This is great, sorry for the time wasted

fzyzcjy commented 1 day ago

It's OK!