mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
49 lines
1.5 KiB
Rust
49 lines
1.5 KiB
Rust
//! System bindings for the wasm/web platform
|
|
//!
|
|
//! This module contains the facade (aka platform-specific) implementations of
|
|
//! OS level functionality for wasm. Note that this wasm is *not* the emscripten
|
|
//! or wasi wasm, so we have no runtime here.
|
|
//!
|
|
//! This is all super highly experimental and not actually intended for
|
|
//! wide/production use yet, it's still all in the experimental category. This
|
|
//! will likely change over time.
|
|
//!
|
|
//! Currently all functions here are basically stubs that immediately return
|
|
//! errors. The hope is that with a portability lint we can turn actually just
|
|
//! remove all this and just omit parts of the standard library if we're
|
|
//! compiling for wasm. That way it's a compile time error for something that's
|
|
//! guaranteed to be a runtime error!
|
|
|
|
#![deny(unsafe_op_in_unsafe_fn)]
|
|
|
|
#[path = "../unsupported/args.rs"]
|
|
pub mod args;
|
|
pub mod env;
|
|
#[path = "../unsupported/os.rs"]
|
|
pub mod os;
|
|
#[path = "../unsupported/pipe.rs"]
|
|
pub mod pipe;
|
|
#[path = "../unsupported/process.rs"]
|
|
pub mod process;
|
|
#[path = "../unsupported/stdio.rs"]
|
|
pub mod stdio;
|
|
#[path = "../unsupported/time.rs"]
|
|
pub mod time;
|
|
|
|
cfg_if::cfg_if! {
|
|
if #[cfg(target_feature = "atomics")] {
|
|
#[path = "atomics/futex.rs"]
|
|
pub mod futex;
|
|
#[path = "atomics/thread.rs"]
|
|
pub mod thread;
|
|
} else {
|
|
#[path = "../unsupported/thread.rs"]
|
|
pub mod thread;
|
|
}
|
|
}
|
|
|
|
#[path = "../unsupported/common.rs"]
|
|
#[deny(unsafe_op_in_unsafe_fn)]
|
|
mod common;
|
|
pub use common::*;
|