Version 1.82.0 (2024-10-17)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

  • We now disallow setting some built-in cfgs via the command-line with the newly added explicit_builtin_cfgs_in_flags lint in order to prevent incoherent state, eg. windows cfg active but target is Linux based. The appropriate rustc flag should be used instead.
  • The standard library has a new implementation of binary_search which is significantly improves performance (#128254). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
  • illumos/Solaris now sets MSG_NOSIGNAL when writing to sockets. This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.
  • Removes a problematic hack that always passed the --whole-archive linker flag for tests, which may cause linker errors for code accidentally relying on it.
  • The WebAssembly target features multivalue and reference-types are now both enabled by default. These two features both have subtle changes implied for generated WebAssembly binaries. For the multivalue feature, WebAssembly target support has changed when upgrading to LLVM 19. Support for generating functions with multiple returns no longer works and -Ctarget-feature=+multivalue has a different meaning than it did in LLVM 18 and prior. There is no longer any supported means to generate a module that has a function with multiple returns in WebAssembly from Rust source code. For the reference-types feature the encoding of immediates in the call_indirect, a commonly used instruction by the WebAssembly backend, has changed. Validators and parsers which don't understand the reference-types proposal will no longer accept modules produced by LLVM due to this change in encoding of immediates. Additionally these features being enabled are encoded in the target_features custom section and may affect downstream tooling such as wasm-opt consuming the module. Generating a WebAssembly module that disables default features requires -Zbuild-std support from Cargo and more information can be found at rust-lang/rust#128511.
  • Rust now raises unsafety errors for union patterns in parameter-position

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.81.0 (2024-09-05)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

  • Usage of the wasm32-wasi target will now issue a compiler warning and request users switch to the wasm32-wasip1 target instead. Both targets are the same, wasm32-wasi is only being renamed, and this change to the WASI target is being done to enable removing wasm32-wasi in January 2025.

  • We have renamed std::panic::PanicInfo to std::panic::PanicHookInfo. The old name will continue to work as an alias, but will result in a deprecation warning starting in Rust 1.82.0.

    core::panic::PanicInfo will remain unchanged, however, as this is now a different type.

    The reason is that these types have different roles: std::panic::PanicHookInfo is the argument to the panic hook in std context (where panics can have an arbitrary payload), while core::panic::PanicInfo is the argument to the #[panic_handler] in no_std context (where panics always carry a formatted message). Separating these types allows us to add more useful methods to these types, such as std::panic::PanicHookInfo::payload_as_str() and core::panic::PanicInfo::message().

  • The new sort implementations may panic if a type's implementation of Ord (or the given comparison function) does not implement a total order as the trait requires. Ord's supertraits (PartialOrd, Eq, and PartialEq) must also be consistent. The previous implementations would not “notice” any problem, but the new implementations have a good chance of detecting inconsistencies, throwing a panic rather than returning knowingly unsorted data.

  • In very rare cases, a change in the internal evaluation order of the trait solver may result in new fatal overflow errors.

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.80.1 (2024-08-08)

Version 1.80.0 (2024-07-25)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.79.0 (2024-06-13)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Misc

Compatibility Notes

Version 1.78.0 (2024-05-02)

Language

Compiler

Target changes:

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.77.2 (2024-04-09)

Version 1.77.1 (2024-03-28)

Version 1.77.0 (2024-03-21)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Rustdoc

Misc

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.76.0 (2024-02-08)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

See Cargo release notes.

Rustdoc

Compatibility Notes

Version 1.75.0 (2023-12-28)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.74.1 (2023-12-07)

Version 1.74.0 (2023-11-16)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

None this cycle.

Version 1.73.0 (2023-10-05)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Misc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.72.1 (2023-09-19)

Version 1.72.0 (2023-08-24)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Rustdoc

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

  • Enable -Zdoctest-in-workspace by default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. docs #12221 #12288
  • Add support of the “default” keyword to reset previously set build.jobs parallelism back to the default. #12222

Compatibility Notes

Version 1.71.1 (2023-08-03)

Version 1.71.0 (2023-07-13)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Misc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.70.0 (2023-06-01)

Language

Compiler

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.69.0 (2023-04-20)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.68.2 (2023-03-28)

Version 1.68.1 (2023-03-23)

Version 1.68.0 (2023-03-09)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Misc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.67.1 (2023-02-09)

Version 1.67.0 (2023-01-26)

Language

Compiler

Added, updated, and removed targets:

Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.66.1 (2023-01-10)

  • Added validation of SSH host keys for git URLs in Cargo (CVE-2022-46176)

Version 1.66.0 (2022-12-15)

Language

Compiler

Libraries

Stabilized APIs

Rustdoc

Cargo

See detailed release notes for more.

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.65.0 (2022-11-03)

Language

Compiler

New targets:

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.64.0 (2022-09-22)

Language

Compiler

Libraries

Stabilized APIs

These types were previously stable in std::ffi, but are now also available in core and alloc:

These types were previously stable in std::os::raw, but are now also available in core::ffi and std::ffi:

These APIs are now usable in const contexts:

Cargo

Misc

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.63.0 (2022-08-11)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now usable in const contexts:

Cargo

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.62.1 (2022-07-19)

Rust 1.62.1 addresses a few recent regressions in the compiler and standard library, and also mitigates a CPU vulnerability on Intel SGX.

Version 1.62.0 (2022-06-30)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Clippy

Cargo

  • Added the cargo add command for adding dependencies to Cargo.toml from the command-line. docs
  • Package ID specs now support name@version syntax in addition to the previous name:version to align with the behavior in cargo add and other tools. cargo install and cargo yank also now support this syntax so the version does not need to passed as a separate flag.
  • The git and registry directories in Cargo's home directory (usually ~/.cargo) are now marked as cache directories so that they are not included in backups or content indexing (on Windows).
  • Added automatic @ argfile support, which will use “response files” if the command-line to rustc exceeds the operating system's limit.

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.61.0 (2022-05-19)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now usable in const contexts:

Cargo

No feature changes, but see compatibility notes.

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.60.0 (2022-04-07)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.59.0 (2022-02-24)

Language

Compiler

This release disables incremental compilation, unless the user has explicitly opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable. This is due to a known and relatively frequently occurring bug in incremental compilation, which causes builds to issue internal compiler errors. This particular bug is already fixed on nightly, but that fix has not yet rolled out to stable and is deemed too risky for a direct stable backport.

As always, we encourage users to test with nightly and report bugs so that we can track failures and fix issues earlier.

See 94124 for more details.

Libraries

Stabilized APIs

Const-stable:

Cargo

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.58.1 (2022-01-20)

Version 1.58.0 (2022-01-13)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

These APIs are now usable in const contexts:

Cargo

Rustdoc

Compatibility Notes

Internal Changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.57.0 (2021-12-02)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilised APIs

These APIs are now usable in const contexts:

Cargo

Compatibility notes

Internal changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.56.1 (2021-11-01)

  • New lints to detect the presence of bidirectional-override Unicode codepoints in the compiled source code (CVE-2021-42574)

Version 1.56.0 (2021-10-21)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilised APIs

These APIs are now usable in const contexts:

Cargo

Compatibility notes

Internal changes

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.55.0 (2021-09-09)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilised APIs

The following previously stable functions are now const.

Cargo

Rustdoc

Compatibility Notes

Version 1.54.0 (2021-07-29)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Compatibility Notes

Version 1.53.0 (2021-06-17)

Language

  • You can now use unicode for identifiers. This allows multilingual identifiers but still doesn't allow glyphs that are not considered characters such as or 🦀. More specifically you can now use any identifier that matches the UAX #31 “Unicode Identifier and Pattern Syntax” standard. This is the same standard as languages like Python, however Rust uses NFC normalization which may be different from other languages.
  • You can now specify “or patterns” inside pattern matches. Previously you could only use | (OR) on complete patterns. E.g.
    let x = Some(2u8);
    // Before
    matches!(x, Some(1) | Some(2));
    // Now
    matches!(x, Some(1 | 2));
    
  • Added the :pat_param macro_rules! matcher. This matcher has the same semantics as the :pat matcher. This is to allow :pat to change semantics to being a pattern fragment in a future edition.

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilised APIs

Cargo

Rustdoc

Compatibility Notes

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.52.1 (2021-05-10)

This release disables incremental compilation, unless the user has explicitly opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.

This is due to the widespread, and frequently occurring, breakage encountered by Rust users due to newly enabled incremental verification in 1.52.0. Notably, Rust users should upgrade to 1.52.0 or 1.52.1: the bugs that are detected by newly added incremental verification are still present in past stable versions, and are not yet fixed on any channel. These bugs can lead to miscompilation of Rust binaries.

These problems only affect incremental builds, so release builds with Cargo should not be affected unless the user has explicitly opted into incremental. Debug and check builds are affected.

See 84970 for more details.

Version 1.52.0 (2021-05-06)

Language

Compiler

Added tier 3* support for the following targets.

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilised APIs

The following previously stable APIs are now const.

Rustdoc

Misc

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Compatibility Notes

Version 1.51.0 (2021-03-25)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Rustdoc

Various improvements to intra-doc links:

Misc

Compatibility Notes

Internal Only

Version 1.50.0 (2021-02-11)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

The following previously stable methods are now const.

Cargo

Misc

Compatibility Notes

Version 1.49.0 (2020-12-31)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

The following previously stable methods are now const.

Cargo

Compatibility Notes

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.48.0 (2020-11-19)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

The following previously stable methods are now const fn's:

Cargo

Rustdoc

Compatibility Notes

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.47.0 (2020-10-08)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

The following previously stable APIs have now been made const.

Cargo

Misc

Compatibility Notes

Internal Only

Version 1.46.0 (2020-08-27)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Added a number of new environment variables that are now available when compiling your crate.

Compatibility Notes

Version 1.45.2 (2020-08-03)

Version 1.45.1 (2020-07-30)

Version 1.45.0 (2020-07-16)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Internals Only

Version 1.44.1 (2020-06-18)

Version 1.44.0 (2020-06-04)

Language

Syntax-only changes

#[cfg(FALSE)]
mod foo {
    mod bar {
        mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
    }
}

These are still rejected semantically, so you will likely receive an error but these changes can be seen and parsed by macros and conditional compilation.

Compiler

Libraries

Stabilized APIs

Cargo

  • Added the cargo tree command which will print a tree graph of your dependencies. E.g.
      mdbook v0.3.2 (/Users/src/rust/mdbook)
    ├── ammonia v3.0.0
    │   ├── html5ever v0.24.0
    │   │   ├── log v0.4.8
    │   │   │   └── cfg-if v0.1.9
    │   │   ├── mac v0.1.1
    │   │   └── markup5ever v0.9.0
    │   │       ├── log v0.4.8 (*)
    │   │       ├── phf v0.7.24
    │   │       │   └── phf_shared v0.7.24
    │   │       │       ├── siphasher v0.2.3
    │   │       │       └── unicase v1.4.2
    │   │       │           [build-dependencies]
    │   │       │           └── version_check v0.1.5
    ...
    
    You can also display dependencies on multiple versions of the same crate with cargo tree -d (short for cargo tree --duplicates).

Misc

Compatibility Notes

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.43.1 (2020-05-07)

Version 1.43.0 (2020-04-23)

Language

Syntax only changes

These are still rejected semantically, so you will likely receive an error but these changes can be seen and parsed by macros and conditional compilation.

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Internal Only

These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.

Version 1.42.0 (2020-03-12)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Compatibility Notes

Version 1.41.1 (2020-02-27)

Version 1.41.0 (2020-01-30)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.40.0 (2019-12-19)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.39.0 (2019-11-07)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.38.0 (2019-09-26)

Language

Compiler

* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

Rustdoc

Misc

Compatibility Notes

Version 1.37.0 (2019-08-15)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.36.0 (2019-07-04)

Language

Libraries

Stabilized APIs

Cargo

You can find further change's in Cargo's 1.36.0 release notes.

Clippy

There have been numerous additions and fixes to clippy, see Clippy's 1.36.0 release notes for more details.

Misc

Compatibility Notes

  • With the stabilisation of mem::MaybeUninit, mem::uninitialized use is no longer recommended, and will be deprecated in 1.39.0.

Version 1.35.0 (2019-05-23)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Version 1.34.2 (2019-05-14)

Version 1.34.1 (2019-04-25)

Version 1.34.0 (2019-04-11)

Language

Compiler

Libraries

Stabilized APIs

std & core

std

Cargo

Misc

Compatibility Notes

Version 1.33.0 (2019-02-28)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Compatibility Notes

Version 1.32.0 (2019-01-17)

Language

2018 edition

All editions

Compiler

Libraries

The following APIs are now const functions and can be used in a const context.

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.31.1 (2018-12-20)

Version 1.31.0 (2018-12-06)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Version 1.30.1 (2018-11-08)

Version 1.30.0 (2018-10-25)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Version 1.29.2 (2018-10-11)

Version 1.29.1 (2018-09-25)

Security Notes

  • The standard library's str::repeat function contained an out of bounds write caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens.

    Thank you to Scott McMurray for responsibly disclosing this vulnerability to us.

Version 1.29.0 (2018-09-13)

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.28.0 (2018-08-02)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.27.2 (2018-07-20)

Compatibility Notes

  • The borrow checker was fixed to avoid potential unsoundness when using match ergonomics: #52213.

Version 1.27.1 (2018-07-10)

Security Notes

  • rustdoc would execute plugins in the /tmp/rustdoc/plugins directory when running, which enabled executing code as some other user on a given machine. This release fixes that vulnerability; you can read more about this on the blog. The associated CVE is CVE-2018-1000622.

    Thank you to Red Hat for responsibly disclosing this vulnerability to us.

Compatibility Notes

  • The borrow checker was fixed to avoid an additional potential unsoundness when using match ergonomics: #51415, #49534.

Version 1.27.0 (2018-06-21)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.26.2 (2018-06-05)

Compatibility Notes

Version 1.26.1 (2018-05-29)

Tools

Compatibility Notes

Version 1.26.0 (2018-05-10)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.25.0 (2018-03-29)

Language

enum Foo { A, B, C }

fn main() {
    let x = Foo::A;
    match x {
        | Foo::A
        | Foo::B => println!("AB"),
        | Foo::C => println!("C"),
    }
}

Compiler

Libraries

Stabilized APIs

The following functions can now be used in a constant expression. eg. static MINUTE: Duration = Duration::from_secs(60);

Cargo

Misc

Compatibility Notes

Version 1.24.1 (2018-03-01)

Version 1.24.0 (2018-02-15)

Language

Compiler

Libraries

Stabilized APIs

The following functions can now be used in a constant expression. eg. let buffer: [u8; size_of::<usize>()];, static COUNTER: AtomicUsize = AtomicUsize::new(1);

Cargo

Misc

Compatibility Notes

Version 1.23.0 (2018-01-04)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.22.1 (2017-11-22)

Version 1.22.0 (2017-11-22)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.21.0 (2017-10-12)

Language

Compiler

Libraries

Stabilized APIs

std::mem::discriminant

Cargo

Misc

Compatibility Notes

Version 1.20.0 (2017-08-31)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Compatibility Notes

Version 1.19.0 (2017-07-20)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.18.0 (2017-06-08)

Language

Compiler

Libraries

Stabilized APIs

Cargo

Misc

Compatibility Notes

Version 1.17.0 (2017-04-27)

Language

Compiler

Stabilized APIs

Libraries

Cargo

Misc

Compatibility Notes

Version 1.16.0 (2017-03-16)

Language

Compiler

Stabilized APIs

Libraries

Cargo

Misc

Compatibility Notes

Version 1.15.1 (2017-02-09)

Version 1.15.0 (2017-02-02)

Language

Compiler

Compiler Performance

Stabilized APIs

Libraries

Cargo

Tooling

Misc

Compatibility Notes

Version 1.14.0 (2016-12-22)

Language

Compiler

Compile-time Optimizations

Libraries

Cargo

Tooling

  • rustup is the recommended Rust installation method
  • This release includes host (rustc) builds for Linux on MIPS, PowerPC, and S390x. These are tier 2 platforms and may have major defects. Follow the instructions on the website to install, or add the targets to an existing installation with rustup target add. The new target triples are:
    • mips-unknown-linux-gnu
    • mipsel-unknown-linux-gnu
    • mips64-unknown-linux-gnuabi64
    • mips64el-unknown-linux-gnuabi64
    • powerpc-unknown-linux-gnu
    • powerpc64-unknown-linux-gnu
    • powerpc64le-unknown-linux-gnu
    • s390x-unknown-linux-gnu
  • This release includes target (std) builds for ARM Linux running MUSL libc. These are tier 2 platforms and may have major defects. Add the following triples to an existing rustup installation with rustup target add:
    • arm-unknown-linux-musleabi
    • arm-unknown-linux-musleabihf
    • armv7-unknown-linux-musleabihf
  • This release includes experimental support for WebAssembly, via the wasm32-unknown-emscripten target. This target is known to have major defects. Please test, report, and fix.
  • rustup no longer installs documentation by default. Run rustup component add rust-docs to install.
  • Fix line stepping in debugger
  • Enable line number debuginfo in releases

Misc

Compatibility Notes

Version 1.13.0 (2016-11-10)

Language

Compiler

Diagnostics

Compile-time Optimizations

Stabilized APIs

Libraries

Cargo

Tooling

Misc

Compatibility Notes

Version 1.12.1 (2016-10-20)

Regression Fixes

Version 1.12.0 (2016-09-29)

Highlights

Compiler

Diagnostics

Language

Stabilized APIs

Libraries

Cargo

Performance

Tooling

Misc

Compatibility Notes

Version 1.11.0 (2016-08-18)

Language

Stabilized APIs

Libraries

Cargo

Performance

Rustdoc

Tooling

Misc

Compatibility Notes

Version 1.10.0 (2016-07-07)

Language

Stabilized APIs

Libraries

Cargo

Performance

Usability

Misc

Compatibility Notes

Version 1.9.0 (2016-05-26)

Language

Stabilized APIs

Libraries

Cargo

Performance

Misc

Compatibility Notes

Version 1.8.0 (2016-04-14)

Language

Libraries

Performance

Misc

Cargo

Compatibility Notes

Version 1.7.0 (2016-03-03)

Libraries

Misc

Cargo

Compatibility Notes

Version 1.6.0 (2016-01-21)

Language

  • The #![no_std] attribute causes a crate to not be linked to the standard library, but only the core library, as described in RFC 1184. The core library defines common types and traits but has no platform dependencies whatsoever, and is the basis for Rust software in environments that cannot support a full port of the standard library, such as operating systems. Most of the core library is now stable.

Libraries

Cargo

  • Cargo will look in $CARGO_HOME/bin for subcommands by default.
  • Cargo build scripts can specify their dependencies by emitting the rerun-if-changed key.
  • crates.io will reject publication of crates with dependencies that have a wildcard version constraint. Crates with wildcard dependencies were seen to cause a variety of problems, as described in RFC 1241. Since 1.5 publication of such crates has emitted a warning.
  • cargo clean accepts a --release flag to clean the release folder. A variety of artifacts that Cargo failed to clean are now correctly deleted.

Misc

Compatibility Notes

Version 1.5.0 (2015-12-10)

  • ~700 changes, numerous bugfixes

Highlights

Breaking Changes

Language

  • When evaluating expressions at compile-time that are not compile-time constants (const-evaluating expressions in non-const contexts), incorrect code such as overlong bitshifts and arithmetic overflow will generate a warning instead of an error, delaying the error until runtime. This will allow the const-evaluator to be expanded in the future backwards-compatibly.
  • The improper_ctypes lint no longer warns about using isize and usize in FFI.

Libraries

Miscellaneous

Version 1.4.0 (2015-10-29)

  • ~1200 changes, numerous bugfixes

Highlights

  • Windows builds targeting the 64-bit MSVC ABI and linker (instead of GNU) are now supported and recommended for use.

Breaking Changes

Language

Libraries

Miscellaneous

Version 1.3.0 (2015-09-17)

  • ~900 changes, numerous bugfixes

Highlights

  • The new object lifetime defaults have been turned on after a cycle of warnings about the change. Now types like &'a Box<Trait> (or &'a Rc<Trait>, etc) will change from being interpreted as &'a Box<Trait+'a> to &'a Box<Trait+'static>.
  • The Rustonomicon is a new book in the official documentation that dives into writing unsafe Rust.
  • The Duration API, has been stabilized. This basic unit of timekeeping is employed by other std APIs, as well as out-of-tree time crates.

