On 16-06-23, 10:37, Erik Schilling wrote: > Specifying MSRV (minimum supported rust version) was introduced with > Rust 1.56. So old versions of libraries do not have this restriction > spelled out in their Cargo.toml. > > This means that even if we claimed a MSRV of 1.56 until now, that did > not mean that things were actually buildable with 1.56 practically > (without manually researching compatible versions and pinning them > down). > > `bindgen` started listing a MSRV from v0.61 (requiring Rust 1.57) [1]. > So that may seem like an obvious choice. But if one attempts to build > it with such an old version one will realize that `log` only started > requesting a MSRV with 0.4.19 (requesting Rust 1.60) [2]. Hence, we > would either need to manually restrict log to an old, but compatible > release (which would unnecessarily restrict everyone on newer Rust > versions) or just also bump our MSRV to 1.60. > > Rust 1.60 was released on 2022-04-07 [3] and seems like an acceptable > choice if core components such as `log` started their MSRV tracking with > that version. If someone is determined wanting to use this with an older > version of Rust, thats still possible. If one has done the necessary > manual research and pinned their versions down, one can use > --ignore-rust-version (or a < 1.56 version of Rust that does not check > the MSRV yet). > > Thanks to Manos Pitsidianakis <manos.pitsidianakis@xxxxxxxxxx> for > helping me out when I successfully confused myself somewhere. > > [1] https://github.com/rust-lang/rust-bindgen/blob/v0.61.0/bindgen/Cargo.toml > [2] https://github.com/rust-lang/log/blob/0.4.19/Cargo.toml > [3] https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html > > Signed-off-by: Erik Schilling <erik.schilling@xxxxxxxxxx> > --- > While looking at the clippy fixes [1], I realized that things do not > actually build with the minimum supported Rust version that we claim. > The simplest way forward seems to be just bumping that version. > > [1] https://lore.kernel.org/r/20230612154055.56556-1-warthog618@xxxxxxxxx/ > > To: Linux-GPIO <linux-gpio@xxxxxxxxxxxxxxx> > Cc: Kent Gibson <warthog618@xxxxxxxxx> > Cc: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> > Cc: Viresh Kumar <viresh.kumar@xxxxxxxxxx> > Cc: Manos Pitsidianakis <manos.pitsidianakis@xxxxxxxxxx> > Cc: Alex Bennée <alex.bennee@xxxxxxxxxx> > --- > bindings/rust/gpiosim-sys/Cargo.toml | 2 +- > bindings/rust/libgpiod-sys/Cargo.toml | 2 +- > bindings/rust/libgpiod/Cargo.toml | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/bindings/rust/gpiosim-sys/Cargo.toml b/bindings/rust/gpiosim-sys/Cargo.toml > index af30748..1f44a31 100644 > --- a/bindings/rust/gpiosim-sys/Cargo.toml > +++ b/bindings/rust/gpiosim-sys/Cargo.toml > @@ -9,7 +9,7 @@ authors = ["Viresh Kumar <viresh.kumar@xxxxxxxxxx>"] > description = "gpiosim header bindings" > repository = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git" > categories = ["external-ffi-bindings", "os::linux-apis"] > -rust-version = "1.56" > +rust-version = "1.60" > keywords = ["libgpiod", "gpio", "gpiosim"] > license = "Apache-2.0 OR BSD-3-Clause" > edition = "2021" > diff --git a/bindings/rust/libgpiod-sys/Cargo.toml b/bindings/rust/libgpiod-sys/Cargo.toml > index 0c814ee..b4d26e9 100644 > --- a/bindings/rust/libgpiod-sys/Cargo.toml > +++ b/bindings/rust/libgpiod-sys/Cargo.toml > @@ -9,7 +9,7 @@ authors = ["Viresh Kumar <viresh.kumar@xxxxxxxxxx>"] > description = "libgpiod public header bindings" > repository = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git" > categories = ["external-ffi-bindings", "os::linux-apis"] > -rust-version = "1.56" > +rust-version = "1.60" > keywords = ["libgpiod", "gpio"] > license = "Apache-2.0 OR BSD-3-Clause" > edition = "2021" > diff --git a/bindings/rust/libgpiod/Cargo.toml b/bindings/rust/libgpiod/Cargo.toml > index d6758be..518e5e5 100644 > --- a/bindings/rust/libgpiod/Cargo.toml > +++ b/bindings/rust/libgpiod/Cargo.toml > @@ -9,7 +9,7 @@ authors = ["Viresh Kumar <viresh.kumar@xxxxxxxxxx>"] > description = "libgpiod wrappers" > repository = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git" > categories = ["api-bindings", "hardware-support", "embedded", "os::linux-apis"] > -rust-version = "1.56" > +rust-version = "1.60" > keywords = ["libgpiod", "gpio"] > license = "Apache-2.0 OR BSD-3-Clause" > edition = "2021" Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx> -- viresh