5 unstable releases

0.2.1 May 15, 2025
0.2.0 Mar 18, 2025
0.1.2 Mar 18, 2025
0.1.1 Feb 21, 2025
0.0.0 Feb 10, 2025

#418 in Windows APIs

Download history 90/week @ 2025-02-06 32/week @ 2025-02-13 6636/week @ 2025-02-20 38501/week @ 2025-02-27 61610/week @ 2025-03-06 74164/week @ 2025-03-13 72606/week @ 2025-03-20 64956/week @ 2025-03-27 82703/week @ 2025-04-03 107086/week @ 2025-04-10 124101/week @ 2025-04-17 124027/week @ 2025-04-24 116294/week @ 2025-05-01 125574/week @ 2025-05-08 136125/week @ 2025-05-15

522,301 downloads per month
Used in 1,737 crates (8 directly)

MIT/Apache

290KB
6.5K SLoC

Windows async types

The windows-future crate provides stock async support for Windows APIs.

Start by adding the following to your Cargo.toml file:

[dependencies.windows-future]
version = "0.2"

Use the Windows async types as needed:

use windows_future::*;
use windows_result::*;

fn main() -> Result<()> {
    // This result will be available immediately.
    let ready = IAsyncOperation::ready(Ok(123));
    assert_eq!(ready.get()?, 123);

    let ready = IAsyncOperation::spawn(|| {
        // Some lengthy operation goes here...
        Ok(456)
    });

    assert_eq!(ready.get()?, 456);

    Ok(())
}

Dependencies

~220–650KB
~16K SLoC