Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Philipp Oppermann

    os.phil-opp.com · Personal blog · on HN since 2015

    Philipp Oppermann writes a tutorial series on building an operating system kernel in Rust, covering paging, heap allocation, and async/await.

    Visit blogHN submissions
    Systems & PerformanceLanguages & CompilersProgramming
    What HN says

    HN commenters recommend it as an approachable series for writing a kernel, one that shows how little unsafe code low-level Rust needs.

    Stats for nerds
    95HN people shared it
    50linked in comments
    4.6Kstory points
    Oct 2025last shared
    2016people per year2025

    Top posts on HN

    1. 1
      Learn Rust by writing a small OS
      59 people · 897 points · first shared 2015 · 80 comments on HN
    2. 2
      Writing an OS in Rust: Introduction to Paging
      2 people · 597 points · first shared 2019 · 79 comments on HN
    3. 3
      Writing an OS in Rust: Async/Await
      10 people · 414 points · first shared 2020 · 103 comments on HN
    4. 4
      Writing an OS in Rust: Hardware Interrupts
      1 person · 398 points · first shared 2018 · 63 comments on HN
    5. 5
      Writing an OS in Rust: Advanced Paging
      1 person · 336 points · first shared 2019 · 141 comments on HN
    6. 6
      Writing an OS in Rust: Better Exception Messages
      3 people · 220 points · first shared 2016 · 31 comments on HN
    7. 7
      Writing an OS in Rust: Handling Exceptions
      1 person · 183 points · first shared 2017 · 41 comments on HN
    8. 8
      Writing an OS in Rust: Remap the Kernel
      1 person · 179 points · first shared 2016 · 25 comments on HN
    9. 9
      Writing an OS in Rust: Returning from Exceptions
      1 person · 175 points · first shared 2016 · 54 comments on HN
    10. 10
      Writing an OS in Rust: Testing
      2 people · 173 points · first shared 2019 · 9 comments on HN

    What HN people wrote when they linked it

    • 1letterunixnameJul 2023

      There's a no-std tutorial on how to write a demo kernel in Rust. https://os.phil-opp.com

      osdev.org, sandpile.org, RBIL, and freevga. The biggest PITA is hardware support. There are many good vintage hardcopy books with recipes for things like reliable port IO and undocumented hardware tricks.

      - Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4

      - Microsoft MS-DOS Programmer's Reference (also includes real-mode BIOS calls)

      - PC Interrupts

      - Undocumented PC

      - PC Intern

      - Programmer's Guide To The EGA, VGA, And Super VGA Cards

      - Graphics Programming Black Book Special Edition

      Also, it's worth toying with advances in OS dev past the era of monolithic, microkernel, and hybrid.

      1. Capability-based like seL4. It has a number of inherent performance and security advantages including capabilities and excellent IPC.

      2. POSIX compatibility layer. Even embedded OSes without the concept of threads or processes can implement POSIX.

      3. Hypervisor. They're much easier to add with intel's VT-[xd]. Failing that, fall back to emulation. Translational emulation is very performant.

      4. Get good at generalizing interrupt handlers, making them fast, avoiding race conditions, and using lock-free patterns.

      Also:

      5. Rewriting or trapping unsupported instructions including x87 and MMX.

      6. The failure of pure microkernel was the added complexity and management of sequencing multiple resources in a transactional manner.…

    • bluejekyllAug 2021

      > Any Rust code that goes low level liberally uses unsafe{} blocks

      This isn't an accurate statement. Liberal use of unsafe is not common or best practice in Rust. My favorite educational series that shows how little unsafe is required to work in low-level spaces is Phil Opperman's, "Writing an OS in Rust": https://os.phil-opp.com/

      That being said, I don't think most people use "Rust is safe" in an particular way that's different from saying Java is safe. Rust in many ways offers similar (and stronger) safety guarantees than Java (one of the safest langauges to date). Is Java safe? We all know that bugs can be created in every language, it's really the different classes of bugs that each language offers some defense against that sets them apart from each other.

    • dysocoJun 2024

      Sadly no, they moved all courses to a private platform, but we used a lot of external resources not too much of our own except the exercises.

      The kernel development one was pretty much what you can find in the Intel Manuals + osdev wiki [1] or some of the many osdev tutorials [2].

      For SIMD I'm not aware of good tutorials or books, we did use again Intel manuals for reference and also [3]. For the image filters I assume you can search algorithms for basic filters such as pixelate, edges, etc. expressed as matrix operations and see how you can write that as SIMD ops.

      [1]: https://wiki.osdev.org/Expanded_Main_Page [2]: https://os.phil-opp.com/ [3]: https://www.felixcloutier.com/x86/

    • rvzJan 2020

      That's it?

      While the point of this project is to go for developing a very small kernel, I afraid I can't recommend this as a way to "learn to write your first OS kernel".

      Particularly, this project has been fossilised for two years, (last commit was in 2018) with a single commit each year hardly qualifies as an updated tutorial for writing OS kernels.

      My first recommendation would be the "writing an OS in Rust" tutorials [0] and the xv6 tutorials [1].

      [0] https://os.phil-opp.com/

      [1] https://pdos.csail.mit.edu/6.828/2019/xv6.html

    • ekiddJul 2020

      If anybody enjoys this and wants to take it much further, you might want to check out https://os.phil-opp.com/. This is basically a book-in-progress that shows how to build an OS in Rust OS from scratch. It shows how boot up an OS, and it goes on to show how to set up basic drivers and memory management. He does a great job of explaining each step as he goes.

      (This is linked near the end of the article, but I think it's worth pointing out.)

      Full disclosure: I think he uses a library I wrote to initialize the keyboard controller.

    • exDM69Sep 2025

      The osdev wiki is the best source for this and they have the bare bones tutorials with all the linker scripts, bootstrap code, makefiles, etc you might need. They have examples for multiboot and UEFI (and BIOS boot sector).

      For Rust there's this popular series: https://os.phil-opp.com/

      If I were to start a new OS project I would do it in Rust too but as awesome as Rust is, I can't recommend doing a bare metal project as your first foray into the language. Learning two or more things at once doesn't work for me.

    Related

    Felix Klockblog.pnkfx.org16 people

    GC and Rust Part 1: Specifying the Problem

    Felix Klock
    Personal · last shared 2025
    Ralf Jungralfj.de99 people

    There is no memory safety without thread safety

    Ralf Jung
    Personal · last shared 2026
    Niko Matsakissmallcultfollowing.com221 people

    Towards a Rust Foundation

    Niko Matsakis
    Personal · last shared 2026
    Manish Goregaokarmanishearth.github.io97 people

    Picking Apart the Crashing iOS String

    Manish Goregaokar
    Personal · last shared 2026
    Probably Danceprobablydance.com74 people

    Fibonacci Hashing: The Optimization That the World Forgot

    Probably Dance
    Personal · last shared 2026
    notgullnotgull.net20 people

    Why choose async/await over threads?

    notgull
    Personal · last shared 2026
    Rust Blogblog.rust-lang.org533 people

    Announcing Rust 1.0

    Rust Blog
    Company · last shared 2026
    Graham Jenkinsdarkcoding.net44 people

    Facebook’s code quality problem (2015)

    Graham Jenkins
    Personal · last shared 2025