From 23bc362810bab6a2923d9d77e01fb3436159b203 Mon Sep 17 00:00:00 2001 From: Felix Zwettler Date: Sat, 21 Feb 2026 16:41:53 +0100 Subject: [PATCH 1/3] Bump cairo,pango version to v0.22, MSRV to v1.92 --- .github/workflows/ci.yml | 4 +- Cargo.lock | 85 +++++++++++++++++----------------------- Cargo.toml | 2 +- piet-cairo/Cargo.toml | 6 +-- piet-common/Cargo.toml | 4 +- 5 files changed, 45 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 691b82a0..d7b338de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,12 +3,12 @@ env: # version like 1.70. Note that we only specify MAJOR.MINOR and not PATCH so that bugfixes still # come automatically. If the version specified here is no longer the latest stable version, # then please feel free to submit a PR that adjusts it along with the potential clippy fixes. - RUST_STABLE_VER: "1.89" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7 + RUST_STABLE_VER: "1.92" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7 # The purpose of checking with the minimum supported Rust toolchain is to detect its staleness. # If the compilation fails, then the version specified here needs to be bumped up to reality. # Be sure to also update the rust-version property in the workspace Cargo.toml file, # plus all the README.md files of the affected packages. - RUST_MIN_VER: "1.85" + RUST_MIN_VER: "1.92" # List of packages that will be checked with the minimum supported Rust version. # This should be limited to packages that are intended for publishing. RUST_MIN_VER_PKGS: "-p piet -p piet-common -p piet-cairo -p piet-coregraphics -p piet-direct2d -p piet-svg -p piet-web" diff --git a/Cargo.lock b/Cargo.lock index 98734942..e834554d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,9 +67,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.3" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "bumpalo" @@ -97,11 +97,11 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "cairo-rs" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1158f326d7b755a9ae2b36c5b5391400e3431f3b77418cedb6d7130126628f10" +checksum = "5cc8d9aa793480744cd9a0524fef1a2e197d9eaa0f739cde19d16aba530dcb95" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "cairo-sys-rs", "glib", "libc", @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b963177900ec8e783927e5ed99e16c0ec1b723f1f125dff8992db28ef35c62c3" +checksum = "f8b4985713047f5faee02b8db6a6ef32bbb50269ff53c1aee716d1d195b76d54" dependencies = [ "glib-sys", "libc", @@ -262,7 +262,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "core-foundation 0.10.1", "core-graphics-types 0.2.0", "foreign-types", @@ -286,7 +286,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "core-foundation 0.10.1", "libc", ] @@ -509,7 +509,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c7e611d49285d4c4b2e1727b72cf05353558885cc5252f93707b845dfcaf3d3" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "byteorder", "core-foundation 0.9.4", "core-graphics 0.23.2", @@ -654,9 +654,9 @@ dependencies = [ [[package]] name = "gio" -version = "0.21.1" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b5e3f390d01b79e30da451dd00e27cd1ac2de81658e3abf6c1fc3229b24c5f" +checksum = "bb018ae3f3967134a833fac8a2568c3e698f4b95c658865360772d73803cc5de" dependencies = [ "futures-channel", "futures-core", @@ -671,9 +671,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a03f2234671e5a588cfe1f59c2b22c103f5772ea351be9cc824a9ce0d06d99fd" +checksum = "64729ba2772c080448f9f966dba8f4456beeb100d8c28a865ef8a0f2ef4987e1" dependencies = [ "glib-sys", "gobject-sys", @@ -684,17 +684,16 @@ dependencies = [ [[package]] name = "glib" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60bdc26493257b5794ba9301f7cbaf7ab0d69a570bfbefa4d7d360e781cb5205" +checksum = "9a3b79a62980e85d61aae88988e5bcca6a35f05b0008e1333aa43bd61ef9bf35" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", - "gio-sys", "glib-macros", "glib-sys", "gobject-sys", @@ -705,12 +704,11 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e772291ebea14c28eb11bb75741f62f4a4894f25e60ce80100797b6b010ef0f9" +checksum = "8b48a968528354e04603ae96205f00cf7e77347ffde0fc943a2159948d7d6d80" dependencies = [ "heck", - "proc-macro-crate", "proc-macro2", "quote", "syn", @@ -718,9 +716,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7c43cff6a7dc43821e45ebf172399437acd6716fa2186b6852d2b397bf622d" +checksum = "48073e3b228419faa80b9b7f7122759d4ab2f44cd52a065fde7ca08f34c03147" dependencies = [ "libc", "system-deps", @@ -728,9 +726,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9a190eef2bce144a6aa8434e306974c6062c398e0a33a146d60238f9062d5c" +checksum = "18eda93f09d3778f38255b231b17ef67195013a592c91624a4daf8bead875565" dependencies = [ "glib-sys", "libc", @@ -891,7 +889,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "libc", ] @@ -909,9 +907,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.7.5" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "minicov" @@ -980,9 +978,9 @@ dependencies = [ [[package]] name = "pango" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab47feb3403aa564edaeb68620c5b9159f8814733a7dd45f0b1a27d19de362fe" +checksum = "25d8f224eddef627b896d2f7b05725b3faedbd140e0e8343446f0d34f34238ee" dependencies = [ "gio", "glib", @@ -992,9 +990,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f855bccb447644e149fae79086e1f81514c30fe5e9b8bd257d9d3c941116c86" +checksum = "bbd111a20ca90fedf03e09c59783c679c00900f1d8491cca5399f5e33609d5d6" dependencies = [ "glib-sys", "gobject-sys", @@ -1004,9 +1002,9 @@ dependencies = [ [[package]] name = "pangocairo" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb23cf0052917cbf75f160d4913a46ce741567f566b514fadc09d761f41eb2fb" +checksum = "d9f15369c787b1cc59a5b86eff6afffd5a9716c5beb4969d20b307cebfe7e407" dependencies = [ "cairo-rs", "glib", @@ -1017,9 +1015,9 @@ dependencies = [ [[package]] name = "pangocairo-sys" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcda09c0b17007d7eb6c5eb1643c5b40b067073c15f0cc5a809a6fc68b5d9be7" +checksum = "d95cb73468373b9e568abb1afbaf5b42fe6ab9128fc41b5f2adbf69451c3c77f" dependencies = [ "cairo-sys-rs", "glib-sys", @@ -1253,15 +1251,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" -dependencies = [ - "toml_edit", -] - [[package]] name = "proc-macro2" version = "1.0.101" @@ -1416,7 +1405,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "bitflags 2.9.3", + "bitflags 2.11.0", "bytemuck", "core_maths", "log", @@ -1531,9 +1520,9 @@ checksum = "94afda9cd163c04f6bee8b4bf2501c91548deae308373c436f36aeff3cf3c4a3" [[package]] name = "syn" -version = "2.0.106" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 4f96967a..8e52b3df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ version = "0.8.0" edition = "2024" # Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml and with the relevant README.md files. -rust-version = "1.85" +rust-version = "1.92" license = "Apache-2.0 OR MIT" repository = "https://github.com/linebender/piet" diff --git a/piet-cairo/Cargo.toml b/piet-cairo/Cargo.toml index e33d6292..1fc44d9f 100644 --- a/piet-cairo/Cargo.toml +++ b/piet-cairo/Cargo.toml @@ -19,9 +19,9 @@ targets = [] [dependencies] piet = { workspace = true } -cairo-rs = { version = "0.21.1", default-features = false } # We don't need glib -pango = { version = "0.21.1", features = ["v1_44"] } -pangocairo = "0.21.1" +cairo-rs = { version = "0.22.0", default-features = false } # We don't need glib +pango = { version = "0.22.0", features = ["v1_44"] } +pangocairo = "0.22.0" unicode-segmentation = "1.12.0" xi-unicode = "0.3.0" diff --git a/piet-common/Cargo.toml b/piet-common/Cargo.toml index 48d4e258..89305573 100644 --- a/piet-common/Cargo.toml +++ b/piet-common/Cargo.toml @@ -45,8 +45,8 @@ png = { version = "0.17.16", optional = true } [target.'cfg(any(target_os="linux", target_os="openbsd", target_os="freebsd", target_os="netbsd"))'.dependencies] piet-cairo = { workspace = true } -cairo-rs = { version = "0.21.1", default-features = false } -cairo-sys-rs = { version = "0.21.1" } +cairo-rs = { version = "0.22.0", default-features = false } +cairo-sys-rs = { version = "0.22.0" } [target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies] piet-coregraphics = { workspace = true } From 360b90ebd34a93eea698b251c90d3c5e9f6d642b Mon Sep 17 00:00:00 2001 From: Felix Zwettler Date: Sat, 21 Feb 2026 17:23:14 +0100 Subject: [PATCH 2/3] Satifsy latest clippy lints --- piet-coregraphics/src/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/piet-coregraphics/src/lib.rs b/piet-coregraphics/src/lib.rs index b28ddc9e..221b7c2b 100644 --- a/piet-coregraphics/src/lib.rs +++ b/piet-coregraphics/src/lib.rs @@ -412,14 +412,15 @@ impl<'a> RenderContext for CoreGraphicsContext<'a> { dst_rect: impl Into, interp: InterpolationMode, ) { - if let CoreGraphicsImage::YDown(image) = image { - if let Some(cropped) = image.cropped(to_cgrect(src_rect)) { - self.draw_image(&CoreGraphicsImage::YDown(cropped), dst_rect, interp); - } - } else if let CoreGraphicsImage::YUp(image) = image { - if let Some(cropped) = image.cropped(to_cgrect(src_rect)) { - self.draw_image(&CoreGraphicsImage::YUp(cropped), dst_rect, interp); - } + let src_cgrect = to_cgrect(src_rect); + if let CoreGraphicsImage::YDown(image) = image + && let Some(cropped) = image.cropped(src_cgrect) + { + self.draw_image(&CoreGraphicsImage::YDown(cropped), dst_rect, interp); + } else if let CoreGraphicsImage::YUp(image) = image + && let Some(cropped) = image.cropped(src_cgrect) + { + self.draw_image(&CoreGraphicsImage::YUp(cropped), dst_rect, interp); } } From 2f0392568618064b614c65d659299bc780a12669 Mon Sep 17 00:00:00 2001 From: Felix Zwettler Date: Tue, 24 Feb 2026 19:03:42 +0100 Subject: [PATCH 3/3] Update mentions of MSRV in READMEs --- README.md | 2 +- piet-common/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b41d909..38d80e64 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ which should produce an image called `d2d-test-00-2.00.png`. ## Minimum supported Rust Version (MSRV) -This version of Piet has been verified to compile with **Rust 1.85** and later. +This version of Piet has been verified to compile with **Rust 1.92** and later. Future versions of Piet might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases. diff --git a/piet-common/README.md b/piet-common/README.md index 9af503d7..6631512a 100644 --- a/piet-common/README.md +++ b/piet-common/README.md @@ -7,7 +7,7 @@ The [piet-web][] backend will be selected when targeting `wasm32`. ## Minimum supported Rust Version (MSRV) -This version of Piet has been verified to compile with **Rust 1.85** and later. +This version of Piet has been verified to compile with **Rust 1.92** and later. Future versions of Piet might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.