Skip to content

Commit 62abe00

Browse files
authored
Merge pull request rust-osdev#683 from nicholasbishop/bishop-update-lib-doc
uefi: Update package docstring
2 parents 052ca3f + 3e81247 commit 62abe00

File tree

1 file changed

+39
-18
lines changed

1 file changed

+39
-18
lines changed

uefi/src/lib.rs

+39-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
1-
//! Rusty wrapper for the Unified Extensible Firmware Interface.
1+
//! Rusty wrapper for the [Unified Extensible Firmware Interface][UEFI].
2+
//!
3+
//! See the [Rust UEFI Book] for a tutorial, how-tos, and overviews of some
4+
//! important UEFI concepts. For more details of UEFI, see the latest [UEFI
5+
//! Specification][spec].
6+
//!
7+
//! Feel free to file bug reports and questions in our [issue tracker], and [PR
8+
//! contributions][contributing] are also welcome!
29
//!
310
//! # Crate organisation
411
//!
5-
//! The top-level module contains some of the most used types,
6-
//! such as the result and error types, or other common data structures
7-
//! such as GUIDs and handles.
12+
//! The top-level module contains some of the most used types and macros,
13+
//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and
14+
//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and
15+
//! [`guid`] macros.
16+
//!
17+
//! ## Tables
18+
//!
19+
//! The [`SystemTable`] provides access to almost everything in UEFI. It comes
20+
//! in two flavors:
21+
//! - `SystemTable<Boot>`: for boot-time applications such as bootloaders,
22+
//! provides access to both boot and runtime services.
23+
//! - `SystemTable<Runtime>`: for operating systems after boot services have
24+
//! been exited.
825
//!
9-
//! ## Tables and protocols
26+
//! ## Protocols
1027
//!
11-
//! The `table` module contains definitions of the UEFI tables,
12-
//! which are structures containing some basic functions and references to other tables.
13-
//! Most importantly, the boot services table also provides a way to obtain **protocol** handles.
28+
//! When boot services are active, most functionality is provided via UEFI
29+
//! protocols. Protocols provide operations such as reading and writing files,
30+
//! drawing to the screen, sending and receiving network requests, and much
31+
//! more. The list of protocols that are actually available when running an
32+
//! application depends on the device. For example, a PC with no network card
33+
//! may not provide network protocols.
1434
//!
15-
//! The `proto` module contains the standard UEFI protocols, which are normally provided
16-
//! by the various UEFI drivers and firmware layers.
35+
//! See the [`BootServices`] documentation for details of how to open a
36+
//! protocol, and see the [`proto`] module for protocol implementations. New
37+
//! protocols can be defined with the [`unsafe_protocol`] macro.
1738
//!
1839
//! ## Optional crate features
1940
//!
@@ -46,16 +67,16 @@
4667
//! [`uefi-services`] crate provides an `init` method that takes care of
4768
//! this.
4869
//!
49-
//! ## Adapting to local conditions
50-
//!
51-
//! Unlike system tables, which are present on *all* UEFI implementations,
52-
//! protocols *may* or *may not* be present on a certain system.
53-
//!
54-
//! For example, a PC with no network card might not contain a network driver,
55-
//! therefore all the network protocols will be unavailable.
56-
//!
70+
//! [Rust UEFI Book]: https://rust-osdev.github.io/uefi-rs/HEAD/
71+
//! [UEFI]: https://uefi.org/
72+
//! [`BootServices`]: table::boot::BootServices
5773
//! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
74+
//! [`SystemTable`]: table::SystemTable
5875
//! [`uefi-services`]: https://crates.io/crates/uefi-services
76+
//! [`unsafe_protocol`]: proto::unsafe_protocol
77+
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
78+
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues
79+
//! [spec]: https://uefi.org/specifications
5980
//! [unstable features]: https://doc.rust-lang.org/unstable-book/
6081
6182
#![feature(abi_efiapi)]

0 commit comments

Comments
 (0)