winpty-rs-windows-sys

Crates.iowinpty-rs-windows-sys
lib.rswinpty-rs-windows-sys
version0.60.2
created_at2025-08-04 20:30:31.290945+00
updated_at2025-08-04 20:30:31.290945+00
descriptionRust for Windows
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1781129
size19,000,763
Edgar Andrés Margffoy Tuay (andfoy)

documentation

README

windows-sys

The windows-sys crate is a zero-overhead fallback for the most demanding situations and primarily where the absolute best compile time is essential. It only includes function declarations (externs), structs, and constants. No convenience helpers, traits, or wrappers are provided.

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

[dependencies.winpty-rs-windows-sys]
version = "0.60"
features = [
    "Win32_Security",
    "Win32_System_Threading",
    "Win32_UI_WindowsAndMessaging",
]

Make use of any Windows APIs as needed:

use winpty_rs_windows_sys::{
    core::*, Win32::Foundation::*, Win32::System::Threading::*, Win32::UI::WindowsAndMessaging::*,
};

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

        MessageBoxA(0 as _, s!("Ansi"), s!("Caption"), MB_OK);
        MessageBoxW(0 as _, w!("Wide"), w!("Caption"), MB_OK);
    }
}
Commit count: 1734

cargo fmt