Friday, 29 June 2018

What’s new in Rust 1.27

Version 1.27 of the Rust systems programming language is now available.

Current version: What’s new in Rust 1.27

Rust 1.27 features basic SIMD (single-instruction, multiple-data)capabilities. The std::arch module serves as a gateway to architecture-specific instructions usually related to SIMD. A higher-level std::simdmodule is planned for the future.
Other new features in Rust 1.27 include:
  • The dyn Trait syntax is stabilized, providing a syntax for trait objects using a contextual dyn. A “bare trait” syntax for trait objects is deprecated, because it is often ambiguous and confusing.
  • The #[must use] attribute can now be used on functions. Previously, it only applied to types, such as Result<T, E>. Parts of the standard library also have been enhanced to use #[must use].
  • Multiple new APIs were stabilized in the release, including DoubleEndedIterator: : rfind and NonNull: :cast.
  • The Cargo package manager for Rust has been upgraded to require a --target-dir flag to change the target directory for a given invocation. Additionally, auto keys have been added to tomlfor dealing with targets.

Where to download Rust 1.27

You can download Rust 1.27 from the project website.

Previous version: What’s new in Rust 1.26

Rleased in mid-May 2018, highlights of Rust 1.26 include:
  • A reduction in compile times, via a fix impacting nested types.
  • Support for 128-bit integers, twice the size of u64 and holding more values.
  • Library stabilizations, specifically fs::read_to_string, providing a convenience over File::open and io::Read::read_to_string for reading a file into memory.
  • The Cargo package manager is expected to offer faster resolution of lock files and require manual cargo update invocations less often. 
  • The impl Trait feature, allowing for abstract types in returns or function parameters, is now stable. Existential types are provided.
  • Better match bindings, with the compiler automatically referencing or dereferencing in match.
  • Basic slice patterns, which allow you to match on slices in a similar way to matching on other data types.

Previous version: What’s new in Rust 1.25

Version 1.25 of Rust features an upgrade to its LLVM (Low-Level Virtual Machine) compiler infrastructure that improves support for the WebAssembly portable code format, which itself is designed to improve the performance of web applications. Rust 1.25 also includes improvements to the Cargo package manager and library stabilizations.

New Rust features from the LLVM upgrade

The Rust language has been upgraded to LLVM 6 from LLVM 4. This lets Rust keep abreast of the upstream WebAssembly back end and pick up new features when they land.
The LLVM upgrade also fixes some SIMD-related compilation errors. For internet of thigs (IoT) development, LLVM 6 brings Rust closer to supporting the AVR microntroller family, leveraged in the Arduino Uno board. Rust, Mozilla claims, can improve security and reliability of IoT devices and is much better at this than the C/C++ languages commonly used to write microcontroller firmware. AVR support is due soon.

New Rust features from the Cargo CLI changes

For the Cargo command-line interface, cargo new will default to generating a binary rather than a library. Rust’s developers said they try to keep the CLI stable but that this change was important and unlikely to result in breakage. They said that cargo new accepts two flags:
  • —lib, for building libraries
  • —bin, to build binaries or executables
In previous versions of Cargo, developers who did not pass one of these flags would default to —lib. This was done because each binary often depends on other libraries, thus making the library case more common. But this behavior is actually incorrect, because each library is depended on by many binaries. Also, some community members found the default surprising.

Other new features in Rust 1.25

Other features in Rust 1.25 include:
  • Library stabilizations include a std::ptr::NonNull<T> type, which is nonnull and covariant.
  • libcore has gained the time module, with the Duration type that had only been available in libstd
  • Checkouts of Git dependenices from the Cargo database folder should be quicker, due to the use of hard links. Cargo caches Git repositories in a few locations.
  • Nested imports groups provide a new way to write use statements, which can reduce repetition and foster clarity.
https://www.infoworld.com

No comments:

Post a Comment