The r-efi project provides the protocol constants and definitions of the UEFI Reference Specification as native rust code. The scope of this project is limited to those protocol definitions. The protocols are not actually implemented. As such, this project serves as base for any UEFI application that needs to interact with UEFI, or implement (parts of) the UEFI specification.
Early code: print!(b”Hello, world!\n“); level
nuefil is yet another Rust UEFI libraray.
It is based on the UEFI libaray of Redox.
This repository contains the source code for:
* efivar – A Rust crate to read and write EFI variables
* efiboot – A command-line tool to manage the UEFI boot manager
A library to parse ACPI tables and AML, written in Rust. Designed to be easy to use from inside a kernel written in Rust, and fully tested. Acpi is currently very early in development, will be highly unstable and is next to useless for actually parsing ACPI or AML.
Nikolaj is learning Rust. He just rewrote one C tool to Rust:
Note that ‘firmware’ does not appear to be in scope of this book, which is sad. In the current Rust future, we’ll still have to use C for firmware, then Rust for the OS-level embedded code.
efi_app: A sample UEFI application written in Rust.
Ergonomic Rust bindings to the UEFI environment for writing UEFI applications.
This library allows you to write UEFI applications in Rust.
UEFI is the successor to the BIOS. It provides an early boot environment for OS loaders and other low-level applications.
The objective of this library is to provide safe and performant wrappers for UEFI interfaces, and allow developers to write idiomatic Rust code.
SnowFlake is a new OS written in Rust.
Boot2Snow is based on System76’s firmware-update.
This library allows you to write UEFI applications in Rust. UEFI is the successor to the BIOS. It provides an early boot environment for OS loaders and other low-level applications. The objective of this library is to provide safe and performant wrappers for UEFI interfaces, and allow developers to write idiomatic Rust code. This crate’s documentation is fairly minimal, and you are encouraged to refer to the UEFI specification for detailed information. You can find some example code in the tests directory, as well as use the build.py script to generate the documentation. This repo also contains a x86_64-uefi.json file, which is a custom Rust target for 64-bit UEFI applications.[…]
Gabriel Majeri has created “biors”, a BIOS implementation written in Rust! It is only a few days old, does not appear to be ready for use yet.
biors – The Basic Input / Output Rust System
This repository contains an x86 platform firmware implementation – more commonly known as a BIOS. It is written in Rust, and is designed for modern x86_64 processors. Similarly to CoreBoot, it is designed to deliver a “payload” – this could be a PC-AT compatible BIOS, or a UEFI implementation. BIOS is pronounced “BY-oss”, this project is pronounced “BY-orss”.[…]
PS: Gabriel has also written C++ bindings for UEFI! 😉
First there was a C vesion for CHIP8:
Now where is a Rust version, for CHIP16:
CHIP16 emulator for UEFI environment
Ian Santopietro of System76 has a Python-based tool called kernelstub, which boots Linux using the Linux Stub bootloader instead of an external bootloader.
Kernelstub is a basic program enabling booting from the kernel’s built-in EFI Stub bootloader. It keeps the ESP and NVRAM up to date automatically when the kernel updates and allows for modifying and setting the boot parameters/kernel options stored in NVRAM. Kernelstub is a basic program enabling booting from the kernel’s built-in EFI Stub bootloader. It keeps the ESP and NVRAM up to date automatically when the kernel updates and allows for modifying and setting the boot parameters/kernel options stored in NVRAM. It works by detecting certain information about the running OS, kernel, storage devices, and options, then combines all of that together into a unified entity, then calls efibootmgr to register the kernel with the NVRAM. It also copies the latest kernel, initrd.img to the EFI System Partition so that UEFI can find it. It will also store a copy of the kernel’s command line (/proc/cmdline) on the ESP in case of necessary recovery from an EFI shell.
He just gave a talk/demo of it at SeaGL:
His presentation mentioned this blog in the ‘more info’ slide! 🙂
Rust UEFI crate (64-bit only) for bootloaders and operating systems.
This crate is for supporting UEFI applications such as bootloaders and operating systems.
THIS IS EARLY DAYS, and in particular I have not tested or otherwise used this crate yet myself!