Version 1.32 of the Rust systems programming language is now available.
Current version: What’s new in Rust 1.32
The 1.32 version of Rust, released in January 2019, includes the following changes:
- The
dbg
macro. Insertingdbg!()
into a Rust application prints anyprintln!
-formattable expression tostderr
, with a minimal amount of boilerplate. Inserting print statements as an aid to debugging is an old-school technique, but a reliable fallback when you just need to know the state of a variable at a given point in time. - The
jemalloc
memory allocator is no longer the default. Rust applications now use the system’s own memory allocator as the default, withjemalloc
available via thejemallocator
crate. Using the system allocator reduces the size of Rust binaries by about 300 KB, and makes the default behavior for Rust apps across platforms more consistent. (Rust apps built on Microsoft Windows have used the system allocator by default for some time now.) - Macros now have the ability to perform matching against all types of literals — strings, numerics, and
char
literals. This makes it easier to write macros that accept literals as parameters. - More refinements to the way module imports work, further reducing the amount of boilerplate needed for trivial apps.