No description
Find a file
2026-07-11 16:09:36 -04:00
.cargo several unrelated cleanups 2022-11-20 12:49:37 -05:00
.github Merge pull request #2003 from rust-osdev/renovate/codecov-codecov-action-7.x 2026-07-11 19:48:54 +00:00
book remove multilingual field from book.toml 2026-06-28 15:18:46 +10:00
docs Update timeline section of funcs_migration.md 2024-10-07 21:46:25 -04:00
template release: uefi-raw-0.15.1 and uefi-0.39.0 2026-07-11 16:09:36 -04:00
uefi release: uefi-raw-0.15.1 and uefi-0.39.0 2026-07-11 16:09:36 -04:00
uefi-macros treewide: bump to MSRV 1.91 2026-05-31 21:17:30 +02:00
uefi-raw release: uefi-raw-0.15.1 and uefi-0.39.0 2026-07-11 16:09:36 -04:00
uefi-std-example rust: update to edition 2024 2025-05-17 12:21:52 +02:00
uefi-test-runner feat(test-runner): add IOMMU test coverage 2026-06-25 00:54:12 -06:00
xtask fix(deps): update rust crate itertools to 0.15.0 2026-07-11 19:41:17 +00:00
.editorconfig typos: fixes 2024-04-08 16:13:43 +02:00
.envrc nix: switch to Nix Flake 2025-03-02 11:48:36 +01:00
.gitattributes Add project skeleton 2017-11-22 19:06:09 +02:00
.gitignore cleanup of IPConfig2/Http Protocol PR 2025-05-19 22:14:01 +02:00
.typos.toml doc: extend showcases in README and fix typos/spellcheck 2026-07-07 10:16:12 +02:00
Cargo.lock release: uefi-raw-0.15.1 and uefi-0.39.0 2026-07-11 16:09:36 -04:00
Cargo.toml uefi: add jiff02 feature and integrate jiff types with struct Time 2026-06-16 07:02:14 +02:00
CHANGELOG.md treewide: nuke uefi-services 2024-04-20 15:25:16 +02:00
CONTRIBUTING.md uefi: Use unsafe_protocol! for all protocol impls 2022-12-26 18:10:19 -05:00
flake.lock flake: bump all dependencies 2026-06-09 21:11:41 +02:00
flake.nix flake: simplify nix code 2026-06-09 21:11:33 +02:00
LICENSE-APACHE Add LICENSE-APACHE 2025-02-05 16:52:14 -05:00
LICENSE-MIT Add LICENSE-MIT 2025-02-05 16:52:14 -05:00
PUBLISHING.md treewide: nuke uefi-services 2024-04-20 15:25:16 +02:00
README.md doc: fix showcases in README 2026-07-07 10:21:44 +02:00
rust-toolchain.toml nix: get rust toolchain from rust-overlay 2023-11-24 10:54:43 +01:00
rustfmt.toml rustfmt: fixes for device_path_gen for 2024 edition 2025-05-17 12:27:06 +02:00

uefi-rs

Rusty wrapper for the Unified Extensible Firmware Interface.

This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality.

Crates.io Docs.rs License Build status Stars

UEFI App running in QEMU Screenshot of an application running in QEMU on an UEFI firmware that leverages our Rust library.

API and User Documentation

The main contribution of this project is the uefi crate. Please refer to docs.rs for comprehensive documentation of the latest stable release. The latest not necessarily yet published documentation can be found in src/lib.rs, which can also be locally viewed by running $ cargo xtask doc --open.

Developer Guide

Repository Structure

This repository provides various crates:

  • uefi: High-level wrapper around various low-level UEFI APIs. This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality. This is the main contribution of this project.
  • uefi-raw: Raw ABI-compatible types that closely match the definitions in the UEFI Specification. They are suitable for implementing UEFI firmware or creating interfaces to it.
  • uefi-macros: Helper macros used by uefi.
  • uefi-test-runner: A UEFI application that runs our integration tests.
  • uefi-std-example: Example UEFI app but as Rust standard binary.

Building and testing uefi-rs

Use the cargo 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: build uefi-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 under WSL 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

The uefi-test-runner directory contains a sample UEFI app which exercises most of the library's functionality.

Check out the testing project's README.md for prerequisites for running the tests.

Showcases

Selected showcases from community. Feel free to raise a PR and add yours!

  • ratatuefi provides a Ratatui backend for the UEFI environment using uefi.
  • efimux is an EFI application for booting other EFI applications, written with the aforementioned ratatuefi and therefore also uefi.
  • uefirc is a graphical UEFI IRC client to connect to an IRC server, chat, and read messages, all from the comfort of your motherboard's pre-boot environment.

Discuss and Contribute

For general discussions, feel free to join us in our Zulip and ask your questions there.

Further, you can submit bugs and also ask questions in our [issue tracker]. Contributions in the form of a PR are also highly welcome. Check our contributing guide for details.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.