Skip to content
0:00 / 0:00

#unsaferust#rustonomicon#jongjengset

Rust NYC: Jon Gjengset - Demystifying unsafe code

Rust Programming Language

70K subscribers • 43 videos on Hallway • Conference channel

YouTube

Intermediate. Assumes working knowledge.

26K views6 years ago2 recommendations

Programming languagesSystems programmingRustMemory managementConcurrency and parallelism

Jon Gjengset explains what unsafe code in Rust actually means, why it is necessary, and how to use it responsibly.

Unsafe code is something we, as Rust programmers, have a complicated relationship with. Some shrug it off as "it's fine, it's just C", while others declare any use of unsafe as irresponsible and a strike against any code that uses it. Many of us sit somewhere in between, often because we are unsure what this unsafe thing even really is. Is it truly as disastrous as some say, or is it really just harmless and overblown as others claim? In this talk, we explore the pages of the nomicon and take a look at what unsafe really means, why it is dangerous, why it is sometimes useful nonetheless, and how to deal with it responsibly. Thanks to our sponsors for the Rust NYC meetup and especially timber.io for sponsoring the film crew. Slides: jon.thesquareplanet.com/slides/demystifying-unsafe/ Slides PDF: jon.thesquareplanet.com/slides/demystifying-unsafe/export.pd… Meetup: meetup.com/Rust-NYC/ Jon: twitter.com/jonhoo

Why it's here

2 people recommend this

What people say. Recommended as an excellent, clear explanation of unsafe Rust and how to think about memory safety.

Sammion Hacker News • Recommends

On “How to speed up the Rust compiler in 2020”

There's a great new talk by on Gjengset on youtube that tackles just this question: Rust NYC: Jon Gjengset - Demystifying unsafe code link to this video

saghmon Hacker News • Recommends

On “Compiling C to Safe Rust, Formalized”

…anyone interested can probably find fairly easily by googling "unsafe Rust harder than C", I'll break my usual rule of strongly preferring articles to video content to link a talk from youtube because the speaker is one of those people I mention who I'd trust more than me to write unsafe code and I remember seeing him give this talk at the meetup: link to this video…

ibraheemdevon Hacker News • Mentions

On “The Rustonomicon”

…, and I wanted to take a little bit of time to talk about what unsafe is because I think a lot of where the communities lack of alignment on this particular topic comes from a fact that unsafe is a bit of a mystery to many of us Learning about unsafe is useful, and at time necessary, it's not inherently evil, nor should it be used too freely. 0: link to this video…