webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

Decide on minimum supported rust version

Open k0nserv opened this issue 3 years ago • 2 comments

Currently we support Rust 1.57.0 as our minimal version. However, this is entirely arbitrary. We should have a policy.

Some inspiration:

tokio

Tokio will keep a rolling MSRV (minimum supported rust version) policy of at least 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.49.0.

time

The time crate is guaranteed to compile with any release of rustc from the past six months. Optional feature flags that enable interoperability with third-party crates (e.g. rand) follow the policy of that crate if stricter.

serde

See https://github.com/serde-rs/serde/pull/2257

rcgen

The MSRV policy is to strive for supporting 6-month old Rust versions.

Please add suggestions and inspirations from other crates(ideally those that are likely to be in a consumers tree already)

k0nserv avatar Aug 25 '22 10:08 k0nserv

CI broke again because async-global-executor moved to version 1.59.0. This is was created because the same thing happened with time.

Proposal

Given how common the six months approach seems to be I think we should use the same, it's likely that consumers have had to update already because the six month MSRV policy is so common.

k0nserv avatar Aug 31 '22 11:08 k0nserv

Fix for async-global-executor https://github.com/webrtc-rs/webrtc/pull/278

k0nserv avatar Aug 31 '22 12:08 k0nserv

cc @KillingSpark @niklaskorz @morajabi @sax @stuqdog @KallDrexx @xnorpx @rainliu @morajabi @billylindeman

I'd to go with my proposal above unless there's a strong argument against that

k0nserv avatar Oct 31 '22 16:10 k0nserv

Makes sense to me. Almost all my work ends up on the latest rust compiler.

KallDrexx avatar Oct 31 '22 16:10 KallDrexx

Implicit in my proposal is that changes to MSRV will not be considered breaking either, just making this explicit

k0nserv avatar Oct 31 '22 17:10 k0nserv

I made a PR that updates the minimum to 1.60.0 and documents the suggested proposal

https://github.com/webrtc-rs/webrtc/pull/337

k0nserv avatar Nov 01 '22 15:11 k0nserv

I've merged #337 so I'm closing this now.

Policy is to have an MSRV for compilers released in the last six months and bump the minimum version as non breaking.

k0nserv avatar Nov 02 '22 10:11 k0nserv