Legal notice
Thanks to my sponsors: Justin Ossevoort, Vincent, Nicholas, ofrighil, Matt Jadczak, Dominik Wagner, Garret Kelly, Neil Blakey-Milner, Lena Schönburg, Olly Swanson, Beth Rennie, genny, Julian Schmid, Alex Rudy, Raphaël Thériault, Ula, Chris, Michał Bartoszkiewicz, Nyefan, Henrik Tudborg and 269 more
https://fasterthanli.me is a publication of https://bearcove.eu
Here's another article just for you:
Rust modules vs files
A while back, I asked on Twitter what people found confusing in Rust, and one of the top topics was “how the module system maps to files”.
I remember struggling with that a lot when I first started Rust, so I’ll try to explain it in a way that makes sense to me.
Important note
All that follows is written for Rust 2021 edition. I have no interest in learning (or teaching) the ins and outs of the previous version, especially because it was a lot more confusing to me.