From 105b65c2ac2ddbdc75013806955c97f3dff5f493 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 13 May 2025 10:53:57 +0300 Subject: [PATCH] workspace: set rust-version (MSRV) This declares the minimum supported Rust version, independently of the `rust-toolchain.toml` file, which specifies the Rust version and toolchain components the crate/workspace should be built with. The MSRV affects other crates that depend on anything in this workspace, but the toolchain file does not seem to affect them. This means the MSRV is useful for those who build or develop dependents. Signed-off-by: Lars Wirzenius --- Cargo.toml | 21 ++++++++++++++++----- radicle-cli-test/Cargo.toml | 1 + radicle-cli/Cargo.toml | 1 + radicle-cob/Cargo.toml | 1 + radicle-crdt/Cargo.toml | 1 + radicle-crypto/Cargo.toml | 1 + radicle-dag/Cargo.toml | 1 + radicle-fetch/Cargo.toml | 1 + radicle-node/Cargo.toml | 1 + radicle-remote-helper/Cargo.toml | 1 + radicle-signals/Cargo.toml | 1 + radicle-ssh/Cargo.toml | 1 + radicle-systemd/Cargo.toml | 1 + radicle-term/Cargo.toml | 1 + radicle-tools/Cargo.toml | 1 + radicle/Cargo.toml | 1 + 16 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 72f8c3ef..cb166291 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,4 @@ [workspace] -package.version = "0.9.0" members = [ "radicle", "radicle-cob", @@ -31,11 +30,23 @@ default-members = [ ] resolver = "2" -[profile.container] -inherits = "release" -debug = true -incremental = false +[workspace.package] +version = "0.9.0" + +# Even though some crates in this workspace may build fine +# on a lower version, we set it here and inherit in all +# crates. This is to simplify maintenance. As of 2025-05-13 +# we do not have the capacity to think about `rust-version` +# *per crate*. If anyone ever wants to set it to a different +# value per crate, this is of course possible. We're waiting +# for the day it makes a difference… +rust-version = "1.81.0" [workspace.lints] clippy.type_complexity = "allow" clippy.enum_variant_names = "allow" + +[profile.container] +inherits = "release" +debug = true +incremental = false diff --git a/radicle-cli-test/Cargo.toml b/radicle-cli-test/Cargo.toml index e9d6874d..d41feb5b 100644 --- a/radicle-cli-test/Cargo.toml +++ b/radicle-cli-test/Cargo.toml @@ -9,6 +9,7 @@ edition = "2021" categories = ["development-tools::testing"] keywords = ["cli", "test", "command"] readme = "README.md" +rust-version.workspace = true [dependencies] escargot = { version = "0.5.7" } diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index e8091d8c..4f628aef 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -7,6 +7,7 @@ version = "0.12.1" authors = ["cloudhead "] edition = "2021" build = "build.rs" +rust-version.workspace = true [[bin]] name = "rad" diff --git a/radicle-cob/Cargo.toml b/radicle-cob/Cargo.toml index f262e849..601c0f2d 100644 --- a/radicle-cob/Cargo.toml +++ b/radicle-cob/Cargo.toml @@ -11,6 +11,7 @@ authors = [ edition = "2021" license = "MIT OR Apache-2.0" keywords = ["radicle", "cob", "cobs"] +rust-version.workspace = true [features] default = [] diff --git a/radicle-crdt/Cargo.toml b/radicle-crdt/Cargo.toml index 21d107b3..4507f85c 100644 --- a/radicle-crdt/Cargo.toml +++ b/radicle-crdt/Cargo.toml @@ -3,6 +3,7 @@ name = "radicle-crdt" version = "0.1.0" license = "MIT OR Apache-2.0" edition = "2021" +rust-version.workspace = true [features] test = ["fastrand", "qcheck"] diff --git a/radicle-crypto/Cargo.toml b/radicle-crypto/Cargo.toml index 4f7beb82..ab902741 100644 --- a/radicle-crypto/Cargo.toml +++ b/radicle-crypto/Cargo.toml @@ -10,6 +10,7 @@ authors = [ "Fintan Halpenny ", ] edition = "2021" +rust-version.workspace = true [features] test = ["fastrand", "qcheck"] diff --git a/radicle-dag/Cargo.toml b/radicle-dag/Cargo.toml index b71b0601..f7c670a5 100644 --- a/radicle-dag/Cargo.toml +++ b/radicle-dag/Cargo.toml @@ -7,6 +7,7 @@ license = "MIT OR Apache-2.0" authors = ["cloudhead "] version = "0.10.0" edition = "2021" +rust-version.workspace = true [dependencies] fastrand = { version = "2.0.0" } diff --git a/radicle-fetch/Cargo.toml b/radicle-fetch/Cargo.toml index 171dd25a..517dc3bd 100644 --- a/radicle-fetch/Cargo.toml +++ b/radicle-fetch/Cargo.toml @@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0" version = "0.10.0" authors = ["Fintan Halpenny "] edition = "2021" +rust-version.workspace = true [dependencies] bstr = { version = "1.3" } diff --git a/radicle-node/Cargo.toml b/radicle-node/Cargo.toml index 35f6d502..1e665714 100644 --- a/radicle-node/Cargo.toml +++ b/radicle-node/Cargo.toml @@ -7,6 +7,7 @@ version = "0.10.0" authors = ["cloudhead "] edition = "2021" build = "build.rs" +rust-version.workspace = true [features] default = ["systemd"] diff --git a/radicle-remote-helper/Cargo.toml b/radicle-remote-helper/Cargo.toml index 91251fb4..7f1e2635 100644 --- a/radicle-remote-helper/Cargo.toml +++ b/radicle-remote-helper/Cargo.toml @@ -7,6 +7,7 @@ version = "0.10.0" authors = ["cloudhead "] edition = "2021" build = "build.rs" +rust-version.workspace = true [dependencies] thiserror = { version = "1" } diff --git a/radicle-signals/Cargo.toml b/radicle-signals/Cargo.toml index 968ac0e3..eb6ae1d4 100644 --- a/radicle-signals/Cargo.toml +++ b/radicle-signals/Cargo.toml @@ -6,6 +6,7 @@ repository = "https://app.radicle.xyz/seeds/seed.radicle.xyz/rad:z3gqcJUoA1n9HaH license = "MIT OR Apache-2.0" edition = "2021" version = "0.11.0" +rust-version.workspace = true [dependencies] crossbeam-channel = { version = "0.5.6" } diff --git a/radicle-ssh/Cargo.toml b/radicle-ssh/Cargo.toml index 50add46b..b2c583ab 100644 --- a/radicle-ssh/Cargo.toml +++ b/radicle-ssh/Cargo.toml @@ -11,6 +11,7 @@ authors = [ "cloudhead " ] edition = "2021" +rust-version.workspace = true [dependencies] byteorder = "1.4" diff --git a/radicle-systemd/Cargo.toml b/radicle-systemd/Cargo.toml index acc7dd8a..e6be50d2 100644 --- a/radicle-systemd/Cargo.toml +++ b/radicle-systemd/Cargo.toml @@ -6,3 +6,4 @@ repository = "https://app.radicle.xyz/seeds/seed.radicle.xyz/rad:z3gqcJUoA1n9HaH license = "MIT OR Apache-2.0" edition = "2021" version = "0.9.0" +rust-version.workspace = true diff --git a/radicle-term/Cargo.toml b/radicle-term/Cargo.toml index ba73731f..b8b9ce9d 100644 --- a/radicle-term/Cargo.toml +++ b/radicle-term/Cargo.toml @@ -7,6 +7,7 @@ license = "MIT OR Apache-2.0" version = "0.12.0" authors = ["cloudhead "] edition = "2021" +rust-version.workspace = true [features] default = ["git2"] diff --git a/radicle-tools/Cargo.toml b/radicle-tools/Cargo.toml index 85b53bff..eac98330 100644 --- a/radicle-tools/Cargo.toml +++ b/radicle-tools/Cargo.toml @@ -4,6 +4,7 @@ license = "MIT OR Apache-2.0" version = "0.9.0" authors = ["Alexis Sellier "] edition = "2021" +rust-version.workspace = true [dependencies] anyhow = { version = "1" } diff --git a/radicle/Cargo.toml b/radicle/Cargo.toml index 9282579b..bf03e006 100644 --- a/radicle/Cargo.toml +++ b/radicle/Cargo.toml @@ -7,6 +7,7 @@ license = "MIT OR Apache-2.0" version = "0.14.0" authors = ["cloudhead "] edition = "2021" +rust-version.workspace = true [features] default = []