Breaking Changes

Language

Libraries

Misc

Version 1.2.0 (2015-08-07)

  • ~1200 changes, numerous bugfixes

Highlights

Breaking Changes

Language

  • Patterns with ref mut now correctly invoke DerefMut when matching against dereferenceable values.

Libraries

Misc

Version 1.1.0 (2015-06-25)

  • ~850 changes, numerous bugfixes

Highlights

  • The std::fs module has been expanded to expand the set of functionality exposed:
    • DirEntry now supports optimizations like file_type and metadata which don't incur a syscall on some platforms.
    • A symlink_metadata function has been added.
    • The fs::Metadata structure now lowers to its OS counterpart, providing access to all underlying information.
  • The compiler now contains extended explanations of many errors. When an error with an explanation occurs the compiler suggests using the --explain flag to read the explanation. Error explanations are also available online.
  • Thanks to multiple improvements to type checking, as well as other work, the time to bootstrap the compiler decreased by 32%.

Libraries

Misc

Version 1.0.0 (2015-05-15)

  • ~1500 changes, numerous bugfixes

Highlights

  • The vast majority of the standard library is now #[stable]. It is no longer possible to use unstable features with a stable build of the compiler.
  • Many popular crates on crates.io now work on the stable release channel.
  • Arithmetic on basic integer types now checks for overflow in debug builds.

