3 unstable releases

0.1.1 Apr 12, 2024
0.1.0 Feb 22, 2024
0.0.0 Feb 15, 2024

#160 in Windows APIs

Download history 123/week @ 2024-02-12 132/week @ 2024-02-19 59/week @ 2024-02-26 16/week @ 2024-03-04 19/week @ 2024-03-11 19/week @ 2024-03-18 173/week @ 2024-04-01 279/week @ 2024-04-08 538/week @ 2024-04-15

990 downloads per month
Used in 19 crates (via playdate-build-utils)

MIT/Apache

48KB
1K 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.1"

Read and write registry keys and values as needed:

use windows_registry::*;

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

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

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

    Ok(())
}

lib.rs:

Learn more about Rust for Windows here: https://github.com/microsoft/windows-rs

Dependencies

~0–6MB