#windows #winapi #util #win


A dumping ground for high level safe wrappers over winapi

6 releases

0.1.5 Apr 20, 2020
0.1.4 Mar 30, 2020
0.1.3 Jan 11, 2020
0.1.2 Jan 27, 2019
0.1.1 Aug 25, 2018

#8 in Windows APIs

Download history 87705/week @ 2020-06-28 88936/week @ 2020-07-05 89765/week @ 2020-07-12 87694/week @ 2020-07-19 87278/week @ 2020-07-26 91246/week @ 2020-08-02 89887/week @ 2020-08-09 89607/week @ 2020-08-16 88781/week @ 2020-08-23 87981/week @ 2020-08-30 85656/week @ 2020-09-06 86164/week @ 2020-09-13 84764/week @ 2020-09-20 88909/week @ 2020-09-27 94560/week @ 2020-10-04 90458/week @ 2020-10-11

376,865 downloads per month
Used in 5,597 crates (14 directly)


482 lines


This crate provides a smattering of safe wrappers around various parts of the winapi crate.

Build status

Dual-licensed under MIT or the UNLICENSE.




Add this to your Cargo.toml:

winapi-util = "0.1"


This crate was born out of frustration with having to write lots of little ffi utility bindings in a variety of crates in order to get Windows support. Eventually, I started needing to copy & paste a lot of those utility routines. Since they are utility routines, they often don't make sense to expose directly in the crate in which they are defined. Instead of continuing this process, I decided to make a crate instead.

Normally, I'm not a huge fan of "utility" crates like this that don't have a well defined scope, but this is primarily a practical endeavor to make it easier to isolate Windows specific ffi code.

While I don't have a long term vision for this crate, I will welcome additional PRs that add more high level routines/types on an as-needed basis.

WARNING: I am not a Windows developer, so extra review to make sure I've got things right is most appreciated.

Minimum Rust version policy

This crate's minimum supported rustc version is 1.34.0.

The current policy is that the minimum Rust version required to use this crate can be increased in non-breaking version updates. For example, if crate 1.0 requires Rust 1.20.0, then crate 1.0.z for all values of z will also require Rust 1.20.0 or newer. However, crate 1.y for y > 0 may require a newer minimum version of Rust.

In general, this crate will be conservative with respect to the minimum supported version of Rust.