This Month in Rust OSDev (October 2020)
Welcome to a new issue of "This Month in Rust OSDev". In these posts, we will 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.
In this section, we give an overview of notable changes to the projects hosted under 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 October, we merged following changes:
- Provide functions for accessing the underlying L4 table for mapper types
GlobalDescriptorTable::add_entrya const fn
- Update docs to suggest
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 or framebuffers.
In October, we published a new version to fix the crate's
unstable feature on newer Rust nightlies:
Thanks to @vetio for this contribution!
bootloader crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. This month, we published versions
0.9.11 to fix build errors on the latest nightlies, caused by the new feature gate names for some
const fn features.
We we didn't merge any changes to the
master branch this month, we made more progress on the rewrite that adds UEFI support: There is now a draft pull request that tracks the remaining issues.
uefi crate provides safe and performant wrappers for UEFI, the successor to the BIOS. In October, we merged the following changes:
Thanks to @Swampman08 for their contribution!
pci_types library provides types for accessing and configuring PCI devices from Rust operating systems. Lots of this code (e.g. identifying devices by class codes) can be shared
between projects, and would benefit from community contributions.
This month, we published version
0.2.0 with the following changes:
- Untie accessor from the actual PciHeader type
- Split out endpoint header to separate struct
- Provide method for accessing BARs on endpoint headers
cargo-xbuild project provides
cargo command wrappers to cross-compile the sysroot crates
alloc. This month, we merged the following changes:
build-std-featuresflag for Cargo's
- Upgrade the crate to edition 2018 (published as
Even though we still maintain the
cargo-xbuild crate, we recommend switching to cargo's own
build-std feature that is always up-to-date with the latest Rust/Cargo changes. We wrote a short guide on how to switch to it, which is available in our Readme.
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.
(Section written by @andre-richter)
It introduces a first set of changes which are eventually needed for separating
user address spaces:
- The memory mapping strategy gets more sophisticated and no longer
identity mapsthe whole of the board's address space.
- Instead, only ranges that are actually needed are mapped:
identity mappedfor now.
MMIO regionsare remapped lazily to a special virtual address region at the top of the virtual address space during the device driver's
(Section written by @phil-opp)
This month, the Writing an OS in Rust series received the following updates:
- Remove rlibc and use compiler-builtins-mem feature
- Translate post 02 to Japanese
- The translated post is now published.
- Add Right-to-Left support for template in preparation for a Persian translation
See the merged pull request list for the complete set of changes this month. Thanks a lot to all contributors!
In case you speak Persian: There is currently an open pull request to add a Persian translation of
Bare Bones chapter that needs reviews. Thanks to everyone involved!
In in our previous status update I described my plans to rewrite the blog on top of the upcoming UEFI bootloader. In the past month I started rewriting the Minimal Rust Kernel post for this. Unfortunately, I'm still facing build-related issues because of limitations of Cargo's config files. To resolve these (and other)
.cargo/config issues, I created a proposal on the Rust internals forum to make some
.cargo/config options available in
Cargo.toml too. Feel free to join the discussion if it's relevant to you!
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 gitter channel.