Language

Libraries

Misc

  • Many errors now have extended explanations that can be accessed with the --explain flag to rustc.
  • Many new examples have been added to the standard library documentation.
  • rustdoc has received a number of improvements focused on completion and polish.
  • Metadata was tuned, shrinking binaries by 27%.
  • Much headway was made on ecosystem-wide CI, making it possible to compare builds for breakage.

Version 1.0.0-alpha.2 (2015-02-20)

  • ~1300 changes, numerous bugfixes

  • Highlights

    • The various I/O modules were overhauled to reduce unnecessary abstractions and provide better interoperation with the underlying platform. The old io module remains temporarily at std::old_io.
    • The standard library now participates in feature gating, so use of unstable libraries now requires a #![feature(...)] attribute. The impact of this change is described on the forum. RFC.
  • Language

    • for loops now operate on the IntoIterator trait, which eliminates the need to call .iter(), etc. to iterate over collections. There are some new subtleties to remember though regarding what sort of iterators various types yield, in particular that for foo in bar { } yields values from a move iterator, destroying the original collection. RFC.
    • Objects now have default lifetime bounds, so you don‘t have to write Box<Trait+'static> when you don’t care about storing references. RFC.
    • In types that implement Drop, lifetimes must outlive the value. This will soon make it possible to safely implement Drop for types where #[unsafe_destructor] is now required. Read the gorgeous RFC for details.
    • The fully qualified ::X syntax lets you set the Self type for a trait method or associated type. RFC.
    • References to types that implement Deref<U> now automatically coerce to references to the dereferenced type U, e.g. &T where T: Deref<U> automatically coerces to &U. This should eliminate many unsightly uses of &*, as when converting from references to vectors into references to slices. RFC.
    • The explicit closure kind syntax (|&:|, |&mut:|, |:|) is obsolete and closure kind is inferred from context.
    • Self is a keyword.
  • Libraries

    • The Show and String formatting traits have been renamed to Debug and Display to more clearly reflect their related purposes. Automatically getting a string conversion to use with format!("{:?}", something_to_debug) is now written #[derive(Debug)].
    • Abstract OS-specific string types, std::ff::{OsString, OsStr}, provide strings in platform-specific encodings for easier interop with system APIs. RFC.
    • The boxed::into_raw and Box::from_raw functions convert between Box<T> and *mut T, a common pattern for creating raw pointers.
  • Tooling

  • Misc

    • Rust is tested against a LALR grammar, which parses almost all the Rust files that rustc does.

