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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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 renamed to compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

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

Lines changed: 3 additions & 3 deletions
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 renamed to library/std/src/sys/pal/wasip2/mod.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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,

0 commit comments

Comments
 (0)