From 75b113ac5be20cfd6bfa96d69d93d6f7708d7649 Mon Sep 17 00:00:00 2001 From: MarekSpodBiedry <73122968+MarekSpodBiedry@users.noreply.github.com> Date: Mon, 12 Oct 2026 00:30:25 +0200 Subject: [PATCH] Raise workspace rust-version to 1.95 to match the UI crate (#1169) (#1188) --- Cargo.toml | 2 +- README.md | 2 ++ docs/architecture.md | 2 +- docs/development.md | 4 ++-- xtask/src/version.rs | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 70a65b6b..ddea910f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ default-members = ["crates/*", "apps/pdfcraft", "apps/pdfcraft-cli", "xtask"] version = "0.6.0" edition = "2024" license = "MIT OR Apache-2.0" -rust-version = "1.90" +rust-version = "1.95" repository = "https://github.com/storytold/pdfcraft" [workspace.dependencies] diff --git a/README.md b/README.md index a0e985b1..4f5792db 100644 --- a/README.md +++ b/README.md @@ -369,6 +369,8 @@ PdfCraft is a clean-room implementation. Its behaviour comes from the ISO 32000 ## Get started +Building needs Rust 1.95 or later. + ```sh git clone https://github.com/storytold/pdfcraft cd pdfcraft diff --git a/docs/architecture.md b/docs/architecture.md index eb56cdb3..013633b7 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -8,7 +8,7 @@ crate's `README.md` has the detail. ## Shape -One Cargo workspace (`Cargo.toml`, edition 2024, Rust ≥ 1.90, `MIT OR Apache-2.0`), 31 library +One Cargo workspace (`Cargo.toml`, edition 2024, Rust ≥ 1.95, `MIT OR Apache-2.0`), 31 library crates in `crates/`, three binaries in `apps/`, build tooling in `xtask/`, and patched third-party crates in `vendor/`. About 152k lines of Rust and 1,765 tests (2026-10-10). Rust only: no handwritten JS/TS, in the product or the build. diff --git a/docs/development.md b/docs/development.md index 53531189..634c4bb2 100644 --- a/docs/development.md +++ b/docs/development.md @@ -22,8 +22,8 @@ Cargo stores custom-profile artifacts separately under `target/low-disk`. Switch normal and low-disk profiles can therefore leave both sets of artifacts on disk. To remove only the low-disk artifacts, run `cargo clean --profile low-disk`. -The UI crate and complete desktop/web builds require Rust 1.95 or later, matching the pinned -`craft-ui` dependency. The workspace's core-crate minimum is unchanged. +Building PdfCraft requires Rust 1.95 or later: the UI crate and its `egui` and `craft-ui` +dependencies need it, and the workspace `rust-version` states the same minimum. ## Interface appearance diff --git a/xtask/src/version.rs b/xtask/src/version.rs index e11c99d7..06736531 100644 --- a/xtask/src/version.rs +++ b/xtask/src/version.rs @@ -154,4 +154,18 @@ mod tests { let text = std::fs::read_to_string(crate::gates::root().join("Cargo.toml")).unwrap(); validate(&read(&text).unwrap()).unwrap(); } + + /// The `rust-version = "1.NN"` line of a manifest, as the minor number. + fn minor_of_rust_version(manifest: &str) -> u32 { + let line = manifest.lines().find(|l| l.starts_with("rust-version = \"")).unwrap(); + line.split('"').nth(1).unwrap().split('.').nth(1).unwrap().parse().unwrap() + } + + #[test] + fn workspace_rust_version_covers_the_ui_crate() { + let root = crate::gates::root(); + let workspace = std::fs::read_to_string(root.join("Cargo.toml")).unwrap(); + let ui = std::fs::read_to_string(root.join("crates/ui-egui/Cargo.toml")).unwrap(); + assert!(minor_of_rust_version(&workspace) >= minor_of_rust_version(&ui)); + } }