|Rust Releases New Versions|
|Written by Kay Ewbank|
|Tuesday, 11 August 2015|
Two new versions of Rust have been released; 1.2 in a stable version, and 1.3 as a beta release. The main improvements in Rust 1.2 are faster compilation and parallel code generation, along with support for the MSVC toolchain.
Rust is a systems programming language that aims to be safe, fast and concurrent without having a garbage collector. The idea is this makes it a useful language in circumstances where other languages have drawbacks. Rust is good for embedding in other languages, writing programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems.
Today marks the completion of the Rust 1.2 stable and 1.3 beta release cycles! Read on for the highlight, or check the release notes for more detail.
The improvements to the compiler performance see the new version of Rust performing 33% faster than Rust 1.0 in benchmark tests. According to a post about the new version on the Rust language blog, there is:
"an across-the-board improvement to real-world compiler performance. Representative crates include hyper (compiles 1.16x faster), html5ever (1.62x faster), regex (1.32x faster) and rust-encoding (1.35x faster).”
The 33% improvement in speed comes from the parallel codegen, which the blog post says is particularly useful for debug builds, since it prevents some optimizations. However, it can also be used with optimizations as an effective -O1 flag.
The performance of Cargo, Rust’s package manager, has also been improved, so that builds that do not require any recompilation on large projects are as much as ten times faster. Another improvement to Cargo is that it now supports shared target directories that cache dependencies across multiple packages. This also reduces the build-time for complex projects.
The new release has improved support for Microsoft Visual C (MSVC) and you can now link Rust code directly against code built using the native Windows toolchain. The developers say that:
“the compiler bootstraps on MSVC, we have preliminary nightlies, and we are testing all rust-lang crates against MSVC. Unwinding support is not yet available (the process aborts on panic), but work is underway to land it.”
In language terms, the completion of support for dynamically-sized type (DST) means that smart pointers such as Rc can be seamlessly applied to arrays and trait objects, making Rc<[T]> fully usable.
At the moment this support is limited to smart pointers in the standard library; support for external smart pointer types is available in nightlies, and will be stabilized soon.
Away from the 1.2 stable release, the 1.3 beta sees the introduction of the Rustonomicon, a new book covering “The Dark Arts of Advanced and Unsafe Rust Programming”. More practically, there are a number of performance boosts over and above those in 1.2, including a more efficient algorithm for the substring matcher; improvements to zero filling; and the implementation of Read::read_to_end has been specialized for stdin and File, resulting in additional speedups.
The team has also added preliminary support for targeting Windows XP. While they do not intend to treat Windows XP as a “first tier” platform, it is now feasible to build Rust code for XP as long as you avoid certain parts of the standard library.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: email@example.com
|Last Updated ( Wednesday, 12 August 2015 )|