Skip to content

Commit 63e37c4

Browse files
committed
doc: lib.rs: Crate organization -> Library Structure & Tips
Also added "UEFI Strings" subsection
1 parent cdca03e commit 63e37c4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

uefi/src/lib.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,21 @@
8282
//!
8383
//! For more details of UEFI itself, see the latest [UEFI Specification][spec].
8484
//!
85-
//! # Crate organisation
85+
//! # Library Structure & Tips
8686
//!
8787
//! The top-level module contains some of the most used types and macros,
8888
//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and
8989
//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and
9090
//! [`guid`] macros.
9191
//!
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+
//!
92100
//! ## Tables
93101
//!
94102
//! The [`SystemTable`] provides access to almost everything in UEFI. It comes
@@ -199,6 +207,7 @@
199207
//! [`SystemTable`]: table::SystemTable
200208
//! [`r-efi`]: https://crates.io/crates/r-efi
201209
//! [`entry-macro`]: uefi_macros::entry
210+
//! [`ctr16!`]: crate::cstr16
202211
//! [`unsafe_protocol`]: proto::unsafe_protocol
203212
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
204213
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues

0 commit comments

Comments
 (0)