Skip to content

Commit bea25d6

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

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
@@ -60,13 +60,21 @@
6060
//!
6161
//! For more details of UEFI itself, see the latest [UEFI Specification][spec].
6262
//!
63-
//! # Crate organisation
63+
//! # Library Structure & Tips
6464
//!
6565
//! The top-level module contains some of the most used types and macros,
6666
//! including the [`Handle`] and [`Result`] types, the [`CStr16`] and
6767
//! [`CString16`] types for working with UCS-2 strings, and the [`entry`] and
6868
//! [`guid`] macros.
6969
//!
70+
//! ## UEFI Strings
71+
//!
72+
//! Rust string literals are UTF-8 encoded and thus, not compatible with most
73+
//! UEFI interfaces. We provide [`CStr16`] and [`CString16`] for proper working
74+
//! with UCS-2 strings, including various transformation functions from standard
75+
//! Rust strings. You can use [`ctr16!`] to create UCS-2 string literals at
76+
//! compile time.
77+
//!
7078
//! ## Tables
7179
//!
7280
//! The [`SystemTable`] provides access to almost everything in UEFI. It comes
@@ -179,6 +187,7 @@
179187
//! [`BootServices`]: table::boot::BootServices
180188
//! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
181189
//! [`SystemTable`]: table::SystemTable
190+
//! [`ctr16!`]: crate::cstr16
182191
//! [`unsafe_protocol`]: proto::unsafe_protocol
183192
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
184193
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues

0 commit comments

Comments
 (0)