-
-
Notifications
You must be signed in to change notification settings - Fork 169
doc: massive overhaul of documentation #1264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79c048a
676c585
27ec946
d85b4c9
9f9e5ca
505e70f
e46e74a
02bc2cf
52954f4
837fe5c
b9829d7
e0fde84
5c9343f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,44 @@ | ||
# uefi-rs | ||
|
||
Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI]. | ||
|
||
[](https://crates.io/crates/uefi) | ||
[](https://docs.rs/uefi) | ||
 | ||
 | ||
 | ||
|
||
## Description | ||
|
||
[UEFI] started as the successor firmware to the BIOS in x86 space and developed | ||
to a universal firmware specification for various platforms, such as ARM. It | ||
provides an early boot environment with a variety of [specified][spec] | ||
ready-to-use "high-level" functionality, such as accessing disks or the network. | ||
EFI images, the files that can be loaded by an UEFI environment, can leverage | ||
these abstractions to extend the functionality in form of additional drivers, | ||
OS-specific bootloaders, or different kind of low-level applications. | ||
|
||
Our mission is to provide **safe** and **performant** wrappers for UEFI | ||
interfaces, and allow developers to write idiomatic Rust code. | ||
|
||
This repository provides various crates: | ||
|
||
- `uefi-raw`: Raw Rust UEFI bindings for basic structures and functions. | ||
- `uefi`: High-level wrapper around various low-level UEFI APIs. \ | ||
Offers various optional features for typical Rust convenience, such as a | ||
Logger and an Allocator. (_This is what you are usually looking for!_) | ||
- `uefi-macros`: Helper macros. Used by `uefi`. | ||
## TL;DR | ||
|
||
Develop Rust software that leverages **safe**, **convenient**, and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: For clarity I would add a few words at the start of the sentence like "This crate makes it easy to develop Rust software [..].". Makes it clearer that we aren't necessarily the ones making the safe/convenient/performant software, but rather we're helping users of the crate do that. |
||
**performant** abstractions for [UEFI] functionality. | ||
|
||
You can use the abstractions for example to: | ||
## API and User Documentation | ||
|
||
- create OS-specific loaders and leverage UEFI boot service | ||
- access UEFI runtime services from an OS | ||
|
||
All crates are compatible with all platforms that both the Rust compiler and | ||
UEFI support, such as `i686`, `x86_64`, and `aarch64`). Please note that we | ||
can't test all possible hardware/firmware/platform combinations. | ||
|
||
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface | ||
The main contribution of this project is the `uefi` crate. | ||
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 build by running `$ cargo xtask doc --open`. | ||
|
||
 | ||
Screenshot of an application running in QEMU on an UEFI firmware that leverages | ||
our Rust library. | ||
|
||
## User Documentation | ||
|
||
<!-- KEEP IN SYNC WITH uefi/README --> | ||
|
||
For a quick start, please check out [the UEFI application template](template). | ||
|
||
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important | ||
UEFI concepts. Reference documentation for the various crates can be found on | ||
[docs.rs]: | ||
|
||
- [docs.rs/uefi](https://docs.rs/uefi) | ||
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros) | ||
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw) | ||
|
||
For additional information, refer to the [UEFI specification][spec]. | ||
|
||
[spec]: https://uefi.org/specs/UEFI/2.10 | ||
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD | ||
[docs.rs]: https://docs.rs | ||
|
||
### MSRV | ||
|
||
See the [uefi package's README](uefi/README.md#MSRV). | ||
|
||
## Developer Guide | ||
|
||
### Project structure | ||
|
||
This project contains multiple sub-crates: | ||
### Repository Structure | ||
|
||
- `uefi`: defines the standard UEFI tables / interfaces. | ||
The objective is to stay unopinionated and safely wrap most interfaces. | ||
Additional opinionated features (such as a Logger) are feature-gated. | ||
|
||
- `uefi-macros`: procedural macros that are used to derive some traits | ||
in `uefi`. | ||
This repository provides various crates: | ||
|
||
- `uefi-raw`: raw types that closely match the definitions in the UEFI | ||
Specification. Safe wrappers for these types are provided by the `uefi` | ||
crate. The raw types are suitable for implementing UEFI firmware. | ||
- [`uefi-raw`](/uefi-raw/README.md): Raw Rust UEFI bindings for basic structures and functions. | ||
- [`uefi`](/uefi/README.md): High-level wrapper around various low-level UEFI APIs. \ | ||
Offers various optional features for typical Rust convenience, such as a | ||
Logger and an Allocator. | ||
This is the **main contribution** of this project. | ||
- [`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 unit / integration tests. | ||
|
||
- `uefi-test-runner`: a UEFI application that runs unit / integration tests. | ||
|
||
[log]: https://github.com/rust-lang-nursery/log | ||
|
||
|
@@ -123,11 +77,14 @@ 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. | ||
|
||
## Contributing | ||
## Discuss and Contribute | ||
|
||
We welcome issues and pull requests! For instructions on how to set up a | ||
development environment and how to add new protocols, check out | ||
[CONTRIBUTING.md](CONTRIBUTING.md). | ||
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 form of a PR are also highly welcome. Check our | ||
[contributing guide](./CONTRIBUTING.md) for details. | ||
|
||
## License | ||
|
||
|
@@ -136,3 +93,6 @@ 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,38 @@ | ||
# uefi-rs | ||
# `uefi` | ||
|
||
Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI]. | ||
|
||
[](https://crates.io/crates/uefi) | ||
[](https://docs.rs/uefi) | ||
 | ||
 | ||
 | ||
|
||
## TL;DR | ||
|
||
For an introduction to the `uefi-rs` project and documentation, please refer to | ||
our main [README]. | ||
|
||
[README]: https://github.com/rust-osdev/uefi-rs/blob/main/README.md | ||
|
||
## Optional features | ||
|
||
This crate's features are described in [`src/lib.rs`]. | ||
|
||
[`src/lib.rs`]: src/lib.rs | ||
|
||
## User Documentation | ||
|
||
<!-- KEEP IN SYNC WITH MAIN README --> | ||
|
||
For a quick start, please check out [the UEFI application template](template). | ||
|
||
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important | ||
UEFI concepts. Reference documentation for the various crates can be found on | ||
[docs.rs]: | ||
|
||
- [docs.rs/uefi](https://docs.rs/uefi) | ||
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros) | ||
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw) | ||
Develop Rust software that leverages **safe**, **convenient**, and | ||
**performant** abstractions for [UEFI] functionality. | ||
|
||
[spec]: http://www.uefi.org/specifications | ||
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD | ||
## About | ||
|
||
## MSRV | ||
With `uefi`, you have the flexibility to integrate selected types and | ||
abstractions into your project or to conveniently create EFI images, addressing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Here and elsewhere, let's standardize on always saying |
||
the entire spectrum of your development needs. | ||
|
||
The minimum supported Rust version is currently 1.70. | ||
`uefi` works with stable Rust, but additional nightly-only features are | ||
gated behind an `unstable` Cargo feature flag. | ||
|
||
Our policy is to support at least the past two stable releases. | ||
_Note that for producing EFI images, you also need to use a corresponding `uefi` | ||
compiler target of Rust, such as `x86_64-unknown-uefi`._ | ||
|
||
## License | ||
## API and User Documentation | ||
|
||
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. | ||
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`](./src/lib.rs), which can also be | ||
locally build by running `$ cargo xtask doc --open`. | ||
|
||
The full text of the license is available in the [license file](LICENSE). | ||
For an introduction to the `uefi-rs` project and this repository, please refer | ||
to our main [README](https://github.com/rust-osdev/uefi-rs/blob/main/README.md). | ||
<!-- ^ This link can't be relative as it also should work in the packaged crate | ||
on crates.io. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we should drop the tl;dr header here since the section is just one sentence. Have this content come directly after the "Rusty wrapper for the Unified Extensible Firmware Interface." sentence.