Rust team drops v1.41, sweetening the deal on crates

Rust release

Mozilla-bred programming language Rust has hit version 1.41, improving Cargo details and relaxing restrictions for trait implementations, after discussion over a new home kicked off.

The most highlighted RFC implemented in the 1.41 release is meant “to clarify some ambiguity” when implementing traits, allowing the impl<T> ForeignTrait<LocalType> for ForeignType<T> construct. It relaxes former restrictions when realising foreign traits for foreign types. Those are meant to prevent crates from implementing the same traits with the same types which can lead to conflicts. However, the strictness of this so called orphan rule narrowed the possibilities when extending crates, the language’s version of packages.

Since the lock file format of Rust’s package manager Cargo has led to some merge conflicts in the past, the Rust team has come up with a new one, meant to keep updates, and therefore conflict potential, to a minimum. The new format directly lists checksum fields instead of tracking checksums via the [metadata] table, and only mentions a dependency’s version/source when it’s ambiguous. 

While the former should reduce conflicts by keeping updates of shared data to a minimum, shorter entries in the dependencies key supposedly “will only either add entries to a lock file or update lines related to just that package” when updating a crate. The format isn’t the default yet, but is planned to become the standard “some time down the road”.


Speaking of Cargo, the install command had been reworked to also update existing installations of a crate, if a new release is available. Compared to the –force flag which could be used for that purpose before, the changed install leaves the crate as it is if it’s up to date instead of enforcing a reinstallation.

Additional changes can be found in Rust’s foreign function interface, where users get more guarantees when using Box<T> to make it more compatible with C, as well as in the standard library. The library mainly saw a stabilisation of methods such as Result::map_or and weak_count. More details are available via the announcement blog post.

Rust is a programming language developed by Mozilla, meant to help with building reliable, efficient software. In recent weeks, discussion about the project’s future has heated up, after core developer Nicholas Matsakis raised the idea of a foundation home. Setting one up could clarify the language’s independent status and help it grow, since “the Rust project has started to hit the limits of what Mozilla can reasonably support.”

- Advertisement -