Crates.io | bootuefi |
lib.rs | bootuefi |
version | 0.1.1 |
source | src |
created_at | 2019-08-18 08:40:16.8238 |
updated_at | 2020-10-16 16:23:18.63194 |
description | A tool for running and testing Rust UEFI project. |
homepage | https://github.com/12101111/bootuefi |
repository | https://github.com/12101111/bootuefi |
max_upload_size | |
id | 157817 |
size | 32,288 |
This is a tool for running and testing Rust UEFI project.
BootUEFI is modified from bootimage
cargo install bootuefi
First you should install cargo-xbuild
.
Then set bootuefi
as a custom runner in .cargo/config
:
[build]
target = "x86_64-unknown-uefi"
[target.x86_64-unknown-uefi]
runner = "bootuefi"
You can run your rust UEFI application through cargo xrun
or test it throught cargo xtest
.
Configuration is done through a through a [package.metadata.bootuefi]
table in the Cargo.toml
of your project. The following options are available:
[package.metadata.bootuefi]
# The command to run qemu.
# Set this to an absolute path if your qemu is not in your PATH
qemu = "qemu-system-x86_64"
# The Path to UEFI firmware
bios = "OVMF.fd"
# Additional arguments passed to qemu for non-test executables
run-args = []
# Additional arguments passed to qemu for test executables
test-args = []
# Don't use default arguments for qemu
default-args = true
# An exit code that should be considered as success for test executables
test-success-exit-code = 0
# The timeout for running a test
test-timeout = 300
Default arguments for qemu:
// Disable default devices. QEMU by defaults enables a ton of devices which slow down boot.
"-nodefaults",
// Use a modern machine, with acceleration if possible.
"-machine", "q35,accel=kvm:tcg",
// A standard VGA card with Bochs VBE extensions.
"-vga", "std",
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.