Get the latest tech news

Safety Goggles for Alchemists


The Path Towards Safer Transmute Since Rust’s inception, mem::transmute has been the poster-dragon of unsafe code, but its reign of error is coming to an end! In this talk blog post, you’ll learn how Rust is poised to become the first systems programming language with transmutation safety, and how safe transmute is already being put to use to build next-gen systems. (This is an adaption of my RustConf 2024 talk of the same name.

As you might know, when Graydon Hoare presented Rust at the Mozilla Annual Summit in 2010, his opening slide described the project as “ Technology from the past come to save the future from itself. We need to avoid recursion, migrate to a denser memory representation of layouts, and implement a run-length-encoding optimization so we can support very large arrays efficiently. We have some ideas of how to solve this, including the possibility of a marker trait automatically implemented for types whose memory representation is consistent across targets and compiler versions.

Get the Android app

Or read this on Hacker News