#efi

efivar

Rust crate for manipulating EFI variables using the OS interface

7 releases (3 stable)

new 1.0.3 Mar 20, 2023
1.0.2 Mar 15, 2023
1.0.1 Jan 2, 2023
0.2.2 Dec 31, 2022
0.1.0 May 8, 2019

#125 in Hardware support

Download history 257/week @ 2022-11-27 197/week @ 2022-12-04 225/week @ 2022-12-11 107/week @ 2022-12-18 900/week @ 2022-12-25 309/week @ 2023-01-01 322/week @ 2023-01-08 370/week @ 2023-01-15 428/week @ 2023-01-22 278/week @ 2023-01-29 316/week @ 2023-02-05 264/week @ 2023-02-12 306/week @ 2023-02-19 139/week @ 2023-02-26 279/week @ 2023-03-05 217/week @ 2023-03-12

953 downloads per month
Used in 5 crates (2 directly)

MIT license

51KB
1K SLoC

efivar

efivar is a Rust crate for manipulating EFI variables using the OS interface. This crate is mainly used by efiboot to implement its functionality.

Author

Vincent Tavernier v.tavernier@pm.me


lib.rs:

efivar is a crate for manipulating EFI variables using the OS interface. This crate is mainly used by efiboot to implement its functionality.

On Linux, it is assumed that efivarfs is mounted and available at /sys/firmware/efi/efivars, which should be the default nowadays on all major distros.

On Windows, it uses the Get/SetFirmwareEnvironmentVariable family of functions, which require administrative rights. This also requires adjusting the security token for the current thread to include SeSystemEnvironmentPrivilege. This is done during the initialization of SystemManager (see SystemManager::new() ).

In-memory and filesystem storage are also provided for testing purposes, or as a way to dump system variables to an external file.

Dependencies

~0.5–1MB
~19K SLoC