BT

InfoQ Homepage News Rust 1.4 Brings Major Improvement to Cargo

Rust 1.4 Brings Major Improvement to Cargo

Bookmarks

The Rust core team has released 1.4 stable, with approximately 1200 changes including a major improvement to Cargo, stabilised APIs, and fixes to improve the behavior of associated types.

Cargo, the Rust package manager, now prints extra information about changes updating issue #984. The core team give the following example:

$ cargo update
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating libc v0.1.8 -> v0.1.10
    Updating memchr v0.1.3 -> v0.1.5
    Updating num v0.1.26 -> v0.1.27
    Updating rand v0.3.9 -> v0.3.10
    Updating rustc-serialize v0.3.15 -> v0.3.16

Contributor George Hilliard says the code will now "correctly handle adding/removing multiple versions of one package, as well as several packages with different sources, but the same name."

RFC 1214, “Clarify (and improve) rules for projections and well-formedness” brings to Rust type system changes that aims to address the outlives relation with respect to projections, while also better enforcing that all types respect their declared bounds.

The core team's blog post explains that’s what appears to be "deeply technical" from the title, the "TL;DR" is that some weaknesses were found in the definition and implementation of a few aspects of the type system. RFC 1214 fixes these problems.

Contributor Niko Matsakis elaborates

The current implementation can be both unsound (rust-lang/rust#24622), inconvenient (rust-lang/rust#23442), and surprising (rust-lang/rust#21748, rust-lang/rust#25692). The changes are as follows:

  • Simplify the outlives relation to be syntactically based.
  • Specify improved rules for the outlives relation and projections.
  • Specify more specifically where WF bounds are enforced, covering several cases missing from the implementation

The release notes for Rust 1.4 warn of "immediate breakage" in some scenarios following this update.

Also significant in Rust 1.4 is RFC 1212, changing "all functions dealing with reading ‘lines’ to treat both \n and \r\n as a valid line-ending", as well as library changes including faster reverse-string searches, and Windows builds that target the 64-bit MSVC ABI and linker (instead of GNU) are now supported and recommended for use.

More details about Rust 1.4 can be found in the release notes.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.