File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/doc/rustc/src/platform-support Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -265,9 +265,12 @@ cargo build --target x86_64-unknown-uefi -Zbuild-std=std,panic_abort
265265#### os_str
266266- While the strings in UEFI should be valid UCS-2, in practice, many implementations just do not care and use UTF-16 strings.
267267- Thus, the current implementation supports full UTF-16 strings.
268+ #### stdio
269+ - Uses ` Simple Text Input Protocol ` and ` Simple Text Output Protocol ` .
270+ - Note: UEFI uses CRLF for new line. This means Enter key is registered as CR instead of LF.
268271
269272## Example: Hello World With std
270- The following code features a valid UEFI application, including stdio and ` alloc ` (` OsString ` and ` Vec ` ):
273+ The following code features a valid UEFI application, including ` stdio ` and ` alloc ` (` OsString ` and ` Vec ` ):
271274
272275This example can be compiled as binary crate via ` cargo ` using the toolchain
273276compiled from the above source (named custom):
@@ -286,6 +289,9 @@ use std::{
286289};
287290
288291pub fn main() {
292+ println!("Starting Rust Application...");
293+
294+ // Use System Table Directly
289295 let st = env::system_table().as_ptr() as *mut efi::SystemTable;
290296 let mut s: Vec<u16> = OsString::from("Hello World!\n").encode_wide().collect();
291297 s.push(0);
You can’t perform that action at this time.
0 commit comments