Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce MSRV policy #4038

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,28 @@ jobs:
name: doc_api
path: docs.tar.gz

msrv-lib:
name: Check MSRV for libraries
runs-on: ubuntu-latest
defaults:
run:
working-directory: crates/msrv/lib
steps:
- uses: actions/checkout@v4
- run: rustup update --no-self-update 1.57 && rustup default 1.57
- run: cargo build

msrv-cli:
name: Check MSRV for CLI tools
runs-on: ubuntu-latest
defaults:
run:
working-directory: crates/msrv/cli
steps:
- uses: actions/checkout@v4
- run: rustup update --no-self-update 1.76 && rustup default 1.76
- run: cargo build


deploy:
permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ yarn.lock
.vscode
webdriver.json
benchmarks/pkg
/crates/msrv/*/target
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
* Added support for WebIDL records. This added new methods to various APIs, notably `ClipboardItem()`, `GPUDeviceDescriptor.requiredLimits` and `Header()`.
[#4030](https://github.com/rustwasm/wasm-bindgen/pull/4030)

* Added an official MSRV policy. Library MSRV changes will be accompanied by a minor version bump. CLI tool MSRV can change with any version bump.
[#4038](https://github.com/rustwasm/wasm-bindgen/pull/4038)

### Changed

* Stabilize Web Share API.
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ members = [
"examples/synchronous-instantiation",
"tests/no-std",
]
exclude = ["crates/msrv"]
resolver = "2"

[patch.crates-io]
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ You can find general documentation about using Rust and WebAssembly together
- [web-sys](https://docs.rs/web-sys)
- [wasm-bindgen-futures](https://docs.rs/wasm-bindgen-futures)

## MSRV Policy

Libraries that are released on [crates.io](https://crates.io) have a MSRV of v1.57. Changes to the MSRV will be accompanied by a minor version bump.

CLI tools and their corresponding support libraries have a MSRV of v1.76. Changes to the MSRV will be accompanied by a patch version bump.

## License

This project is licensed under either of
Expand Down
1 change: 0 additions & 1 deletion benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm-bindgen-benchmark"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[dependencies]
wasm-bindgen = { path = '../' }
Expand Down
2 changes: 1 addition & 1 deletion crates/cli-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Shared support for the wasm-bindgen-cli package, an internal dependency
"""
edition = '2018'
rust-version = "1.57"
rust-version = "1.76"

[dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ impl<'a> Context<'a> {
assert!(!catch);
assert!(!log_error);

let ts_sig = export.generate_typescript.then(|| ts_sig.as_str());
let ts_sig = export.generate_typescript.then_some(ts_sig.as_str());

let js_docs = format_doc_comments(&export.comments, Some(js_doc));
let ts_docs = format_doc_comments(&export.comments, None);
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ information see https://github.com/rustwasm/wasm-bindgen.
"""
edition = '2018'
default-run = 'wasm-bindgen'
rust-version = "1.57"
rust-version = "1.76"

[package.metadata.binstall]
pkg-url = "https://github.com/rustwasm/wasm-bindgen/releases/download/{ version }/wasm-bindgen-{ version }-{ target }{ archive-suffix }"
Expand Down
1 change: 0 additions & 1 deletion crates/example-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "example-tests"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[dependencies]
anyhow = "1.0.75"
Expand Down
8 changes: 8 additions & 0 deletions crates/msrv/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "msrv-cli-test"
version = "0.0.0"
edition = "2018"
publish = false

[dependencies]
wasm-bindgen-cli = { path = "../../cli" }
Empty file added crates/msrv/cli/src/lib.rs
Empty file.
19 changes: 19 additions & 0 deletions crates/msrv/lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "msrv-library-test"
version = "0.0.0"
edition = "2018"
publish = false

[dependencies]
js-sys = { path = "../../js-sys" }
wasm-bindgen = { path = "../../../" }
wasm-bindgen-futures = { path = "../../futures" }
wasm-bindgen-test = { path = "../../test" }
web-sys = { path = "../../web-sys" }

bumpalo = "=3.12.0"
log = "=0.4.18"
scoped-tls = "=1.0.0"

[patch.crates-io]
wasm-bindgen = { path = "../../../" }
Empty file added crates/msrv/lib/src/lib.rs
Empty file.
2 changes: 1 addition & 1 deletion crates/test/src/rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl Display for TestResult {
TestResult::Ok => write!(f, "ok"),
TestResult::Err(_) => write!(f, "FAIL"),
TestResult::Ignored(None) => write!(f, "ignored"),
TestResult::Ignored(Some(reason)) => write!(f, "ignored, {reason}"),
TestResult::Ignored(Some(reason)) => write!(f, "ignored, {}", reason),
}
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/typescript-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "typescript-tests"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[dependencies]
wasm-bindgen = { path = '../..' }
Expand Down
1 change: 0 additions & 1 deletion crates/webidl-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
publish = false
rust-version = "1.57"

[lib]
test = false
Expand Down
1 change: 0 additions & 1 deletion crates/webidl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ description = """
Support for parsing WebIDL specific to wasm-bindgen
"""
edition = "2018"
rust-version = "1.57"

[dependencies]
env_logger = "0.11.5"
Expand Down
1 change: 0 additions & 1 deletion examples/add/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "add"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/canvas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "canvas"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/char/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "char"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/closures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "closures"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/console_log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "console_log"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/deno/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "deno"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/dom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "dom"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/duck-typed-interfaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "rust-duck-typed-interfaces"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/fetch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "fetch"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/guide-supported-types-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "guide-supported-types-examples"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "hello_world"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/julia_set/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "julia_set"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/paint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm-bindgen-paint"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/performance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "performance"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/raytrace-parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "raytrace-parallel"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/request-animation-frame/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "request-animation-frame"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/synchronous-instantiation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "synchronous-instantiation"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/todomvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "todomvc"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/wasm-audio-worklet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "wasm-audio-worklet"
version = "0.1.0"
edition = "2021"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/wasm-in-wasm-imports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm-in-wasm-imports"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/wasm-in-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm-in-wasm"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/wasm-in-web-worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm-in-web-worker"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/wasm2js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "wasm2js"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/weather_report/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ authors = ["Ayush <[email protected]>"]
categories = ["wasm"]
readme = "README.md"
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/webaudio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "webaudio"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/webgl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "webgl"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/webrtc_datachannel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "webrtc_datachannel"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 0 additions & 1 deletion examples/websockets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "websockets"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[lib]
crate-type = ["cdylib"]
Expand Down
Loading