Rustacean Station

What's New in Rust 1.79 and 1.80

61 snips
May 10, 2025
Discover the exciting new features introduced in Rust 1.79 and 1.80! The discussion highlights inline constant expressions and enhancements to global variables, boosting readability and resource management. Delve into frame pointers for improved debugging and the stabilization of unchecked arithmetic for optimized performance. Learn about advancements in string processing, including UTF-8 handling and new methods for slices. Don't miss the introduction of lazy initialization types and exclusive ranges in pattern matching, enhancing developer efficiency!
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Frame Pointers Enabled in Std Lib

  • Frame pointers are now enabled in standard library builds to improve debugging.
  • Frame pointers store stack frame info, easing stack unwinding despite a small memory overhead.
ADVICE

Use unchecked integer additions Safely

  • Use the new unchecked arithmetic methods on integer types for unsafe but faster operations when you can prove no overflow occurs.
  • This avoids overhead of checked APIs and unwraps, improving performance in critical code.
INSIGHT

Safe Len on Raw Slice Pointers

  • Raw pointers to slices now have safe length and is_empty methods.
  • This safely exposes the length metadata stored in fat pointers without dereferencing the data pointer.
Get the Snipd Podcast app to discover more snips from this episode
Get the app