diff --git a/Cargo.lock b/Cargo.lock index 0508bd2..20e11eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,17 +24,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "aes" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eb277bec05f56a0e0591f155a484cbd0f4f07ff2905051a48c72f004f7ed58" -dependencies = [ - "cipher", - "cpubits", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.8.12" @@ -66,27 +55,6 @@ dependencies = [ "equator", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "android-activity" version = "0.6.1" @@ -142,27 +110,6 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -[[package]] -name = "arboard" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" -dependencies = [ - "clipboard-win", - "image", - "log", - "objc2 0.6.4", - "objc2-app-kit 0.3.2", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation 0.3.2", - "parking_lot", - "percent-encoding", - "windows-sys 0.59.0", - "wl-clipboard-rs", - "x11rb", -] - [[package]] name = "arg_enum_proc_macro" version = "0.3.4" @@ -409,26 +356,20 @@ dependencies = [ "arrayvec", ] -[[package]] -name = "base64" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" - [[package]] name = "bit-set" -version = "0.9.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.9.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bit_field" @@ -467,14 +408,10 @@ dependencies = [ ] [[package]] -name = "block-buffer" -version = "0.12.1" +name = "block" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" -dependencies = [ - "hybrid-array", - "zeroize", -] +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block2" @@ -508,13 +445,28 @@ dependencies = [ ] [[package]] -name = "brotli-decompressor" -version = "5.0.3" +name = "bon" +version = "3.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +checksum = "a602c73c7b0148ec6d12af6fd5cc7a46e2eacc8878271a999abac56eed12f561" dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", + "bon-macros", + "rustversion", +] + +[[package]] +name = "bon-macros" +version = "3.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dee98b0db6a962de883bf5d20362dee4d7ca0d12fe39a7c6c73c844e1cd7c1f" +dependencies = [ + "darling", + "ident_case", + "prettyplease", + "proc-macro2", + "quote", + "rustversion", + "syn", ] [[package]] @@ -573,15 +525,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" -[[package]] -name = "bzip2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" -dependencies = [ - "libbz2-rs-sys", -] - [[package]] name = "calloop" version = "0.13.0" @@ -596,18 +539,43 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "calloop" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" +dependencies = [ + "bitflags 2.13.0", + "polling", + "rustix 1.1.4", + "slab", + "tracing", +] + [[package]] name = "calloop-wayland-source" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "calloop", + "calloop 0.13.0", "rustix 0.38.44", "wayland-backend", "wayland-client", ] +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.4", + "rustix 1.1.4", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" version = "1.2.65" @@ -642,16 +610,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[package]] -name = "cipher" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clipboard-win" version = "5.4.1" @@ -662,16 +620,40 @@ dependencies = [ ] [[package]] -name = "cmov" -version = "0.5.4" +name = "clipboard_macos" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" +checksum = "9b7f4aaa047ba3c3630b080bb9860894732ff23e2aee290a418909aa6d5df38f" +dependencies = [ + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "clipboard_wayland" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8" +dependencies = [ + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd63e33452ffdafd39924c4f05a5dd1e94db646c779c6bd59148a3d95fff5ad4" +dependencies = [ + "thiserror 2.0.18", + "x11rb", +] [[package]] name = "codespan-reporting" -version = "0.13.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ "serde", "termcolor", @@ -703,18 +685,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - -[[package]] -name = "constant_time_eq" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" - [[package]] name = "core-foundation" version = "0.9.4" @@ -725,6 +695,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -738,8 +718,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", "foreign-types", "libc", ] @@ -751,7 +731,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.0", + "core-foundation 0.10.1", "libc", ] @@ -766,20 +757,20 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.19.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73" +checksum = "173852283a9a57a3cbe365d86e74dc428a09c50421477d5ad6fe9d9509e37737" dependencies = [ "bitflags 2.13.0", - "fontdb 0.23.0", - "harfrust 0.5.2", + "fontdb", + "harfrust", "linebender_resource_handle", "log", "rangemap", - "rustc-hash 2.1.2", + "rustc-hash 1.1.0", "self_cell", - "skrifa 0.40.0", - "smol_str 0.3.6", + "skrifa 0.37.0", + "smol_str", "swash", "sys-locale", "unicode-bidi", @@ -788,21 +779,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "cpubits" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" - -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.5.0" @@ -846,7 +822,8 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "cryoglyph" version = "0.1.0" -source = "git+https://github.com/iced-rs/cryoglyph.git?rev=f4e7e4eb84dc1d2f335a98c67d8694640d53a433#f4e7e4eb84dc1d2f335a98c67d8694640d53a433" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc795bdbccdbd461736fb163930a009da6597b226d6f6fce33e7a8eb6ec519" dependencies = [ "cosmic-text", "etagere", @@ -855,15 +832,6 @@ dependencies = [ "wgpu", ] -[[package]] -name = "crypto-common" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" -dependencies = [ - "hybrid-array", -] - [[package]] name = "ctor" version = "0.10.1" @@ -873,15 +841,6 @@ dependencies = [ "dtor", ] -[[package]] -name = "ctutils" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" -dependencies = [ - "cmov", -] - [[package]] name = "cursor-icon" version = "1.2.0" @@ -889,10 +848,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" [[package]] -name = "data-url" -version = "0.3.2" +name = "darling" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn", +] [[package]] name = "dav1d" @@ -916,31 +903,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "deflate64" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" - -[[package]] -name = "deranged" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" - -[[package]] -name = "digest" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "ctutils", - "zeroize", -] - [[package]] name = "dirs" version = "6.0.0" @@ -1006,8 +968,9 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" -version = "0.1.1" -source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] name = "dtor" @@ -1181,12 +1144,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - [[package]] name = "flate2" version = "1.1.9" @@ -1195,15 +1152,8 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", - "zlib-rs", ] -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" - [[package]] name = "foldhash" version = "0.1.5" @@ -1218,18 +1168,18 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.11.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] [[package]] name = "font-types" -version = "0.12.3" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75382bc7392ef10aad10935f92fc3db36d2d4dad0e5d96d8d65e04f89a07ec39" +checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" dependencies = [ "bytemuck", ] @@ -1240,7 +1190,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646" dependencies = [ - "roxmltree 0.20.0", + "roxmltree", ] [[package]] @@ -1257,19 +1207,6 @@ dependencies = [ "ttf-parser", ] -[[package]] -name = "fontdb" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2660c5e9157bf76d2db1294e4a9feba604ef610819a3b591088d0d8392a3290f" -dependencies = [ - "fontconfig-parser", - "log", - "memmap2", - "slotmap", - "tinyvec", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -1438,10 +1375,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 6.0.0", - "wasm-bindgen", ] [[package]] @@ -1467,15 +1402,15 @@ dependencies = [ [[package]] name = "glam" -version = "0.33.6" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fef0953c54fd3de2f44b743fbf77e044c81a25faee03636dfccc0d35135e23" +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glow" -version = "0.17.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -1493,17 +1428,34 @@ dependencies = [ ] [[package]] -name = "gpu-allocator" -version = "0.28.0" +name = "gpu-alloc" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.13.0", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.13.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ - "ash", - "hashbrown 0.16.1", "log", "presser", - "thiserror 2.0.18", - "windows", + "thiserror 1.0.69", + "windows 0.58.0", ] [[package]] @@ -1550,26 +1502,14 @@ dependencies = [ [[package]] name = "harfrust" -version = "0.5.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" +checksum = "92c020db12c71d8a12a3fe7607873cade3a01a6287e29d540c8723276221b9d8" dependencies = [ "bitflags 2.13.0", "bytemuck", "core_maths", - "read-fonts 0.37.0", - "smallvec", -] - -[[package]] -name = "harfrust" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" -dependencies = [ - "bitflags 2.13.0", - "bytemuck", - "read-fonts 0.41.0", + "read-fonts 0.35.0", "smallvec", ] @@ -1597,8 +1537,6 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.2.0", ] @@ -1632,28 +1570,11 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "hmac" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" -dependencies = [ - "digest", -] - -[[package]] -name = "hybrid-array" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" -dependencies = [ - "typenum", -] - [[package]] name = "iced" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000e01026c93ba643f8357a3db3ada0e6555265a377f6f9291c472f6dd701fb3" dependencies = [ "iced_core", "iced_debug", @@ -1668,8 +1589,9 @@ dependencies = [ [[package]] name = "iced_core" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ab1937d699403e7e69252ae743a902bcee9f4ab2052cc4c9a46fcf34729d85" dependencies = [ "bitflags 2.13.0", "bytes", @@ -1677,18 +1599,17 @@ dependencies = [ "lilt", "log", "num-traits", - "raw-window-handle", "rustc-hash 2.1.2", - "smol_str 0.2.2", + "smol_str", "thiserror 2.0.18", - "unicode-segmentation", "web-time", ] [[package]] name = "iced_debug" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25035ab0215a620e53f4103e36fc4e59a1fb2817e4bfc38a30ad27b4202ea0be" dependencies = [ "iced_core", "iced_futures", @@ -1697,8 +1618,9 @@ dependencies = [ [[package]] name = "iced_futures" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c0c85ccad42dfbec7293c36c018af0ea0dbcc52d137a4a9a0b0f6822a3fdf0a" dependencies = [ "futures", "iced_core", @@ -1710,8 +1632,9 @@ dependencies = [ [[package]] name = "iced_graphics" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234ca1c2cec4155055f68fa5fad1b5242c496ac8238d80a259bca382fb44a102" dependencies = [ "bitflags 2.13.0", "bytemuck", @@ -1725,12 +1648,14 @@ dependencies = [ "raw-window-handle", "rustc-hash 2.1.2", "thiserror 2.0.18", + "unicode-segmentation", ] [[package]] name = "iced_program" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dfafec2947cda688d8eb00dac337ba11aa60f9ef6335aed343e189d26e4a673" dependencies = [ "iced_graphics", "iced_runtime", @@ -1738,8 +1663,9 @@ dependencies = [ [[package]] name = "iced_renderer" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250cc0802408e8c077986ec56c7d07c65f423ee658a4b9fd795a1f2aae5dac05" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -1750,40 +1676,45 @@ dependencies = [ [[package]] name = "iced_runtime" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1889b819ce4c06674183242e336c8d49465665441396914dc07cc86f44fa8d4" dependencies = [ "bytes", "iced_core", "iced_futures", + "raw-window-handle", "thiserror 2.0.18", ] [[package]] name = "iced_tiny_skia" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0acf8b75a3bc914aff5f2329fdffc1b36eeaea29dda0e4bd232f1c62e9cc3d" dependencies = [ "bytemuck", "cosmic-text", "iced_debug", "iced_graphics", - "kurbo 0.10.4", + "kurbo", "log", "rustc-hash 2.1.2", "softbuffer", - "tiny-skia 0.11.4", + "tiny-skia", ] [[package]] name = "iced_wgpu" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff144a999b0ca0f8a10257934500060240825c42e950ec0ebee9c8ae30561c13" dependencies = [ "bitflags 2.13.0", "bytemuck", "cryoglyph", "futures", + "glam", "guillotiere", "iced_debug", "iced_graphics", @@ -1795,11 +1726,11 @@ dependencies = [ [[package]] name = "iced_widget" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1596afa0d3109c2618e8bc12bae6c11d3064df8f95c42dfce570397dbe957ab" dependencies = [ "iced_renderer", - "iced_runtime", "log", "num-traits", "rustc-hash 2.1.2", @@ -1809,24 +1740,29 @@ dependencies = [ [[package]] name = "iced_winit" -version = "0.15.0-dev" -source = "git+https://github.com/iced-rs/iced#a8ff2d522552c1252b88afc02bc310dd657cd25e" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7dbedc47562d1de3b9707d939f678b88c382004b7ab5a18f7a7dd723162d75" dependencies = [ - "arboard", "iced_debug", "iced_program", - "iced_runtime", "log", "mundy", - "objc2 0.5.2", "rustc-hash 2.1.2", "thiserror 2.0.18", "tracing", "wasm-bindgen-futures", "web-sys", + "window_clipboard", "winit", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "image" version = "0.25.10" @@ -1863,12 +1799,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "imagesize" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b27460c2c92b037f3f94c538ed9a3342f3fdf923606781629ccb35f82d042a" - [[package]] name = "imagey" version = "0.1.0" @@ -1876,12 +1806,8 @@ dependencies = [ "dirs", "iced", "image", - "jxl-oxide", - "misc-image-integration", - "resvg", + "jpegxl-rs", "rfd", - "size", - "zip", ] [[package]] @@ -1900,15 +1826,6 @@ dependencies = [ "hashbrown 0.17.1", ] -[[package]] -name = "inout" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7" -dependencies = [ - "hybrid-array", -] - [[package]] name = "interpolate_name" version = "0.2.4" @@ -1998,193 +1915,37 @@ dependencies = [ ] [[package]] -name = "js-sys" -version = "0.3.85" +name = "jpegxl-rs" +version = "0.14.0+libjxl-0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "9b7d16fe73fb6d2e16b986392b716409c6ae6fabd35769d66bea391b016cdbc9" dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "jxl-bitstream" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b480e752277e29eb4054f69546887a9b84656fe78c08f54ba5850ced98a378fe" -dependencies = [ - "tracing", -] - -[[package]] -name = "jxl-coding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd972bcd125e776f1eb241ac50e39f956095a1c2770c64736c968f8946bd9a3c" -dependencies = [ - "jxl-bitstream", - "tracing", -] - -[[package]] -name = "jxl-color" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f316b1358c1711755b3ee8e8cb5c4a1dad12e796233088a7a513440782de80b2" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-image", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "jxl-frame" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d967c6fd669c7c01060b5022d8835fa82fd46b06ffc98b549f17600a097c2b3" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-grid" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01671307879a033bfa52e6e8784b941aca770b3f3a7d33830b455b6844f793fb" -dependencies = [ - "tracing", -] - -[[package]] -name = "jxl-image" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f752d62577c702a94dbbce4045caf08cb58639e8a4d56464b40ecf33ffe565" -dependencies = [ - "jxl-bitstream", - "jxl-grid", - "jxl-oxide-common", - "tracing", -] - -[[package]] -name = "jxl-jbr" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35d032bcec660647828527ff42c6f5776d2fd44b8357f9f6d9ac6dc07218e46" -dependencies = [ - "brotli-decompressor", - "jxl-bitstream", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-modular" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f045b24c738dd91d482be385512b512721ae08a671bd4b27bf1c47f215235" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", -] - -[[package]] -name = "jxl-oxide" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36c662923f47586880211f3bc7c0d83fb3a9b410d278c7bde93450748abeef3" -dependencies = [ - "brotli-decompressor", - "bytemuck", + "bon", + "byteorder", + "half", "image", - "jxl-bitstream", - "jxl-color", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-jbr", - "jxl-oxide-common", - "jxl-render", - "jxl-threadpool", - "tracing", + "jpegxl-sys", + "thiserror 2.0.18", ] [[package]] -name = "jxl-oxide-common" -version = "1.0.0" +name = "jpegxl-sys" +version = "0.12.1+libjxl-0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62394c5021b3a9e7e0dbb2d639d555d019090c9946c39f6d3b09d390db4157b" +checksum = "00cb4f7ffb45ee4327e9ec6ca1a732f3abef470ee008f7d4be3afb414075cd7d" dependencies = [ - "jxl-bitstream", + "pkg-config", ] [[package]] -name = "jxl-render" -version = "0.12.4" +name = "js-sys" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34386bfdb6a19b5a30cc9beb4d475d537422c31ae8c39bb69640fcce3fcaf19" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ - "bytemuck", - "jxl-bitstream", - "jxl-coding", - "jxl-color", - "jxl-frame", - "jxl-grid", - "jxl-image", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "jxl-vardct", - "tracing", -] - -[[package]] -name = "jxl-threadpool" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f15eb830aa77a7f21148d72e153562a26bfe570139bd4922eab1908dd499d3" -dependencies = [ - "rayon", - "rayon-core", - "tracing", -] - -[[package]] -name = "jxl-vardct" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce72a18c6d3a47172ab6c479be2bdb56f22066b5d7092663f03b4490820b4511" -dependencies = [ - "jxl-bitstream", - "jxl-coding", - "jxl-grid", - "jxl-modular", - "jxl-oxide-common", - "jxl-threadpool", - "tracing", + "cfg-if", + "futures-util", + "wasm-bindgen", ] [[package]] @@ -2223,30 +1984,12 @@ dependencies = [ "smallvec", ] -[[package]] -name = "kurbo" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" -dependencies = [ - "arrayvec", - "euclid", - "polycool", - "smallvec", -] - [[package]] name = "lebe" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" -[[package]] -name = "libbz2-rs-sys" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b357333733e8260735ba5894eb928c02ecc69c78715f01a8019e7fa7f2db4c" - [[package]] name = "libc" version = "0.2.186" @@ -2355,12 +2098,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" [[package]] -name = "lzma-rust2" -version = "0.16.5" +name = "malloc_buf" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca93e534d1142d1d0dcca6d25fe302508a5dfb40b302802904577725ea0b695b" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" dependencies = [ - "sha2", + "libc", ] [[package]] @@ -2397,6 +2140,21 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metal" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" +dependencies = [ + "bitflags 2.13.0", + "block", + "core-graphics-types 0.2.0", + "foreign-types", + "log", + "objc", + "paste", +] + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -2407,17 +2165,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "misc-image-integration" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021bf53776c68684f91b0eea6317b518d6b113db09fc929f51f1c01a760ca8f" -dependencies = [ - "image", - "resvg", - "zip", -] - [[package]] name = "moxcms" version = "0.8.1" @@ -2463,7 +2210,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows", + "windows 0.62.2", "zbus", ] @@ -2475,9 +2222,9 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" [[package]] name = "naga" -version = "29.0.4" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bf919621e7975acb27d881bae2fb993e0d45c8e0446e85e6272971e00dc8df" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", @@ -2569,12 +2316,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" - [[package]] name = "num-derive" version = "0.4.2" @@ -2638,6 +2379,15 @@ dependencies = [ "syn", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + [[package]] name = "objc-sys" version = "0.3.5" @@ -2791,7 +2541,7 @@ dependencies = [ "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", - "objc2-metal 0.2.2", + "objc2-metal", ] [[package]] @@ -2908,18 +2658,6 @@ dependencies = [ "objc2-foundation 0.2.2", ] -[[package]] -name = "objc2-metal" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" -dependencies = [ - "bitflags 2.13.0", - "block2 0.6.2", - "objc2 0.6.4", - "objc2-foundation 0.3.2", -] - [[package]] name = "objc2-quartz-core" version = "0.2.2" @@ -2930,7 +2668,7 @@ dependencies = [ "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", - "objc2-metal 0.2.2", + "objc2-metal", ] [[package]] @@ -2943,7 +2681,6 @@ dependencies = [ "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", - "objc2-metal 0.3.2", ] [[package]] @@ -3042,16 +2779,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "os_pipe" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "owned_ttf_parser" version = "0.25.1" @@ -3102,39 +2829,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" -[[package]] -name = "pbkdf2" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629" -dependencies = [ - "digest", - "hmac", -] - [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "petgraph" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" -dependencies = [ - "fixedbitset", - "hashbrown 0.15.5", - "indexmap", -] - -[[package]] -name = "pico-args" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" - [[package]] name = "pin-project" version = "1.1.13" @@ -3223,15 +2923,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" -[[package]] -name = "polycool" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" -dependencies = [ - "arrayvec", -] - [[package]] name = "portable-atomic" version = "1.13.1" @@ -3247,18 +2938,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppmd-rust" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -3274,6 +2953,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -3459,18 +3148,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" -[[package]] -name = "raw-window-metal" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" -dependencies = [ - "objc2 0.6.4", - "objc2-core-foundation", - "objc2-foundation 0.3.2", - "objc2-quartz-core 0.3.2", -] - [[package]] name = "rayon" version = "1.12.0" @@ -3493,13 +3170,13 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.37.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" +checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" dependencies = [ "bytemuck", "core_maths", - "font-types 0.11.3", + "font-types 0.10.1", ] [[package]] @@ -3512,17 +3189,6 @@ dependencies = [ "font-types 0.11.3", ] -[[package]] -name = "read-fonts" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" -dependencies = [ - "bytemuck", - "font-types 0.12.3", - "once_cell", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -3567,24 +3233,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" -[[package]] -name = "resvg" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e3803f97b999e80cbf7c6ecdd07a8102204d92e1633cf48783720c521196bd" -dependencies = [ - "bytemuck", - "gif", - "image-webp", - "log", - "pico-args", - "rgb", - "svgtypes", - "tiny-skia 0.12.0", - "usvg", - "zune-jpeg", -] - [[package]] name = "rfd" version = "0.17.2" @@ -3617,9 +3265,6 @@ name = "rgb" version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" -dependencies = [ - "bytemuck", -] [[package]] name = "roxmltree" @@ -3627,15 +3272,6 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" -[[package]] -name = "roxmltree" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb" -dependencies = [ - "memchr", -] - [[package]] name = "rustc-hash" version = "1.1.0" @@ -3719,8 +3355,8 @@ dependencies = [ "ab_glyph", "log", "memmap2", - "smithay-client-toolkit", - "tiny-skia 0.11.4", + "smithay-client-toolkit 0.19.2", + "tiny-skia", ] [[package]] @@ -3785,28 +3421,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "sha1" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "shlex" version = "2.0.1" @@ -3854,35 +3468,14 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" -[[package]] -name = "simplecss" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" -dependencies = [ - "log", -] - -[[package]] -name = "siphasher" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" - -[[package]] -name = "size" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6709c7b6754dca1311b3c73e79fcce40dd414c782c66d88e8823030093b02b" - [[package]] name = "skrifa" -version = "0.40.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" +checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" dependencies = [ "bytemuck", - "read-fonts 0.37.0", + "read-fonts 0.35.0", ] [[package]] @@ -3895,16 +3488,6 @@ dependencies = [ "read-fonts 0.39.2", ] -[[package]] -name = "skrifa" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" -dependencies = [ - "bytemuck", - "read-fonts 0.41.0", -] - [[package]] name = "slab" version = "0.4.12" @@ -3933,8 +3516,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.13.0", - "calloop", - "calloop-wayland-source", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", @@ -3951,6 +3534,44 @@ dependencies = [ "xkeysym", ] +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.0", + "calloop 0.14.4", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.4", + "thiserror 2.0.18", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + [[package]] name = "smol_str" version = "0.2.2" @@ -3960,12 +3581,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smol_str" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523" - [[package]] name = "softbuffer" version = "0.4.8" @@ -3999,9 +3614,9 @@ dependencies = [ [[package]] name = "spirv" -version = "0.4.0+sdk-1.4.341.0" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ "bitflags 2.13.0", ] @@ -4023,9 +3638,12 @@ name = "strict-num" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" -dependencies = [ - "float-cmp", -] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "svg_fmt" @@ -4033,16 +3651,6 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" -[[package]] -name = "svgtypes" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d" -dependencies = [ - "kurbo 0.13.1", - "siphasher", -] - [[package]] name = "swash" version = "0.2.9" @@ -4169,26 +3777,6 @@ dependencies = [ "zune-jpeg", ] -[[package]] -name = "time" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" -dependencies = [ - "deranged", - "js-sys", - "num-conv", - "powerfmt", - "serde_core", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" - [[package]] name = "tiny-skia" version = "0.11.4" @@ -4200,22 +3788,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "tiny-skia-path 0.11.4", -] - -[[package]] -name = "tiny-skia" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47ffee5eaaf5527f630fb0e356b90ebdec84d5d18d937c5e440350f88c5a91ea" -dependencies = [ - "arrayref", - "arrayvec", - "bytemuck", - "cfg-if", - "log", - "png", - "tiny-skia-path 0.12.0", + "tiny-skia-path", ] [[package]] @@ -4229,17 +3802,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tiny-skia-path" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca365c3faccca67d06593c5980fa6c57687de727a03131735bb85f01fdeeb9" -dependencies = [ - "arrayref", - "bytemuck", - "strict-num", -] - [[package]] name = "tiny-xlib" version = "0.2.5" @@ -4325,6 +3887,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4350,17 +3913,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tree_magic_mini" -version = "3.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" -dependencies = [ - "memchr", - "nom", - "petgraph", -] - [[package]] name = "ttf-parser" version = "0.25.1" @@ -4370,18 +3922,6 @@ dependencies = [ "core_maths", ] -[[package]] -name = "typed-path" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" - -[[package]] -name = "typenum" -version = "1.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" - [[package]] name = "uds_windows" version = "1.2.1" @@ -4423,46 +3963,12 @@ version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" -[[package]] -name = "unicode-vo" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" - [[package]] name = "unicode-width" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "usvg" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977d0a4abdef933f424a99fe09f95576e089b90aebc6f016a3bc813762493e91" -dependencies = [ - "base64", - "data-url", - "flate2", - "fontdb 0.24.0", - "harfrust 0.12.0", - "imagesize", - "kurbo 0.13.1", - "log", - "pico-args", - "roxmltree 0.21.1", - "simplecss", - "siphasher", - "skrifa 0.44.0", - "strict-num", - "svgtypes", - "tiny-skia-path 0.12.0", - "unicode-bidi", - "unicode-script", - "unicode-vo", - "xmlwriter", -] - [[package]] name = "uuid" version = "1.23.4" @@ -4524,9 +4030,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -4537,23 +4043,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4561,9 +4063,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", @@ -4574,9 +4076,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] @@ -4655,6 +4157,32 @@ dependencies = [ "wayland-scanner", ] +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-plasma" version = "0.3.12" @@ -4706,9 +4234,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" dependencies = [ "js-sys", "wasm-bindgen", @@ -4732,13 +4260,12 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "29.0.4" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e8840e1ba2881d4cbb18d2147627a56af426ff064c0401eb0c8410c6325d07" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", "bitflags 2.13.0", - "bytemuck", "cfg-if", "cfg_aliases", "document-features", @@ -4762,9 +4289,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "29.0.4" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f519832254e56965a9940c4af57dcb75f702b6f6fa4a0b172f685395843a4d7" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", "bit-set", @@ -4789,54 +4316,55 @@ dependencies = [ "wgpu-core-deps-emscripten", "wgpu-core-deps-windows-linux-android", "wgpu-hal", - "wgpu-naga-bridge", "wgpu-types", ] [[package]] name = "wgpu-core-deps-apple" -version = "29.0.4" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e39e26c4c0e07589e67d18546cf79ff45383659fc72fca4dd293358a0347f3" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "29.0.4" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e09be551dc939498bdd5f6b2c66e55ab275dad25825267a08605a80fc9f0af" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "29.0.4" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e592c1bbef6ad047647ae6e666ebd8cee7a32bb4544d9700ec96cbf73230257" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "29.0.4" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ace1c17727311c22a46e4e3faf56ea6de81af99dcc839bdfb54857b94d448d" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", "bitflags 2.13.0", - "block2 0.6.2", + "block", "bytemuck", "cfg-if", "cfg_aliases", + "core-graphics-types 0.2.0", "glow", "glutin_wgl_sys", + "gpu-alloc", "gpu-allocator", "gpu-descriptor", "hashbrown 0.16.1", @@ -4845,13 +4373,10 @@ dependencies = [ "libc", "libloading", "log", + "metal", "naga", "ndk-sys", - "objc2 0.6.4", - "objc2-core-foundation", - "objc2-foundation 0.3.2", - "objc2-metal 0.3.2", - "objc2-quartz-core 0.3.2", + "objc", "once_cell", "ordered-float", "parking_lot", @@ -4860,41 +4385,27 @@ dependencies = [ "profiling", "range-alloc", "raw-window-handle", - "raw-window-metal", "renderdoc-sys", "smallvec", "thiserror 2.0.18", "wasm-bindgen", - "wayland-sys", "web-sys", - "wgpu-naga-bridge", - "wgpu-types", - "windows", - "windows-core", - "windows-result", -] - -[[package]] -name = "wgpu-naga-bridge" -version = "29.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95226013f547544b223281cd16a4fb549aa9dcb562adbda0faae4c73ffbbc161" -dependencies = [ - "naga", "wgpu-types", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "29.0.4" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bf84cd9ca8ca45e2b223a3868f1adf9bfc0c66aeac212e76ee7e40fdadf8f5" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ "bitflags 2.13.0", "bytemuck", "js-sys", "log", - "raw-window-handle", + "thiserror 2.0.18", "web-sys", ] @@ -4907,6 +4418,30 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "window_clipboard" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5654226305eaf2dde8853fb482861d28e5dcecbbd40cb88e8393d94bb80d733" +dependencies = [ + "clipboard-win", + "clipboard_macos", + "clipboard_wayland", + "clipboard_x11", + "raw-window-handle", + "thiserror 2.0.18", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets", +] + [[package]] name = "windows" version = "0.62.2" @@ -4914,7 +4449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ "windows-collections", - "windows-core", + "windows-core 0.62.2", "windows-future", "windows-numerics", ] @@ -4925,7 +4460,20 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-core", + "windows-core 0.62.2", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets", ] [[package]] @@ -4934,11 +4482,11 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link", - "windows-result", - "windows-strings", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] @@ -4947,11 +4495,22 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "windows-core", + "windows-core 0.62.2", "windows-link", "windows-threading", ] +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-implement" version = "0.60.2" @@ -4963,6 +4522,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-interface" version = "0.59.3" @@ -4986,10 +4556,19 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core", + "windows-core 0.62.2", "windows-link", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-result" version = "0.4.1" @@ -4999,6 +4578,16 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets", +] + [[package]] name = "windows-strings" version = "0.5.1" @@ -5110,8 +4699,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.8" -source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" dependencies = [ "ahash", "android-activity", @@ -5119,10 +4709,10 @@ dependencies = [ "bitflags 2.13.0", "block2 0.5.1", "bytemuck", - "calloop", + "calloop 0.13.0", "cfg_aliases", "concurrent-queue", - "core-foundation", + "core-foundation 0.9.4", "core-graphics", "cursor-icon", "dpi", @@ -5141,8 +4731,8 @@ dependencies = [ "redox_syscall 0.4.1", "rustix 0.38.44", "sctk-adwaita", - "smithay-client-toolkit", - "smol_str 0.2.2", + "smithay-client-toolkit 0.19.2", + "smol_str", "tracing", "unicode-segmentation", "wasm-bindgen", @@ -5174,24 +4764,6 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" -[[package]] -name = "wl-clipboard-rs" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9651471a32e87d96ef3a127715382b2d11cc7c8bb9822ded8a7cc94072eb0a3" -dependencies = [ - "libc", - "log", - "os_pipe", - "rustix 1.1.4", - "thiserror 2.0.18", - "tree_magic_mini", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -5255,12 +4827,6 @@ version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" -[[package]] -name = "xmlwriter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" - [[package]] name = "y4m" version = "0.8.0" @@ -5360,85 +4926,6 @@ dependencies = [ "syn", ] -[[package]] -name = "zeroize" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" - -[[package]] -name = "zip" -version = "8.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" -dependencies = [ - "aes", - "bzip2", - "constant_time_eq", - "crc32fast", - "deflate64", - "flate2", - "getrandom 0.4.3", - "hmac", - "indexmap", - "lzma-rust2", - "memchr", - "pbkdf2", - "ppmd-rust", - "sha1", - "time", - "typed-path", - "zeroize", - "zopfli", - "zstd", -] - -[[package]] -name = "zlib-rs" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b142a20ec14a91d5bc708c1dc21b080c550113d8aa77afa29635673a65dd02c5" - -[[package]] -name = "zopfli" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" -dependencies = [ - "bumpalo", - "crc32fast", - "log", - "simd-adler32", -] - -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.16+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" -dependencies = [ - "cc", - "pkg-config", -] - [[package]] name = "zune-core" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index ccdbc3a..519eeb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,25 +5,11 @@ edition = "2024" license = "AGPL-3.0-or-later" [dependencies] +iced = { version = "0.14.0", features = [ "image" ] } dirs = "6.0.0" -misc-image-integration = "0.1.0" -resvg = "0.48.1" rfd = "0.17.2" -size = "0.5.0" -zip = "8.6.0" - -[dependencies.iced] -version = "0.15.0-dev" -features = [ "image" ] +jpegxl-rs = "0.14.0" [dependencies.image] version = "0.25.10" features = [ "avif-native" ] - -[dependencies.jxl-oxide] -version = "0.12.6" -# I really wish the image crate was named better -features = [ "image" ] - -[patch.crates-io] -iced.git = "https://github.com/iced-rs/iced" diff --git a/README.md b/README.md deleted file mode 100644 index 545d7ef..0000000 --- a/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# imagey - -image viewer and maybe editor; inspired by mpv's simplicity - -name is subject to change, suggestions welcome :) - -## usage - -```sh -# try it out! -nix run git+https://git.federated.nexus/electria/imagey - -# install it imperatively -nix profile install git+https://git.federated.nexus/electria/imagey -``` - -keybinds are shown on startup if you didn't start it with an image - -## known issues - -### JXL - -1. encoding is not implemented (jxl-oxide is decoding-only) -2. oreintation is incorrect in some cases - - if the image has metadata oreintation AND - - it's a jxl without the right extension OR - it's a jpeg with the jxl extension - - this is due to the JXL decoder automatically rotating the image, - while the JPEG decoder (for instance) requires the extra step. - - my workaround is to check the path of the input file, - not changing the oreintation if it has the jxl extension; - causing these caveats for cases where the extension is wrong. - -### clipboard - -1. large images (eg photos) don't seem to copy on linux/wayland, - (despite set_image not returning any error) diff --git a/flake.nix b/flake.nix index 2004328..ddb2efc 100644 --- a/flake.nix +++ b/flake.nix @@ -19,25 +19,19 @@ cargoToml = fromTOML (builtins.readFile ./Cargo.toml); name = cargoToml.package.name; - dlDeps = - with pkgs; - [ - # needed for both x11 and wayland - libxkbcommon - libGL + dlDeps = with pkgs; [ + # needed for both x11 and wayland + libxkbcommon + libGL + vulkan-loader - libx11 - libxcursor - libxi - libxcb - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - # libdbus, for rfd - dbus.lib + wayland - vulkan-loader - wayland - ]; + libx11 + libxcursor + libxi + libxcb + ]; commonArgs = { # all that's needed for artifacts and checks @@ -45,12 +39,15 @@ pkg-config ]; buildInputs = with pkgs; [ + libjxl dav1d ]; src = ./.; }; + LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps; + # Build *just* the cargo dependencies, # to reuse them for build and test derivations. cargoArtifacts = craneLib.buildDepsOnly commonArgs; @@ -74,8 +71,6 @@ "image/tiff" "image/bmp" "image/vnd.microsoft.icon" # .ico - "application/x-krita" - "image/svg+xml" ]; }; in @@ -84,13 +79,19 @@ // { inherit cargoArtifacts; - nativeBuildInputs = commonArgs.nativeBuildInputs ++ [ - pkgs.autoPatchelfHook - ]; + nativeBuildInputs = + commonArgs.nativeBuildInputs + ++ [ + pkgs.autoPatchelfHook + ] + ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.makeBinaryWrapper; - buildInputs = commonArgs.buildInputs ++ [ - pkgs.libgcc - ]; + buildInputs = + commonArgs.buildInputs + ++ [ + pkgs.libgcc + ] + ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.zenity; runtimeDependencies = dlDeps; @@ -99,6 +100,10 @@ postFixup = '' mkdir -p "$out/share/applications" ln -s "${desktopItem}"/share/applications/* "$out/share/applications/" + '' + + lib.optionalString pkgs.stdenv.hostPlatform.isLinux /* sh */ '' + wrapProgram $out/bin/${name} --inherit-argv0 \ + --prefix PATH : ${lib.makeBinPath [ pkgs.zenity ]} ''; } ); @@ -118,7 +123,7 @@ }; devShells.default = craneLib.devShell { - LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps; + inherit LD_LIBRARY_PATH; inputsFrom = [ crate ]; packages = [ pkgs.rust-analyzer ]; diff --git a/src/jxl.rs b/src/jxl.rs new file mode 100644 index 0000000..26de36f --- /dev/null +++ b/src/jxl.rs @@ -0,0 +1,22 @@ +pub struct JxlDecoder<'a> { + metadata: jpegxl_rs::decode::Metadata, + inner: jpegxl_rs::decode::JxlDecoder<'a, 'a>, +} + +impl<'a> image::ImageDecoder for JxlDecoder<'a> { + fn color_type(&self) -> image::ColorType { + image::ColorType::Rgba8 + } + fn icc_profile(&mut self) -> image::ImageResult>> { + Ok(self.metadata.icc_profile.clone()) + } + fn dimensions(&self) -> (u32, u32) {} + fn read_image(self, buf: &mut [u8]) -> image::ImageResult<()> + where + Self: Sized, + { + } + fn read_image_boxed(self: Box, buf: &mut [u8]) -> image::ImageResult<()> { + self.read_image(buf) + } +} diff --git a/src/main.rs b/src/main.rs index 01ddd8f..ed2e77e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,72 +1,50 @@ -use std::{ - borrow::Cow, - env, - ffi::OsStr, - os::unix::fs::MetadataExt, - path::{Path, PathBuf}, -}; +use std::{env, path::Path}; use iced::{ - Alignment, Color, Element, Length, Renderer, Subscription, Task, Theme, clipboard, event, + Alignment, Color, Element, Length, Renderer, Subscription, Task, Theme, color, event, keyboard::{self, Key, key}, theme, widget, window, }; use image::{EncodableLayout, RgbaImage, imageops}; -use size::Size; +mod jxl; mod utils; #[derive(Clone, Debug)] enum Message { - Open, - Rotate, - Invert, - Filter, - Bar, - Save, - Quit, - - Yank, - Put, - ImageYanked(Result<(), clipboard::Error>), - ImagePut(Result), - - FocusNext, - FocusPrevious, - - ImagePicked(Result>), ImageDisplayReady(Result), - SavePathPicked(Result>), - FileDropped(PathBuf), + Event(iced::Event), } -#[derive(Default)] +#[derive(Clone, Debug, Default)] struct State { image: Option, image_display: Option, - image_filter: widget::image::FilterMethod, - error: Option>, - info: Option, - infobar_shown: bool, + error: Option, } impl State { fn new() -> (Self, Task) { - let mut state = Self::default(); + let mut state = State::default(); - if let Some(path) = env::args().nth(1) { - match state.load_image(path) { - Err(e) => state.error = Some(e.into()), - Ok(task) => return (state, task), - } - } + state.error = env::args().nth(1).and_then(|path| { + utils::load_image(path) + .map(|image| state.image = Some(image)) + .err() + }); + let allocate_image = state.allocate_image(); - (state, Task::none()) + (state, allocate_image) } fn view(&self) -> Element<'_, Message, Theme, Renderer> { - let main = self.image_display.as_ref().map_or_else( - || { + widget::column([ + if let Some(allocation) = self.image_display.as_ref() { + widget::image::viewer(allocation.handle().clone()) + .width(Length::Fill) + .height(Length::Fill) + .into() + } else { widget::container(widget::text(include_str!("usage.txt"))) .height(Length::Fill) .width(Length::Fill) @@ -74,168 +52,103 @@ impl State { .align_y(Alignment::Center) .into() }, - |allocation| { - widget::image::viewer(allocation.handle().clone()) - .filter_method(self.image_filter) - .max_scale(50.) - .min_scale(1.) - .width(Length::Fill) - .height(Length::Fill) - .into() + if let Some(error) = self.error.as_ref() { + widget::text(error).style(widget::text::danger).into() + } else { + widget::space().into() }, - ); - - let mut bar = Vec::new(); - if let Some(error) = self.error.as_ref() { - bar.push( - widget::container(widget::text(error).style(widget::text::danger)) - .align_x(Alignment::Start) - .width(Length::Fill) - .into(), - ); - } - if self.infobar_shown && self.info.is_some() { - bar.push( - widget::container(widget::text(self.title())) - .align_x(Alignment::End) - .width(Length::Fill) - .into(), - ); - } - - widget::column([main, widget::row(bar).into()]).into() + ]) + .into() } fn update(&mut self, message: Message) -> Task { match message { - Message::ImagePicked(result) => { - match result.and_then(|path| self.load_image(path).map_err(Cow::from)) { - Err(e) => self.error = Some(e.into()), + Message::ImageDisplayReady(result) => { + self.image_display = Some(result.unwrap()); + } + + Message::Event(iced::Event::Keyboard(keyboard::Event::KeyPressed { + key, + modifiers, + .. + })) => match key.as_ref() { + // input field cycling + Key::Named(key::Named::Tab) => { + if modifiers.shift() { + return widget::operation::focus_previous(); + } else { + return widget::operation::focus_next(); + } + } + + Key::Character("o") => match self.pick_and_load_image() { Ok(task) => { self.error = None; return task; } + Err(e) => self.error = Some(e), + }, + + Key::Character("r") => { + match self.image.as_ref() { + None => self.error = Some("no image to rotate".into()), + Some(image) => { + self.error = None; + self.image = Some(imageops::rotate90(image)); + return self.allocate_image(); + } + }; } - } - Message::ImageDisplayReady(result) => { - self.image_display = Some(result.unwrap()); - } - Message::SavePathPicked(result) => { - self.error = result - .map_err(Cow::from) - .and_then(|path| { - self.image.as_ref().map_or_else( - || Err("no image to save".into()), - |image| image.save(path).map_err(|e| e.to_string().into()), - ) - }) - .err(); - } - - Message::FocusNext => return widget::operation::focus_next(), - Message::FocusPrevious => return widget::operation::focus_previous(), - - Message::Open => { - return Task::perform(utils::pick_image(), Message::ImagePicked); - } - - Message::Rotate => match self.image.as_ref() { - None => self.error = Some("no image to rotate".into()), - Some(image) => { - self.error = None; - self.image = Some(imageops::rotate90(image)); - return self.allocate_image(); + Key::Character("i") => { + match self.image.as_mut() { + None => self.error = Some("no image to invert".into()), + Some(image) => { + self.error = None; + imageops::invert(image); + return self.allocate_image(); + } + }; } + + Key::Character("s") => { + self.save_image(); + } + + Key::Character("q") => return window::latest().and_then(window::close), + + // ignore unused keys + _ => {} }, - Message::Invert => match self.image.as_mut() { - None => self.error = Some("no image to invert".into()), - Some(image) => { - self.error = None; - imageops::invert(image); - return self.allocate_image(); - } - }, - Message::Filter => { - self.image_filter = match self.image_filter { - widget::image::FilterMethod::Linear => widget::image::FilterMethod::Nearest, - widget::image::FilterMethod::Nearest => widget::image::FilterMethod::Linear, - } - } - Message::Bar => { - self.infobar_shown = !self.infobar_shown; - } - Message::Save => { - if self.image.is_some() { - self.error = None; - return Task::perform(utils::pick_save_path(), Message::SavePathPicked); - } - self.error = Some("no image to save".into()); - } - - Message::Quit => return window::latest().and_then(window::close), - - Message::Yank => { - if let Some(image) = self.image.as_ref() { - return clipboard::write(utils::clipboard_image_from_rgbaimage(&image)) - .map(Message::ImageYanked); - } else { - self.error = Some("no image to yank".into()); - } - } - Message::Put => return clipboard::read_image().map(Message::ImagePut), - - Message::ImageYanked(result) => { - self.error = result.err().map(|e| format!("{e:?}").into()); - } - Message::ImagePut(result) => { - self.error = result.as_ref().err().map(|e| format!("{e:?}").into()); - - if let Ok(image) = result { - self.info = Some(format!("{}x{}", image.size.width, image.size.height,)); - if (image.size.width, image.size.height) < (100, 100) { - self.image_filter = widget::image::FilterMethod::Nearest; + Message::Event(iced::Event::Window(window::Event::FileDropped(file))) => { + match self.load_image(file) { + Ok(task) => { + self.error = None; + return task; } - self.image = Some(utils::rgbaimage_from_clipboard_image(image)); - return self.allocate_image(); + Err(e) => self.error = Some(e), } } - Message::FileDropped(path) => match self.load_image(path) { - Ok(task) => { - self.error = None; - return task; - } - Err(e) => self.error = Some(e.into()), - }, + // ignore unused events + Message::Event(_) => {} } Task::none() } fn load_image(&mut self, path: impl AsRef) -> Result, String> { - utils::load_image(&path).map(|image| { - self.info = Some(format!( - "{} {} {}x{}", - path.as_ref() - .file_name() - .map_or(Cow::Borrowed("[no file]"), OsStr::to_string_lossy), - path.as_ref().metadata().map_or_else( - |e| { - eprintln!("failed to read metadata: {e}"); - Cow::Borrowed("[no size]") - }, - |m| Cow::Owned(Size::from_bytes(m.size()).to_string()) - ), - image.width(), - image.height(), - )); - if image.dimensions() < (100, 100) { - self.image_filter = widget::image::FilterMethod::Nearest; - } + utils::load_image(path).map(|image| { self.image = Some(image); self.allocate_image() }) } + fn pick_and_load_image(&mut self) -> Result, String> { + utils::pick_image().and_then(|path| self.load_image(path)) + } + + fn save_image(&mut self) { + self.error = utils::save_image(self.image.as_ref()).err(); + } fn allocate_image(&self) -> Task { let Some(image) = self.image.as_ref() else { @@ -246,79 +159,35 @@ impl State { widget::image::allocate(widget::image::Handle::from_rgba( image.width(), image.height(), - // SAFETY: this is a sort of race condition; - // will cause panics with large enough images, - // when they are edited consecutively. - // - // this can be reproduced by holding down 'i' with a 10k by 10k px image, - // which will invert the colors rapidly and eventually crash the app. - // - // however, that is not such a problem in this case, - // and I don't know a different way of doing this that doesn't copy - // (performance loss, which is can be pretty big) - // or likely cause flickering instead in such cases - // (like using Handle over Allocation to immediately drop the last one) unsafe { std::mem::transmute::<&[u8], &'static [u8]>(image.as_bytes()) }, )) .map(Message::ImageDisplayReady) } fn subscription(&self) -> Subscription { - event::listen().filter_map(|event| match event { - iced::Event::Keyboard(keyboard::Event::KeyPressed { key, modifiers, .. }) => { - match key.as_ref() { - Key::Named(key::Named::Tab) => Some(if modifiers.shift() { - Message::FocusPrevious - } else { - Message::FocusNext - }), - - Key::Character("o") => Some(Message::Open), - Key::Character("r") => Some(Message::Rotate), - Key::Character("i") => Some(Message::Invert), - Key::Character("f") => Some(Message::Filter), - Key::Character("b") => Some(Message::Bar), - Key::Character("s") => Some(Message::Save), - Key::Character("q") => Some(Message::Quit), - - Key::Character("y") | Key::Character("c") => Some(Message::Yank), - Key::Character("p") | Key::Character("v") => Some(Message::Put), - - _ => None, - } - } - iced::Event::Window(window::Event::FileDropped(path)) => { - Some(Message::FileDropped(path)) - } - _ => None, - }) + event::listen().map(Message::Event) } fn title(&self) -> String { - self.info.as_ref().map_or_else( - || "imagey".into(), - |info| { - format!( - "imagey {info} {}", - utils::string_from_filter_type(self.image_filter), - ) - }, - ) + match self.image.as_ref() { + Some(image) => format!("imagey {}x{}", image.width(), image.height()), + None => "imagey".into(), + } } } fn main() -> Result<(), iced::Error> { - jxl_oxide::integration::register_image_decoding_hook(); - misc_image_integration::register(); - iced::application(State::new, State::update, State::view) .subscription(State::subscription) .title(State::title) .theme(Theme::custom( "custom", - theme::palette::Seed { - background: Color::BLACK, + theme::Palette { + background: color!(0x080808), text: Color::WHITE, - ..theme::palette::Seed::DARK + primary: color!(0xff00ff), + success: color!(0x00ff00), + warning: color!(0x880000), + danger: color!(0xff0000), }, )) .run() diff --git a/src/usage.txt b/src/usage.txt index 9df1bc2..94cf3cf 100644 --- a/src/usage.txt +++ b/src/usage.txt @@ -1,10 +1,5 @@ -'o' to open a new image -'r' to rotate -'i' to invert colors -'f' to switch filter -'b' to toggle the bar -'s' to save the image -'q' to quit - -'y' or 'c' to yank -'p' or 'v' to put +"o" to open a new image +"r" to rotate +"i" to invert colors +"s" to save the image +"q" to quit diff --git a/src/utils.rs b/src/utils.rs index 5158c08..961a27d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,84 +1,150 @@ use std::{ - borrow::Cow, ffi::OsStr, + fs, + io::Write, path::{Path, PathBuf}, }; -use iced::{clipboard, widget}; -use image::{DynamicImage, EncodableLayout, ImageDecoder, ImageReader, ImageResult, RgbaImage}; -use rfd::AsyncFileDialog; +use image::{DynamicImage, ImageDecoder, ImageReader, RgbaImage}; +use jpegxl_rs::image::ToDynamic; +use rfd::FileDialog; pub fn load_image(path: impl AsRef) -> Result { - load_image_impl(path).map_err(|e| e.to_string()) -} -fn load_image_impl(path: impl AsRef) -> ImageResult { - let mut decoder = ImageReader::open(&path)? - .with_guessed_format()? - .into_decoder()?; + let path = path.as_ref(); - let oreintation = decoder.orientation()?; + let decoded_image = match path.extension().map(OsStr::to_string_lossy).as_deref() { + Some("jxl") => { + let data = match std::fs::read(path) { + Ok(d) => d, + Err(e) => { + return Err(format!( + "failed to read data from '{}': {e}", + path.display() + )); + } + }; - let mut decoded_image = DynamicImage::from_decoder(decoder)?; + match jpegxl_rs::decoder_builder() + .build() + .unwrap() + .decode_to_image(&data) + { + Ok(Some(decoded_image)) => decoded_image, + Ok(None) => { + return Err(format!( + "failed to convert jxl '{}' to DynamicImage", + path.display() + )); + } + Err(e) => { + return Err(format!("failed to decode jxl '{}': {e}", path.display())); + } + } + } - // the condition is a workaround to not rotate JXL images twice; - // since they are already rotated by the decoder - // (while jpegs for instance aren't) - if !path - .as_ref() - .extension() - .map(OsStr::to_string_lossy) - .is_some_and(|s| s == "jxl") - { - decoded_image.apply_orientation(oreintation); - } + _ => { + let reader = match ImageReader::open(path) { + Ok(r) => r, + Err(e) => { + return Err(format!( + "failed to create reader for '{}': {e}", + path.display() + )); + } + }; + + let mut decoder = match reader.into_decoder() { + Ok(d) => d, + Err(e) => { + return Err(format!( + "failed to create decoder for '{}': {e}", + path.display() + )); + } + }; + + let oreintation = match decoder.orientation() { + Ok(o) => o, + Err(e) => { + return Err(format!( + "failed to get oreintation of '{}': {e}", + path.display() + )); + } + }; + + let mut decoded_image = match DynamicImage::from_decoder(decoder) { + Ok(i) => i, + Err(e) => { + return Err(format!("failed to decode image '{}': {e}", path.display())); + } + }; + + decoded_image.apply_orientation(oreintation); + + decoded_image + } + }; Ok(decoded_image.into_rgba8()) } -pub async fn pick_image() -> Result> { - let Some(filehandle) = AsyncFileDialog::new() +pub fn pick_image() -> Result { + let Some(path) = FileDialog::new() .add_filter( "image", &[ "png", "PNG", "jpg", "JPG", "jpeg", "JPEG", "avif", "jxl", "bmp", "exr", "ff", - "gif", "hdr", "ico", "pnm", "qoi", "tga", "tiff", "webp", "kra", "svg", "svgz", + "gif", "hdr", "ico", "pnm", "qoi", "tga", "tiff", "webp", ], ) .pick_file() - .await else { return Err("no path to open provided".into()); }; - Ok(filehandle.path().to_owned()) + Ok(path) } -pub async fn pick_save_path() -> Result> { - let Some(filehandle) = AsyncFileDialog::new().save_file().await else { +pub fn save_image(image: Option<&RgbaImage>) -> Result<(), String> { + let Some(image) = image else { + return Err("no image to save".into()); + }; + + let Some(path) = FileDialog::new().save_file() else { return Err("no path to save provided".into()); }; - Ok(filehandle.path().to_owned()) -} + let mut file = match fs::File::create(&path) { + Ok(f) => f, + Err(e) => return Err(format!("failed to create file '{}': {e}", path.display())), + }; -pub const fn string_from_filter_type(f: widget::image::FilterMethod) -> &'static str { - match f { - widget::image::FilterMethod::Linear => "bilinear", - widget::image::FilterMethod::Nearest => "nearest neighbor", - } -} + match path.extension().map(OsStr::to_string_lossy).as_deref() { + Some("jxl") => { + let mut encoder = jpegxl_rs::encoder_builder() + .speed(jpegxl_rs::encode::EncoderSpeed::Glacier) + .lossless(true) + .build() + .unwrap(); + let rgb_image = DynamicImage::from(image.to_owned()).into_rgb8(); + let jxl = + match encoder.encode::(&rgb_image, rgb_image.width(), rgb_image.height()) { + Ok(j) => j, + Err(e) => { + return Err(format!("failed to encode jxl '{}': {e}", path.display())); + } + }; -pub fn clipboard_image_from_rgbaimage(image: &RgbaImage) -> clipboard::Image { - clipboard::Image { - size: (image.width(), image.height()).into(), - // SAFETY: this is also probably a race condition, - // where if the user switches the image before it's done, - // then something will die. - // - // however, especially with larger images, - // copying them is just too expensive. - rgba: unsafe { std::mem::transmute::<&[u8], &'static [u8]>(image.as_bytes()) }.into(), - } -} -pub fn rgbaimage_from_clipboard_image(image: clipboard::Image) -> RgbaImage { - RgbaImage::from_raw(image.size.width, image.size.height, image.rgba.into()).unwrap() + if let Err(e) = file.write(&jxl.data) { + return Err(format!("failed to write jxl to '{}': {e}", path.display())); + }; + } + _ => { + if let Err(e) = image.save(&path) { + return Err(format!("failed to save '{}': {e}", path.display())); + }; + } + }; + + Ok(()) }