bindings: rust: bump MSRV to 1.60
PATCH RESEND 1/1 bindings: rust: bump MSRV to 1.60
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 <[email protected]> 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
---
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/[email protected]/
To: Linux-GPIO <[email protected]>
Cc: Kent Gibson <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Manos Pitsidianakis <[email protected]>
Cc: Alex Bennée <[email protected]>
--- 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(-)
bindings/rust/gpiosim-sys/Cargo.toml +1 -1
@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"
bindings/rust/libgpiod-sys/Cargo.toml +1 -1
@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"
bindings/rust/libgpiod/Cargo.toml +1 -1
@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"
---
base-commit: 9a80247cf4a70c837055271c978afda7ef107338
change-id: 20230616-msrv-0f1d20f5bd09
Best regards,
Signature · 1 line
Erik Schilling <[email protected]>
Had to resend due to encoding woes with Alex name... Seems to be some b4 bug.
Sorry for the noise.
Quoted 83 lines · Erik Schilling
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).
bindgenstarted 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 thatlogonly 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
logstarted 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 <[email protected]> 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.htmlSigned-off-by Erik Schilling <[email protected]>---
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/[email protected]/
To: Linux-GPIO <[email protected]>
Cc: Kent Gibson <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Manos Pitsidianakis <[email protected]>
Cc: Alex Bennée <[email protected]>--- 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(-)bindings/rust/gpiosim-sys/Cargo.toml +1
-1@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"bindings/rust/libgpiod-sys/Cargo.toml +1
-1@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"bindings/rust/libgpiod/Cargo.toml +0
-0
bindings/rust/libgpiod/Cargo.toml authors = ["Viresh Kumar <[email protected]>"] · line 15
Quoted 8 lines
bindings/rust/libgpiod/Cargo.toml +1
-1@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"
Signature · 1 line
viresh
Bartosz Golaszewski
AppliedQuoted 97 lines · Erik Schilling
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).
bindgenstarted 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 thatlogonly 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
logstarted 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 <[email protected]> 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.htmlSigned-off-by Erik Schilling <[email protected]>---
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/[email protected]/
To: Linux-GPIO <[email protected]>
Cc: Kent Gibson <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Manos Pitsidianakis <[email protected]>
Cc: Alex Bennée <[email protected]>--- 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(-)bindings/rust/gpiosim-sys/Cargo.toml +1
-1@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"bindings/rust/libgpiod-sys/Cargo.toml +1
-1@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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"bindings/rust/libgpiod/Cargo.toml +1
-2@@ -9,7 +9,7 @@ authors = ["Viresh Kumar <[email protected]>"] 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" ---base-commit:
9a80247cf4a70c837055271c978afda7ef107338
change-id: 20230616-msrv-0f1d20f5bd09
Quoted 4 lines
Best regards,
--
Erik Schilling <[email protected]>
Applied, thanks!
Bart