- Notifications
You must be signed in to change notification settings - Fork0
rucoder/uefi-rs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
UEFI is the successor to the BIOS. It provides an early boot environment forOS loaders, hypervisors and other low-level applications. While it started outas x86-specific, it has been adopted on other platforms, such as ARM.
This crate makes it easy to both:
- Write UEFI applications in Rust (for
i686
,x86_64
, oraarch64
) - Call UEFI functions from an OS (usually built with acustom target)
The objective is to providesafe andperformant wrappers for UEFI interfaces,and allow developers to write idiomatic Rust code.
Check outthe UEFI application template for a quick start.
This project contains multiple sub-crates:
uefi
: defines the standard UEFI tables / interfaces.The objective is to stay unopinionated and safely wrap most interfaces.uefi-macros
: procedural macros that are used to derive some traits inuefi
.uefi-raw
: raw types that closely match the definitions in the UEFISpecification. Safe wrappers for these types are provided by theuefi
crate. The raw types are suitable for implementing UEFI firmware.uefi-services
: provides a panic handler, and initializes thealloc
/logger
features.uefi-test-runner
: a UEFI application that runs unit / integration tests.
Theuefi-rs book contains a tutorial, how-tos, and overviews of someimportant UEFI concepts.
Reference documentation can be found on docs.rs:
For additional information, refer to theUEFI specification.
Use thecargo xtask
command to build and test the crate.
Available commands:
build
: build all the UEFI packages--release
: build in release mode--target {x86_64,ia32,aarch64}
: choose target UEFI arch
clippy
: run clippy on all the packages--target {x86_64,ia32,aarch64}
: choose target UEFI arch--warnings-as-errors
: treat warnings as errors
doc
: build the docs for the UEFI packages--open
: open the docs in a browser--warnings-as-errors
: treat warnings as errors
run
: builduefi-test-runner
and run it in QEMU--ci
: disable some tests that don't work in the CI--disable-kvm
: disable hardware accelerated virtualization support in QEMU.Especially useful if you want to run the tests underWSL on Windows.--example <NAME>
: run an example instead of the main binary.--headless
: run QEMU without a GUI--ovmf-code <PATH>
: path of an OVMF code file--ovmf-vars <PATH>
: path of an OVMF vars file--release
: build in release mode--target {x86_64,ia32,aarch64}
: choose target UEFI arch
test
: run unit tests and doctests on the host
Theuefi-test-runner
directory contains a sample UEFI app which exercisesmost of the library's functionality.
Check out the testing project'sREADME.md
forprerequisites for running the tests.
See theuefi package's README.
We welcome issues and pull requests! For instructions on how to set up a developmentenvironment and how to add new protocols, check outCONTRIBUTING.md.
The code in this repository is licensed under the Mozilla Public License 2.This license allows you to use the crate in proprietary programs, but any modifications to the files must be open-sourced.
The full text of the license is available in thelicense file.
About
Rust wrapper for UEFI.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- Rust99.3%
- Other0.7%