Writing an OS in Rust

Philipp Oppermann's blog

Updates in April 2019

Lot’s of things changed in the Writing an OS in Rust series in the past month, both on the blog itself and in the tools behind the scenes. This post gives an overview of the most important updates.

This post is an experiment inspired by This Week in Rust and similar series. The goal is to provide a resource that allows following the project more closely and staying up-to-date with the changes in the tools/libraries behind the scenes. If enough people find this useful, I will try to turn this in a semi-regular series.

Bootloader

  • The build system of the bootloader was rewritten to do a proper linking instead of appending the kernel executable manually like before. The relevant pull requests are Rewrite build system and Updates for new build system. These (breaking) changes were released as version 0.5.0 (changelog).
  • To make the bootloader work with future versions of bootimage, a package.metadata.bootloader.target key was added to the Cargo.toml of the bootloader. This key specifies the name of the target JSON file, so that bootimage knows which --target argument to pass. This change was released as version 0.5.1 (changelog)
  • In the Version 0.6.0 pull request, the #[cfg(not(test))] attribute was removed from the entry_point macro. This makes it possible to use the macro together with cargo xtest and a custom test framework. Since the change is breaking, it was released as version 0.6.0 (changelog).

Bootimage

  • The Rewrite bootimage for new bootloader build system pull request completely revamped the implementation of the crate. This was released as version 0.7.0. See the changelog for a list of changes.
    • The rewrite had the unintended side-effect that bootimage run no longer ignored executables named test-*, so that an additional --bin argument was required for specifying which executable to run. To avoid breaking users of bootimage test, we yanked version 0.7.0. After fixing the issue, version 0.7.1 was released (changelog).
  • The New features for bootimage runner pull request added support for additional arguments and various functionality for supporting cargo xtest. The changes were released as version 0.7.2 (changelog).
  • An argument parsing bug that broke the new cargo bootimage subcommand on Windows was fixed. The fix was released as version 0.7.3.

Blog OS

Thank You!

Thanks a lot to all the contributors this month!

I also want to thank all the people who support me on GitHub, Patreon, and Donorbox. It means a lot to me!



Comments

Do you have a problem, want to share feedback, or discuss further ideas? Feel free to leave a comment here! Please stick to English and follow Rust's code of conduct. This comment thread directly maps to a discussion on GitHub, so you can also comment there if you prefer.

Instead of authenticating the giscus application, you can also comment directly on GitHub.