This Month in Rust OSDev (January 2022)
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.
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 January, we merged the following pull requests:
Thanks to @jarkkojs for their contribution!
bootloader crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables.
This month, we merged the following changes:
- Remove feature flag for
- Add support for position independent executables
- Logger: nicer font rendering into framebuffer
- Add small doc-comment to
uefi crate provides safe and performant wrappers for UEFI, the successor to the BIOS.
We merged the following changes in January:
- Release version 0.14.0
- System Table and Handle: From-implementation to create objects from raw pointers
- Replace build.py with the xtask pattern
- Fix logs cut off after screenshot test
- uefi-macros: fix new clippy lint
Thanks to @phip1611 for their contribution!
multiboot2 crate provides abstraction types for the boot information of multiboot2 bootloaders.
The latest release of the
multiboot2-crate is now
v0.12.2). It contains minor improvements,
such as new getters that were originally missing.
The combined diff of all changes can be found here.
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.
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.
(Section written by @ColinFinck)
Colin Finck released an initial version of his ntfs crate this month, a Rust library to access Microsoft's proprietary NTFS filesystem.
For those of you who are not running Windows: NTFS is the primary filesystem in Windows, from Windows NT's release in 1993 up to the current Windows 11. Unlike FAT32, NTFS has no practical limits for file and partition sizes, comes with B-Tree Indexes for faster lookups, and adds a few resilience and efficiency features (such as journaling, compression, and sparse files).
The ntfs crate supports Rust's no_std environment and is therefore not tied to a specific platform API. It aims to be embeddable in firmware-level code and kernels just as well as in user-mode applications.
Colin Finck will talk about NTFS and his adventures in writing a filesystem crate in Rust on the upcoming FOSDEM conference. The talk is on Saturday, 5 February at 17:00 (CET, UTC+1). The conference is virtual and admission is free.
(Section written by @phip1611)
Philipp Schuster released an initial version of his noto-sans-mono-bitmap crate this month. It provides a pre-rasterized bitmap font from Noto Sans Mono, an open font from Google. The crate is a replacement for legacy bitmap fonts, such as the font8x8 crate. It is suitable for printing high quality/nice looking text to a framebuffer in bootloaders, kernels and similar environments where you don't want or can't use the FPU.
To avoid CPU intensive soft float workloads, the crate contains pre-rendered symbols from the Noto Sans Mono font in different sizes and font weights (light, regular, bold) as Rust constants paired with a convenient getter function.
The screenshot above shows text that is rendered into an UEFI framebuffer using the bitmap font
An example of usage can be found in PR#213 of the
rust-osdev/bootloader crate, where this crate was merged and replaced
(Section written by @phil-opp)
This month, we merged three small improvements for the Writing an OS in Rust blog:
Thanks to @TisnKu for their contribution!
I have also brought the
edition-3 branch up to date again. I marked all the stub posts of the upcoming third edition as drafts, which should allow us to merge the unfinished branch now and then prepare the new edition directly in the
main branch (without publishing them yet). This way, we can avoid that the branches diverge too much.
Regarding the state of the new edition: I'm planning to release an extra post about UEFI booting first because that article is almost ready. For the main posts of the edition, I'm still waiting for a few cargo features, namely artifact dependencies, a package/target-specific way to enable the unstable
build-std feature, and fixes for the experimental
package.forced-target manifest key. I also intend to have the new version of the
bootloader crate ready soon, which should make the build and test process simpler and more robust.
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.