windows-sys (0.100.0+paring.1)

Published 2026-10-14 03:21:29 +09:00 by paring

Installation

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add windows-sys@0.100.0+paring.1 --registry forgejo

About this package

Rust for Windows

windows-sys

The windows-sys crate provides raw Windows API declarations, structs, and constants without wrappers or helper traits.

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

[dependencies.windows-sys]
version = "0.100"
features = [
    "handleapi",
    "synchapi",
    "winuser",
]

Make use of any Windows APIs as needed:

use windows_sys::{core::*, Win32::*};

unsafe {
    let event = CreateEventW(std::ptr::null_mut(), 1, 0, std::ptr::null());
    SetEvent(event);
    WaitForSingleObject(event, 0);
    CloseHandle(event);

    MessageBoxA(0 as _, s!("Ansi"), s!("Caption"), MB_OK as u32);
    MessageBoxW(0 as _, w!("Wide"), w!("Caption"), MB_OK as u32);
}

Dependencies

ID Version
windows-link ^0.100.0
Details
Cargo
2026-10-14 03:21:29 +09:00
21
2026-11-15 19:56:41 +09:00
MIT OR Apache-2.0
2.4 MiB
Assets (1)
Versions (1) View all
0.100.0+paring.1 2026-10-14