Blog series on creating an OS in Rust

(os.phil-opp.com)

127 points | by znano a day ago ago

9 comments

  • junon a day ago

    Phil-opp's posts were instrumental in getting the boilerplate of my kernel up and running pretty quickly, mostly due to the unusual build config that is required.

    I've since grown my own sense about it but it always tickles me when I think of a better way to do X, search for X on the cargo or rust issue trackers, find a ticket also looking for that, and more often than not Phill-opp either present or the one requesting it.

    Hats off and kudos, it's a great series :)

  • the_duke a day ago

    Even if you don't care about building an OS: the async/await post [1] is the best resource for understanding how async actually works in Rust.

    Highly recommended.

    [1] https://os.phil-opp.com/async-await/

  • WD-42 21 hours ago

    Did Phil Opp's series for fun recently, it's a great intro to OS development. I can also recommend "OS in 1k lines" as a follow-up that targets RISC-V instead of X86. It really demonstrates how large a difference a modern architecture makes.

    https://operating-system-in-1000-lines.vercel.app/en/

  • wkjagt 20 hours ago

    I want to get into Rust and OS development, so this sounds like a great series. However, the articles were written in 2018-2020. Would they still be mostly relevant? Or has Rust moved so fast that too much has changed?

    • hadlock 17 hours ago

      Earlier this year I was able to struggle-bus together my own bootable rust binary (and bootloader in assembly!) on QEMU in a couple of hours using his blog as a guide. It seems the LLMs have definitely scraped his blog, as if you go off the happy path they're absolutely useless in this endeavor, and few other resources on the topic exist.

    • mrnoone 19 hours ago

      You can have a look at this project that shows how with proper abstractions you can minimize unsafe Rust for low level firmware. Specifically look for page token, page allocator and page table implementations: https://github.com/IBM/ACE-RISCV

    • scottaino 19 hours ago

      I went through it recently and I don't think there was anything in the blog that was out of date. There was mention in the blog of having to do some hacky things because certain features in rust didn't exist yet, but the hacky solutions provided still worked.

  • azhenley 20 hours ago

    Also relevant, Making a RISC-V Operating System Using Rust (2019). I wonder what relevant Rust features have changes in the last 6 years.

    https://news.ycombinator.com/item?id=36320914

  • zparky a day ago

    previous discussion in 2022, 80 comments: https://news.ycombinator.com/item?id=30467572