Skip to content

Commit 4b7a455

Browse files
committed
Test no_std MSRV in CI
1 parent 69a626c commit 4b7a455

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,22 @@ jobs:
540540
msrv-lib:
541541
name: Check MSRV for libraries
542542
runs-on: ubuntu-latest
543+
strategy:
544+
fail-fast: false
545+
matrix:
546+
target:
547+
- x86_64-unknown-linux-gnu
548+
- wasm32-unknown-unknown
549+
features:
550+
- --no-default-features
551+
- ""
543552
defaults:
544553
run:
545554
working-directory: crates/msrv/lib
546555
steps:
547556
- uses: actions/checkout@v4
548-
- run: rustup update --no-self-update 1.57 && rustup default 1.57
549-
- run: cargo build
557+
- run: rustup update --no-self-update 1.57 && rustup default 1.57 && rustup target add ${{ matrix.target }}
558+
- run: cargo build --target ${{ matrix.target }} ${{ matrix.features }}
550559

551560
msrv-cli:
552561
name: Check MSRV for CLI tools

crates/msrv/lib/Cargo.toml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,32 @@ name = "msrv-library-test"
44
publish = false
55
version = "0.0.0"
66

7+
[features]
8+
default = ["std"]
9+
std = [
10+
"wasm-bindgen-backend/std",
11+
"wasm-bindgen-macro-support/std",
12+
"wasm-bindgen-macro/std",
13+
"wasm-bindgen/std",
14+
"js-sys/std",
15+
"wasm-bindgen-futures/std",
16+
"web-sys/std",
17+
"wasm-bindgen-test/std",
18+
]
19+
720
[dependencies]
8-
js-sys = { path = "../../js-sys" }
9-
wasm-bindgen = { path = "../../../" }
10-
wasm-bindgen-backend = { path = "../../backend" }
11-
wasm-bindgen-futures = { path = "../../futures" }
12-
wasm-bindgen-macro = { path = "../../macro" }
13-
wasm-bindgen-macro-support = { path = "../../macro-support" }
21+
js-sys = { path = "../../js-sys", default-features = false }
22+
wasm-bindgen = { path = "../../../", default-features = false }
23+
wasm-bindgen-backend = { path = "../../backend", default-features = false }
24+
wasm-bindgen-futures = { path = "../../futures", default-features = false }
25+
wasm-bindgen-macro = { path = "../../macro", default-features = false }
26+
wasm-bindgen-macro-support = { path = "../../macro-support", default-features = false }
1427
wasm-bindgen-shared = { path = "../../shared" }
15-
wasm-bindgen-test = { path = "../../test" }
28+
wasm-bindgen-test = { path = "../../test", default-features = false }
1629
wasm-bindgen-test-macro = { path = "../../test-macro" }
17-
web-sys = { path = "../../web-sys" }
30+
web-sys = { path = "../../web-sys", default-features = false }
1831

32+
# Pinned sub-dependencies for MSRV
1933
bumpalo = "=3.12.0"
2034
log = "=0.4.18"
21-
scoped-tls = "=1.0.0"
22-
23-
[patch.crates-io]
24-
wasm-bindgen = { path = "../../../" }
35+
scoped-tls = { version = "=1.0.0", optional = false }

0 commit comments

Comments
 (0)