What’s new with Rust?

Maourice Gonzalez

Updated on:

Rust Lang Feature

The Rust Team just released version 1.59.0 and it comes packed with some very useful and interesting goodies. For those that don’t know, Rust is a lightning-fast and memory-efficient programming language that can power performance-critical services, run on embedded devices, and seamlessly interface with other languages. If you want to learn more about Rust and how it compares to classic languages like C++, check out this article from yours truly. Now let’s talk about what’s new!

Incompatibility Warnings

Programming languages and frameworks move forward at a relentless pace, sometimes you will find yourself in situations where a specific implementation used by your project will not longer be allowed or work. Unfortunately sometimes you happen to find out very late in the game when your project simply stops building. Version 1.59.0 brings a great feature that now shows warnings when a dependency will stop working in subsequent releases.

warning: the following packages contain code that will be rejected by a future version of Rust: old_dep v0.1.0
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

This allows you to be prepared and avoid headaches down the line. Now instead of scrambling to find an alternative, you can plan your migration ahead of time and avoid all of the stress that come with last minute changes.

Stripped binaries

In Rust, the standard libraries typically ship debug info and symbols which makes them larger than they need to be. Using the new “strip” option allows you to remove all of this extra baggage and generate much smaller binaries for distribution.

strip = "debuginfo"

Inline assembly

Saved the best for last! This release now supports inline assembly. Many applications that require very low-level control over their execution or access to specific machine instructions can benefit from this. Check out this example below from the Rust release announcement.

When compiling for x86-64 targets, for instance you can write:

Rust Inline Assembly

As of now support there is support for the following architectures:

  • x86
  • x86-64
  • ARM
  • AArch64
  • RISC-V

As you can see Rust is moving along nicely, the language is very robust and should not be overlooked when looking to build high performant portable applications with the ability to run pretty much anywhere. To read about all of the updates head over to the  RustCargo, and Clippy GitHub repositories.

What are your thoughts on Rust? Have you used it? Are you excited about these new features in version 1.59.0? Sound off in the comments below!