Skip to content

Commit a07379e

Browse files
Merge pull request #1292 from phip1611/doc5
doc: Comparison to Ecosystem (including Rust std impl) [doc: 4/N]
2 parents 68b85bb + f094ccf commit a07379e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

uefi/src/lib.rs

+42
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
//! important UEFI concepts. For more details of UEFI, see the latest [UEFI
88
//! Specification][spec].
99
//!
10+
//! # Minimal Example
11+
//!
12+
//! Minimal example for an UEFI application using functionality of the
13+
//! `uefi` crate:
14+
//!
15+
//! ```ignore
16+
#![doc = include_str!("../../template/src/main.rs")]
17+
//! ```
18+
//!
19+
//! Please find more info in our [Rust UEFI Book].
20+
//!
1021
//! # Value-add and Use Cases
1122
//!
1223
//! `uefi` supports writing code for both pre- and post-exit boot services
@@ -115,6 +126,33 @@
115126
//! Contributions in the form of a PR are also highly welcome. Check our
116127
//! [contributing guide][contributing] for details.
117128
//!
129+
//! # Comparison to other Projects in the Ecosystem
130+
//!
131+
//! ## Rust `std` implementation
132+
//!
133+
//! There is an ongoing effort for a [`std` implementation][rustc-uefi-std] of
134+
//! the Rust standard library, which allows you to write UEFI programs that look
135+
//! very similar to normal Rust programs running on top of an OS.
136+
//!
137+
//! It is still under development. You can track the progress in the
138+
//! corresponding [tracking issue][uefi-std-tr-issue].
139+
//!
140+
//! Using the `std` implementation simplifies the overall process of producing
141+
//! the binary. For example, our [`#[entry]`][entry-macro] macro won't be
142+
//! required any longer. As the `std` implementation evolves over time, you'll
143+
//! need fewer and fewer abstractions of this crate. For everything not covered
144+
//! by the `std` implementation, you can obtain relevant structures to work with
145+
//! our crate via:
146+
//! - `std::os::uefi::env::boot_services()`
147+
//! - `std::os::uefi::env::get_system_handle()`
148+
//! - `std::os::uefi::env::get_system_table()`
149+
//!
150+
//! ## `r-efi`
151+
//!
152+
//! [`r-efi`] provides Raw UEFI bindings without high-level convenience similar
153+
//! to our `uefi-raw` crate, which is part of this project, but more
154+
//! feature-complete. It targets a lower-level than our `uefi` crate does.
155+
//!
118156
//! # License
119157
//! <!-- Keep in Sync with README! -->
120158
//!
@@ -136,11 +174,15 @@
136174
//! [`BootServices`]: table::boot::BootServices
137175
//! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
138176
//! [`SystemTable`]: table::SystemTable
177+
//! [`r-efi`]: https://crates.io/crates/r-efi
178+
//! [`entry-macro`]: uefi_macros::entry
139179
//! [`unsafe_protocol`]: proto::unsafe_protocol
140180
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
141181
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues
142182
//! [spec]: https://uefi.org/specifications
143183
//! [unstable features]: https://doc.rust-lang.org/unstable-book/
184+
//! [rustc-uefi-std]: https://doc.rust-lang.org/nightly/rustc/platform-support/unknown-uefi.html
185+
//! [uefi-std-tr-issue]: https://github.com/rust-lang/rust/issues/100499
144186
145187
#![cfg_attr(all(feature = "unstable", feature = "alloc"), feature(allocator_api))]
146188
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

0 commit comments

Comments
 (0)