gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
230 stars 102 forks source link

codegen: Use async keyword for not in traits functions #1482

Open bilelmoussaoui opened 1 year ago

bilelmoussaoui commented 1 year ago

Keep the Pin<Box> only for in trait async functions. Reduces the generated code a little bit :)

gtk4-rs PR: https://github.com/gtk-rs/gtk4-rs/pull/1421

bilelmoussaoui commented 1 year ago

Maybe for traits we can make use of the async-trait attribute macro for the time being then?

That is a possibility yes, I can find some time for that later.

sdroege commented 1 year ago

That is a possibility yes, I can find some time for that later.

Should make this PR only simpler, I guess :)

bilelmoussaoui commented 7 months ago

Now that async traits are stable, should we re-consider this and bump the minimal required rust version?

sdroege commented 7 months ago

Not yet, see the announcement of the stabilization of the feature. It explicitly asked people to wait using it for public API for various reasons.