days
-7
-1
hours
0
-3
minutes
-2
-9
seconds
-5
-7
search
Updating Rust

Rust 1.34.0 stable adds alternative cargo registries and more

Sarah Schlothauer
Rust
© Shutterstock / Colorshadow

The developer love for Rust is strong – this is the fourth year in a row that it polled as the number one most loved programming language in the StackOverflow developer survey. Now, the latest stable release of Rust is here. Rust 1.34.0 adds a few new features, including alternative cargo registries, and severeal deprecations.

Rust-lang updated to version 1.34.0 on April 11, 2019. The update is a new stable release that introduces a major new feature and several deprecations, changes, and new additions.

Recently, StackOverflow’s Annual Developer Survey showed the strong developer love for Rust. It polled as the number one most loved programming language for the fourth year in the row, ahead of Python, TypeScript, and Kotlin.

This marks the first update since February, so let’s take a look at the new features.

Rust 1.34.0 stable release additions

The new release introduces support for alternative cargo registries. According to the release blog’s notes, this differs from previous versions of Rust:

Since before 1.0, Rust has had a public crate registry, crates.io. People publish crates with cargo publish and it’s easy to include these crates in the [dependencies] section of your Cargo.toml…With this release, Cargo gains support for alternate registries. These registries coexist with crates.io, so you can write software that depends on crates from both crates.io and your custom registry. Crates on crates.io cannot however depend on external registries.

https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html

Developers who wish to run their own registry can see further detailed instructions on how to implement a minimal registry.

SEE ALSO: KISS it: Good architecture and design for Continuous Delivery pipelines

Now, the latest release adds full support for ? in documentation tests. The announcement blog details the proposal behind this new feature:

RFC 1937 proposed adding support for using the ? operator in fn main()#[test]functions, and doctests, allowing them to return Option<T> or Result<T, E>, with error values causing a nonzero exit code in the case of fn main(), and a test failure in the case of the tests.

Deprecations

Take a look at the latest changes and deprecations:

Getting the new update

According to the instructions in the release announcement, if you have a previous version of Rustlang installed via the rustup tool, updating to version 1.34.0 only requires one line of code:

$ rustup update stable

SEE ALSO: Defending against CDD: Chaos-driven delivery

Install Rust from their website available here. The website will walk you through the necessary steps and update to the latest stable release. The rustup tool helps install and manage Rust. If rustup is already downloaded, you will need to update it to the latest version  by running rustup update.

View the detailed release notes for this update on the GitHub repo.

Author
Sarah Schlothauer

Sarah Schlothauer

All Posts by Sarah Schlothauer

Sarah Schlothauer is an assistant editor for JAXenter.com. She received her Bachelor's degree from Monmouth University and is currently enrolled at Goethe University in Frankfurt, Germany where she is working on her Masters. She lives in Frankfurt with her husband and cat.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of