/// via the command line).
///
/// The first element is traditionally the path to the executable, but it can be
-/// set to arbitrary text, and it may not even exist, so this property should
+/// set to arbitrary text, and may not even exist. This means this property should
/// not be relied upon for security purposes.
///
/// # Panics
///
/// The returned iterator will panic during iteration if any argument to the
-/// process is not valid unicode. If this is not desired it is recommended to
+/// process is not valid unicode. If this is not desired,
/// use the `args_os` function instead.
///
/// # Examples
/// Constants associated with the current target
#[stable(feature = "env", since = "1.0.0")]
pub mod consts {
- /// A string describing the architecture of the CPU that this is currently
+ /// A string describing the architecture of the CPU that is currently
/// in use.
///
/// Some possible values:
pub const EXE_EXTENSION: &'static str = "pexe";
}
+#[cfg(target_os = "emscripten")]
+mod os {
+ pub const FAMILY: &'static str = "unix";
+ pub const OS: &'static str = "emscripten";
+ pub const DLL_PREFIX: &'static str = "lib";
+ pub const DLL_SUFFIX: &'static str = ".so";
+ pub const DLL_EXTENSION: &'static str = "so";
+ pub const EXE_SUFFIX: &'static str = ".js";
+ pub const EXE_EXTENSION: &'static str = "js";
+}
+
#[cfg(target_arch = "x86")]
mod arch {
pub const ARCH: &'static str = "x86";
pub const ARCH: &'static str = "le32";
}
+#[cfg(target_arch = "asmjs")]
+mod arch {
+ pub const ARCH: &'static str = "asmjs";
+}
+
#[cfg(test)]
mod tests {
use prelude::v1::*;