This Month in Rust OSDev (November 2021)
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.
Project Updates
In this section, we give an overview of notable changes to the projects hosted under the rust-osdev
organization.
uefi-rs
The uefi
crate provides safe and performant wrappers for UEFI, the successor to the BIOS.
We merged the following PRs this month:
- loaded_image: document size argument unit
- Revert "Temporarily disable a false-positive clippy lint"
- Fix
locate_device_path
impl argument pointer - Change
Handle
representation to be non-nullable so thatOption<Handle>
is FFI-safe - Improve
Handle
buffer handling code - Add
CStr16::from_str_with_buf
- Update and reorganize documentation
- Add flag to
build.py
for disabling KVM
Thanks to @necauqua and @baloo for their contributions!
x86_64
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.
In November, @Freax13 joined our x86_64
maintenance team after doing a lot of great work on the crate. Welcome!
We merged the following non-breaking changes this month:
- Add
set_general_handler
macro - Add the VMM Communication Exception (
#VC
) to theInterruptDescriptorTable
- Derive common traits for number, range and enum types
- Remove redundant alignment check
- fix(idt): fix panic messages for index and
#VC
We also merged a number of breaking changes that will go into the upcoming 0.15 release:
- Implement
Index<u8>
for IDT instead ofIndex<usize>
- Fix memory safety of
load_tss
andGlobalDescriptorTable
- Change type of
InterruptStackFrameValue::cpu_flags
toRFlags
- Add
InvalidStarSegmentSelectors
error type - Add
PcidTooBig
error - Activate
feature(asm_const)
Thanks to @Freax13, @haraldh, and @mpajkowski for their contributions!
Call for Participation
Want to contribute to a Rust OSDev project, but don't know where to start? Pick up one of these outstanding issues in one of our projects and get started!
No tasks were proposed for this section.
If you maintain a Rust project related to operating system development and are looking for contributors, especially for tasks suited to people getting started in this space, please create a PR against the next
branch with the tasks you want to include in the next issue.
Personal Projects
In this section, we describe updates to personal 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.
metta-systems/vesper
(Section written by @berkus)
Vesper is a capability-based single-address-space nanokernel. This means it is aiming to be small, to provide only isolation primitives; at the same time SAS makes it a lot easier to perform cross-process operations (because all addresses are the same across all processes). It uses capabilities to provide security for such operations, so that unauthorized processes will not be able to intervene in legitimate traffic.
It's in very early stages of development and is a basis for a larger envisioned system. The progress is fairly slow, only allowed as my available time permits. This month to motivate me to move it faster I've decided to start posting monthly development updates. The first post is about the tools I use.
Since rebooting to Rust almost 4 years ago I've been constantly amazed by the language ecosystem and what wonders are possible. This time I want to tell about incredible tooling that makes my OSdev experience a sunny warm place in contrast to the barren lands of my previous OSdev environments. Read the full article here.
phil-opp/blog_os
(Section written by @phil-opp)
There were no visible changes to the Writing an OS in Rust series this month, but I continued working on the new build system for the upcoming third edition. One particular change that I want to highlight is that I redesigned the configuration of the bootloader
crate. Instead of passing it via a package.metadata.bootloader
section in the kernel's Cargo.toml
, users will pass a configuration struct to the entry_point
macro. This struct is then serialized at compile time into a separate section in the ELF executable, which the bootloader can then read on loading. This change should make the build process easier and more flexible.
I plan to simplify the build system further, but I'm currently waiting on some upcoming cargo
features for that. In particular, I think that artifact dependencies and per-packet configuration options will be very useful for the project, especially the config options I mentioned in my status update comment on GitHub.
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.