Skip to content
0:00 / 0:00

#unsaferust#vec#pointers

Building on an unsafe foundation — Jason Orendorff

Rust Belt Rust Conference

4.8K subscribers • 4 videos on Hallway

YouTube
  • Recommended by 3 people: 1 on Lobsters and 2 in engineering communities.
  • Presented by Jason Orendorff, co-author of Programming Rust

Intermediate. Assumes working knowledge.

8.3K views8 years ago3 recommendations

Programming languagesSystems programmingRustMemory managementData structures

Jason Orendorff explains why unsafe code is necessary in safe languages and demonstrates how it is used to build safe abstractions like Vec.

Beneath every safe programming language, library, or virtual machine is a whole lot of unsafe code. Rust is no exception. This talk will explain why “unsafe” code is allowed at all in a safe language, show the unsafe code at work inside safe features like Vec, and teach how to write a safe library that uses unsafe code.

Why it's here

3 people recommend this

What people say. Highly recommended as one of the best explanations of how safe Rust builds on top of unsafe foundations.

u/Hitife80in r/rust • Recommends

On “Why Writing a Linked List in Rust is Basically Impossible”

Another obligatory reference for OP: Building on an unsafe foundation — Jason Orendorff. Forget linked lists -- a standard Vector has plenty of unsafe code, and it should (agruably) be simpler to implement. Unsafe Rust is just a stepping stone to warn the developer -- use responsibly, only where you actually need it. To OP's credit -- he did say he is starting to dabble in Rust and may be going unsafe is a bit too early. But, at the same time he seems to have background in C -- that should have prepared him for this.

fitzgenon Lobsters • Recommends

Building on an unsafe foundation Jason Orendorff gave this talk at the Rust Belt Rust conference.

u/0x7CFEin r/rust • Recommends

On “What's your favorite Rust conference talk?”

One of the best (if not *the* best) talks about Rust I've ever seen. Definitely worth its time if you want to know what really is Rust about. By the way, Jason Orendorff is the second author of "Programming Rust" book. Another video I strongly suggest to watch is Boats' recent talk on the coherence, although it's quite advanced topic for a newbie. But still it's a very good explanation of what the heck coherence is and why it's there in the first place. I was surprised to know that even seasoned rustaceans often don't know about it.