Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rust-osdev/uefi-rs
Rust wrapper for UEFI.
https://github.com/rust-osdev/uefi-rs
osdev rust uefi
Last synced: 12 days ago
JSON representation
Rust wrapper for UEFI.
- Host: GitHub
- URL: https://github.com/rust-osdev/uefi-rs
- Owner: rust-osdev
- License: mpl-2.0
- Created: 2017-11-22T15:39:12.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T05:16:30.000Z (7 months ago)
- Last Synced: 2024-04-18T02:12:41.623Z (7 months ago)
- Topics: osdev, rust, uefi
- Language: Rust
- Homepage: https://rust-osdev.com/uefi-book
- Size: 3.72 MB
- Stars: 1,186
- Watchers: 26
- Forks: 150
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-uefi-security - uefi-rs
README
# uefi-rs
Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI].
This crate makes it easy to develop Rust software that leverages **safe**,
**convenient**, and **performant** abstractions for [UEFI] functionality.[![Crates.io](https://img.shields.io/crates/v/uefi)](https://crates.io/crates/uefi)
[![Docs.rs](https://docs.rs/uefi/badge.svg)](https://docs.rs/uefi)
![License](https://img.shields.io/github/license/rust-osdev/uefi-rs)
![Build status](https://github.com/rust-osdev/uefi-rs/workflows/Rust/badge.svg)
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)![UEFI App running in QEMU](https://imgur.com/SFPSVuO.png)
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](./uefi/README.md).
Please refer to [docs.rs](https://docs.rs/uefi) for comprehensive documentation
of the **latest stable release**. The latest not necessarily yet published
documentation can be found in [`src/lib.rs`](./uefi/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`](/uefi/README.md): 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`](/uefi-raw/README.md): 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`](/uefi-macros/README.md): Helper macros used by `uefi`.
- [`uefi-test-runner`](/uefi-test-runner/README.md): A UEFI application that
runs our integration tests.
- [`uefi-std-example`](/uefi-std-example/README.md): 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](https://docs.microsoft.com/en-us/windows/wsl) on Windows.
- `--example `: run an example instead of the main binary.
- `--headless`: run QEMU without a GUI
- `--ovmf-code `: path of an OVMF code file
- `--ovmf-vars `: 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 hostThe `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`](uefi-test-runner/README.md) for
prerequisites for running the tests.## 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](./CONTRIBUTING.md) for details.## License
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 the [license file](LICENSE).
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
[Zulip]: https://rust-osdev.zulipchat.com