contextfree / winrt-rust

Use and (eventually) make Windows Runtime APIs with Rust
Apache License 2.0
142 stars 10 forks source link

Support await syntax for async methods #55

Open Boddlnagg opened 6 years ago

Boddlnagg commented 6 years ago

This should be possible with Rust's coroutines support, see https://doc.rust-lang.org/nightly/unstable-book/language-features/generators.html and https://github.com/rust-lang/rust/issues/43122.

We might need to provide our own macros similar to https://github.com/alexcrichton/futures-await.

Boddlnagg commented 5 years ago

I got a proof of concept running in a branch: I started working on this in a branch: https://github.com/Boddlnagg/winrt-rust/tree/futures-preview

I must say that it feels quite nice!