Skip to content

Commit d95fbcc

Browse files
committed
doc: Crate organization -> Library Structure & Tips
Also added "UEFI Strings" subsection
1 parent 47c3353 commit d95fbcc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

uefi/src/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,21 @@
8181
//!
8282
//! For more details of UEFI itself, see the latest [UEFI Specification][spec].
8383
//!
84-
//! # Crate organisation
84+
//! # Library Structure & Tips
8585
//!
8686
//! The top-level module contains some of the most used types and macros,
8787
//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and
8888
//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and
8989
//! [`guid`] macros.
9090
//!
91+
//! ## UEFI Strings
92+
//!
93+
//! Rust string literals are UTF-8 encoded and thus, not compatible with most
94+
//! UEFI interfaces. We provide [`CStr16`] and [`CString16`] for proper working
95+
//! with UCS-2 strings, including various transformation functions from standard
96+
//! Rust strings. You can use [`ctr16!`] to create UCS-2 string literals at
97+
//! compile time.
98+
//!
9199
//! ## Tables
92100
//!
93101
//! The [`SystemTable`] provides access to almost everything in UEFI. It comes
@@ -205,6 +213,7 @@
205213
//! [`SystemTable`]: table::SystemTable
206214
//! [`r-efi`]: https://crates.io/crates/r-efi
207215
//! [`entry-macro`]: uefi_macros::entry
216+
//! [`ctr16!`]: crate::cstr16
208217
//! [`unsafe_protocol`]: proto::unsafe_protocol
209218
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
210219
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues

0 commit comments

Comments
 (0)