|
| 1 | ++++ |
| 2 | +title = "This Month in Rust OSDev: February 2022" |
| 3 | +date = 2022-03-06 |
| 4 | + |
| 5 | +[extra] |
| 6 | +month = "February 2022" |
| 7 | +authors = [ |
| 8 | + "phil-opp", |
| 9 | + "GabrielMajeri", |
| 10 | + # add yourself here |
| 11 | +] |
| 12 | ++++ |
| 13 | + |
| 14 | +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. |
| 15 | + |
| 16 | +<!-- more --> |
| 17 | + |
| 18 | +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 [_comment form_](#comment-form) at the bottom of this page. |
| 19 | + |
| 20 | +<!-- |
| 21 | + This is a draft for the upcoming "This Month in Rust OSDev (February 2022)" post. |
| 22 | + Feel free to create pull requests against the `next` branch to add your |
| 23 | + content here. |
| 24 | + Please take a look at the past posts on https://rust-osdev.com/ to see the |
| 25 | + general structure of these posts. |
| 26 | +--> |
| 27 | + |
| 28 | +## Project Updates |
| 29 | + |
| 30 | +In this section, we give an overview of notable changes to the projects hosted under the [`rust-osdev`] organization. |
| 31 | + |
| 32 | +[`rust-osdev`]: https://github.com/rust-osdev/about |
| 33 | + |
| 34 | +### [`uefi-rs`](https://github.com/rust-osdev/uefi-rs) |
| 35 | + |
| 36 | +<span class="maintainers">Maintained by [@GabrielMajeri](https://github.com/GabrielMajeri), [@nicholasbishop](https://github.com/orgs/rust-osdev/people/nicholasbishop), and [@HadrienG2](https://github.com/orgs/rust-osdev/people/HadrienG2)</span> |
| 37 | + |
| 38 | +The `uefi` crate provides safe and performant wrappers for [UEFI](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface), the successor to the BIOS. |
| 39 | + |
| 40 | +One of the pain points of developers building software using `uefi-rs` has been the `Completion` type, which is like an expanded `Result` type which also handles warnings (besides successes and errors). There's an [open proposal](https://github.com/rust-osdev/uefi-rs/issues/360) to drop this type and revert to using more standard `Result`s everywhere, by treating all warnings as errors. Initial feedback suggests that such a change would be beneficial to the project, but comments and suggestions are welcome on the linked issue. |
| 41 | + |
| 42 | +We merged the following changes in February: |
| 43 | + |
| 44 | +- [Run tests on AArch64 VM in CI](https://github.com/rust-osdev/uefi-rs/pull/353) |
| 45 | +- [Add IA32 target to `xtask` and test it in CI](https://github.com/rust-osdev/uefi-rs/pull/354) |
| 46 | +- [Fix links in project template `README` file](https://github.com/rust-osdev/uefi-rs/pull/356) |
| 47 | +- [Remove `CStr16::as_string`](https://github.com/rust-osdev/uefi-rs/pull/357) |
| 48 | +- [Fix status code check at end of VM test](https://github.com/rust-osdev/uefi-rs/pull/355) |
| 49 | +- [Automatically test latest crate release on latest nightly in CI](https://github.com/rust-osdev/uefi-rs/pull/348) |
| 50 | +- [Fix various phrasing inconsistencies and spelling errors in protocol docs](https://github.com/rust-osdev/uefi-rs/pull/193) |
| 51 | +- [Remove implicit string conversion from `File::open`](https://github.com/rust-osdev/uefi-rs/pull/363) |
| 52 | +- [Expand `Align` trait docstring](https://github.com/rust-osdev/uefi-rs/pull/367) |
| 53 | +- [Add string equality operator impls](https://github.com/rust-osdev/uefi-rs/pull/366) |
| 54 | +- [Fix file info structures' sizes and add tests](https://github.com/rust-osdev/uefi-rs/pull/365) |
| 55 | +- [Implicitly run tests with `+nightly`](https://github.com/rust-osdev/uefi-rs/pull/364) |
| 56 | +- [Remove more implicit string conversions](https://github.com/rust-osdev/uefi-rs/pull/368) |
| 57 | +- [Add a `CHANGELOG.md`](https://github.com/rust-osdev/uefi-rs/pull/369) |
| 58 | +- [Add minimal test for `LoadedImage` protocol](https://github.com/rust-osdev/uefi-rs/pull/370) |
| 59 | +- [Fix `ProtocolsPerHandle` internal slice property](https://github.com/rust-osdev/uefi-rs/pull/374) |
| 60 | +- [Update changelog for file info changes](https://github.com/rust-osdev/uefi-rs/pull/373) |
| 61 | +- [Make the load options API on `LoadedImage` protocol safer](https://github.com/rust-osdev/uefi-rs/pull/375) |
| 62 | +- [Switch all packages to the 2021 edition](https://github.com/rust-osdev/uefi-rs/pull/376) |
| 63 | + |
| 64 | +Thanks to [@nicholasbishop](https://github.com/nicholasbishop), [@Stzx](https://github.com/Stzx), [@avirule](https://github.com/avirule) and [@AtsukiTak](https://github.com/AtsukiTak) for their contributions! |
| 65 | + |
| 66 | +### [`x86_64`](https://github.com/rust-osdev/x86_64) |
| 67 | + |
| 68 | +<span class="maintainers">Maintained by [@phil-opp](https://github.com/phil-opp), [@josephlr](https://github.com/orgs/rust-osdev/people/josephlr), [@Freax13](https://github.com/orgs/rust-osdev/people/Freax13), and [@rybot666](https://github.com/orgs/rust-osdev/people/rybot666)</span> |
| 69 | + |
| 70 | +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. |
| 71 | + |
| 72 | +In February, we merged the following pull requests: |
| 73 | + |
| 74 | +- [Remove external assembly](https://github.com/rust-osdev/x86_64/pull/343) |
| 75 | +- [Implement `core::iter::Step` for `VirtAddr` and `Page`](https://github.com/rust-osdev/x86_64/pull/342) |
| 76 | +- [Make fields of `VirtAddrNotValid` and `PhysAddrNotValid` public](https://github.com/rust-osdev/x86_64/pull/340) |
| 77 | +- [Fix: `VirtAddrNotValid` and `PhysAddrNotValid` should contain the whole address](https://github.com/rust-osdev/x86_64/pull/347) |
| 78 | + |
| 79 | +We also merged a few breaking changes, which will be part of the upcoming `v0.15` release: |
| 80 | + |
| 81 | +- [Merge latest changes from `master` into `next` and migrate code](https://github.com/rust-osdev/x86_64/pull/338) |
| 82 | +- [Make `Cr2::read` return a result](https://github.com/rust-osdev/x86_64/pull/335) |
| 83 | +- [Remove `external_asm` and `inline_asm` features](https://github.com/rust-osdev/x86_64/pull/345) |
| 84 | + |
| 85 | +### [`bootloader`](https://github.com/rust-osdev/bootloader) |
| 86 | + |
| 87 | +<span class="maintainers">Maintained by [@phil-opp](https://github.com/phil-opp), [@rybot666](https://github.com/rybot666), and [@64](https://github.com/64)</span> |
| 88 | + |
| 89 | +The `bootloader` crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. |
| 90 | + |
| 91 | +We merged the following changes this month: |
| 92 | + |
| 93 | +- [Add ASLR](https://github.com/rust-osdev/bootloader/pull/221) |
| 94 | +- [`maybe_uninit_extra` is no longer feature-gated](https://github.com/rust-osdev/bootloader/pull/222) <span class="gray">(published as `v0.10.12`)</span> |
| 95 | +- [[v0.9] Remove the `asm` and `global_asm` features, which are now stable](https://github.com/rust-osdev/bootloader/pull/227) <span class="gray">(published as `v0.9.22`)</span> |
| 96 | + |
| 97 | +Thanks to [@Freax13](https://github.com/Freax13) and [@kennystrawnmusic](https://github.com/kennystrawnmusic) for their contributions! |
| 98 | + |
| 99 | +We also pushed a [big restructuring](https://github.com/rust-osdev/bootloader/commit/8fb5eff0de2f776979271b771e78c94af752135e) to the [`next`](https://github.com/rust-osdev/bootloader/tree/next) branch, which will become the `v0.11` version eventually. The branch is still in an experimental state and not documented yet, so it's probably a bit early to try it out. But we are making good progress! |
| 100 | + |
| 101 | +### [`vga`](https://github.com/rust-osdev/vga) |
| 102 | + |
| 103 | +<span class="maintainers">Maintained by [@RKennedy9064](https://github.com/RKennedy9064)</span> |
| 104 | + |
| 105 | +The work-in-progress `vga` crate allows the configuration of the VGA hardware, e.g. switching from text-based mode to a pixel-based graphics mode. This month, we merged the following pull request: |
| 106 | + |
| 107 | +- [Set color palette to standard 256 VGA palette](https://github.com/rust-osdev/vga/pull/26) |
| 108 | + |
| 109 | +Thanks to [@clavierpaul](https://github.com/clavierpaul) for this contribution! |
| 110 | + |
| 111 | +## Call for Participation |
| 112 | + |
| 113 | +Want to contribute to a Rust OSDev project, but don't know where to start? Pick up one of these outstanding |
| 114 | +issues in one of our projects and get started! |
| 115 | + |
| 116 | +<!-- |
| 117 | +Please use the following template for adding items: |
| 118 | +- [(`repo_name`) Issue Description](https://example.com/link-to-issue) |
| 119 | +--> |
| 120 | + |
| 121 | +- [(`rust-osdev/uefi`) Feedback requested: Treat UEFI warnings as errors](https://github.com/rust-osdev/uefi-rs/issues/360) |
| 122 | +- [(`phil-opp/blog_os`) Looking for a reviewer for a new Korean translation](https://github.com/phil-opp/blog_os/pull/1079) |
| 123 | + |
| 124 | + |
| 125 | +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](https://github.com/rust-osdev/homepage/pulls) against the `next` branch with the tasks you want to include in the next issue. |
| 126 | + |
| 127 | +## Other Projects |
| 128 | + |
| 129 | +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. |
| 130 | + |
| 131 | +### [`phil-opp/blog_os`](https://github.com/phil-opp/blog_os) |
| 132 | + |
| 133 | +<span class="maintainers">(Section written by [@phil-opp](https://github.com/phil-opp))</span> |
| 134 | + |
| 135 | +We merged two fixes for the _Writing an OS in Rust_ blog this month: |
| 136 | + |
| 137 | +- [Fix link to MS Docs](https://github.com/phil-opp/blog_os/pull/1077) |
| 138 | +- [Fix typo in `02-minimal-rust-kernel`](https://github.com/phil-opp/blog_os/pull/1080) |
| 139 | + |
| 140 | +Thanks to [@kITerE](https://github.com/kITerE) and [@MaxDesiatov](https://github.com/MaxDesiatov) for these contributions! |
| 141 | + |
| 142 | +I'm also still working on the third edition of the blog. The current state is the following: |
| 143 | + |
| 144 | +- This month, cargo finally gained [support for artifact dependencies](https://github.com/rust-lang/cargo/pull/9992), which is a feature that I plan to use for the edition. There are still a few issues with it, for example [a panic in combination with `-Zbuild-std`](https://github.com/rust-lang/cargo/issues/10444) and that there is currently no way to enable `-Zbuild-std=core` for an artifact dependency without enabling it globally. |
| 145 | +- The upcoming `v0.11` version of the `bootloader` crate is already finished for the UEFI part. I'm still working on the BIOS implementation, which is more difficult unfortunately. |
| 146 | + |
| 147 | +## Join Us? |
| 148 | + |
| 149 | +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](https://gitter.im/rust-osdev/Lobby). |
0 commit comments