Skip to content

Commit 5e9bed7

Browse files
committed
Rename wasm32-wasi-preview2 to wasm32-wasip2
Signed-off-by: Ryan Levick <[email protected]>
1 parent f115064 commit 5e9bed7

File tree

22 files changed

+28
-28
lines changed

22 files changed

+28
-28
lines changed

compiler/rustc_span/src/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1881,9 +1881,9 @@ symbols! {
18811881
vtable_align,
18821882
vtable_size,
18831883
warn,
1884+
wasip2,
18841885
wasm_abi,
18851886
wasm_import_module,
1886-
wasm_preview2,
18871887
wasm_target_feature,
18881888
while_let,
18891889
windows,

compiler/rustc_target/src/spec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ supported_targets! {
15751575
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
15761576
("wasm32-unknown-unknown", wasm32_unknown_unknown),
15771577
("wasm32-wasi", wasm32_wasi),
1578-
("wasm32-wasi-preview2", wasm32_wasi_preview2),
1578+
("wasm32-wasip2", wasm32_wasip2),
15791579
("wasm32-wasi-preview1-threads", wasm32_wasi_preview1_threads),
15801580
("wasm64-unknown-unknown", wasm64_unknown_unknown),
15811581

compiler/rustc_target/src/spec/targets/wasm32_wasi_preview2.rs compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! The `wasm32-wasi-preview2` target is the next evolution of the
1+
//! The `wasm32-wasip2` target is the next evolution of the
22
//! wasm32-wasi target. While the wasi specification is still under
33
//! active development, the {review 2 iteration is considered an "island
44
//! of stability" that should allow users to rely on it indefinitely.
@@ -24,7 +24,7 @@ pub fn target() -> Target {
2424
let mut options = base::wasm::options();
2525

2626
options.os = "wasi".into();
27-
options.env = "preview2".into();
27+
options.env = "p2".into();
2828
options.linker = Some("wasm-component-ld".into());
2929

3030
options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();

library/std/src/os/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ pub mod linux;
8585
#[cfg(any(target_os = "wasi", doc))]
8686
pub mod wasi;
8787

88-
#[cfg(any(all(target_os = "wasi", target_env = "preview2"), doc))]
89-
pub mod wasi_preview2;
88+
#[cfg(any(all(target_os = "wasi", target_env = "p2"), doc))]
89+
pub mod wasip2;
9090

9191
// windows
9292
#[cfg(not(all(

library/std/src/os/wasi/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
//! [`OsStr`]: crate::ffi::OsStr
2929
//! [`OsString`]: crate::ffi::OsString
3030
31-
#![cfg_attr(not(target_env = "preview2"), stable(feature = "rust1", since = "1.0.0"))]
32-
#![cfg_attr(target_env = "preview2", unstable(feature = "wasm_preview2", issue = "none"))]
31+
#![cfg_attr(not(target_env = "p2"), stable(feature = "rust1", since = "1.0.0"))]
32+
#![cfg_attr(target_env = "p2", unstable(feature = "wasip2", issue = "none"))]
3333
#![deny(unsafe_op_in_unsafe_fn)]
3434
#![doc(cfg(target_os = "wasi"))]
3535

File renamed without changes.

library/std/src/sys/pal/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ cfg_if::cfg_if! {
4040
} else if #[cfg(target_os = "wasi")] {
4141
mod wasi;
4242
pub use self::wasi::*;
43-
} else if #[cfg(all(target_os = "wasi", target_env = "preview2"))] {
44-
mod wasi_preview2;
45-
pub use self::wasi_preview2::*;
43+
} else if #[cfg(all(target_os = "wasi", target_env = "p2"))] {
44+
mod wasip2;
45+
pub use self::wasip2::*;
4646
} else if #[cfg(target_family = "wasm")] {
4747
mod wasm;
4848
pub use self::wasm::*;

library/std/src/sys/pal/wasi_preview2/mod.rs library/std/src/sys/pal/wasip2/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub mod time;
4949

