Issue 165344
Summary Rename wasm32-wasi to wasm32-wasip1
Labels backend:WebAssembly
Assignees sunfishcode
Reporter sunfishcode
    I propose to rename clang's wasm32-wasi target to wasm32-wasip1. This will align clang with [Rust] and [Go], and it eventually free up the name "wasm32-wasi" for a future WASI 1.0 standard.

The name "wasm32-wasi" would continue to be recognized as an alias for "wasm32-wasip1" for several clang releases, though it would evoke a deprecation warning, like this:

```
$ clang -c t.c --target=wasm32-wasi
clang: warning: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Wdeprecated]
$
```
As just a warning, it wouldn't break builds (unless users ask it to, with `-Werror`).

`wasm32-wasip1` is already accepted by all versions of clang that support wasm32-wasi, because clang's target code just checks that the OS name starts with "wasi" and ignores anything after that. Consequently, users can migrate their build scripts to "wasm32-wasip1" at any time, without having to upgrade to a new version, or drop support for old versions. You can literally use "wasm32-wasip1" today if you wish, and it'll work with past and future versions.

Users using the default target in wasi-sdk would not need to make any changes.

[Rust]: https://blog.rust-lang.org/2024/09/05/Rust-1.81.0/#wasi-0-1-target-naming-changed
[Go]: https://go.dev/wiki/WebAssembly#wasi-gooswasip1-port

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to