|
7 | 7 | //! important UEFI concepts. For more details of UEFI, see the latest [UEFI
|
8 | 8 | //! Specification][spec].
|
9 | 9 | //!
|
| 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 | +//! |
10 | 21 | //! # Value-add and Use Cases
|
11 | 22 | //!
|
12 | 23 | //! `uefi` supports writing code for both pre- and post-exit boot services
|
|
115 | 126 | //! Contributions in the form of a PR are also highly welcome. Check our
|
116 | 127 | //! [contributing guide][contributing] for details.
|
117 | 128 | //!
|
| 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 | +//! |
118 | 156 | //! # License
|
119 | 157 | //! <!-- Keep in Sync with README! -->
|
120 | 158 | //!
|
|
136 | 174 | //! [`BootServices`]: table::boot::BootServices
|
137 | 175 | //! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
|
138 | 176 | //! [`SystemTable`]: table::SystemTable
|
| 177 | +//! [`r-efi`]: https://crates.io/crates/r-efi |
| 178 | +//! [`entry-macro`]: uefi_macros::entry |
139 | 179 | //! [`unsafe_protocol`]: proto::unsafe_protocol
|
140 | 180 | //! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
|
141 | 181 | //! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues
|
142 | 182 | //! [spec]: https://uefi.org/specifications
|
143 | 183 | //! [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 |
144 | 186 |
|
145 | 187 | #![cfg_attr(all(feature = "unstable", feature = "alloc"), feature(allocator_api))]
|
146 | 188 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
|
0 commit comments