diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dffb299..a2bd46d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,6 +51,22 @@ jobs: - name: Test (all features) run: CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime cargo test --target wasm32-wasi --all-features + emscripten: + name: Test Emscripten + runs-on: ubuntu-latest + container: emscripten/emsdk:latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install toolchain + uses: dtolnay/rust-toolchain@nightly + with: + targets: wasm32-unknown-emscripten + - name: Test (no features) + run: CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node cargo test --target wasm32-unknown-emscripten --no-default-features + - name: Test (all features) + run: CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node cargo test --target wasm32-unknown-emscripten --all-features + lints: name: Rustfmt & Clippy diff --git a/src/lib.rs b/src/lib.rs index cb621c1..f74fb66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -120,7 +120,7 @@ fn check_description() { "Incorrect function." } else if cfg!(target_os = "illumos") { "Not owner" - } else if cfg!(target_os = "wasi") { + } else if cfg!(target_os = "wasi") || cfg!(target_os = "emscripten") { "Argument list too long" } else if cfg!(target_os = "haiku") { "Operation not allowed" diff --git a/src/unix.rs b/src/unix.rs index 983693b..d2ca222 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -91,7 +91,8 @@ extern "C" { target_os = "linux", target_os = "hurd", target_os = "redox", - target_os = "dragonfly" + target_os = "dragonfly", + target_os = "emscripten", ), link_name = "__errno_location" )]