From 0a97f46d9cd67b60e49b28080932a42e2e80ee6a Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Fri, 29 May 2026 15:11:37 +0200 Subject: [PATCH] Pin Rust version to `1.85.0` --- Cargo.toml | 1 + crates/README.md | 2 +- crates/geomerge-demo/Cargo.toml | 1 + flake.nix | 4 ++-- rust-toolchain.toml | 3 +++ 5 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/Cargo.toml b/Cargo.toml index bbfd8fc..12a24d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ resolver = "3" [workspace.package] edition = "2024" license = "MIT OR Apache-2.0" +rust-version = "1.85.0" [workspace.lints.rust] unsafe_code = "forbid" diff --git a/crates/README.md b/crates/README.md index c47a2a9..bab6d4d 100644 --- a/crates/README.md +++ b/crates/README.md @@ -3,7 +3,7 @@ Independent Rust app crates live in this directory. Each subdirectory should be a normal Cargo package with its own `Cargo.toml`. -The repository root is a virtual workspace, so shared commands such as `make fmt-check`, `make clippy`, and `make test` run across all crates. +The repository root is a virtual workspace, so shared commands such as `make format`, `make lint`, and `make test` run across all crates. Suggested shape: diff --git a/crates/geomerge-demo/Cargo.toml b/crates/geomerge-demo/Cargo.toml index b9336e7..2e9a343 100644 --- a/crates/geomerge-demo/Cargo.toml +++ b/crates/geomerge-demo/Cargo.toml @@ -3,6 +3,7 @@ name = "geomerge-demo" version = "0.1.0" edition.workspace = true license.workspace = true +rust-version.workspace = true [lints] workspace = true diff --git a/flake.nix b/flake.nix index 507a81d..783e2cf 100644 --- a/flake.nix +++ b/flake.nix @@ -18,8 +18,8 @@ overlays = [ rust-overlay.overlays.default ]; }; - # Edition 2024 requires Rust >= 1.85. Pin to a recent stable. - rustToolchain = pkgs.rust-bin.stable.latest.default.override { + # Pinned to match workspace.package.rust-version in Cargo.toml. + rustToolchain = pkgs.rust-bin.stable."1.85.0".default.override { extensions = [ "rust-src" "rust-analyzer" "clippy" "rustfmt" ]; }; in diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..787a54a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.85.0" +components = ["rustfmt", "clippy", "rust-analyzer"]