tauri-apps/tauri-bindgen

[bug] async handlers

JonasKruckenberg opened this issue · 2 comments

[bug] async handlers

any idea how difficult it will be to add async support?

tried a bit and added #[async_trait] to the generated function definitions.
tried nightly rust cause, no clue how else to use async in closures to use the async fn in func_wrap().
(The question at the beginning relates to the implementation without the nightly features)
but now the error trait IntoFunc<...> is not implemented for closure appeared.

I finally figured out how to implement this (it wasn't easy lol) unfortunately it involved removing the nice IntoFunc trait magic but since this really is internal anyway it should be fine