Skip to content

Commit e58ff18

Browse files
authored
Introduce MSRV policy (#4038)
1 parent 5b2922c commit e58ff18

File tree

49 files changed

+64
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+64
-40
lines changed

.github/workflows/main.yml

+22
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,28 @@ jobs:
438438
name: doc_api
439439
path: docs.tar.gz
440440

441+
msrv-lib:
442+
name: Check MSRV for libraries
443+
runs-on: ubuntu-latest
444+
defaults:
445+
run:
446+
working-directory: crates/msrv/lib
447+
steps:
448+
- uses: actions/checkout@v4
449+
- run: rustup update --no-self-update 1.57 && rustup default 1.57
450+
- run: cargo build
451+
452+
msrv-cli:
453+
name: Check MSRV for CLI tools
454+
runs-on: ubuntu-latest
455+
defaults:
456+
run:
457+
working-directory: crates/msrv/cli
458+
steps:
459+
- uses: actions/checkout@v4
460+
- run: rustup update --no-self-update 1.76 && rustup default 1.76
461+
- run: cargo build
462+
441463

442464
deploy:
443465
permissions:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ yarn.lock
1111
.vscode
1212
webdriver.json
1313
benchmarks/pkg
14+
/crates/msrv/*/target

CHANGELOG.md

+3

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ members = [
101101
"examples/synchronous-instantiation",
102102
"tests/no-std",
103103
]
104+
exclude = ["crates/msrv"]
104105
resolver = "2"
105106

106107
[patch.crates-io]

README.md

+6

benchmarks/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm-bindgen-benchmark"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[dependencies]
98
wasm-bindgen = { path = '../' }

crates/cli-support/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Shared support for the wasm-bindgen-cli package, an internal dependency
1111
"""
1212
edition = '2018'
13-
rust-version = "1.57"
13+
rust-version = "1.76"
1414

1515
[dependencies]
1616
anyhow = "1.0"

crates/cli-support/src/js/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ impl<'a> Context<'a> {
26372637
assert!(!catch);
26382638
assert!(!log_error);
26392639

2640-
let ts_sig = export.generate_typescript.then(|| ts_sig.as_str());
2640+
let ts_sig = export.generate_typescript.then_some(ts_sig.as_str());
26412641

26422642
let js_docs = format_doc_comments(&export.comments, Some(js_doc));
26432643
let ts_docs = format_doc_comments(&export.comments, None);

crates/cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ information see https://github.com/rustwasm/wasm-bindgen.
1313
"""
1414
edition = '2018'
1515
default-run = 'wasm-bindgen'
16-
rust-version = "1.57"
16+
rust-version = "1.76"
1717

1818
[package.metadata.binstall]
1919
pkg-url = "https://github.com/rustwasm/wasm-bindgen/releases/download/{ version }/wasm-bindgen-{ version }-{ target }{ archive-suffix }"

crates/example-tests/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "example-tests"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[dependencies]
98
anyhow = "1.0.75"

crates/msrv/cli/Cargo.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "msrv-cli-test"
3+
version = "0.0.0"
4+
edition = "2018"
5+
publish = false
6+
7+
[dependencies]
8+
wasm-bindgen-cli = { path = "../../cli" }

crates/msrv/cli/src/lib.rs

Whitespace-only changes.

crates/msrv/lib/Cargo.toml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "msrv-library-test"
3+
version = "0.0.0"
4+
edition = "2018"
5+
publish = false
6+
7+
[dependencies]
8+
js-sys = { path = "../../js-sys" }
9+
wasm-bindgen = { path = "../../../" }
10+
wasm-bindgen-futures = { path = "../../futures" }
11+
wasm-bindgen-test = { path = "../../test" }
12+
web-sys = { path = "../../web-sys" }
13+
14+
bumpalo = "=3.12.0"
15+
log = "=0.4.18"
16+
scoped-tls = "=1.0.0"
17+
18+
[patch.crates-io]
19+
wasm-bindgen = { path = "../../../" }

crates/msrv/lib/src/lib.rs

Whitespace-only changes.

crates/test/src/rt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ impl Display for TestResult {
216216
TestResult::Ok => write!(f, "ok"),
217217
TestResult::Err(_) => write!(f, "FAIL"),
218218
TestResult::Ignored(None) => write!(f, "ignored"),
219-
TestResult::Ignored(Some(reason)) => write!(f, "ignored, {reason}"),
219+
TestResult::Ignored(Some(reason)) => write!(f, "ignored, {}", reason),
220220
}
221221
}
222222
}

crates/typescript-tests/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "typescript-tests"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[dependencies]
98
wasm-bindgen = { path = '../..' }

crates/webidl-tests/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
66
publish = false
7-
rust-version = "1.57"
87

98
[lib]
109
test = false

crates/webidl/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ description = """
1111
Support for parsing WebIDL specific to wasm-bindgen
1212
"""
1313
edition = "2018"
14-
rust-version = "1.57"
1514

1615
[dependencies]
1716
env_logger = "0.11.5"

examples/add/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "add"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/canvas/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "canvas"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/char/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "char"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/closures/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "closures"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/console_log/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "console_log"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/deno/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "deno"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/dom/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "dom"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/duck-typed-interfaces/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "rust-duck-typed-interfaces"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/fetch/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "fetch"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/guide-supported-types-examples/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "guide-supported-types-examples"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/hello_world/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "hello_world"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/julia_set/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "julia_set"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/paint/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm-bindgen-paint"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/performance/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "performance"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/raytrace-parallel/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "raytrace-parallel"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/request-animation-frame/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "request-animation-frame"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/synchronous-instantiation/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "synchronous-instantiation"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/todomvc/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "todomvc"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/wasm-audio-worklet/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name = "wasm-audio-worklet"
33
version = "0.1.0"
44
edition = "2021"
5-
rust-version = "1.57"
65

76
[lib]
87
crate-type = ["cdylib"]

examples/wasm-in-wasm-imports/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm-in-wasm-imports"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/wasm-in-wasm/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm-in-wasm"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/wasm-in-web-worker/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm-in-web-worker"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/wasm2js/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "wasm2js"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/weather_report/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ authors = ["Ayush <[email protected]>"]
66
categories = ["wasm"]
77
readme = "README.md"
88
edition = "2018"
9-
rust-version = "1.57"
109

1110
[lib]
1211
crate-type = ["cdylib"]

examples/webaudio/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "webaudio"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/webgl/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "webgl"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/webrtc_datachannel/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "webrtc_datachannel"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

examples/websockets/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "websockets"
33
version = "0.1.0"
44
authors = ["The wasm-bindgen Developers"]
55
edition = "2018"
6-
rust-version = "1.57"
76

87
[lib]
98
crate-type = ["cdylib"]

0 commit comments

Comments
 (0)