std/sys/pal/wasm/mod.rs
1//! System bindings for the wasm/web platform
2//!
3//! This module contains the facade (aka platform-specific) implementations of
4//! OS level functionality for wasm. Note that this wasm is *not* the emscripten
5//! or wasi wasm, so we have no runtime here.
6//!
7//! This is all super highly experimental and not actually intended for
8//! wide/production use yet, it's still all in the experimental category. This
9//! will likely change over time.
10//!
11//! Currently all functions here are basically stubs that immediately return
12//! errors. The hope is that with a portability lint we can turn actually just
13//! remove all this and just omit parts of the standard library if we're
14//! compiling for wasm. That way it's a compile time error for something that's
15//! guaranteed to be a runtime error!
16
17#![deny(unsafe_op_in_unsafe_fn)]
18
19#[path = "../unsupported/os.rs"]
20pub mod os;
21#[path = "../unsupported/pipe.rs"]
22pub mod pipe;
23#[path = "../unsupported/time.rs"]
24pub mod time;
25
26cfg_if::cfg_if! {
27 if #[cfg(target_feature = "atomics")] {
28 #[path = "atomics/futex.rs"]
29 pub mod futex;
30 #[path = "atomics/thread.rs"]
31 pub mod thread;
32 } else {
33 #[path = "../unsupported/thread.rs"]
34 pub mod thread;
35 }
36}
37
38#[path = "../unsupported/common.rs"]
39#[deny(unsafe_op_in_unsafe_fn)]
40mod common;
41pub use common::*;