Back to home


Dysfunctional Programming

Towards Stable Rust UEFI Firmware

While Tianocore EDKII still dominates the UEFI development world, there has been continuous effort to enable Rust for firmware development. But so far the tools involved have not been stabilised. We now started an effort to remedy this and get stable Rust support for UEFI targets.

The rust compiler has gained support for multiple UEFI targets in the past, namely:

This allows building Rust UEFI Applications with a standard compiler by simply passing --target <arch>-unknown-uefi to cargo or rustc. Unfortunately, Tier-3 support means no compiler builds are distributed via the Rust release channels, nor does the Rust-CI guarantee the targets build successfully. Moreover, this implies that a nightly/unstable compiler is required to build for those targets, even though no nightly Rust Language features are required.

Raising support of these targets to Tier-2 will include automatic toolchain builds distributed via Rust release channels. Hence, no nightly/unstable compiler is required, anymore. Automatic CI builds will guarantee the targets build successfully and do not randomly break. This will greatly improve the trust in the platform and significantly enhance the developer experience.

Rust support for UEFI has been documented in the rustc-book section UEFI Platform Support. You can follow and support the Major Change Proposal (MCP) to raise support to Tier-2 on the Rust Compiler-Team Tracker.

Written by David Rheinsberg, on September 7, 2022.