7 unstable releases (3 breaking)

0.3.2 Oct 6, 2025
0.3.1 Sep 25, 2025
0.2.0 Mar 18, 2025
0.1.2 Mar 18, 2025
0.0.0 Feb 6, 2025

#548 in Windows APIs

Download history 883019/week @ 2025-12-09 761554/week @ 2025-12-16 381561/week @ 2025-12-23 468079/week @ 2025-12-30 883311/week @ 2026-01-06 975163/week @ 2026-01-13 1099990/week @ 2026-01-20 1071436/week @ 2026-01-27 1064574/week @ 2026-02-03 1089068/week @ 2026-02-10 1166995/week @ 2026-02-17 1415850/week @ 2026-02-24 1489090/week @ 2026-03-03 1585066/week @ 2026-03-10 1305403/week @ 2026-03-17 1298178/week @ 2026-03-24

5,950,314 downloads per month
Used in 4,337 crates (9 directly)

MIT/Apache

245KB
6K SLoC

Windows collection types

The windows-collections crate provides stock collection support for Windows APIs.

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

[dependencies.windows-collections]
version = "0.3"

Use the Windows collection types as needed:

use windows_collections::*;

let numbers = IIterable::<i32>::from(vec![1, 2, 3]);

for value in numbers {
    println!("{value}");
}

Naturally, the Windows collection types work with other Windows crates:

use windows_collections::*;
use windows_strings::*;

let greetings =
    IVectorView::<HSTRING>::from(vec![HSTRING::from("hello"), HSTRING::from("world")]);

for value in greetings {
    println!("{value}");
}

let map = std::collections::BTreeMap::from([("one".into(), 1), ("two".into(), 2)]);
let map = IMapView::<HSTRING, i32>::from(map);

assert_eq!(map.Lookup(h!("one")).unwrap(), 1);
assert_eq!(map.Lookup(h!("two")).unwrap(), 2);

Dependencies

~135–510KB
~12K SLoC