Having these functions is very helpful if one installs multiple protocol interfaces in a driver at once. The caveat is unfortunately that Rust handling of varargs isn't very convenient. I also didn't come up with a working + nice way using normal macros to workaround. Instead, I looked into the implementation in edk2 [0]. The logic is fairly simple and can be emulated on a higher-level by us. [0] https://github.com/tianocore/edk2/blob/66346d5edeac2a00d3cf2f2f3b5f66d423c07b3e/MdeModulePkg/Core/Dxe/Hand/Handle.c#L630
uefi
Rusty wrapper for the Unified Extensible Firmware Interface.
This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality.
Value-add and Use Cases
uefi supports writing code for both pre- and post-exit boot services
epochs, but its true strength shines when you create UEFI images that heavily
interact with UEFI boot services. Still, you have the flexibility to just
integrate selected types and abstractions into your project, for example to
parse the UEFI memory map.
Note that for producing UEFI images, you also need to use a corresponding
uefi compiler target of Rust, such as x86_64-unknown-uefi.
API and User Documentation
Please refer to docs.rs for comprehensive documentation
of the latest stable release. The latest not necessarily yet published
documentation can be found in src/lib.rs, which can also be
locally viewed by running $ cargo xtask doc --open.
For an introduction to the uefi-rs project and this repository, please refer
to our main README.