Skip to content

Commit 93e864e

Browse files
Merge pull request #1293 from phip1611/doc6
doc: Talk about Documentation Organization/Overview [doc: 5/N]
2 parents 0e959b4 + 63e37c4 commit 93e864e

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

uefi/README.md

-17
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@ This crate's features are described in [`src/lib.rs`].
3333

3434
[`src/lib.rs`]: src/lib.rs
3535

36-
## User Documentation
37-
38-
<!-- KEEP IN SYNC WITH MAIN README -->
39-
40-
For a quick start, please check out [the UEFI application template](template).
41-
42-
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important
43-
UEFI concepts. Reference documentation for the various crates can be found on
44-
[docs.rs]:
45-
46-
- [docs.rs/uefi](https://docs.rs/uefi)
47-
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
48-
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
49-
50-
[spec]: http://www.uefi.org/specifications
51-
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD
52-
5336
## MSRV
5437

5538
The minimum supported Rust version is currently 1.70.

uefi/src/lib.rs

+24-1
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,34 @@
6969
//! The minimum supported Rust version is currently 1.70.
7070
//! Our policy is to support at least the past two stable releases.
7171
//!
72-
//! # Crate organisation
72+
//! # API/User Documentation, Documentation Structure, and other Resources
73+
//!
74+
//! Down below, you find typical technical documentation of all types, modules,
75+
//! and functions exported by `uefi`.
76+
//!
77+
//! For a TL;DR quick start with an example on how to create your own EFI
78+
//! application, please check out [the UEFI application template][template]. The
79+
//! [Rust UEFI Book] is a more beginner-friendly tutorial with How-Tos, and
80+
//! overviews of some important UEFI concepts and the abstractions provided by
81+
//! this library.
82+
//!
83+
//! For more details of UEFI itself, see the latest [UEFI Specification][spec].
84+
//!
85+
//! # Library Structure & Tips
7386
//!
7487
//! The top-level module contains some of the most used types and macros,
7588
//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and
7689
//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and
7790
//! [`guid`] macros.
7891
//!
92+
//! ## UEFI Strings
93+
//!
94+
//! Rust string literals are UTF-8 encoded and thus, not compatible with most
95+
//! UEFI interfaces. We provide [`CStr16`] and [`CString16`] for proper working
96+
//! with UCS-2 strings, including various transformation functions from standard
97+
//! Rust strings. You can use [`ctr16!`] to create UCS-2 string literals at
98+
//! compile time.
99+
//!
79100
//! ## Tables
80101
//!
81102
//! The [`SystemTable`] provides access to almost everything in UEFI. It comes
@@ -186,10 +207,12 @@
186207
//! [`SystemTable`]: table::SystemTable
187208
//! [`r-efi`]: https://crates.io/crates/r-efi
188209
//! [`entry-macro`]: uefi_macros::entry
210+
//! [`ctr16!`]: crate::cstr16
189211
//! [`unsafe_protocol`]: proto::unsafe_protocol
190212
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
191213
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues
192214
//! [spec]: https://uefi.org/specifications
215+
//! [template]: https://github.com/rust-osdev/uefi-rs/tree/main/template
193216
//! [unstable features]: https://doc.rust-lang.org/unstable-book/
194217
//! [rustc-uefi-std]: https://doc.rust-lang.org/nightly/rustc/platform-support/unknown-uefi.html
195218
//! [uefi-std-tr-issue]: https://github.com/rust-lang/rust/issues/100499

0 commit comments

Comments
 (0)