此内容没有您所选择的语言版本。

Chapter 5. Changes in Rust Toolset in Red Hat Developer Tools 2018.2


This chapter lists some notable changes in Rust Toolset since its previous release.

5.1. Rust

Rust has been updated from version 1.22.1 to 1.25.0. Notable changes include:

  • Incremental compilation has been added to the Rust compiler. The compiler can reuse artifacts from previous builds and rebuild only the neccessary parts of code.
  • The default amount of code generation units for compilation has been changed to 16.
  • The methods from the AsciiExt trait are now implemented directly in the string and character types.

    Note that this change may cause unused_imports warnings to appear for code bases using the AsciiExt trait.

  • Several library functions such as mem::size_of() can be used in const expressions.
  • Structs can be aligned using the #[repr(align(x))] attribute.
  • The std::ptr::NonNull<T> type has been added to the standard library for holding a non-null covariant pointer.
  • The rustfmt code formatting tool has been added. For more information, see Chapter 3, rustfmt.

Additionally, the following bugs have been fixed:

  • Previous changes in the glibc library caused Rust to not recognize stack guard code. As a consequence, when a stack overflow happened in a Rust thread, Rust terminated with a segmentation fault signal SIGSEGV instead of an abort signal SIGABRT. Additionally, the error message "thread '{}' has overflowed its stack" was not displayed. Rust has been updated to recognize the stack guard correctly and terminates again with the correct signal and error message. (BZ#1540329)

5.2. cargo

The cargo tool has been updated from version 0.23.0 to 0.26.0. Notable changes include:

  • Support for unit tests has been added to the cargo check command.
  • Support for selecting specific versions has been added to the cargo install command.
  • Support for removing multiple packages at once has been added to the cargo uninstall command.
  • Debug builds enable incremental compilation by default.
  • The cargo new command now defaults to creating a project for a binary instead of a library. Additionally, it no longer mangles supplied project names when they include substrings related to Rust.

5.3. Container Image

Notable changes include:

  • Source-to-Image (S2I) support has been added to the rust-toolset-7-rhel7 container image. As a result, S2I can be used to build Rust application containers. (BZ#1535050)
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat