|
| 1 | ++++ |
| 2 | +title = "This Month in Rust OSDev: July 2024" |
| 3 | +date = 2024-08-08 |
| 4 | + |
| 5 | +[extra] |
| 6 | +month = "July 2024" |
| 7 | +editors = ["phil-opp"] |
| 8 | ++++ |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +<!-- more --> |
| 13 | + |
| 14 | +This series is openly developed [on GitHub](https://github.com/rust-osdev/homepage/). 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](https://github.com/rust-osdev/homepage/issues/new) or using our <a href="#comment-form">_comment form_</a> at the bottom of this page. |
| 15 | + |
| 16 | +<!-- |
| 17 | + This is a draft for the upcoming "This Month in Rust OSDev (July 2024)" post. |
| 18 | + Feel free to create pull requests against the `next` branch to add your |
| 19 | + content here. |
| 20 | + Please take a look at the past posts on https://rust-osdev.com/ to see the |
| 21 | + general structure of these posts. |
| 22 | +--> |
| 23 | + |
| 24 | +## Announcements, News, and Blog Posts |
| 25 | + |
| 26 | +Here we collect news, blog posts, etc. related to OS development in Rust. |
| 27 | + |
| 28 | +- [simple-fatfs: A filesystem library aimed at embedded ecosystems](https://www.reddit.com/r/rust/comments/1ejukow/simplefatfs_a_filesystem_library_aimed_at/) |
| 29 | +- Redox OS: [Towards userspaceification of POSIX - part I: signal handling and IO](https://www.redox-os.org/news/kernel-11/) |
| 30 | +- [Jeremy Soller on OS Development, Legacy Code, Redox OS and the Future of Memory-Safe Languages (Podcast Interview)](https://corrode.dev/podcast/s02e07-system76/) |
| 31 | +- [Developing a cryptographically secure bootloader for RISC-V in Rust](https://www.codethink.co.uk/articles/2024/secure_bootloader/) |
| 32 | + |
| 33 | +<!-- |
| 34 | +Please follow this template: |
| 35 | +
|
| 36 | +- [Title](https://example.com) |
| 37 | + - (optional) Some additional context |
| 38 | +--> |
| 39 | + |
| 40 | + |
| 41 | +## Infrastructure and Tooling |
| 42 | + |
| 43 | +In this section, we collect recent updates to `rustc`, `cargo`, and other tooling that are relevant to Rust OS development. |
| 44 | + |
| 45 | +- [Stabilize unsafe extern blocks (RFC 3484)](https://github.com/rust-lang/rust/pull/127921) |
| 46 | +- [Stabilize `offset_of_nested`](https://github.com/rust-lang/rust/pull/128284) |
| 47 | +- [Add `#[must_use]` to some `into_raw*` functions](https://github.com/rust-lang/rust/pull/127586) |
| 48 | +- [treat `&raw (const|mut) UNSAFE_STATIC` implied deref as safe](https://github.com/rust-lang/rust/pull/125834) |
| 49 | +- [Add NuttX based targets for RISC-V and ARM](https://github.com/rust-lang/rust/pull/127755) |
| 50 | +- [`#[naked]`: report incompatible attributes](https://github.com/rust-lang/rust/pull/127853) |
| 51 | +- [Fill out target-spec metadata for all targets](https://github.com/rust-lang/rust/pull/127265) |
| 52 | + |
| 53 | +<!-- |
| 54 | + Please use the following template: |
| 55 | +
|
| 56 | +- [Title](https://example.com) |
| 57 | + - (optional) Some additional context |
| 58 | +--> |
| 59 | + |
| 60 | + |
| 61 | +## `rust-osdev` Projects |
| 62 | + |
| 63 | +In this section, we give an overview of notable changes to the projects hosted under the [`rust-osdev`](https://github.com/rust-osdev/about) organization. |
| 64 | + |
| 65 | + |
| 66 | +### [`virtio-spec-rs`](https://github.com/rust-osdev/virtio-spec-rs) (new project!) |
| 67 | +<span class="maintainers">Maintained by [@mkroening](https://github.com/mkroening)</span> |
| 68 | + |
| 69 | +The `virtio-spec` crate provides definitions from the Virtual I/O Device (VIRTIO) specification. |
| 70 | +This project aims to be unopinionated regarding actual VIRTIO drivers that are implemented on top of this crate. |
| 71 | + |
| 72 | +The origins of this crate are in [Hermit](https://github.com/hermit-os/kernel). |
| 73 | +Due to the need for correct foundational definitions from the Virtio spec that are easily reviewable and independent of the actual driver logic, this project was created from the ground up and without any intended bias towards Hermit. |
| 74 | + |
| 75 | +Currently, definitions are available for split and packed virtqueues, for Virtio over MMIO and Virtio over PCI, and for the network, socket and file system devices. |
| 76 | +Feature requests for additional devices are more than welcome! |
| 77 | + |
| 78 | + |
| 79 | +### [`fuse-abi`](https://github.com/rust-osdev/fuse-abi) (new project!) |
| 80 | +<span class="maintainers">Maintained by [@mkroening](https://github.com/mkroening)</span> |
| 81 | + |
| 82 | +The `fuse-abi` crate provides bindings to FUSE devices. |
| 83 | +In motivation similar to that of `virtio-spec`, this project aims to provide correct foundational definitions for the FUSE kernel ABI. |
| 84 | +It can even be used together with `virtio-spec` when creating a driver for the Virtio file system device. |
| 85 | + |
| 86 | +This crate essentially brings [`#include <linux/fuse.h>`](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/fuse.h?h=v6.9) to Rust. |
| 87 | +The code is autogenerated using [`bindgen`](https://github.com/rust-lang/rust-bindgen), ensuring the correctness of definitions. |
| 88 | + |
| 89 | +### [`uefi-rs`](https://github.com/rust-osdev/uefi-rs) |
| 90 | +<span class="maintainers">Maintained by [@GabrielMajeri](https://github.com/GabrielMajeri), [@nicholasbishop](https://github.com/nicholasbishop), and [@phip1611](https://github.com/phip1611)</span> |
| 91 | + |
| 92 | +The `uefi-rs` crate provides safe and performant wrappers for [UEFI](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface), the successor to the BIOS. We merged the following PRs this month: |
| 93 | + |
| 94 | +- [release: uefi-macros-0.14.0, uefi-raw-0.6.0, uefi-0.29.0](https://github.com/rust-osdev/uefi-rs/pull/1221) |
| 95 | +- [book: Publish the latest release instead of main](https://github.com/rust-osdev/uefi-rs/pull/1224) |
| 96 | +- [Add redirects for all the html files under HEAD](https://github.com/rust-osdev/uefi-rs/pull/1225) |
| 97 | +- [Drop SystemTable arg from uefi::helpers::init](https://github.com/rust-osdev/uefi-rs/pull/1226) |
| 98 | +- [uefi-macros: Allow zero-param function in the entry macro](https://github.com/rust-osdev/uefi-rs/pull/1227) |
| 99 | +- [uefi: Fix return value lifetime for register_protocol_notify](https://github.com/rust-osdev/uefi-rs/pull/1228) |
| 100 | +- [logger: Remove some unnecessary cfgs](https://github.com/rust-osdev/uefi-rs/pull/1235) |
| 101 | +- [fix(deps): update rust crate syn to v2.0.70](https://github.com/rust-osdev/uefi-rs/pull/1231) |
| 102 | +- [uefi: _print more failsafe](https://github.com/rust-osdev/uefi-rs/pull/1239) |
| 103 | +- [mem: introduce traits MemoryMap and MemoryMapMut](https://github.com/rust-osdev/uefi-rs/pull/1234) |
| 104 | +- [Add uefi::system module](https://github.com/rust-osdev/uefi-rs/pull/1237) |
| 105 | +- [Add PcrEvent::new_in_box/PcrEventInputs::new_in_box](https://github.com/rust-osdev/uefi-rs/pull/1246) |
| 106 | +- [Add uefi::runtime module](https://github.com/rust-osdev/uefi-rs/pull/1249) |
| 107 | +- [runtime: Add freestanding functions to get/set/delete UEFI variables](https://github.com/rust-osdev/uefi-rs/pull/1250) |
| 108 | +- [boot: Always impl Drop for MemoryMapBackingMemory](https://github.com/rust-osdev/uefi-rs/pull/1248) |
| 109 | +- [test-runner: Drop the memory map OOM loop](https://github.com/rust-osdev/uefi-rs/pull/1254) |
| 110 | +- [uefi-raw: Add more MemoryType constants](https://github.com/rust-osdev/uefi-rs/pull/1253) |
| 111 | +- [Add variable key functions to `uefi::runtime`](https://github.com/rust-osdev/uefi-rs/pull/1252) |
| 112 | +- [uefi: mem: mem.rs -> mem/mod.rs](https://github.com/rust-osdev/uefi-rs/pull/1251) |
| 113 | +- [runtime: Add query_variable_info](https://github.com/rust-osdev/uefi-rs/pull/1256) |
| 114 | +- [Fix CI for Rust 1.80](https://github.com/rust-osdev/uefi-rs/pull/1261) |
| 115 | +- [Add capsule update functions to `uefi::runtime`](https://github.com/rust-osdev/uefi-rs/pull/1259) |
| 116 | +- [Add uefi::boot module](https://github.com/rust-osdev/uefi-rs/pull/1255) |
| 117 | +- [runtime: Add uefi::runtime::reset](https://github.com/rust-osdev/uefi-rs/pull/1258) |
| 118 | +- [cleanup/follow-up: memory_map](https://github.com/rust-osdev/uefi-rs/pull/1240) |
| 119 | +- [Move the global image handle to uefi::boot](https://github.com/rust-osdev/uefi-rs/pull/1262) |
| 120 | +- [Add `boot::locate_handle_buffer`](https://github.com/rust-osdev/uefi-rs/pull/1269) |
| 121 | +- [boot: Add freestanding version of open_protocol](https://github.com/rust-osdev/uefi-rs/pull/1270) |
| 122 | +- [boot: Add freestanding version of open_protocol_exclusive](https://github.com/rust-osdev/uefi-rs/pull/1272) |
| 123 | +- [Finalize memory_map module refactoring](https://github.com/rust-osdev/uefi-rs/pull/1263) |
| 124 | +- [Add `boot::{load_image, unload_image, start_image}`](https://github.com/rust-osdev/uefi-rs/pull/1273) |
| 125 | +- [clippy: add use_self and const fn](https://github.com/rust-osdev/uefi-rs/pull/1271) |
| 126 | +- [clippy: streamline lints](https://github.com/rust-osdev/uefi-rs/pull/1274) |
| 127 | +- [ci: reorganize nightly CI jobs](https://github.com/rust-osdev/uefi-rs/pull/1275) |
| 128 | + |
| 129 | +<!-- - [fix(deps): update rust crate clap to v4.5.8](https://github.com/rust-osdev/uefi-rs/pull/1220) --> |
| 130 | +<!-- - [chore(deps): update rust crate log to v0.4.22](https://github.com/rust-osdev/uefi-rs/pull/1219) --> |
| 131 | +<!-- - [chore(deps): update crate-ci/typos action to v1.23.1](https://github.com/rust-osdev/uefi-rs/pull/1232) --> |
| 132 | +<!-- - [chore(deps): lock file maintenance](https://github.com/rust-osdev/uefi-rs/pull/1233) --> |
| 133 | +<!-- - [chore(deps): update crate-ci/typos action to v1.23.2](https://github.com/rust-osdev/uefi-rs/pull/1242) --> |
| 134 | +<!-- - [chore(deps): lock file maintenance](https://github.com/rust-osdev/uefi-rs/pull/1245) --> |
| 135 | +<!-- - [chore(deps): lock file maintenance](https://github.com/rust-osdev/uefi-rs/pull/1257) --> |
| 136 | +<!-- - [chore(deps): update crate-ci/typos action to v1.23.5](https://github.com/rust-osdev/uefi-rs/pull/1265) --> |
| 137 | +<!-- - [chore(deps): lock file maintenance](https://github.com/rust-osdev/uefi-rs/pull/1267) --> |
| 138 | +<!-- - [fix(deps): update rust crate heck to 0.5.0](https://github.com/rust-osdev/uefi-rs/pull/1268) --> |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | +### [`acpi`](https://github.com/rust-osdev/acpi) |
| 143 | +<span class="maintainers">Maintained by [@IsaacWoods](https://github.com/IsaacWoods)</span> |
| 144 | + |
| 145 | +The `acpi` repository contains crates for parsing the ACPI tables – data structures that the firmware of modern computers use to relay information about the hardware to the OS. We merged the following changes this month: |
| 146 | + |
| 147 | +- [acpi: add support for SPCR table](https://github.com/rust-osdev/acpi/pull/216) |
| 148 | + |
| 149 | +Thanks to [@00xc](https://github.com/00xc) for their contributions! |
| 150 | + |
| 151 | + |
| 152 | +### [`uart_16550`](https://github.com/rust-osdev/uart_16550) |
| 153 | +<span class="maintainers">Maintained by [@phil-opp](https://github.com/phil-opp)</span> |
| 154 | + |
| 155 | +The `uart_16550` crate provides basic support for serial port I/O for 16550-compatible UARTs. We merged the following change this month: |
| 156 | + |
| 157 | +- [build(deps): update bitflags dependency to version 2](https://github.com/rust-osdev/uart_16550/pull/33) |
| 158 | +- [feat: add `try_send_raw` and `try_receive`](https://github.com/rust-osdev/uart_16550/pull/34) |
| 159 | + |
| 160 | +Thanks to [@mkroening](https://github.com/mkroening) for their contributions! |
| 161 | + |
| 162 | + |
| 163 | +### [`endian-num`](https://github.com/rust-osdev/endian-num) |
| 164 | +<span class="maintainers">Maintained by [@mkroening](https://github.com/mkroening)</span> |
| 165 | + |
| 166 | +The `endian-num` crate provides the `Be` (big-endian) and `Le` (little-endian) byte-order-aware numeric types. |
| 167 | + |
| 168 | +- [test: fix doctests for 32-bit and 16-bit pointer widths](https://github.com/rust-osdev/endian-num/pull/4) |
| 169 | +- [chore: remove appendix from LICENSE-APACHE](https://github.com/rust-osdev/endian-num/pull/5) |
| 170 | + |
| 171 | + |
| 172 | +### [`bootloader`](https://github.com/rust-osdev/bootloader) |
| 173 | +<span class="maintainers">Maintained by [@phil-opp](https://github.com/phil-opp) and [@Freax13](https://github.com/orgs/rust-osdev/people/Freax13)</span> |
| 174 | + |
| 175 | +The `bootloader` crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. This month, we merged the following improvements: |
| 176 | + |
| 177 | +- [always cover at least the first 4 GiB of physical memory](https://github.com/rust-osdev/bootloader/pull/448) |
| 178 | + |
| 179 | + |
| 180 | +### [`x86_64`](https://github.com/rust-osdev/x86_64) |
| 181 | +<span class="maintainers">Maintained by [@phil-opp](https://github.com/phil-opp), [@josephlr](https://github.com/orgs/rust-osdev/people/josephlr), and [@Freax13](https://github.com/orgs/rust-osdev/people/Freax13)</span> |
| 182 | + |
| 183 | +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. |
| 184 | + |
| 185 | +We merged the following PR this month: |
| 186 | + |
| 187 | +- [Ensure that Page actually implements Hash](https://github.com/rust-osdev/x86_64/pull/490) |
| 188 | +- [don't use label starting with `1`](https://github.com/rust-osdev/x86_64/pull/492) |
| 189 | +- [Add size and len for PageRange, PhysFrameRange, PageRangeInclusive and PhysFrameRangeInclusive](https://github.com/rust-osdev/x86_64/pull/491) |
| 190 | +- [fix testing](https://github.com/rust-osdev/x86_64/pull/495) |
| 191 | + |
| 192 | +Thanks to [@Wasabi375](https://github.com/Wasabi375) for their contribution! |
| 193 | + |
| 194 | + |
| 195 | +<!-- |
| 196 | + Please use the following template: |
| 197 | +
|
| 198 | + ### [`repo_name`](https://github.com/rust-osdev/repo_name) |
| 199 | + <span class="maintainers">Maintained by [@maintainer_1](https://github.com/maintainer_1)</span> |
| 200 | +
|
| 201 | + The `repo_name` crate ...<<short introduction>>... |
| 202 | +
|
| 203 | + We merged the following changes this month: |
| 204 | + <<changelog, either in list or text form>> |
| 205 | +--> |
| 206 | + |
| 207 | + |
| 208 | +## Other Projects |
| 209 | + |
| 210 | +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](https://github.com/rust-osdev/homepage/pulls) with the updates of your OS project for the next post. |
| 211 | + |
| 212 | +<!-- |
| 213 | + Please use the following template: |
| 214 | +
|
| 215 | + ### [`owner_name/repo_name`](https://github.com/rust-osdev/owner_name/repo_name) |
| 216 | + <span class="maintainers">(Section written by [@your_github_name](https://github.com/your_github_name))</span> |
| 217 | +
|
| 218 | + ...<<your project updates>>... |
| 219 | +--> |
| 220 | + |
| 221 | +### [`phip1611/bit_ops`](https://github.com/phip1611/bit_ops) |
| 222 | +<span class="maintainers">(Section written by [@phip1611](https://github.com/phip1611))</span> |
| 223 | + |
| 224 | +I've recently created and published [`bit_ops`](https://github.com/phip1611/bit_ops). |
| 225 | +It offers common bit-oriented operations on primitive integer types with a focus on |
| 226 | +`no_std` and `const` compatibility. Unlike other crates that provide tooling to |
| 227 | +create sophisticated high-level types with bitfields, the focus of `bit_ops` is |
| 228 | +on raw primitive integer types. |
| 229 | + |
| 230 | + |
| 231 | +## Join Us? |
| 232 | + |
| 233 | +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](https://rust-osdev.zulipchat.com). |
0 commit comments