notgull
notgull.net · Personal blog · on HN since 2023
John Nunley (notgull) writes about Rust, async/await internals, unsafe code, and compiler bootstrapping, including the Dozer Rust compiler in C.
What HN saysHN commenters link it for Dozer, a bare-bones Rust compiler in C meant to simplify bootstrapping, and debate its claims about unsafe Rust.
20HN people shared it
6linked it in comments
20stories submitted
1.2Kstory points
4 months agolast shared
2023people per year2026
Most-shared posts
- 1Writing a Rust compiler in C4 people · 393 points · first shared 2024 · 223 comments on HN
- 2Why choose async/await over threads?2 people · 433 points · first shared 2024 · 458 comments on HN
- 3Async/Await versus the Calloop Model2 people · 10 points · first shared 2025 · discussion on HN
- 4The rabbit hole of unsafe Rust bugs2 people · 3 points · first shared 2023 · discussion on HN
- 5\Device\Afd: what makes async Rust and libuv work on Windows2 people · 3 points · first shared 2024 · discussion on HN
- 6Eyra is an interesting Rust project2 people · 2 points · first shared 2023 · 1 comments on HN
- 7Explaining the internals of async-task from the ground up2 people · 2 points · first shared 2024 · discussion on HN
- 8Rust's Block Pattern1 people · 216 points · first shared 2025 · 112 comments on HN
- 9Blocking code is a leaky abstraction1 people · 140 points · first shared 2024 · 145 comments on HN
- 10Notgull versus Burnout1 people · 4 points · first shared 2025 · discussion on HN
- 11How to Deal with Rust Dependencies1 people · 4 points · first shared 2025 · discussion on HN
- 12You might want async in your project1 people · 2 points · first shared 2023 · discussion on HN
- 13About Bootstrapping, and why it's important1 people · 2 points · first shared 2026 · discussion on HN
- 14Smol-macros, smol-hyper and smol-axum1 people · 1 points · first shared 2024 · discussion on HN
- 15How do we prevent Bitrot?1 people · 1 points · first shared 2026 · discussion on HN
What HN people wrote when they linked it
smorrow · 2026-01-26
Dozer might be the most likely path to that.
https://notgull.net/announcing-dozer
csb6 · 2025-12-23
There was a project [0] to write a bare bones rust compiler (no borrow checking) in C that aims to be able to build rustc in order to simplify bootstrapping, but it seems to have stalled.
[0] https://notgull.net/announcing-dozer/
inahga · 2024-10-15
> Another way to see the benefit of this approach is that if you have a memory violation, then you only have to look in the unsafe blocks.
Not really. Safety is non-local. It is possible to break unsafe code by feeding inputs from safe Rust that don't uphold the invariants that make the unsafe code safe. So it's not enough to look in the unsafe blocks--you have to consider the all the contexts that invoke the unsafe code.
See https://doc.rust-lang.org/nomicon/working-with-unsafe.html, and https://notgull.net/cautionary-unsafe-tale/ for a practical example.
yencabulator · 2024-09-02
See also https://notgull.net/announcing-dozer/ -- removes C++ and LLVM from the stack needed to bootstrap Rust.
Ygg2 · 2023-12-24
> If you at all break the rather subtle rules, then essentially anything can and will happen.
If by subtle rules you mean your invariants, that is missing fundamental assumptions.
It's akin to making a building without foundation and load bearing structures.
> So for example, there was recently a thread where someone had code that checked if a value was in range to safely coerce it directly to an enum then did so. But because of eager evaluation of an argument the unsafe cast happened first
You mean this: https://notgull.net/cautionary-unsafe-tale/
However note the UB goes away if you never use any unsafe code. Or if you expand your unsafe to encompas some safe code.
Issue it had was safe code was invalidating the invariants unsafe code was relying on. Iirc alignment.
nullindividual · 2024-06-23
Correct link: https://notgull.net/device-afd/