5050
cfg_if::cfg_if! {
5151
if #[cfg(target_feature = "atomics")] {
52-
compile_error!("The wasm32-wasi-preview2 target does not support atomics");
52+
compile_error!("The wasm32-wasip2 target does not support atomics");
5353
} else {
5454
#[path = "../unsupported/locks/mod.rs"]
5555
pub mod locks;

library/stdarch

Submodule stdarch updated 139 files

src/bootstrap/src/core/build_steps/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ fn copy_self_contained_objects(
404404
)
405405
})
406406
.join("lib")
407-
.join(target.to_string().replace("-preview1", "").replace("-preview2", ""));
407+
.join(target.to_string().replace("-preview1", "").replace("p2", ""));
408408
for &obj in &["libc.a", "crt1-command.o", "crt1-reactor.o"] {
409409
copy_and_stamp(
410410
builder,

src/bootstrap/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
8989
(Some(Mode::Std), "netbsd10", None),
9090
(Some(Mode::Std), "backtrace_in_libstd", None),
9191
/* Extra values not defined in the built-in targets yet, but used in std */
92-
(Some(Mode::Std), "target_env", Some(&["libnx", "preview2"])),
92+
(Some(Mode::Std), "target_env", Some(&["libnx", "p2"])),
9393
// (Some(Mode::Std), "target_os", Some(&[])),
9494
(Some(Mode::Std), "target_arch", Some(&["spirv", "nvptx", "xtensa"])),
9595
/* Extra names used by dependencies */

src/doc/book

Submodule book updated 95 files

src/doc/rustc/src/SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
- [*-unknown-openbsd](platform-support/openbsd.md)
6161
- [\*-unknown-uefi](platform-support/unknown-uefi.md)
6262
- [wasm32-wasi-preview1-threads](platform-support/wasm32-wasi-preview1-threads.md)
63-
- [wasm32-wasi-preview2](platform-support/wasm32-wasi-preview2.md)
63+
- [wasm32-wasip2](platform-support/wasm32-wasip2.md)
6464
- [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
6565
- [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
6666
- [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md)

src/doc/rustc/src/platform-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ target | std | host | notes
361361
`thumbv7a-pc-windows-msvc` | ? | |
362362
`thumbv7a-uwp-windows-msvc` | ✓ | |
363363
`thumbv7neon-unknown-linux-musleabihf` | ? | | Thumb2-mode ARMv7-A Linux with NEON, MUSL
364-
[`wasm32-wasi-preview2`](platform-support/wasm32-wasi-preview2.md) | ✓ | | WebAssembly
364+
[`wasm32-wasip2`](platform-support/wasm32-wasip2.md) | ✓ | | WebAssembly
365365
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
366366
`x86_64-apple-ios-macabi` | ✓ | | Apple Catalyst on x86_64
367367
[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ? | | x86 64-bit tvOS

src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md src/doc/rustc/src/platform-support/wasm32-wasip2.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# `wasm32-wasi-preview2`
1+
# `wasm32-wasip2`
22

33
**Tier: 3**
44

5-
The `wasm32-wasi-preview2` target is a new and still (as of January 2024) an
6-
experimental target. This target is an extension to `wasm32-wasi-preview1` target,
5+
The `wasm32-wasip2` target is a new and still (as of January 2024) an
6+
experimental target. This target is an extension to `wasm32-wasip1` target,
77
originally known as `wasm32-wasi`. It is the next evolution in the development of
88
wasi (the [WebAssembly System Interface](https://wasi.dev)) that uses the WebAssembly
99
[component model] to allow for a standardized set of syscalls that are intended to empower

src/llvm-project

src/tools/cargo

Submodule cargo updated 1035 files

tests/assembly/targets/targets-elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@
489489
//@ revisions: wasm32_wasi_preview1_threads
490490
//@ [wasm32_wasi_preview1_threads] compile-flags: --target wasm32-wasi-preview1-threads
491491
//@ [wasm32_wasi_preview1_threads] needs-llvm-components: webassembly
492-
//@ revisions: wasm32_wasip1
492+
//@ revisions: wasm32_wasip2
493493
//@ [wasm32_wasip2] compile-flags: --target wasm32-wasip2
494494
//@ [wasm32_wasip2] needs-llvm-components: webassembly
495495
//@ revisions: wasm64_unknown_unknown

0 commit comments

Comments
 (0)