Skip to content

Commit 3311283

Browse files
committed
Get wasm32-wasip2 compiling with its custom pal implementation
The ordering of targets in `pal/mod.rs` did not end up using the wasip2 implementation, so after reordering that I've edited the implementation to compile correctly.
1 parent 9ce37dc commit 3311283

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ cfg_if::cfg_if! {
3737
} else if #[cfg(target_os = "hermit")] {
3838
mod hermit;
3939
pub use self::hermit::*;
40-
} else if #[cfg(target_os = "wasi")] {
41-
mod wasi;
42-
pub use self::wasi::*;
4340
} else if #[cfg(all(target_os = "wasi", target_env = "p2"))] {
4441
mod wasip2;
4542
pub use self::wasip2::*;
43+
} else if #[cfg(target_os = "wasi")] {
44+
mod wasi;
45+
pub use self::wasi::*;
4646
} else if #[cfg(target_family = "wasm")] {
4747
mod wasm;
4848
pub use self::wasm::*;

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

-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
pub mod alloc;
1111
#[path = "../wasi/args.rs"]
1212
pub mod args;
13-
#[path = "../unix/cmath.rs"]
14-
pub mod cmath;
1513
#[path = "../wasi/env.rs"]
1614
pub mod env;
1715
#[path = "../wasi/fd.rs"]
@@ -28,10 +26,6 @@ pub mod io;
2826
pub mod net;
2927
#[path = "../wasi/os.rs"]
3028
pub mod os;
31-
#[path = "../unix/os_str.rs"]
32-
pub mod os_str;
33-
#[path = "../unix/path.rs"]
34-
pub mod path;
3529
#[path = "../unsupported/pipe.rs"]
3630
pub mod pipe;
3731
#[path = "../unsupported/process.rs"]

0 commit comments

Comments
 (0)