build: bump workspace MSRV from 1.77 to 1.85#970
build: bump workspace MSRV from 1.77 to 1.85#970anikettuli wants to merge 1 commit intoStremio:developmentfrom
Conversation
Aligns the declared MSRV with what CI has been running (`build.yml` uses stable and `msrv.yml` exercises the pinned version). Also collapses the outlier MSRV on `stremio-watched-bitfield` (previously 1.60) so all three published crates agree. Changes: - Cargo.toml: rust-version 1.77 -> 1.85, fix workflow filename in comment. - stremio-watched-bitfield/Cargo.toml: rust-version 1.60 -> 1.85, replace the historical "dep:serde" rationale with an "aligned with workspace" note. - .github/workflows/msrv.yml: RUST_MSRV_VERSION 1.77 -> 1.85. No Cargo.lock change; dependency manifest floors untouched. This commit is purely a declared-MSRV bump. Unblocks future work that wants to use: - std::sync::LazyLock (stabilized in 1.80) - `let ... else` chain patterns (1.82) - standard library additions shipped between 1.77 and 1.85 Verified locally (Rust 1.85.1 stable-x86_64-pc-windows-gnu): cargo test -p stremio-core --lib -> 202 passed, 0 failed cargo test -p stremio-watched-bitfield -> 7 passed, 0 failed cargo clippy --all --no-deps -D warnings -> clean cargo fmt --check -> clean
stremio-core-web prebuildPrebuild artifact published by the Paste one of these into Release "@stremio/stremio-core-web": "https://stremio.github.io/stremio-core/stremio-core-web/claude/msrv-bump-1.85/stremio-stremio-core-web-0.56.3.tgz"Dev "@stremio/stremio-core-web": "https://stremio.github.io/stremio-core/stremio-core-web/claude/msrv-bump-1.85/dev/stremio-stremio-core-web-0.56.3.tgz" |
There was a problem hiding this comment.
Pull request overview
Raises the declared minimum supported Rust version (MSRV) for the workspace and updates the MSRV CI workflow to match, consolidating MSRV expectations across crates and automation.
Changes:
- Bump
rust-versionforstremio-coreto1.85. - Bump
rust-versionforstremio-watched-bitfieldto1.85and update the rationale comment. - Update MSRV CI workflow env (
RUST_MSRV_VERSION) to1.85.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Cargo.toml |
Updates workspace crate MSRV declaration to Rust 1.85 and fixes workflow filename reference. |
stremio-watched-bitfield/Cargo.toml |
Aligns watched-bitfield crate MSRV to 1.85 and updates explanatory comment. |
.github/workflows/msrv.yml |
Updates MSRV workflow toolchain version to 1.85. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # When upgrading MSRV make sure to update the msrv.yaml workflow | ||
| rust-version = "1.77" | ||
| # When upgrading MSRV make sure to update the msrv.yml workflow | ||
| rust-version = "1.85" |
There was a problem hiding this comment.
Bumping the workspace MSRV to 1.85 will likely break existing CI jobs/toolchains that are still pinned to Rust 1.77 (e.g. stremio-core-web/rust-toolchain.toml and the RUST_VERSION: '1.77' env vars in several workflows). Those jobs build stremio-core-web, which depends on stremio-core; Cargo will refuse to compile it with a toolchain lower than stremio-core’s rust-version. Consider updating those pins (or otherwise adjusting the CI matrix) so the whole repo builds consistently after this MSRV bump.
| rust-version = "1.85" | |
| rust-version = "1.77" |
| # Aligned with the workspace MSRV. Originally pinned at 1.60 for `dep:serde` | ||
| # syntax; raising to 1.85 keeps all three crates on one Rust version. |
There was a problem hiding this comment.
The comment says raising to 1.85 “keeps all three crates on one Rust version”, but other workspace crates (e.g. stremio-core-web, stremio-derive) currently don’t declare rust-version, so this statement is misleading. Either adjust the wording to reflect what’s actually enforced, or add rust-version = "1.85" to the other workspace crates to truly align declared MSRV across the workspace.
| # Aligned with the workspace MSRV. Originally pinned at 1.60 for `dep:serde` | |
| # syntax; raising to 1.85 keeps all three crates on one Rust version. | |
| # Aligned with the workspace-targeted Rust version. Originally pinned at | |
| # 1.60 for `dep:serde` syntax; this crate now declares Rust 1.85. |
`std::sync::LazyLock` (stabilized in Rust 1.80) provides the same behavior as `once_cell::sync::Lazy` without a third-party dependency. Migrating cuts one crate from every build and tightens the stdlib alignment story. `OnceCell` / `OnceLock` usage was not present in the workspace, so this PR focuses purely on the `Lazy` migration. Changes: - 10 files: `use once_cell::sync::Lazy;` -> `use std::sync::LazyLock;`, and every `Lazy::new(...)` / `: Lazy<T>` renamed to `LazyLock::new(...)` / `: LazyLock<T>`. No behavior change - API is drop-in identical. - Cargo.toml (root): drop `once_cell = "1"`, bump `rust-version` to 1.85. - stremio-core-web/Cargo.toml: drop `once_cell = "1"`. - stremio-watched-bitfield/Cargo.toml: bump `rust-version` to 1.85 for consistency with the workspace. - .github/workflows/msrv.yml: RUST_MSRV_VERSION to 1.85. The MSRV bump is required because `LazyLock` needs Rust 1.80+. Bumping to 1.85 matches the CI matrix (build.yml uses stable) so there is no fresh floor to enforce separately. If Stremio#970 (the standalone MSRV bump PR) lands first, the MSRV changes here become no-ops; if this lands first, Stremio#970 becomes a no-op. Either merge order is clean. Touched files: src/addon_transport/http_transport/http_transport.rs src/constants.rs src/models/ctx/update_notifications.rs src/models/player.rs src/unit_tests/ctx/notifications/update_notifications.rs src/unit_tests/ctx/sync_library_with_api.rs src/unit_tests/deep_links/library_item_deep_links.rs src/unit_tests/env.rs stremio-core-web/src/env.rs stremio-core-web/src/stremio_core_web.rs Verified locally (Rust 1.85.1 stable-x86_64-pc-windows-gnu): cargo test -p stremio-core --lib -> 202 passed, 0 failed cargo test -p stremio-watched-bitfield -> 7 passed, 0 failed cargo clippy --all --no-deps -D warnings -> clean cargo fmt --check -> clean
|
Superseded by #973 — the five dead-weight/MSRV modernizations are bundled there to avoid five near-identical Cargo.toml / Cargo.lock merges. Each change remains a distinct commit for piecewise review. |
Summary
Aligns the declared minimum supported Rust version (MSRV) across the three workspace crates and the MSRV CI job to
1.85(up from1.77on the two core crates and1.60onstremio-watched-bitfield).Why this change
build.ymlalready uses stable Rust and the workspace compiles fine on current toolchains after this bump — the1.77declaration on the manifest was lagging reality.stremio-watched-bitfieldpinned1.60with a note aboutdep:serdesyntax (stable since 1.60). That rationale is still true, but keeping the watched-bitfield floor three years behind the rest of the workspace created a split MSRV with no practical benefit.once_cell::sync::Lazy→std::sync::LazyLock, stabilized in 1.80) require the MSRV to be at least 1.80. 1.85 matches the CI matrix and leaves headroom.Effect
1.77, so this affects users on1.77–1.84.1.85.1is approximately one year old on release day of this PR.once_cellin favor of standard library primitives, tighten type inference in a few spots, and use 1.80+ stdlib additions.Changes
Cargo.toml—rust-version = "1.77"→"1.85". Also fixes a comment that referenced a non-existent workflow filename (msrv.yaml→msrv.yml).stremio-watched-bitfield/Cargo.toml—rust-version = "1.60"→"1.85". Comment rewritten to explain the alignment rationale..github/workflows/msrv.yml—RUST_MSRV_VERSION: '1.77'→'1.85'.No
Cargo.lockchanges. Dependency manifest floors are untouched; runningcargo updateis intentionally deferred to a separate PR, since the workspace has byte-exactflate2-encoded deep-link tests that break on anyminiz_oxidebump (a known brittleness that deserves its own fix, not a bundled one).Test plan
Verified locally (Rust 1.85.1
stable-x86_64-pc-windows-gnu):cargo test -p stremio-core --lib— 202 passed, 0 failedcargo test -p stremio-watched-bitfield— 7 passed, 0 failedcargo clippy --all --no-deps -- -D warnings— cleancargo fmt --check— cleanFollow-ups (separate PRs)
cargo updateto pick up recent dependency patches, paired with a round-trip test forStream::deep_linkso the result isn't coupled to a specificminiz_oxideoutput.once_cell::sync::{Lazy, OnceCell}→std::sync::{LazyLock, OnceLock}, now unblocked.stremio-watched-bitfield(0.13 → 0.22) — real API migration, deserves its own PR.