Version 1.0.0-alpha (2015-01-09)

  • ~2400 changes, numerous bugfixes

  • Highlights

    • The language itself is considered feature complete for 1.0, though there will be many usability improvements and bugfixes before the final release.
    • Nearly 50% of the public API surface of the standard library has been declared ‘stable’. Those interfaces are unlikely to change before 1.0.
    • The long-running debate over integer types has been settled: Rust will ship with types named isize and usize, rather than int and uint, for pointer-sized integers. Guidelines will be rolled out during the alpha cycle.
    • Most crates that are not std have been moved out of the Rust distribution into the Cargo ecosystem so they can evolve separately and don't need to be stabilized as quickly, including ‘time’, ‘getopts’, ‘num’, ‘regex’, and ‘term’.
    • Documentation continues to be expanded with more API coverage, more examples, and more in-depth explanations. The guides have been consolidated into The Rust Programming Language.
    • Rust By Example” is now maintained by the Rust team.
    • All official Rust binary installers now come with Cargo, the Rust package manager.
  • Language

    • Closures have been completely redesigned to be implemented in terms of traits, can now be used as generic type bounds and thus monomorphized and inlined, or via an opaque pointer (boxed) as in the old system. The new system is often referred to as ‘unboxed’ closures.
    • Traits now support associated types, allowing families of related types to be defined together and used generically in powerful ways.
    • Enum variants are namespaced by their type names.
    • where clauses provide a more versatile and attractive syntax for specifying generic bounds, though the previous syntax remains valid.
    • Rust again picks a fallback (either i32 or f64) for uninferred numeric types.
    • Rust no longer has a runtime of any description, and only supports OS threads, not green threads.
    • At long last, Rust has been overhauled for ‘dynamically-sized types’ (DST), which integrates ‘fat pointers’ (object types, arrays, and str) more deeply into the type system, making it more consistent.
    • Rust now has a general range syntax, i..j, i.., and ..j that produce range types and which, when combined with the Index operator and multidispatch, leads to a convenient slice notation, [i..j].
    • The new range syntax revealed an ambiguity in the fixed-length array syntax, so now fixed length arrays are written [T; N].
    • The Copy trait is no longer implemented automatically. Unsafe pointers no longer implement Sync and Send so types containing them don't automatically either. Sync and Send are now ‘unsafe traits’ so one can “forcibly” implement them via unsafe impl if a type confirms to the requirements for them even though the internals do not (e.g. structs containing unsafe pointers like Arc). These changes are intended to prevent some footguns and are collectively known as opt-in built-in traits (though Sync and Send will soon become pure library types unknown to the compiler).
    • Operator traits now take their operands by value, and comparison traits can use multidispatch to compare one type against multiple other types, allowing e.g. String to be compared with &str.
    • if let and while let are no longer feature-gated.
    • Rust has adopted a more uniform syntax for escaping unicode characters.
    • macro_rules! has been declared stable. Though it is a flawed system it is sufficiently popular that it must be usable for 1.0. Effort has gone into future-proofing it in ways that will allow other macro systems to be developed in parallel, and won't otherwise impact the evolution of the language.
    • The prelude has been pared back significantly such that it is the minimum necessary to support the most pervasive code patterns, and through generalized where clauses many of the prelude extension traits have been consolidated.
    • Rust's rudimentary reflection has been removed, as it incurred too much code generation for little benefit.
    • Struct variants are no longer feature-gated.
    • Trait bounds can be polymorphic over lifetimes. Also known as ‘higher-ranked trait bounds’, this crucially allows unboxed closures to work.
    • Macros invocations surrounded by parens or square brackets and not terminated by a semicolon are parsed as expressions, which makes expressions like vec![1i32, 2, 3].len() work as expected.
    • Trait objects now implement their traits automatically, and traits that can be coerced to objects now must be object safe.
    • Automatically deriving traits is now done with #[derive(...)] not #[deriving(...)] for consistency with other naming conventions.
    • Importing the containing module or enum at the same time as items or variants they contain is now done with self instead of mod, as in use foo::{self, bar}
    • Glob imports are no longer feature-gated.
    • The box operator and box patterns have been feature-gated pending a redesign. For now unique boxes should be allocated like other containers, with Box::new.
  • Libraries

    • A series of efforts to establish conventions for collections types has resulted in API improvements throughout the standard library.
    • New APIs for error handling provide ergonomic interop between error types, and new conventions describe more clearly the recommended error handling strategies in Rust.
    • The fail! macro has been renamed to panic! so that it is easier to discuss failure in the context of error handling without making clarifications as to whether you are referring to the ‘fail’ macro or failure more generally.
    • On Linux, OsRng prefers the new, more reliable getrandom syscall when available.
    • The ‘serialize’ crate has been renamed ‘rustc-serialize’ and moved out of the distribution to Cargo. Although it is widely used now, it is expected to be superseded in the near future.
    • The Show formatter, typically implemented with #[derive(Show)] is now requested with the {:?} specifier and is intended for use by all types, for uses such as println! debugging. The new String formatter must be implemented by hand, uses the {} specifier, and is intended for full-fidelity conversions of things that can logically be represented as strings.
  • Tooling

    • Flexible target specification allows rustc's code generation to be configured to support otherwise-unsupported platforms.
    • Rust comes with rust-gdb and rust-lldb scripts that launch their respective debuggers with Rust-appropriate pretty-printing.
    • The Windows installation of Rust is distributed with the MinGW components currently required to link binaries on that platform.
  • Misc

    • Nullable enum optimizations have been extended to more types so that e.g. Option<Vec<T>> and Option<String> take up no more space than the inner types themselves.
    • Work has begun on supporting AArch64.

Version 0.12.0 (2014-10-09)

  • ~1900 changes, numerous bugfixes

  • Highlights

    • The introductory documentation (now called The Rust Guide) has been completely rewritten, as have a number of supplementary guides.
    • Rust's package manager, Cargo, continues to improve and is sometimes considered to be quite awesome.
    • Many API's in std have been reviewed and updated for consistency with the in-development Rust coding guidelines. The standard library documentation tracks stabilization progress.
    • Minor libraries have been moved out-of-tree to the rust-lang org on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can be installed with Cargo.
    • Lifetime elision allows lifetime annotations to be left off of function declarations in many common scenarios.
    • Rust now works on 64-bit Windows.
  • Language

    • Indexing can be overloaded with the Index and IndexMut traits.
    • The if let construct takes a branch only if the let pattern matches, currently behind the ‘if_let’ feature gate.
    • ‘where clauses’, a more flexible syntax for specifying trait bounds that is more aesthetic, have been added for traits and free functions. Where clauses will in the future make it possible to constrain associated types, which would be impossible with the existing syntax.
    • A new slicing syntax (e.g. [0..4]) has been introduced behind the ‘slicing_syntax’ feature gate, and can be overloaded with the Slice or SliceMut traits.
    • The syntax for matching of sub-slices has been changed to use a postfix .. instead of prefix (.e.g. [a, b, c..]), for consistency with other uses of .. and to future-proof potential additional uses of the syntax.
    • The syntax for matching inclusive ranges in patterns has changed from 0..3 to 0...4 to be consistent with the exclusive range syntax for slicing.
    • Matching of sub-slices in non-tail positions (e.g. [a.., b, c]) has been put behind the ‘advanced_slice_patterns’ feature gate and may be removed in the future.
    • Components of tuples and tuple structs can be extracted using the value.0 syntax, currently behind the tuple_indexing feature gate.
    • The #[crate_id] attribute is no longer supported; versioning is handled by the package manager.
    • Renaming crate imports are now written extern crate foo as bar instead of extern crate bar = foo.
    • Renaming use statements are now written use foo as bar instead of use bar = foo.
    • let and match bindings and argument names in macros are now hygienic.
    • The new, more efficient, closure types (‘unboxed closures’) have been added under a feature gate, ‘unboxed_closures’. These will soon replace the existing closure types, once higher-ranked trait lifetimes are added to the language.
    • move has been added as a keyword, for indicating closures that capture by value.
    • Mutation and assignment is no longer allowed in pattern guards.
    • Generic structs and enums can now have trait bounds.
    • The Share trait is now called Sync to free up the term ‘shared’ to refer to ‘shared reference’ (the default reference type.
    • Dynamically-sized types have been mostly implemented, unifying the behavior of fat-pointer types with the rest of the type system.
    • As part of dynamically-sized types, the Sized trait has been introduced, which qualifying types implement by default, and which type parameters expect by default. To specify that a type parameter does not need to be sized, write <Sized? T>. Most types are Sized, notable exceptions being unsized arrays ([T]) and trait types.
    • Closures can return !, as in || -> ! or proc() -> !.
    • Lifetime bounds can now be applied to type parameters and object types.
    • The old, reference counted GC type, Gc<T> which was once denoted by the @ sigil, has finally been removed. GC will be revisited in the future.
  • Libraries

    • Library documentation has been improved for a number of modules.
    • Bit-vectors, collections::bitv has been modernized.
    • The url crate is deprecated in favor of http://github.com/servo/rust-url, which can be installed with Cargo.
    • Most I/O stream types can be cloned and subsequently closed from a different thread.
    • A std::time::Duration type has been added for use in I/O methods that rely on timers, as well as in the ‘time’ crate's Timespec arithmetic.
    • The runtime I/O abstraction layer that enabled the green thread scheduler to do non-thread-blocking I/O has been removed, along with the libuv-based implementation employed by the green thread scheduler. This will greatly simplify the future I/O work.
    • collections::btree has been rewritten to have a more idiomatic and efficient design.
  • Tooling

    • rustdoc output now indicates the stability levels of API's.
    • The --crate-name flag can specify the name of the crate being compiled, like #[crate_name].
    • The -C metadata specifies additional metadata to hash into symbol names, and -C extra-filename specifies additional information to put into the output filename, for use by the package manager for versioning.
    • debug info generation has continued to improve and should be more reliable under both gdb and lldb.
    • rustc has experimental support for compiling in parallel using the