Skip to content

Commit 7eb4b79

Browse files
Merge pull request #1291 from phip1611/doc4
doc: add comprehensive About section to lib.rs [doc: 3/N]
2 parents 42dd1f0 + 0d8d13a commit 7eb4b79

File tree

2 files changed

+50
-11
lines changed

2 files changed

+50
-11
lines changed

uefi/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ This crate makes it easy to develop Rust software that leverages **safe**,
1111
![Build status](https://github.com/rust-osdev/uefi-rs/workflows/Rust/badge.svg)
1212
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
1313

14+
## Value-add and Use Cases
15+
16+
`uefi` supports writing code for both pre- and post-exit boot services
17+
epochs, but its true strength shines when you create UEFI images that heavily
18+
interact with UEFI boot services. Still, you have the flexibility to just
19+
integrate selected types and abstractions into your project, for example to
20+
parse the UEFI memory map.
21+
22+
_Note that for producing UEFI images, you also need to use a corresponding
23+
`uefi` compiler target of Rust, such as `x86_64-unknown-uefi`._
24+
1425
For an introduction to the `uefi-rs` project and documentation, please refer to
1526
our main [README].
1627

uefi/src/lib.rs

+39-11
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,47 @@
77
//! important UEFI concepts. For more details of UEFI, see the latest [UEFI
88
//! Specification][spec].
99
//!
10-
//! # Interaction with uefi services
10+
//! # Value-add and Use Cases
1111
//!
12-
//! With this crate you can write code for the pre- and post-exit boot services
13-
//! epochs. However, the `uefi` crate unfolds its true potential when
14-
//! interacting with UEFI boot services.
12+
//! `uefi` supports writing code for both pre- and post-exit boot services
13+
//! epochs, but its true strength shines when you create UEFI images that heavily
14+
//! interact with UEFI boot services. Still, you have the flexibility to just
15+
//! integrate selected types and abstractions into your project, for example to
16+
//! parse the UEFI memory map.
1517
//!
16-
//! ## Supported Architectures
18+
//! _Note that for producing UEFI images, you also need to use a corresponding
19+
//! `uefi` compiler target of Rust, such as `x86_64-unknown-uefi`._
20+
//!
21+
//! ## Example Use Cases
22+
//!
23+
//! This library significantly simplifies the process of creating **UEFI images**
24+
//! by abstracting away much of the UEFI API complexity and by providing
25+
//! convenient wrappers. When we mention UEFI images, we are talking about UEFI
26+
//! applications, UEFI boot service drivers, and EFI runtime service drivers,
27+
//! which typically have the `.efi` file extension. For instance, an UEFI
28+
//! application could be an OS-specific loader, similar to _GRUB_ or _Limine_.
29+
//!
30+
//! Additionally, you can use this crate in non-UEFI images (such as a kernel
31+
//! in ELF format) to perform tasks like parsing the UEFI memory map embedded in
32+
//! the boot information provided by a bootloader. It also enables access to
33+
//! UEFI runtime services from a non-UEFI image kernel.
34+
//!
35+
//! # Supported Compiler Versions and Architectures
36+
//!
37+
//! `uefi` works with stable Rust, but additional nightly-only features are
38+
//! gated behind the `unstable` Cargo feature. Please find more information
39+
//! about additional crate features below.
1740
//!
1841
//! `uefi` is compatible with all platforms that both the Rust compiler and
1942
//! UEFI support, such as `i686`, `x86_64`, and `aarch64`. Please note that we
2043
//! can't test all possible hardware/firmware/platform combinations in CI.
2144
//!
45+
//! ## MSRV
46+
//! <!-- Keep in Sync with README! -->
47+
//!
48+
//! The minimum supported Rust version is currently 1.70.
49+
//! Our policy is to support at least the past two stable releases.
50+
//!
2251
//! # Crate organisation
2352
//!
2453
//! The top-level module contains some of the most used types and macros,
@@ -86,12 +115,6 @@
86115
//! Contributions in the form of a PR are also highly welcome. Check our
87116
//! [contributing guide][contributing] for details.
88117
//!
89-
//! # MSRV
90-
//! <!-- Keep in Sync with README! -->
91-
//!
92-
//! The minimum supported Rust version is currently 1.70.
93-
//! Our policy is to support at least the past two stable releases.
94-
//!
95118
//! # License
96119
//! <!-- Keep in Sync with README! -->
97120
//!
@@ -101,6 +124,11 @@
101124
//!
102125
//! The full text of the license is available in the [license file][LICENSE].
103126
//!
127+
//! # Terminology
128+
//!
129+
//! Both "EFI" and "UEFI" can be used interchangeably, such as "UEFI image" or
130+
//! "EFI image". We prefer "UEFI" in our crate and its documentation.
131+
//!
104132
//! [LICENSE]: https://github.com/rust-osdev/uefi-rs/blob/main/uefi/LICENSE
105133
//! [Rust UEFI Book]: https://rust-osdev.github.io/uefi-rs/HEAD/
106134
//! [UEFI]: https://uefi.org/

0 commit comments

Comments
 (0)