public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND libgpiod] bindings: rust: bump MSRV to 1.60
@ 2023-06-16  8:37 Erik Schilling
  2023-06-16  8:40 ` Erik Schilling
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Erik Schilling @ 2023-06-16  8:37 UTC (permalink / raw)
  To: Linux-GPIO
  Cc: Erik Schilling, Kent Gibson, Bartosz Golaszewski, Viresh Kumar,
	Manos Pitsidianakis, Alex Bennée

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@linaro.org> 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@linaro.org>
---
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@gmail.com/

To: Linux-GPIO <linux-gpio@vger.kernel.org>
Cc: Kent Gibson <warthog618@gmail.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
---
 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@linaro.org>"]
 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@linaro.org>"]
 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@linaro.org>"]
 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,
-- 
Erik Schilling <erik.schilling@linaro.org>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-19  8:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16  8:37 [PATCH RESEND libgpiod] bindings: rust: bump MSRV to 1.60 Erik Schilling
2023-06-16  8:40 ` Erik Schilling
2023-06-19  4:28 ` Viresh Kumar
2023-06-19  8:17 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox