Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.54 release blog post #870

Merged
merged 10 commits into from
Jul 29, 2021
78 changes: 78 additions & 0 deletions posts/2021-07-29-Rust-1.54.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
layout: post
title: "Announcing Rust 1.54.0"
author: The Rust Release Team
release: true
---

# Announcing Rust 1.54.0

The Rust team is happy to announce a new version of Rust, 1.54.0. Rust is a programming language empowering everyone
to build reliable and efficient software.

If you have a previous version of Rust installed via rustup, getting Rust
1.54.0 is as easy as:

```console
rustup update stable
```

If you don't have it already, you can [get `rustup`][install]
from the appropriate page on our website, and check out the
[detailed release notes for 1.54.0][notes] on GitHub.

[install]: https://www.rust-lang.org/install.html
[notes]: XXX
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved

## What's in 1.54.0 stable

### Attributes can call macros!()

Rust 1.54 supports invoking function-like macros inside attributes. One notable use case for this is including documentation from other files into Rust doc comments. For example, if your project's README represents a good documentation comment, you can use `include_str!` to directly incorporate the contents. Previously, various workarounds allowed similar functionality, but from 1.54 this is much more ergonomic.
pietroalbini marked this conversation as resolved.
Show resolved Hide resolved


```rust=
#![doc = include_str!("README.md")]
```

Macros can be nested inside the attribute as well, for example to include content generated by a build script:

```rust
#[path = concat!(env!("OUT_DIR"), "/generated.rs")]
mod generated;
```

Read [here](https://github.com/rust-lang/rust/pull/83366) for more details.

### wasm32 intrinsics stabilized

A number of intrinsics for the wasm32 platform have been stabilized, which gives access to the SIMD instructions in WebAssembly.

Notably, unlike the previously stabilized `x86` and `x86_64` intrinsics, these do not have a safety requirement to only be called when the appropriate target feature is enabled. This is because WebAssembly was written from the start to validate code safely before executing it, so instructions are guaranteed to be decoded correctly (or not at all).

This means that we can expose some of the intrinsics as entirely safe functions, for example [`v128_bitselect`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_bitselect.html). However, there are still some intrinsics which are unsafe because they use raw pointers, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html).

### Incremental Compilation is XXX by default

TODO - Wesley is going to draft text here.
wesleywiser marked this conversation as resolved.
Show resolved Hide resolved

Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved
### Stabilized APIs

The following methods and trait implementations were stabilized.

TODO
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved

### Other changes

There are other changes in the Rust 1.54.0 release:
check out what changed in [Rust](XXX), [Cargo](XXX), and [Clippy](XXX).
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved

rustfmt has also been fixed in the 1.54.0 release to properly format nested
out-of-line modules. This may cause changes in formatting to files that were
being ignored by the 1.53.0 rustfmt. See details [here](https://github.com/rust-lang/rust/pull/86424).
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved

### Contributors to 1.54.0

Many people came together to create Rust 1.54.0.
We couldn't have done it without all of you.
[Thanks!](https://thanks.rust-lang.org/rust/1.54.0/)