microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
guest_test_uefi/src/main.rs
24lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | // UNSAFETY: lots of low-level direct access to hardware and usage of inherently |
| 5 | // unsafe UEFI APIs. |
| 6 | // |
| 7 | // On the bright side - this is entirely test code, and is not used anything |
| 8 | // near production! |
| 9 | #![allow(unsafe_code)] |
| 10 | #![doc = include_str!("../README.md")] |
| 11 | // HACK: workaround for building guest_test_uefi as part of the workspace in CI. |
| 12 | #![cfg_attr(all(not(test), target_os = "uefi"), no_main)] |
| 13 | #![cfg_attr(all(not(test), target_os = "uefi"), no_std)] |
| 14 | |
| 15 | // HACK: workaround for building guest_test_uefi as part of the workspace in CI |
| 16 | // |
| 17 | // Actual entrypoint is `uefi::uefi_main`, via the `#[entry]` macro |
| 18 | #[cfg(any(test, not(target_os = "uefi")))] |
| 19 | fn main() {} |
| 20 | |
| 21 | #[macro_use] |
| 22 | extern crate alloc; |
| 23 | |
| 24 | mod uefi; |
| 25 | |