Raise workspace rust-version to 1.95 to match the UI crate (#1169) (#1188)

This commit is contained in:
MarekSpodBiedry authored and GitHub committed 2026-10-11 18:30:25 -04:00
1 parent 3fa7a3a3e8
commit 75b113ac5b
5 files changed
+20 -4

No files matched your search

+1 -1
View File
@@ -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]
+2
View File
@@ -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
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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
+14
View File
@@ -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));
}
}