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

Minimum Supported Rust Version (MSRV) Policy? #203

Open
madsmtm opened this issue Jul 19, 2022 · 5 comments
Open

Minimum Supported Rust Version (MSRV) Policy? #203

madsmtm opened this issue Jul 19, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@madsmtm
Copy link
Owner

madsmtm commented Jul 19, 2022

This library should probably settle on some kind of MSRV policy, I would like some input on that?

A few options:

  • N-3
  • 6 months timeframe
  • 12 months timeframe
  • Pick a stable version, and then stay there until next major version. Allow feature flags to have higher MSRV.

Notes:

  • Does MSRV bump constitute a breaking change?
  • GCC Rust will support 1.40 to start with
  • mrustc supports 1.54 (as of july 2022)
  • We could have different policies for the different crates (e.g. objc-sys supports "N-10" while objc2 supports "N-3")
  • Downside is that features like extern "C-unwind" would take longer to make default
  • Distribution version (here supporting the "this package is possible with distribution-provided cargo/rustc"):
  • See libc discussion: MSRV policy for libc crate rust-lang/libs-team#72
  • See also winit discussion: Minimum Supported Rust Version rust-windowing/winit#1075
  • Given that this package is mostly used on macOS, where users will be getting the rustc using rustup or MacPorts, maybe the situation is a bit different?
    • Would work if we're using newer rustc features, doesn't if we're using newer cargo features
  • Our dependencies (cc, libc, malloc_buf and uuid) would have to have a policy that matches ours!
@madsmtm madsmtm added help wanted Extra attention is needed A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates A-framework Affects the framework crates and the translator for them A-block2 Affects the `block2` crate labels Jul 19, 2022
@madsmtm madsmtm added this to the objc2 v0.3 milestone Aug 22, 2022
@madsmtm
Copy link
Owner Author

madsmtm commented Sep 1, 2022

See also rust-lang/libs-team#72 (comment) on how to check with -Zminimal-versions in CI, if that becomes necessary

@madsmtm madsmtm changed the title Minimum Supported Rust Version (MSRV)? Minimum Supported Rust Version (MSRV) Policy? Sep 1, 2022
@madsmtm madsmtm pinned this issue Sep 1, 2022
@Lokathor
Copy link

Lokathor commented Sep 1, 2022

I would vote for 12 months timeframe, no more. I made some strong statements about a fixed MSRV for bytemuck and tinyvec, and it's not impossible to stand by them. but it's inconvenient to stick with them eternally. A rolling window lets you eventually adapt to rust updates without cfg all over your crate, while a large rolling window lets you stay compatible with linux distros.

Even SDL2, famed for its long term compatibility, will bump its requirements over time.

@matklad
Copy link

matklad commented Sep 26, 2022

while a large rolling window lets you stay compatible with linux distros.

Something I've learned is that 12 months might not be enough for some LTS-style situations.

  • 12 months is too fast for Debian stable
  • curiously, tokio has 6 months MSRV, but also 1 year LTS releases, which together effectively gives 18 months MSRV

(note: the above is purely descriptive, not prescriptive one way or another)

@notgull
Copy link
Contributor

notgull commented Dec 17, 2022

For my crates, I usually try to keep the MSRV at or below Debian Stable, but I don't think that will be desired or even possible for this crate. As it's "experimental" for the time being, I think it'd be fine to have an undefined MSRV. But, eventually, it would be nice to pin it to either a timed MSRV (12 months is usually fine) or some distro's Rust version (Debian Testing uses 1.56 as of the time of writing).

@madsmtm madsmtm removed A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates A-framework Affects the framework crates and the translator for them A-block2 Affects the `block2` crate labels Dec 23, 2022
@madsmtm madsmtm removed this from the objc2 v0.3 milestone Jan 18, 2023
@madsmtm madsmtm unpinned this issue Mar 26, 2023
@madsmtm
Copy link
Owner Author

madsmtm commented Jun 7, 2023

Any bump will also have to be within Firefox' MSRV, if we want wgpu to use icrate: https://github.com/gfx-rs/wgpu#msrv-policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants