Skip to content

Commit 4c0c20e

Browse files
Add initial draft of the post
1 parent 944c1a0 commit 4c0c20e

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

posts/2021-07-29-Rust-1.54.0.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
layout: post
3+
title: "Announcing Rust 1.54.0"
4+
author: The Rust Release Team
5+
release: true
6+
---
7+
8+
# Announcing Rust 1.54.0
9+
10+
The Rust team is happy to announce a new version of Rust, 1.54.0. Rust is a programming language empowering everyone
11+
to build reliable and efficient software.
12+
13+
If you have a previous version of Rust installed via rustup, getting Rust
14+
1.54.0 is as easy as:
15+
16+
```console
17+
rustup update stable
18+
```
19+
20+
If you don't have it already, you can [get `rustup`][install]
21+
from the appropriate page on our website, and check out the
22+
[detailed release notes for 1.54.0][notes] on GitHub.
23+
24+
[install]: https://www.rust-lang.org/install.html
25+
[notes]: XXX
26+
27+
## What's in 1.54.0 stable
28+
29+
### Attributes can call macros!()
30+
31+
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.
32+
33+
34+
```rust=
35+
#![doc = include_str!("README.md")]
36+
```
37+
38+
Macros can be nested inside the attribute as well, for example to include content generated by a build script:
39+
40+
```rust
41+
#[path = concat!(env!("OUT_DIR"), "/generated.rs")]
42+
mod generated;
43+
```
44+
45+
Read [here](https://github.com/rust-lang/rust/pull/83366) for more details.
46+
47+
### wasm32 intrinsics stabilized
48+
49+
A number of intrinsics for the wasm32 platform have been stabilized, which gives access to the SIMD instructions in WebAssembly.
50+
51+
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).
52+
53+
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, such as [`v128_load`](https://doc.rust-lang.org/beta/core/arch/wasm32/fn.v128_load.html).
54+
55+
### Incremental Compilation is XXX by default
56+
57+
TODO - Wesley is going to draft text here.
58+
59+
### Stabilized APIs
60+
61+
The following methods and trait implementations were stabilized.
62+
63+
TODO
64+
65+
### Other changes
66+
67+
There are other changes in the Rust 1.54.0 release:
68+
check out what changed in [Rust](XXX), [Cargo](XXX), and [Clippy](XXX).
69+
70+
### Contributors to 1.54.0
71+
72+
Many people came together to create Rust 1.54.0.
73+
We couldn't have done it without all of you.
74+
[Thanks!](https://thanks.rust-lang.org/rust/1.54.0/)

0 commit comments

Comments
 (0)