BT

InfoQ Homepage News Rust 1.2 Brings Faster Compilation, Parallel Code Generation, and More

Rust 1.2 Brings Faster Compilation, Parallel Code Generation, and More

Bookmarks

The Rust Core Team has announced the availability of the Rust 1.2 stable and 1.3 beta releases. Rust 1.2 focuses mainly on tooling, improving compiler performance and introducing parallel code generation. Furthermore, it introduces support for the MSVC toolchain.

Here the most relevant changes;

  • Faster compilation: Rust 1.2 brings developers a compilation time speedup of about 30% on benchmark compilation. On real-world projects taken from Rust package repository, Crates, performance saw an improvement by a 1.16x–1.62x factor depending on the target project.

  • Parallel coge generation: mostly useful for debug builds, parallel code generation brings a 33% spueedup when bootstrapping on a 4 core machine. Activating parallel code generation will prevent some optimizations and make it equivalent to using a -O1 flag.

  • Cargo: Rust’s package manager has also got improved performance, in two cases specifically: when doing a build that do not require any recompilation; and when using shared target directories in large projects, which make it possible to cache common dependencies.

  • MSVC toolchain support: starting with Rust 1.2, the Rust compiler is able to link using the native Windows toolchain, whereas in previous versions mingw was used. Additionally, the MSVC platform is now a first-tier platform, which means that all rust-lang crates are tested on it.

  • Language changes: most relevant is full support for dynamically-sized types, with the addition of dynamically-sized type coercion. Dynamically-sized types are types whose size is unknown to the compiler, such as [T], which represents a number of sequentailly laid-out instances of T, and Trait, which represents a type T that implements the trait Trait. Dynamically-sized types were already present in Rust 1.0, and Rust 1.2 completes their implementation by allowing smart pointers to apply to existential types such as [T] and Trait.

As to Rust 1.3 beta, it will also bring better performance, mainly improving things within the standard library. Furthermore, Rust 1.3 adds preliminary support for Windows XP, although XP is not considered to be in the “first tier”.

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

Rate this Article

Adoption
Style

Educational Content

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

  • Typo?

    by Vlad Didenko /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Did you mean to say "MSVC platform is noW a first-tier platform"?

  • Typo, there? Did you mean MSVC is NOW a tier-1...

    by Michael Watson /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    How long to correct that? People are reading it....

  • Re: Typo?

    by Sergio De Simone /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    That was an unfortunate typo... sorry about it.
    Thank you very much.

  • Re: Typo, there? Did you mean MSVC is NOW a tier-1...

    by Sergio De Simone /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Now it's done. Sorry about the delay...

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.