Skip to content

Commit 53b7f3f

Browse files
authored
Merge pull request #27 from rust-osdev/next
This Month in Rust OSDev (October 2020)
2 parents 17d3c84 + 91c520a commit 53b7f3f

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

content/this-month/2020-10/index.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
+++
2+
title = "This Month in Rust OSDev (October 2020)"
3+
date = 0000-01-01
4+
5+
[extra]
6+
month = "October 2020"
7+
authors = [
8+
"phil-opp",
9+
# add yourself here
10+
]
11+
+++
12+
13+
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.
14+
15+
<!-- more -->
16+
17+
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).
18+
19+
<!--
20+
This is a draft for the upcoming "This Month in Rust OSDev (October 2020)" post.
21+
Feel free to create pull requests against the `next` branch to add your
22+
content here.
23+
Please take a look at the past posts on https://rust-osdev.com/ to see the
24+
general structure of these posts.
25+
-->
26+
27+
## Project Updates
28+
29+
In this section, we give an overview of notable changes to the projects hosted under the [`rust-osdev`] organization.
30+
31+
[`rust-osdev`]: https://github.com/rust-osdev/about
32+
33+
### [`x86_64`](https://github.com/rust-osdev/x86_64)
34+
35+
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.
36+
37+
In October, we merged following changes:
38+
39+
- [Provide functions for accessing the underlying L4 table for mapper types](https://github.com/rust-osdev/x86_64/pull/184)
40+
- [Make `GlobalDescriptorTable::add_entry` a const fn](https://github.com/rust-osdev/x86_64/pull/191)
41+
- [Update docs to suggest `TryFrom` trait](https://github.com/rust-osdev/x86_64/pull/198)
42+
43+
Thanks to [@toku-sa-n](https://github.com/toku-sa-n) for their contribution! We plan to publish the above changes as [version `0.12.3`](https://github.com/rust-osdev/x86_64/pull/200) in the next few days.
44+
45+
### [`volatile`](https://github.com/rust-osdev/volatile)
46+
47+
The `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.
48+
49+
In October, we published a new version to fix the crate's `unstable` feature on newer Rust nighlies:
50+
51+
- [Change `slice::check_range` to `RangeBounds::assert_len`](https://github.com/rust-osdev/volatile/pull/16) <span class="gray">(published as `v0.4.2`)</span>
52+
53+
Thanks to [@vetio](https://github.com/vetio) for this contribution!
54+
55+
56+
### [`bootloader`](https://github.com/rust-osdev/bootloader)
57+
58+
The `bootloader` crate implements a custom Rust-based bootloader for easy loading of 64-bit ELF executables. This month, we published versions `0.9.9` to `0.9.11` to fix build errors on the latest nightlies, caused by the new feature gate names for some `const fn` features.
59+
60+
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](https://github.com/rust-osdev/bootloader/pull/130) that tracks the remaining issues.
61+
62+
### [`uefi-rs`](https://github.com/rust-osdev/uefi-rs)
63+
64+
The `uefi` crate provides safe and performant wrappers for [UEFI](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface), the successor to the BIOS. In October, we merged the following changes:
65+
66+
- [Made `panic_handler` optional](https://github.com/rust-osdev/uefi-rs/pull/179)
67+
- [Fix Clippy lints](https://github.com/rust-osdev/uefi-rs/pull/180)
68+
69+
Thanks to [@Swampman08](https://github.com/Swampman08) for their contribution!
70+
71+
72+
### [`pci_types`](https://github.com/rust-osdev/pci_types)
73+
74+
The `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
75+
between projects, and would benefit from community contributions.
76+
77+
This month, we published version `0.2.0` with the following changes:
78+
79+
- [Untie accessor from the actual PciHeader type](https://github.com/rust-osdev/pci_types/commit/e1201d7d8986ff1133e2880b0ba62a3b2d7d891b)
80+
- [Split out endpoint header to separate struct](https://github.com/rust-osdev/pci_types/commit/d9cd5809148084d31fe5cc6ddbb5c8129bf23dae)
81+
- [Provide method for accessing BARs on endpoint headers](https://github.com/rust-osdev/pci_types/commit/aeb1b249cf6e4563b815011f7ed759198b283405)
82+
83+
84+
### [`cargo-xbuild`](https://github.com/rust-osdev/cargo-xbuild)
85+
86+
The `cargo-xbuild` project provides `cargo` command wrappers to cross-compile the sysroot crates `core` and `alloc`. This month, we merged the following changes:
87+
88+
- [Document `build-std-features` flag for Cargo's `build-std` feature](https://github.com/rust-osdev/cargo-xbuild/pull/95)
89+
- [Upgrade the crate to edition 2018](https://github.com/rust-osdev/cargo-xbuild/pull/97) <span class="gray">(published as `v0.6.3`)</span>
90+
91+
Thanks to [@luqmana](https://github.com/luqmana) and [@koushiro](https://github.com/koushiro) for these contributions!
92+
93+
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](https://github.com/rust-osdev/cargo-xbuild#alternative-the-build-std-feature-of-cargo).
94+
95+
## Personal Projects
96+
97+
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](https://github.com/rust-osdev/homepage/pulls) with the updates of your OS project for the next post.
98+
99+
### [`rust-embedded/rust-raspberrypi-OS-tutorials`](https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials)
100+
101+
<span class="gray">(Section written by [@andre-richter](https://github.com/andre-richter))</span>
102+
103+
The [_Operating System development tutorials in Rust on the Raspberry Pi_](https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials) project now provides [Tutorial 15 - `Virtual Memory Part 2: MMIO Remap`](https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials/tree/master/15_virtual_mem_part2_mmio_remap).
104+
105+
It introduces a first set of changes which are eventually needed for separating `kernel` and `user` address spaces:
106+
- The memory mapping strategy gets more sophisticated and no longer `identity maps` the _whole_ of the board's address space.
107+
- Instead, only ranges that are actually needed are mapped:
108+
- The `kernel binary` stays `identity mapped` for now.
109+
- Device `MMIO regions` are remapped lazily to a special virtual address region at the top of the virtual address space during the device driver's `init()`.
110+
111+
### [`phil-opp/blog_os`](https://github.com/phil-opp/blog_os)
112+
113+
<span class="gray">(Section written by [@phil-opp](https://github.com/phil-opp))</span>
114+
115+
This month, the _Writing an OS in Rust_ series received the following updates:
116+
117+
- [Remove rlibc and use compiler-builtins-mem feature](https://github.com/phil-opp/blog_os/pull/865)
118+
- [Update `post-04` to use compiler_builtins `mem` feature instead of `rlibc`](https://github.com/phil-opp/blog_os/pull/868)
119+
- [Update blog to use `mem` feature of `compiler_builtins`](https://github.com/phil-opp/blog_os/pull/866)
120+
- [Translate post 02 to Japanese](https://github.com/phil-opp/blog_os/pull/871)
121+
- The translated post is now [published](https://os.phil-opp.com/ja/minimal-rust-kernel/).
122+
- [Add Right-to-Left support for template](https://github.com/phil-opp/blog_os/pull/875) in preparation for a Persian translation
123+
124+
See [the merged pull request list](https://github.com/phil-opp/blog_os/pulls?q=is%3Apr+is%3Aclosed+merged%3A2020-10-01..2020-11-01) for the complete set of changes this month. Thanks a lot to all contributors!
125+
126+
In case you speak Persian: There is currently an open pull request to [add a Persian translation of `Bare Bones` chapter](https://github.com/phil-opp/blog_os/pull/878) that needs reviews. Thanks to everyone involved!
127+
128+
In [in our previous status update](@/this-month/2020-09/index.md#phil-opp-blog-os) 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](https://github.com/rust-lang/cargo/pull/8757#issuecomment-713897532). 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](https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336). Feel free to join the discussion if it's relevant to you!
129+
130+
## Join Us?
131+
132+
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).
133+
134+
135+
<!--
136+
TODO: Update publication date
137+
-->

0 commit comments

Comments
 (0)