Rust 1.34.0 stable adds alternative cargo registries and more

Share
  • April 16, 2019

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 or Result, 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.

The post Rust 1.34.0 stable adds alternative cargo registries and more appeared first on JAXenter.

Source : JAXenter