-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 2023-04-27-wasi-target-rename-1.71.0.md
- Loading branch information
1 parent
52bc3e5
commit 6a0a147
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
layout: post | ||
title: "Renaming the WASI target in Rust 1.71.0" | ||
author: Yoshua Wuyts | ||
release: false | ||
--- | ||
|
||
In Rust 1.71 the existing `wasm32-wasi` target will be renamed to | ||
`wasm32-wasi-preview1`. This matches the naming used in the [WASI Preview | ||
Framework][wpf] and more accurately captures the evolving nature of the WASI | ||
targets. By making this change we also prepare Rust to re-adopt the | ||
`wasm32-wasi` target name for the eventual stable WASI 1.0 release. | ||
|
||
[wpf]: https://github.com/WebAssembly/meetings/blob/main/wasi/2023/presentations/2023-02-09-gohman-wasi-roadmap.pdf | ||
|
||
Work on adding a WASI Preview 2 target to the compiler is currently underway, | ||
but is not yet complete. We expect this to land in a future release of Rust. The | ||
target triple for this target will be `wasm32-wasi-preview2`. | ||
|
||
## Migrating Targets | ||
|
||
To upgrade to the new WASI target on Rust 1.71 on nightly you can run the | ||
following commands using [rustup](https://rustup.rs): | ||
|
||
```bash | ||
$ rustup +nightly target remove wasm32-wasi | ||
$ rustup upgrade nightly | ||
$ rustup +nightly target add wasm32-wasi-preview1 | ||
``` | ||
|
||
Once beta and stable builds are available (expected in ~6 and ~12 weeks | ||
respectively) you should be able to replace the word `nightly` with either | ||
`beta` or `stable` in the instructions. |