7 releases (4 breaking)

new 0.4.0 Jan 7, 2025
0.3.0 Sep 25, 2024
0.2.0 Jul 3, 2024
0.1.2 Jun 7, 2024
0.0.0 Feb 15, 2024

#117 in Windows APIs

Download history 262268/week @ 2024-09-23 286764/week @ 2024-09-30 300812/week @ 2024-10-07 304345/week @ 2024-10-14 315119/week @ 2024-10-21 323748/week @ 2024-10-28 467417/week @ 2024-11-04 469302/week @ 2024-11-11 462279/week @ 2024-11-18 391899/week @ 2024-11-25 435274/week @ 2024-12-02 543565/week @ 2024-12-09 521490/week @ 2024-12-16 219788/week @ 2024-12-23 311658/week @ 2024-12-30 565084/week @ 2025-01-06

1,638,782 downloads per month
Used in 5,270 crates (13 directly)

MIT/Apache

105KB
2.5K SLoC

Windows registry

The windows-registry crate provides simple, safe, and efficient access to the Windows registry.

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

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

Read and write registry keys and values as needed:

use windows_registry::*;

fn main() -> Result<()> {
    let key = CURRENT_USER.create("software\\windows-rs")?;

    key.set_u32("number", 123)?;
    key.set_string("name", "Rust")?;

    println!("{}", key.get_u32("number")?);
    println!("{}", key.get_string("name")?);

    Ok(())
}

Dependencies

~0–8.5MB