BT

Rust 1.5 Released with Cargo Install

| by James Chesters Follow 1 Followers on Dec 21, 2015. Estimated reading time: 2 minutes |

The Rust core team has released the stable version of 1.5, with around 700 changes, including the introduction of cargo install and shrinking the metadata size by 20%.

In the blog post Announcing Rust 1.5 the core team describe cargo install as "a new subcommand that installs Cargo application packages on the local system." It continues

The community is already taking advantage of cargo install to install applications like rustfmt, the work-in-progress code formatting tool for Rust. Moreover, cargo install can also be used to install new subcommands for Cargo itself

These include:

  • cargo-check: statically check a project, but don’t build a binary.
  • cargo-edit: add or remove dependencies for a project through the command line.
  • cargo-graph: build dependency graphs for a project using GraphViz.
  • cargo-watch: automatically re-run a Cargo command when the project changes.

A notable highlight with the release is that now Rust applications hosted on crates.io can be installed locally to ~/.cargo/bin with the cargo install command. This is particularly useful for augmenting Cargo with new subcommands, for example when a binary named. cargo-foo is found in $PATH it can be invoked as cargo foo.

1.5 stable comes with the expected breaking changes. A modification to the rules determining when a particular lifetime must outlive a particular value means that they no longer rely on parametricity. Where the team describe the rules as "clever" they are also referred to as "fragile and unproven."

The update means that Rust "will start assuming that a destructor for a data-type definition such as struct Parametri<c> may read from data held in its C parameter, even though the fn drop formerly appeared to be parametric with respect to C" which would cause rustc to reject code previously accepted.

Rust 1.5 has also shrunk the crate metadata by 20%, with contributor arielb1 commenting "libcore.rlib reduced from 19121 kiB to 15934 kiB."

In a discussion on Hacker News user Cshelton commented on the release

Congrats first of all!

I love Rust and am using it more and more. I'm very excited for 'cargo watch'. These tools built into the package manager will be so helpful with peoples' first time Rust experience. I think I'm going to say it, Rust has my favorite package management system of any language I've used.

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

Rate this Article

Adoption Stage
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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT