Declare an MSRV, or document why one cannot be declared

Open
#236 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
47/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, rust

Research direction

Start by reviewing Cargo.toml, Cargo.lock, and rust-toolchain.toml, then use cargo msrv find -- cargo check --all-features to establish the tested floor. The issue calls for deciding whether dev dependencies should constrain the library MSRV, pinning transitive dependencies if needed, and adding a CI job at the declared version. Done means the declared value is supported by the dependency graph and CI exercises it.

Written by the indexing model from the issue text.

Description

Cargo.toml declares no rust-version. Adding one was attempted during the re-homing work (#232) and dropped, because no honest value is currently declarable. Recording the evidence so this isn't rediscovered.

The library's own floor is ~1.80

src/btc.rs uses std::sync::LazyLock, which stabilised in 1.80. rust-version is enforced per-package regardless of features, and cargo test always activates cfg(test) -> btc.rs, so nothing below 1.80 is claimable while that line exists. Language features otherwise cap out at let-else (1.65).

But the resolved graph requires 1.88

Installing 1.80.0 and running cargo check --all-features --locked fails before compiling anything:

error: failed to parse manifest at .../home-0.5.12/Cargo.toml
Caused by: feature `edition2024` is required

Scanning every manifest in the lockfile, the true floor is 1.88 (home 0.5.12 declares rust-version = "1.88"), with 11 edition-2024 packages requiring Cargo >= 1.85: clap, clap_builder, clap_lex, getrandom, hashbrown, home, indexmap, toml_datetime, toml_edit, toml_parser, zeroize.

Why that's awkward

All of it is dev and build tooling, not library dependencies: home arrives via which/toolchain_find, clap via criterion. So the number is dictated by things a downstream consumer never builds — but resolution drags dev-dependencies through the same manifest parse, so nothing below 1.85 is even testable, let alone declarable.

What declaring it properly requires

  1. Decide whether dev-dependencies should constrain a published library's MSRV at all.
  2. If not, pin the offending transitive deps to pre-edition-2024 versions in Cargo.lock so an MSRV job can run.
  3. Add a CI job at the declared version. This is not optional: rust-toolchain.toml pins 1.97.1, so normal CI never exercises the floor and an undefended rust-version rots immediately.

Determine the real value with cargo msrv find -- cargo check --all-features rather than by reading manifests.

Dominant language
Rust
Stars
34
Forks
19
Avg merge
9h 19m
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xoloki/wsts

All issues in xoloki/wsts

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.