Skip to content

Commit 5e0bdfd

Browse files
authored
fix: move sys_traits to shell feature to fix Wasm build (#149)
* sigh
1 parent 7607906 commit 5e0bdfd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ jobs:
4444
if: contains(matrix.os, 'ubuntu')
4545
run: cargo clippy --all-targets --all-features --release
4646

47-
- name: Build only parser
47+
- name: Build only parser in Wasm
4848
if: contains(matrix.os, 'ubuntu')
49-
run: cargo build --no-default-features
49+
run: |
50+
rustup target add wasm32-unknown-unknown
51+
cargo build --no-default-features --target wasm32-unknown-unknown
5052
- name: Build
5153
run: cargo build --all-targets --all-features --release
5254
- name: Test

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description = "Cross platform scripting for deno task"
1111

1212
[features]
1313
default = ["shell"]
14-
shell = ["futures", "glob", "nix", "os_pipe", "path-dedot", "tokio", "windows-sys"]
14+
shell = ["futures", "glob", "nix", "os_pipe", "path-dedot", "tokio", "windows-sys", "sys_traits"]
1515
serialization = ["serde"]
1616

1717
[dependencies]
@@ -25,7 +25,7 @@ monch = "0.5.0"
2525
thiserror = "2.0.9"
2626
tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "process", "rt-multi-thread", "sync", "time"], optional = true }
2727
deno_path_util = "0.3.2"
28-
sys_traits = { version = "0.1.9", features = ["real", "winapi", "libc"] }
28+
sys_traits = { version = "0.1.9", optional = true, features = ["real", "winapi", "libc"] }
2929

3030
[target.'cfg(unix)'.dependencies]
3131
nix = { version = "0.29.0", features = ["signal"], optional = true }

0 commit comments

Comments
 (0)