Example Rust project for building UEFI applications.
- rustup
- Rust source (
rustup add component rust-src --toolchain nightly
) - Xargo (install or update with
cargo install -f xargo
)
set "RUST_TARGET_PATH=%cd%" && xargo build --release --target uefi-app-x64
RUST_TARGET_PATH=$PWD xargo build --release --target uefi-app-x64
- Create a new VM of type
Other/Unknown (64-bit)
, using the existing blank hard disk provided — or create a new virtual hard disk and format it as GPT. - Open the settings for the VM, go to System > Motherboard and enable EFI.
- Mount the VHD.
- Copy
target/uefi-app-x64/release/uefi-app-x64.efi
to the root of the VHD. - Unmount the VHD.
- Boot the VM, type
fs0:\uefi-app-x64.efi
at the prompt and press enter to run the app.