Skip to content

moooozi/firmware_variables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firmware Variables Library

Crates.io Documentation License: MIT

This library provides an interface for interacting with UEFI firmware variables on Windows systems. It allows you to get, set, and delete UEFI variables, manage boot entries, and handle device paths.

Features

  • Access and manipulate UEFI variables.
  • Manage UEFI boot entries and boot order.
  • Handle device paths in UEFI.
  • Adjust process privileges for accessing UEFI variables.

Installation

Add this to your Cargo.toml:

[dependencies]
firmware_variables = "0.1"

Usage

Here is a basic example of how to use the library:

use firmware_variables::{get_variable, set_variable, get_boot_order};

fn main() {
    // Example: Get a UEFI variable
    let (value, attributes) = get_variable("SomeVariable").expect("Failed to get variable");
    println!("Value: {:?}, Attributes: {:?}", value, attributes);

    // Example: Set a UEFI variable
    set_variable("SomeVariable", b"NewValue").expect("Failed to set variable");

    // Example: Get the boot order
    let boot_order = get_boot_order().expect("Failed to get boot order");
    println!("Boot Order: {:?}", boot_order);
}

Platform Support

Currently supports Windows systems with UEFI firmware.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages