This Month in Rust OSDev: July 2023
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.
- Mutex without lock, Queue without push: cancel safety in lilos
- Kani 0.32.0 has been released! (verification tool for unsafe code blocks)
- bwrap: A fast, lightweight, embedded environment-friendly Rust library for wrapping text
- ESP32 Standard Library Embedded Rust
allocator_api2
crate to use Rust's nightly allocator API on stable Rust
Infrastructure and Tooling
In this section, we collect recent updates to rustc
, cargo
, and other tooling that are relevant to Rust OS development.
- Enable
chkstk
/alloca
intrinsics onx86_64-unknown-uefi
- Add
riscv64gc-unknown-hermit
target - Add
x86_64-unikraft-linux-musl
target - Optimize
AtomicBool
for target that don't support byte-sized atomics
rust-osdev
Projects
In this section, we give an overview of notable changes to the projects hosted under the rust-osdev
organization.
multiboot2
Maintained by @phip1611
The multiboot2 was bumped from 0.16.0
to 0.17.0
. The new release includes the builder pattern for the MBI builder
and the ability to use custom memory types in the memory map in addition to
pre-defined ones. For more info, look here.
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:
- Cargo.lock: Update proc-macro2 to fix nightly CI
- Return a SimpleFileSystem from BootServices::get_image_file_system
- uefi-raw: Derive Ord, PartialOrd, and Hash for all newtype enums
- Add
GraphicsOutputProtocol
touefi_raw
and use it fromuefi
- uefi: Use uefi_raw's SimplePointerProtocol to implement Pointer
- build(deps): bump regex from 1.8.1 to 1.9.0
- Fix target_arch name: i386 -> x86
- Add some uefi-raw links/badges
- Fix a new lint in 1.71
- Add raw serial protocol and use it in
uefi
- Add raw disk protocols and use them in
uefi
- uefi: Change try_exists to return FileSystemResult
- dependabot: Enable updates for Github Actions
- Rework
FileSystem::copy
to operate on 1MiB chunks - build(deps): bump crate-ci/typos from 1.13.20 to 1.16.1
- ci: Add merge_group trigger
- build(deps): bump cachix/install-nix-action from 20 to 22
- add event to smp
Thanks to @devsnek for their contribution!
xhci
Maintained by @toku-sa-n
The xhci
crate provides types of xHCI structures, such as Registers and TRBs. We merged the following PRs this month:
- Switch Clippy runner on CI
- Fix wrong calculation of data_buffer_pointer of transfer::Normal
- Release 0.9.2
Thanks to @lemolatoon for their contribution!
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:
Thanks to @SamZhang3 for their contribution!
bootloader
Maintained by @phil-opp
The bootloader
crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. This month, we released a new patch version to fix the build on the latest nightlies:
ovmf-prebuilt
Maintained by @phil-opp
The ovmf-prebuilt
project provides pre-built edk2 releases to make it easier to set up OVMF. We merged the following improvement this month:
Thanks to @nicholasbishop for their contribution!
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.
SFBdragon/talc
(Section written by @SFBdragon)
Talc
is a recently published, fast, and flexible no-std
memory allocator.
- It's the fastest allocator I've tested as of yet (galloc falls short, buddy_alloc is close but lacks heap efficiency).
- It features a OOM-handling component with dynamic arena resizing.
By the time you're seeing this, hopefully v2 should be out or coming soon:
- The OOM handler system has been made more powerful.
lock_api
is used to allow for custom allocator synchronization.- The internals and API has been improved to pass miri's stacked borrows validation.
- You can now move the allocator struct around freely.
- And more :3
I hope you find it useful!
vinc/moros
(Section written by @vinc)
MOROS is a text-based hobby operating system targeting computers with a x86-64 architecture and a BIOS.
Since last month's release, I focused on adding new syscalls to interact with network sockets from userspace. The DNS and HTTP clients are now using the new UDP and TCP sockets.
I also added another syscall to poll multiple handles at the same time, to read from the console and a socket, improving the main network tool that can now be used as a simple chat program.
The VGA driver, the filesystem, and the editor got a few significant improvements as well, to support downloading and reading larger files.
valibali/cluu
(Section written by @phil-opp)
There is a new project featured in our Showcase series:
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.