This Month in Rust OSDev: October 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.
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
- Change
Event
to be FFI-safe usingNonNull
- Add
guid!
macro - Add Guid methods to convert to/from byte arrays
- Fixes and improvements for
Revision
- Replace
UnalignedCStr16
withUnalignedSlice
- Add new
DeviceSubType
values - Fix clippy warnings
- uefi-services: Change panic handler log message.
Thanks to @timrobertsdev and @raccog for their contributions!
linked-list-allocator
Maintained by @phil-opp and @jamesmunns
- Consider regions that lead to very small back paddings as unsuitable
- Fixes a potential memory leak that was introduced with
v0.10
.
- Fixes a potential memory leak that was introduced with
- Add a random action fuzzer
- Runs randomized tests against the
allocate_first_fit
,deallocate
, andextend
methods - This is the fuzzer that was used to discover the possible out-of-bounds writes in versions
<=0.10.1
- Runs randomized tests against the
- Run new cargo-fuzz job on CI with time limit
- Fuzzes each commit and PR for 5 minutes as a guard against regressions
- The CI job is also run on schedule every day to test against the latest Rust nightly and to increase the chance of finding improbably bugs over time.
Thanks to @evanrichter for their contribution!
bootloader
Maintained by @phil-opp, @rybot666, and @64
We merged the following changes this month:
- Update
noto-sans-mono-bitmap
tov0.2.0
- now supports more unicode ranges, including the fallback character
�
- code ranges are optional via cargo features to minimize binary size
- now supports more unicode ranges, including the fallback character
- implement read-only relocations
- implements
GNU_RELRO
program header handling to make relocations read-only
- implements
- allow booting without a UEFI graphics output
- don't error if no UEFI framebuffer is detected
- this was merged into the
next
branch for the upcomingv0.11
release
Thanks to @phip1611, and @Freax13 for their contributions!
acpi
Maintained by @IsaacWoods
This month, we began work to remove acpi
's dependence on the alloc
crate for allocations, instead directly
using the core::alloc::Allocator
API. This
improves support for bootloaders and kernels that want to treat memory allocation as fallible, allowing them to
more gracefully recover from out-of-memory situations. In the future, we hope that this support will be brought
into alloc
, so that the library can return to using the standard containers.
These changes are not yet finished or released, but a new major version will likely be out in December with these
changes, as well as better support for PCI topologies with multiple segment groups, and a few other changes. If
you'd like to make use of these new features as they're developed, they're already in main
, so you can use a Git
dependency.
Thanks to @semiviral, and @mattfbacon for their contributions!
Call for Participation
Want to contribute to a Rust OSDev project, but don't know where to start? Help with one of these outstanding issues!
No tasks were proposed for this section this month.
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.
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.
d-sonuga/blog-blasterball
(Section written by @d-sonuga)
Demilade Sonuga's Blog is a new blog on writing a simple blasterball game with no OS, no engine and minimal external crates. The blog's aim is to take a Rust beginner from starting the project to finishing it and understanding everything involved in the project's creation.
The project is still in it's early stages, so lots of feedback is very much needed.
If you're interested, please take a look, and send your thoughts to @d_sonuga on Twitter.
Talk on Windows Linked Lists in safe and idiomatic Rust
(Section written by @ColinFinck)
At the first ever EuroRust conference from 13th to 14th October, Colin Finck gave a talk about the challenges of developing his nt-list
crate.
The crate provides a safe and idiomatic Rust wrapper around the Windows variant of Linked Lists.
It was presented on this blog in July.
A recording of the talk has just been uploaded. Check it out, and also check out the other videos from that conference for some great takes on Rust!
MaderNoob/galloc
(Section written by @phil-opp)
The new good_memory_allocator
crate implements a no_std
-compatible linked list allocator, inspired by the dlmalloc
algorithm. It stores an additional usize
of metadata per allocation, which decreases memory efficiency, but increased runtime efficiency. The README
includes promising benchmark results that compare the crate against the linked-list-allocator
and simple-chunk-allocator
crates.
phil-opp/blog_os
(Section written by @phil-opp)
We merged the following changes to the Writing an OS in Rust blog this month:
- Korean translation of Testing post
- Read it at https://os.phil-opp.com/ko/testing/
- Thanks to @JOE1994 for creating the translation and to @SNOOPYOF and @dalinaum for reviewing!
- Korean translation of CPU Exceptions post
- Read it at https://os.phil-opp.com/ko/cpu-exceptions/
- Thanks to @JOE1994 for creating the translation and to @KimWang906 for reviewing!
- French translation of A Minimal Rust Kernel post
- Read it at https://os.phil-opp.com/fr/minimal-rust-kernel/
- Thanks to @TheMimiCodes and @maximevaillancourt for creating the translation and to @alaincao for reviewing (and for fixing links)!
- Update zola to v0.16.1
- Fixes bad URL from
post-09
address calculation section (thanks to @seewishnew) - Remove warning output from QEMU command (thanks to @lovemeforareason)
Other News
- Rust UEFI Firmware Targets Promoted To Tier-2 Status
- Microsoft seems to ship Rust code in Windows Font Parsing (dwrite)
- Announcement of COSMIC Text, a pure Rust library for font shaping, layout, and rendering
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.