This Month in Rust OSDev: June 2024
Welcome to a new issue of "This Month in Rust OSDev". In these posts, we give a regular overview of notable changes in the Rust operating system development ecosystem.
This series is openly developed on GitHub. Feel free to open pull requests there with content you would like to see in the next issue. If you find some issues on this page, please report them by creating an issue or using our comment form at the bottom of this page.
Announcements, News, and Blog Posts
Here we collect news, blog posts, etc. related to OS development in Rust.
- Redox OS - Software Showcase #1
- This is our first showcase video, showing several programs running on Redox OS
- This Month in Redox - June 2024
- k23 - Experimental WASM Microkernel
- First announced at RustNL 2024, k23 is an experimental microkernel written in Rust that runs WebAssembly programs. Now Open Source!
Infrastructure and Tooling
In this section, we collect recent updates to rustc
, cargo
, and other tooling that are relevant to Rust OS development.
- Split core's PanicInfo and std's PanicInfo
- Stabilize
PanicInfo::message()
andPanicMessage
- Unsafe extern blocks
- Size optimize int formatting
- Add
f16
inline ASM support for RISC-V
rust-osdev
Projects
In this section, we give an overview of notable changes to the projects hosted under the rust-osdev
organization.
uefi-rs
Maintained by @GabrielMajeri, @nicholasbishop, and @phip1611
The uefi-rs
crate provides safe and performant wrappers for UEFI, the successor to the BIOS. We merged the following PRs this month:
- uefi: Stop enabling
error_in_core
feature - reorganize deps
- uefi: Add TryFrom u8 slice to DevicePathHeader
- test-runner: Consistently use global image handle
- uefi: Add TryFrom u8 slice to DevicePathNode
- Clean up duplicate global system table pointer in
uefi::helpers
- uefi: make DevicePathHeader::try_from idiomatic
- uefi: Add TryFrom u8 slice to DevicePath
- uefi: re-export CapsuleFlags
- ci: Temporarily turn off warnings-as-errors for nightly CI jobs
- uefi: use UNSPECIFIED_TIMEZONE instead of magic number
- uefi: Make TimeError more descriptive
- Fix versions
- uefi-test-runner: speed up ploting of sierpinski triangle by updating changed pixel only
- memory map: improvements to fight pitfalls (MemoryMap now owns the memory)
- uefi: simplify usage of Mode
- template: fix build failure
- uefi: Add TryFrom<&[u8]> for Time
Thanks to @LightAndLight, @andre-braga, and @JeffLi01 for their contributions!
bootloader
Maintained by @phil-opp and @Freax13
The bootloader
crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. This month, we merged the following improvements:
Thanks to @Wasabi375 for their contributions!
pci_types
Maintained by @IsaacWoods
The pci_types
library provides types for accessing and configuring PCI devices from Rust operating systems. We merged the following change this month:
- feat: accept
FnOnce
for updating commands - ci: add workflow
- feat: don't truncate reserved bits in
CommandRegister
- fix(breaking): clippy lints
- style: update
rustfmt.toml
- feat: derive additional traits for
CommandRegister
- feat: add
EndpointHeader::update_interrupt
- feat: don't take explicit references to
ConfigRegionAccess
- feat: implement
Copy
for all types that already implementClone
- fix: don't take explicit reference in
update_interrupt
- Add method to get the address of any capability
- Fix docs rendering for MsixCapability::set_enabled
- feat: make
update_command
take&mut self
- Add method to enable/disable function masking for MSI-X
- Add unwrap_io and unwrap_mem convenience methods on Bar
- Remove the function_exists method of ConfigRegionAccess
- Support 64-bit addressing in MSI capabilities and improve uniformity with rest of library
Thanks to @IsaacWoods, @bjorn3, and @mkroening for their contributions!
x86_64
Maintained by @phil-opp, @josephlr, and @Freax13
The x86_64
crate provides various abstractions for x86_64
systems, including wrappers for CPU instructions, access to processor-specific registers, and abstraction types for architecture-specific structures such as page tables and descriptor tables.
We merged the following PR this month:
volatile
Maintained by @phil-opp
The volatile
crate provides a safe wrapper type for implementing volatile read and write operations. This is useful for accessing memory regions that have side-effects, such as memory-mapped hardware registers.
We merged the following PR this month:
Other Projects
In this section, we describe updates to Rust OS projects that are not directly related to the rust-osdev
organization. Feel free to create a pull request with the updates of your OS project for the next post.
nicholasbishop/ext4-view-rs
(Section written by @nicholasbishop)
I've released a new Rust crate for reading ext4 filesystems. It's easy to use, with an API very similar to std::fs
. The crate is no-std compatible, but does require an allocator.
Note that by design this crate will remain read-only; writing to an ext4 filesystem is not a goal.
Thanks to @tedbrandston for doing a ton of code review on this project!
Join Us?
Are you interested in Rust-based operating system development? Our rust-osdev
organization is always open to new members and new projects. Just let us know if you want to join! A good way for getting in touch is our Zulip chat.