router
router copied to clipboard
MSRV policy
Our de-facto minimum supported Rust version is currently 1.63 as that’s what we run on CI. https://github.com/apollographql/router/pull/1886 sets rust-version in Cargo.toml accordingly.
In the future we may want to increase that minimum in order to take advantage of new Rust features. People affected are:
- Those contributing to the Router. If they use rustup, they’ll automatically get the version we specify in
channelinrust-toolchain.toml. - Users compiling their own binary (such as to include custom Rust plugins). It should be painless for them to upgrade their toolchain whenever, but some might prefer to do it less often while still upgrading the Router. Or they might prefer to get their toolchain from a distribution other than rustup which may only have some versions available. Until someone asks though I think we should not overly anticipate for this.
Policy proposal:
rust-versioninCargo.tomlis the authoritative source of truth for the MSRV on any given Router version or commit- We keep CI is on MSRV
- Optional: add non-required CIÂ job(s) for some more recent Rust versions, so we get early notice of anything relevant
- We keep
rust-toolchain.tomlin sync with MSRV to keep contributors from accidentally relying on newer features and only finding out on CI. (Note:rust-toolchain.tomlis also what CI defaults to, since https://github.com/apollographql/router/pull/1877) - We document that MSRV can only be a version that been Stable for at least N weeks, where N a number to be decided. N=6 would allow users to always stay on the latest Router but only upgrade to every other Stable Rust version if they want to. But again until someone asks I think even N=0 might be fine
- We don’t systematically increase MSRV based on the calendar, but when there’s a specific feature we want to use
- We consider that increasing MSRV is not a breaking change as far as SemVer is concerned