File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 10
10
- [ Using Protocols] ( how_to/protocols.md )
11
11
- [ Drawing to the Screen] ( how_to/drawing.md )
12
12
- [ Building drivers] ( how_to/building_drivers.md )
13
+ - [ Combining Rust ` std ` with ` uefi ` ] ( how_to/rust-std.md )
13
14
- [ Concepts] ( concepts/introduction.md )
14
15
- [ Boot Stages] ( concepts/boot_stages.md )
15
16
- [ Tables] ( concepts/tables.md )
Original file line number Diff line number Diff line change
1
+ # Combining Rust ` std ` with ` uefi `
2
+
3
+ ## TL;DR
4
+
5
+ In Mid-2024, we recommend to stick to our normal guide. Use this document as
6
+ guide and outlook for the future of UEFI and Rust.
7
+
8
+ ## About
9
+
10
+ In the ` uefi ` crate, we provide tooling to create a ` no_std ` + ` no_main `
11
+ binary, i.e., an UEFI image, in a convenient way by providing a ` #[entry] `
12
+ macro for the crate's main function. However, after ongoing efforts in upstream
13
+ Rust, there is also the option to create a "standard" binary for UEFI. The
14
+ result is the same, but the build process and the overall programming experience
15
+ is much more similar to regular Rust applications written for Operating Systems,
16
+ such as Linux, Windows, or macOS.
17
+
18
+ The ` uefi ` crate is suited to extend the functionality of these "standard
19
+ binaries". Note that UEFI in ` std ` is work-in-progress, and some functionality
20
+ only works with nightly toolchains.
21
+
22
+ ## Code Example
23
+
24
+ Please refer to [ ` <repo>/uefi-std-example ` ] ( /uefi-std-example/README.md ) to
25
+ see a specific example. The relevant ` main.rs ` looks as follows:
26
+
27
+ ``` rust
28
+ {{#include .. / .. / .. / uefi - std - example / src / main . rs}}
29
+ ```
You can’t perform that action at this time.
0 commit comments