about summary refs log tree commit diff
path: root/src/libstd/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/env.rs')
-rw-r--r--src/libstd/env.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index d21e37a012a..fa48efb2788 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -844,6 +844,17 @@ mod os {
     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";
@@ -884,6 +895,11 @@ mod arch {
     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::*;