File tree 1 file changed +7
-1
lines changed
src/doc/rustc/src/platform-support
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
265
265
#### os_str
266
266
- While the strings in UEFI should be valid UCS-2, in practice, many implementations just do not care and use UTF-16 strings.
267
267
- 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.
268
271
269
272
## 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 ` ):
271
274
272
275
This example can be compiled as binary crate via ` cargo ` using the toolchain
273
276
compiled from the above source (named custom):
@@ -286,6 +289,9 @@ use std::{
286
289
};
287
290
288
291
pub fn main() {
292
+ println!("Starting Rust Application...");
293
+
294
+ // Use System Table Directly
289
295
let st = env::system_table().as_ptr() as *mut efi::SystemTable;
290
296
let mut s: Vec<u16> = OsString::from("Hello World!\n").encode_wide().collect();
291
297
s.push(0);
You can’t perform that action at this time.
0 commit comments