Rust live-coder and OSS tinkerer who loves teaching. I try to keep a high SNR. Wrote Rust for Rustaceans. At
@HelsingAI
. Ex AWS. Co-founded
@readysetio
. he/him
What better way to start 2024 than to announce that I'm now (finally) on the sponsorship train! The details are all on Discord @ and on the various pages where you can now support me:
Big announcement time 📢 For a while now, I've been working on a book that covers the next steps of
@rustlang
after "the book" — everything from API design to error handling to concurrency to async to FFI. And the early access was just released over at ! 🎉
Big news time 📢 After I finish my thesis, I'll be joining Amazon AWS, specifically to drive adoption of Rust internally at Amazon! The role will include plenty of interaction with the Rust ecosystem and community, so if all goes to plan you'll only see more of me going forward!
In January,
@anishathalye
,
@jjgort
, and I ran a short class at
@MIT_CSAIL
on topics we think are missing in most CS programs — tools we use every day that everyone should know, like bash, git, vim, and tmux. And now the lecture notes and videos are online!
Exciting news — I'm going to start doing Rust streams as part of my job at AWS! Nothing will change about the format or content, but it'll allow me to do more regular Crust of Rust and Unsafe Chronicles streams since I won't just do them on my spare time \o/
I... wrote a book. Like an actual, real, physical book. It's such a strange feeling finally holding it in my hands. I hope it teaches some people some things, and maybe even elicits some laughs along the way! ❤️
Amazon's (wild) new return-to-office policy is making it … more difficult to come to an agreement about me moving to Norway in June. Which means that come summer I may be looking for a Rust job in Europe! If you have an opportunity that may be relevant (🧵), reach out!
The full digital version of Rust for Rustaceans is now up on ! I don't have a final schedule for the print version yet, but you can at least start reading it in pixel form 🎉 I hope you end up finding it useful ❤️
This week I've used GCC 7 on a GCC 4 platform to build Python to build GCC 11 to build GCC 11 to build Clang 14 to build Clang 14 to build Rust's LLVM all so I could get rid of some paths that had snuck their way into librustc_driver's debug symbols. This is fine 🐕☕🏠🔥🔥🔥.
PSA: Before copy-pasting a GitHub source code link, especially one that links to a line or line range, hit `y` to make the URL include the current commit hash. That way the link will keep working even if the file is later changed or moved/deleted.
Making it possible to turn source code into executables was a mistake. I keep coming to the inevitable conclusion that source code is best left uncompiled. Once you make it runnable, that's when the trouble starts...
The "decrusting tokio" stream is up! We explored the runtime, blocking, I/O, select, cancellation, mutexes, and also covered several common pitfalls and less-known subtleties. I *think* I covered all I want people to know in "only" 3.5 hours 😅 Enjoy‽
I got the receipt from the department — my thesis is now (finally) fully done, and I am officially a PhD graduate 🤓🎉 You can read it here if you are so inclined: . Also, my girlfriend is awesome and got me a mug for the occasion 😅
Hi friends! I recently gave a talk aimed at companies that are considering adding
@rustlang
to their tech stack. In it, I presented the upsides and downsides of Rust, and how it differs from C/C++, Java, Python, and Go. And it's now on YouTube 🍿📽️
It's finally time for a "decrusting tokio" stream! We'll talk about blocking, cancellation, spawning, mechanisms for synchronization, and some relevant under-the-hood things. Will happen 12:00pm UTC on Friday () on YouTube:
In Rust-unrelated news, I have a cat now! Meet Chai (because I love tea and she looks like black tea with a swirl of milk) ❤️ Picked her up from a shelter the morning of Christmas Eve. What a present! Will try to resist the urge to post pictures constantly 😅
Good news everyone! I passed my thesis defense yesterday, and now only have some minor revisions to the thesis itself left before I am completely done 🎉 You can find a recording of the thesis presentation here:
For a while, I've been saying that you need to *make* time for things, as you won't *find* time. Time to follow through. Starting this week, I'm going to do a
@rustlang
stream every 4th Friday at 6pm UTC. Sometimes long, sometimes short, sometimes Q&A, but always something! 📺
Now that the move to Norway is finally reaching a stable state, I'm excited to announce that come August I'll be joining
@HelsingAI
; a European company that develops next generation defense software and AI for European democracies.
I'm so excited for this change. Sparse HTTP registry support for cargo is going to completely get rid of that slow "Updating index" … "resolving deltas" step you sometimes get, and is going to make a huge difference for CI builds!
A little while ago, we solved some of
@flydotio
's distributed system challenges in
@rustlang
(). That was fun, so following in the same vein, this Thursday at 7:30am UTC () we'll try implementing a BitTorrent client from scratch! 🌪️🦀
Just submitted the first draft of the last chapter of Rust for Rustaceans 📕 There's still a bunch of editing to do, and many passes the text must go through before it's done, but it's a big milestone nonetheless! And just in time for vacation too 🎉
I've mused about the next live-coding stream for long enough. On Saturday we're going to implement the concurrency algorithm from the academic paper "A Practical Wait-Free Simulation for Lock-Free Data Structures" by
@petrank
and Shahar Timnat in
@rustlang
. Details in thread 👇
I'm making a "Why Rust" presentation for companies that are curious about what
@rustlang
offers compared to their current language of choice (usually C++/Java/Python). What, to you, is the
#1
reason to consider Rust over each of the languages above in a _commercial_ setting?
The "axum decrusted" video is up! We talk about tower::Service, the Handler trait, Router, and the State extractor, and just generally peel back the crust of the delicious axum pie to expose its gooey center. Turns out dark trait magic is one ingredient 👀
I've gotten a *lot* of questions over the years about the future of Noria, my PhD thesis database, along the lines of "when can I use it for real"? Well, back when I graduated I co-founded a company to make that a reality,
@readysetio
, and it's now public!
Our journey through
@rustlang
's std::collections clocked in at 2½ hours, with about 30m per data structure, which I'm pretty happy with! We went through them all in a decent amount of detail, including implementation outline and trade-offs.
Just submitted the last round of edits (in theory) for the last chapter of Rust of Rustaceans. What remains now is mostly procedural stuff, like indexing the book, and then it'll go to print! Such a weird feeling — my evenings will be my own again 😮
Wow, looks like a more beginner-friendly
@rustlang
stream is something *a lot* of you want to see. So, let's do one! Wednesday @ 8:30p UTC, I'll do a shorter, code-driven stream that covers multiple lifetimes, strings, and some generics. If it goes well, there may be more 👀 1/3
I haven't disappeared; moving is just swallowing 100% of my time. The hope is I'll be more settled end of this coming week, and then I'll announce my new job, a Q&A stream, and start working down my 234 GitHub notifications and the longest inbox backlog I've had in a few years 😅
I'm getting closer to graduating (hoping by Nov 1), and it's time to figure out what's next! I'd like to continue working on
@rustlang
and its ecosystem, ideally on open-source libraries and tools, so if you know of a good fit that supports remote work from LA, please reach out!
A little while ago, I gave a talk about the many (current and future) meanings of impl Trait at the
@rustlang
meetup in Copenhagen. The talk was about 30 minutes, followed by almost 45 minutes of (good) Q&A 😅 🙋 And it's now up on YouTube!
Recording of the stream where we implement (part of) a BitTorrent client in
@rustlang
is now up. We followed a set of challenges from
@codecraftersio
, and got nearly all the way through even with a power outage! I do love implementing protocols… 😅
Woah, I'm almost at 10k followers — that's crazy! I suppose that means my signal-to-noise ratio is acceptable 😅 You're all awesome, and none of my content would exist without your continued excitement and desire to learn with me ❤️
After doing the BitTorrent challenge in
@rustlang
, I had an urge to do some re-organization to better fit what a real implementation would look like when it has to handle files, concurrency, etc. So, let's do a stream on exactly that Friday at 08:30 UTC ()!
Oh fun, I found a bug in Android's eSIM handling! Which means none of my SIM cards now work, and trying to erase them re-triggers the bug. Any Android Googlers want to take a look? A .flib.log.WhatATerribleException exception is involved (yes really).
Okay, this Friday we're going to try for a new
@rustlang
series — "Decrusted" — where we'll dig into a particular crate in the ecosystem and figure out how it does what it does. First up: serde, decrusted! Friday at 6pm UTC:
I think it's about time we do a Crust of Rust on atomics and memory ordering! So, this *Friday* at 5pm UTC (), let's dive into
@rustlang
's std::sync::atomic and try to figure out what's going on in there and what it's all for 🔬 Come one, come all!👩💻🧑🏽💻👨🏿💻
I know, I know, I've been bad at doing regular streams. What can I say — life got in the way. But it's time for another Crust of
@rustlang
! This time, build scripts and FFI 🧱 We'll pick a C library and write a -sys for some of it on Saturday at 5pm UTC ()!
Wooo — my team, which owns the
@rustlang
infrastructure and developer tooling internally at
@awscloud
, is expanding 🎉 If you like building tools and resources for devs, and contributing back to the community where possible, apply (incl. remote) here:
A bit of a delayed announcement, but this week's scheduled stream will be on Saturday at 0930 UTC (). This time, we'll implement the git version control system core bits from scratch! Will be live at
I'm very happy with how today's stream on atomics and memory ordering in
@rustlang
turned out. Hopefully this'll help clear up the confusion and mystery that surrounds the std::sync::atomic module, and allow more people to write good concurrent code! 🧮
We got through a few of the
@flydotio
distributed systems challenges (), and it was a fun (and hopefully educational) process! Might do a part 2 one day to go through more of them now that we have a rough framework in place. 📺 at .
Our experiment implementing the
@3blue1brown
Wordle algorithm (or at least, an approximation of it) in
@rustlang
went pretty well, and we managed to get some pretty impressive speedups (~13500x from the first to the last version)! Video is up now at
I've been looking to stream writing an interpreter for a while, and
@codecraftersio
have just released a challenge in beta following
@munificentbob
's Crafting Interpreters book! So, this Saturday @ 1pm UTC () we'll give it a try 🧑💻
I hacked together a little website for Rust for Rustaceans over at . Nothing fancy, just some quotes from reviews, updates since the book's release, known errata (which I'm sure will grow with time), and some interviews. Let me know what you think!
The real news of the
@StackOverflow
Developer Survey isn't that
@rustlang
is most loved yet again, or that it's now also most wanted, it's that for the second year in a row the most loved editor is
@Neovim
:
For quite some time, I've been hearing that it's hard to find
@rustlang
jobs that aren't in the cryptocurrency space or in very early-stage startups. Well,
@HelsingAI
is hiring almost exclusively Rust folks, and we're neither of those things [1/10]
The
@rustlang
2019 survey: "People are [..] asking for more learning material[,] mainly beginner and intermediate level[.] A lot of these requests also asked for video content specifically." — If I were to do a more beginner-friendly Rust stream, what would you want to see?
Recording of today's stream decrusting the tracing crate is now up! We went over both "sides" of tracing. First spans and events, then subscribers, layers, and filters. And apart from a brief ramble on per-level filters, I think it turned out quite good!
I regularly have people ask me to do a Noria stream (my
@rustlang
research database). So far, I've hesitated, as I worry it'll be hard to follow given that you'd be dropped into a big code base. But now is a good time to try! Who would be interested in watching me do research? 🔬
I'm quite excited to have a surprise slot at Rust Nation! I'll be diving into some of the techniques and tools needed to write dependable, misuse-resistant Rust in high-stakes sectors where errors can have serious consequences (healthcare, aerospace, defense, finance, etc.).
I'm thinking of doing a new (infrequent) Crust of Rust "sub-series" on the many pitfalls of unsafe in
@rustlang
, where each episode looks at a particular trickiness or gotcha. The first one would likely follow my journey with . Does that sound interesting?
Recording of today's Crust of Rust on build scripts and foreign-function interfaces (FFI) is now up! We went over the build scripts of several popular *-sys crates, and also wrote our own (basic) binding against libsodium.
Weird(?) stream idea: "But Why?" — take a simple
@rustlang
example, pick some syntax, and ask "why?" repeatedly. Think println! -> stdout+write! -> ! -> format_args! -> Display/Debug. Not sure who it would be for though. Folks coming from other languages? Would it be interesting?
The recording of the stream where we implemented a lexer and parser for the Lox language from Crafting Interpreters in Rust is now up, and I think it turned out really good! Clocked in at 8h, but it's split into chapters to not be so daunting to follow :)
Just had a recruiter cold email me with the subject line "Rust on your GitHub". No wonder people feel like there are only cryptocurrency jobs in Rust these days when the recruiters seemingly email *anyone with a Rust repo*. I dislike this style of batch recruiting so much...
My favorite thing about being paid partially in stocks? Probably the part where the biannual vesting happens as the stock is down by 1/3, so you're paid tens of thousands of $ less than originally expected. Probably that. Or maybe the part where it's entirely out of your control.
I wonder — is there interest in a shorter stream where I walk through some of my thesis evaluation work so far? Relatively informal, just chatting about what the thesis work focuses on, how I'm evaluating it, what the figures show, how I got to these particular figures, etc.?
Hot(?) take: Rust crates, incl. libraries, should check in Cargo.lock and have 3 CI jobs: -Zminimal-versions, --locked, and rm Cargo.lock. All 3 run tests. Only --locked should be marked as required to minimize friction for new contributors' PRs, which should be 1st priority.
It's finally time to do a decrusted stream about tracing — the so-much-more-than-logging crate that gets requested pretty much every video! We'll do it Friday at 4pm UTC () just like the stream calendar promised for once 😅
The Crust of
@rustlang
stream on async/await is now up! My hope is that it's a bit more approachable than the deep-dive video I did a while ago, and that it provides some of the intuition and mental model that comes in handy when _using_ async/await.
I'm back from vacation, so it's time for another Crust of Rust! This time, I'll try for a more concise async/await video, focusing on what most users see (async/await) more so than the underlying mechanisms (Future/Pin/Waker). Let's do Friday @ 5p UTC () 🦀
Okay, finally time to get back on schedule! This Friday at 4pm UTC () we'll do another "decrusted" stream, this time on the axum web framework. It'll be live on YouTube and Twitch at the usual locations, and recording on YouTube afterwards as always!
The recording of our 3-hour deep-dive into the Why, What, and How of Pinning in
@rustlang
is now up! Thanks all for watching and for all the questions — the stream is better because of you ❤️ Next video in ~3 weeks.
Earlier this week I gave a guest lecture on supply chain security as part of MIT's computer security class (6.5660, formerly 6.858) . That lecture is now up on YouTube for any of you who may be interested in that sort of stuff!
The Crust of Rust mini session on lifetimes seems to have been helpful, so let's do more! I'll cover declarative macros (macro_rules!) on Wed at 8:30p UTC (). As before, it'll assume you have some
@rustlang
experience already, but anyone is welcome ♥️🥧
For all of you who enjoy
@rustlang
live streams, there's now a "team" on Twitch (thanks
@rochacbruno
!) that groups together a bunch of Rust streamers that you may find interesting: . And as always, come say hi on Discord at 👋
I have a crate I really want to reduce the compile time of, and figured I might as well stream my attempt! So, this Friday at 10pm UTC (), let's explore some ways to do that. And yes, I'll be stealing some things from the excellent
✨ Why is my Rust build so slow?
In this article, we look at a LOT of potential reasons why our Rust build could be slow. And discover it's none of them. So we ask rustc to look deep inside the self... and we find our answer.
This was a really fun watch. Makes me want to implement a solver myself in Rust. Mostly to see how fast I can make it while retaining accuracy 😅 Mayne that'd make for a fun performance oriented stream 🤔
New video!
⬜⬜⬜⬜⬜
🟩🟨🟩⬜⬜
🟩🟩🟩🟩🟩
It's an exploration for writing a Wordle solver, with the challenge of not using the official list of Wordle answers (except as a test set), which is really just an excuse for an information theory lesson.
Woah, four weeks flew by! Late to post, but tomorrow's scheduled stream is still happening at 5pm UTC (). We'll take on the
@flydotio
distributed systems challenges in Rust: . Won't do all of them, but it'll be fun to try a few!
Ready to take the next step to professional-level programming in
#Rust
? Rust for Rustaceans by
@jonhoo
will help you do more and learn the underlying mechanisms of
@rustlang
. Now shipping:
I want to do another port-it-to-
@rustlang
live-coding stream — any suggestions? I'm specifically looking for useful data structures (like HdrHistogram) or developer tools (like flamegraph) where having them in Rust might provide value to the ecosystem.
First video in the "decrusted" series where we peel back the crust of the serde crate is now up: . I quite like the format, so expect to see more of these!
About time we did a Crust of Rust again! This *Saturday* at 5pm UTC () we'll look at the various collection types in
@rustlang
's std; their advantages, drawbacks, and common uses, as well as a bit about each of their implementations. Come one come all! 🦀📺
Today's stream on dispatch, trait objects, and dynamically sized types in
@rustlang
was quite the journey — I think we managed to get through at least most of the sticky bits in the ~2 hours 🎉
We didn't actually make the cargo crate compile faster, but we did explore pretty much every tool that might help you reduce your
@rustlang
crate build time. And found that the tools still have some ways to go to produce actionable information 😅
Just wrote the foreword to Rust for Rustaceans, and re-realized that this post from 2018 is one of the reasons why I started doing my videos, and in turn one of the reasons why I wrote the book. So thank you
@QuietMisdreavus
:)
The video of our first steps into implementing "A Practical Wait-Free Simulation for Lock-Free Data Structures" in
@rustlang
is up! I miss these longer streams — they're a lot of fun. Still some way to go, but we made good progress!
Oh cool, Rust for Rustaceans is in the latest "Learn You Some Code"
@humble
Bundle! That means you can get it discounted together with a bunch of other tech books from
@nostarch
*and* support the Python Software Foundation in the process!
It'd be really fun to port Facebook's hazard pointer implementation in Folly to Rust. Would potentially be great for implementing concurrent algorithms in Rust going forward, since concurrent memory reclamation is hard. Maybe that's a good topic for the next stream?
I'm so excited that Helsing (where I now work if you missed the announcement) have become a Foundation sponsor! I think it's one of the key ways in which companies can help support the Rust ecosystem beyond purely technical contributions. And I got to ramble in the blog post 😅
Please join us in welcoming
@helsingai
to the Rust Foundation as our newest Silver Member!
Learn how Helsing is using
#rustlang
& why they joined the Foundation in this interview with Dr. Robert Fink (CTO) &
@jonhoo
(Principal Software Engineer).
Oh, right, I have a stream scheduled for tomorrow, don't I? 😅 Well, my streaming desk currently looks like this in preparation for my move to Norway (getting on the plane on Friday!), so no stream this week I'm afraid. But definitely Q&A soon!
Stream time! On Friday (5p UTC: ), I'll cover ?Sized, fat pointers, dynamic vs. static dispatch, vtables, and trait objects in
@rustlang
. Maybe even coherence if we have time. I get a lot of questions about those, so figured let's do them all at once! 🥧🦀
The Crust of Rust episode on Rc/RefCell/Cell and Arc/RwLock/Mutex is now up — get it while it's hot! We covered
@rustlang
smart pointers and interior mutability, and even did a quick-dive into UnsafeCell and the Drop Check 😮
The Crust of Rust episode on subtyping and variance in
@rustlang
is now up at . Even though it's a thorny topic that I'm fairly new to myself, I _think_ we managed to explain the concepts and their practical implications without too many 🍿moments.
The recording of my first
@rustlang
mini session is now up! We covered lifetime annotations through a real code example, and people seemed to follow along and understand why the lifetimes were needed and how they worked 🎉 Watch it at