The Why, What, and How of Pinning in Rust
Channel:Jon Gjengset · Length:3:03:53 · Published:2019-09-14 · Views:87445
Summary
Jon Gjengset's long live-coding stream explains Rust's Pin and Unpin types: why they exist, how they work, and how they connect to futures and async/await. It also covers moving from pre-pinning code to the new model.
Why HN recommends it
HN treats it as the definitive resource for understanding Pin semantics and lists it among async Rust learning materials.
Jon Gjengset's stream on pin/unpin is invaluable for understanding Pin semantics — HN, 2023
Programming language design · C, C++, Rust, Go & systems languages
Subtitles (excerpt)
Hey everyone, welcome back. It's been a long time since last time, but finally I'm now back. I also have a new microphone which is really cool. one of you gifted it to me. And that is really exciting that I can do something where people feel excited enough that they will contribute to help make things better. I am John, as you can see from screen. I've been doing these streams now for over a year and I do streams on all sorts of Rust related things. Some of them are live coding streams, some of them are open source contribution streams, and some of them like this one are more sort of educational streams. And so there's a Twitter where I announce upcoming videos. I also have a YouTube channel where I post all of the sessions we have after the fact. So you can go back and look at any of the old videos if you want to. I also, for various annoying reasons, I can't actually have a Patreon in the US. And so instead, I've recently started this Amazon wishlist that's linked to from my Twitter. So this is how I ended up with this microphone. If you have something to spare and you want to show your appreciation for what I do, then please find something here that you think could be fun to buy to help me and help with the streams.
On Hacker News
Jon Gjengset's stream on pin/unpin is invaluable for understanding Pin semantics: [VIDEO] But the 10000 ft view is: Pin lets you tell Rust to never ever move a piece of memory. This is almost always done because the piece of memory has pointers into itself (it's self referencial) which would be come invalid if moved. — theossuary, 2023-03
there is a chapter on async in comprehensive rust and rustbook which ought to bring you up to speed there is the async book but it is largely unfinished you can watch John Gjengset's crust of rust async, decrusting tokio, and why what, and how of pinning in rust then there are tokio-lessons and tokio tutorial which teach how to use tokio runtime and there are also good blogposts by phil-oop and r… — lame_lexem, 2026-05
Let's assume for a moment self-referential references were allowed. Let's further say we have such a struct containing self-referential references and we move it. Moving actually moves things in memory, including the thing those references reference. This means the references now point at the old and now incorrect location. Accessing them would trigger undefined behavior. Self-referencing is only… — DasIch, 2021-05
Related videos
- Coding Adventure: Ant and Slime Simulations · Sebastian Lague · 17:53
- Black Hat USA 2013 - OPSEC failures of spies · Black Hat · 25:11
- Arithmetic, Population and Energy - FULL LENGTH · kip399 · 1:14:16
- The Most Misunderstood Concept in Physics · Veritasium · 27:14
- Canceling | ContraPoints · ContraPoints · 1:40:27
- Crust of Rust: async/await · Jon Gjengset · 2:34:01
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- CppCon 2015: Andrei Alexandrescu “std::allocator...” · CppCon · 1:12:27
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28
- Conway's Game Of Life in APL · Dyalog · 7:47
- Lecture 1A | MIT 6.001 Structure and Interpretation, 1986 · MIT OpenCourseWare · 1:12:55
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- Growing a Language, by Guy Steele · Bill Pugh · 53:31
- CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step” · CppCon · 59:33