From 95ccf0b08d7539747043713c67e50a231ea0a98f Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Thu, 17 Oct 2024 21:27:45 +0900 Subject: [PATCH] chore: code tidy up --- Cargo.lock | 414 +++++++++++++++++-------------- Cargo.toml | 23 +- libs/accessdialog/Cargo.toml | 4 +- libs/screenshotdialog/Cargo.toml | 4 +- src/remotedesktop.rs | 7 +- src/screencast.rs | 6 +- src/session.rs | 8 +- src/settings.rs | 6 +- src/utils.rs | 4 +- 9 files changed, 252 insertions(+), 224 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f0b3f1e..0115629 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayref" @@ -607,6 +607,15 @@ dependencies = [ "piper", ] +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "cfg_aliases", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -677,9 +686,9 @@ dependencies = [ [[package]] name = "calloop" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.6.0", "log", @@ -691,16 +700,15 @@ dependencies = [ [[package]] name = "calloop" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +checksum = "a1ead1e1514bce44c0f40e027899fbc595907fc112635bed21b3b5d975c0a5e7" dependencies = [ "bitflags 2.6.0", - "log", "polling 3.7.2", "rustix 0.38.37", "slab", - "thiserror", + "tracing", ] [[package]] @@ -1124,15 +1132,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "css-color-parser2" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8ed1639f4b56ec6f31d007ff66ce4a13099dce5a9995d48368a30d62bf04bd" -dependencies = [ - "lazy_static", -] - [[package]] name = "csscolorparser" version = "0.7.0" @@ -1234,25 +1233,25 @@ checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" [[package]] name = "drm" -version = "0.9.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf9159ef4bcecd0c5e4cbeb573b8d0037493403d542780dba5d840bbf9df56f" +checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "bytemuck", "drm-ffi", "drm-fourcc", - "nix 0.26.4", + "rustix 0.38.37", ] [[package]] name = "drm-ffi" -version = "0.5.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1352481b7b90e27a8a1bf8ef6b33cf18b98dba7c410e75c24bb3eef2f0d8d525" +checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53" dependencies = [ "drm-sys", - "nix 0.26.4", + "rustix 0.38.37", ] [[package]] @@ -1263,11 +1262,12 @@ checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" [[package]] name = "drm-sys" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1369f1679d6b706d234c4c1e0613c415c2c74b598a09ad28080ba2474b72e42d" +checksum = "fd39dde40b6e196c2e8763f23d119ddb1a8714534bf7d77fa97a65b0feda3986" dependencies = [ "libc", + "linux-raw-sys 0.6.5", ] [[package]] @@ -1512,7 +1512,7 @@ checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.4", + "memmap2", "slotmap", "tinyvec", "ttf-parser 0.21.1", @@ -1524,7 +1524,8 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efe23d02309319171d00d794c9ff48d4f903c0e481375b1b04b017470838af04" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", + "rayon", "ttf-parser 0.21.1", ] @@ -1575,9 +1576,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1590,9 +1591,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1600,15 +1601,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1617,9 +1618,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1651,9 +1652,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1662,21 +1663,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1692,11 +1693,11 @@ dependencies = [ [[package]] name = "gbm" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ec389cda876966cf824111bf6e533fb934c711d473498279964a990853b3c6" +checksum = "45bf55ba6dd53ad0ac115046ff999c5324c283444ee6e0be82454c4e8eb2f36a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "drm", "drm-fourcc", "gbm-sys", @@ -1705,9 +1706,9 @@ dependencies = [ [[package]] name = "gbm-sys" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63eba9b9b7a231514482deb08759301c9f9f049ac6869403f381834ebfeaf67" +checksum = "a9cc2f64de9fa707b5c6b2d2f10d7a7e49e845018a9f5685891eb40d3bab2538" dependencies = [ "libc", ] @@ -1959,8 +1960,15 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", + "rayon", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.5.0" @@ -1996,31 +2004,30 @@ dependencies = [ [[package]] name = "i-slint-backend-linuxkms" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17924cec94f3411fb3b2ef25259ceca0eae837db5387e13c4052c3e1fcccc190" +checksum = "ab8f782e541bb2c856e388a63a409215a4f22876e68a5582f00032145fc08f9f" dependencies = [ "bytemuck", - "calloop 0.12.4", + "calloop 0.14.1", "drm", "gbm", - "gbm-sys", "glutin", "i-slint-common", "i-slint-core", "i-slint-renderer-femtovg", "input", - "memmap2 0.9.4", - "nix 0.27.1", + "memmap2", + "nix 0.29.0", "raw-window-handle", - "xkbcommon 0.7.0", + "xkbcommon", ] [[package]] name = "i-slint-backend-qt" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc990b005abc9dd10b133e01398a76d3894af8763740fe683304056006f2d88" +checksum = "f2b8018bd7746566b9d6e16be414639e7cad665fe3121177c2fd2f5f6c49d254" dependencies = [ "const-field-offset", "cpp", @@ -2038,9 +2045,9 @@ dependencies = [ [[package]] name = "i-slint-backend-selector" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1398edffc061119b3fc547e5cde49683d47de806f1d8e431faa913a995c66d12" +checksum = "350b9375a979856a3655a9905174b055726e85b9c4b6bd315f1d36f6529dbc33" dependencies = [ "cfg-if", "i-slint-backend-linuxkms", @@ -2052,9 +2059,9 @@ dependencies = [ [[package]] name = "i-slint-backend-winit" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc34a993838bd2d3625f1f64ae4324b490dbb0e1e410a0be71fffaae1df825" +checksum = "4831644094018b8533264d601ab54f585ba6cc834068e8eae77e571d4cc5b70e" dependencies = [ "accesskit", "accesskit_winit", @@ -2088,9 +2095,9 @@ dependencies = [ [[package]] name = "i-slint-common" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79721ae5b531dc2c5e1ecc2160e042c2563e0bf7cde688e0f27fc3feb90ccd60" +checksum = "bdd025e9a8c1bb6f2132ab453a0f552408050115552134200a7edea2247cccce" dependencies = [ "cfg-if", "derive_more", @@ -2100,14 +2107,13 @@ dependencies = [ [[package]] name = "i-slint-compiler" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc4854b2842ef0858d6c5a483e0125b8db70a84d270497743d104f322314b97" +checksum = "5c3d2bb25fc20cbd999e3c812cae181206d0280e6e73e7ead2fd4598412d93d8" dependencies = [ "by_address", "codemap", "codemap-diagnostic", - "css-color-parser2", "derive_more", "fontdue", "i-slint-common", @@ -2122,7 +2128,7 @@ dependencies = [ "quote", "resvg", "rowan", - "smol_str", + "smol_str 0.3.1", "strum", "thiserror", "url", @@ -2130,9 +2136,9 @@ dependencies = [ [[package]] name = "i-slint-core" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d980dabb573ca810538a47647c9ab98c58daa97a06d51d912300ba5abc719bb0" +checksum = "6d2757683b3377730a67966479a88d6c9f27f7b50b379e3a31c7fbf954e4a661" dependencies = [ "auto_enums", "bitflags 2.6.0", @@ -2177,9 +2183,9 @@ dependencies = [ [[package]] name = "i-slint-core-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f38c93191fc4264887ac9fdcd8537f81353df9be20254039d880f36bad97ac1" +checksum = "17c4f06e2ccbf6e7381abd64e8716767e97b5fdf15280decf8f08f8d58cde25c" dependencies = [ "quote", "syn 2.0.71", @@ -2187,9 +2193,9 @@ dependencies = [ [[package]] name = "i-slint-renderer-femtovg" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85a2de6699a2e2d4faaa6780621366c5363de8580af53dc5edeafa408b92686" +checksum = "9a450bd34e9493cb8694dbe5998346a84f180fae14ad26ae7d8c385fa0c039f4" dependencies = [ "cfg-if", "const-field-offset", @@ -2218,9 +2224,9 @@ dependencies = [ [[package]] name = "i-slint-renderer-skia" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535141cb4349f3677d097a46170b07cc11672dbb1dbdc7eade4a3b6f4ed2a110" +checksum = "51d6e478f22705e017db15416434d5dec7b138b6a1853baacdb489b8b558c1eb" dependencies = [ "bytemuck", "cfg-if", @@ -2242,12 +2248,13 @@ dependencies = [ "once_cell", "pin-weak", "raw-window-handle", + "raw-window-metal", "scoped-tls-hkt", "skia-safe", "softbuffer", "unicode-segmentation", "vtable", - "windows 0.56.0", + "windows 0.58.0", ] [[package]] @@ -2339,12 +2346,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.0", ] [[package]] @@ -2369,13 +2376,12 @@ dependencies = [ [[package]] name = "input" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e74cd82cedcd66db78742a8337bdc48f188c4d2c12742cbc5cd85113f0b059" +checksum = "fbdc09524a91f9cacd26f16734ff63d7dc650daffadd2b6f84d17a285bd875a9" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "input-sys", - "io-lifetimes", "libc", "log", "udev", @@ -2628,7 +2634,7 @@ checksum = "a2efa01ecfd021b1e7db27f21f4e79b35b048081c9cae9d2f898eddc98444d69" dependencies = [ "image 0.24.9", "log", - "memmap2 0.9.4", + "memmap2", "nix 0.27.1", "thiserror", "wayland-client", @@ -2643,7 +2649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a8bdf9590fcaf73793e5896adf5c8d7193332b9818fb44c65dba9cb6b0a5a9c" dependencies = [ "cairo-rs", - "memmap2 0.9.4", + "memmap2", "pango", "pangocairo", "tempfile", @@ -2681,6 +2687,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "linux-raw-sys" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" + [[package]] name = "lock_api" version = "0.4.12" @@ -2759,15 +2771,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memmap2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.4" @@ -3239,9 +3242,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" dependencies = [ "critical-section", "portable-atomic", @@ -3622,9 +3625,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.34.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", ] @@ -3674,6 +3677,17 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "raw-window-metal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2000e45d7daa9b6d946e88dfa1d7ae330424a81918a6545741821c989eb80a9" +dependencies = [ + "objc2", + "objc2-foundation", + "objc2-quartz-core", +] + [[package]] name = "rayon" version = "1.10.0" @@ -3771,7 +3785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" dependencies = [ "countme", - "hashbrown", + "hashbrown 0.14.5", "memoffset 0.9.1", "rustc-hash", "text-size", @@ -3908,7 +3922,7 @@ checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.4", + "memmap2", "smithay-client-toolkit", "tiny-skia", ] @@ -3921,18 +3935,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -3963,9 +3977,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4034,9 +4048,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "skia-bindings" -version = "0.75.0" +version = "0.78.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06e19e97660b09a381c6eb566849b63556b1a90b8e2c6ba2d146b3f5066847b" +checksum = "29880a81b088de322e9c5306236c70761a61b5fa4df3c15c93bad3ce890ce34c" dependencies = [ "bindgen", "cc", @@ -4051,14 +4065,14 @@ dependencies = [ [[package]] name = "skia-safe" -version = "0.75.0" +version = "0.78.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6e6f369522471b585c99427720b53aad04016fa4314e0a8cf23f17083a4e4c" +checksum = "4f15700ac678c06649077495acbba07e7ae01e5ca46b7dc18213f2c3477ada71" dependencies = [ "bitflags 2.6.0", "lazy_static", "skia-bindings", - "windows 0.56.0", + "windows 0.58.0", ] [[package]] @@ -4072,9 +4086,9 @@ dependencies = [ [[package]] name = "slint" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37776c51062d2c7ab7b9d00612a0d425fd792216fd777c473aee41c531490e4" +checksum = "c4ec667df21d0bf4a5eb49735ab476c809a625ba2fa9a59a2405bc9edf0977ce" dependencies = [ "const-field-offset", "i-slint-backend-qt", @@ -4090,21 +4104,21 @@ dependencies = [ [[package]] name = "slint-build" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719fe028aee2f051b9eea782e4d7068fb9b0a1de18426f00d3b2097c79e0e659" +checksum = "ec068281021ccd3a69dbe36a0caf207d88aa5b50945ced9000f17a5d2b139003" dependencies = [ "i-slint-compiler", "spin_on", "thiserror", - "toml_edit 0.22.16", + "toml_edit 0.22.22", ] [[package]] name = "slint-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d30b8166c46cf34a91d17bc63281f01fe78fd9017b405ae1624e9740f15fe89" +checksum = "9f79eb3465efc8fb2f1939fd7473cbdfc75aa2d4eef3d2b3964b60595e357a2f" dependencies = [ "i-slint-compiler", "proc-macro2", @@ -4139,15 +4153,15 @@ dependencies = [ "cursor-icon", "libc", "log", - "memmap2 0.9.4", + "memmap2", "rustix 0.38.37", "thiserror", "wayland-backend", "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols 0.32.3", - "wayland-protocols-wlr 0.3.3", + "wayland-protocols 0.32.4", + "wayland-protocols-wlr 0.3.4", "wayland-scanner", "xkeysym", ] @@ -4172,6 +4186,16 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66eaf762c5af19db3108300515c8aa7a50efc90ff745f4c62288052ebf9fdd25" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "socket2" version = "0.4.10" @@ -4206,7 +4230,7 @@ dependencies = [ "foreign-types", "js-sys", "log", - "memmap2 0.9.4", + "memmap2", "objc2", "objc2-app-kit", "objc2-foundation", @@ -4377,18 +4401,18 @@ checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4502,21 +4526,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.15" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.16", + "toml_edit 0.22.22", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -4545,15 +4569,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.16" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.20", ] [[package]] @@ -4562,6 +4586,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4633,10 +4658,11 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "udev" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebdbbd670373442a12fe9ef7aeb53aec4147a5a27a00bbc3ab639f08f48191a" +checksum = "8ba005bcd5b1158ae3cd815905990e8b6ee4ba9ee7adbab6d7b58d389ad09c93" dependencies = [ + "io-lifetimes", "libc", "libudev-sys", "pkg-config", @@ -4898,9 +4924,9 @@ checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wayland-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", @@ -4912,9 +4938,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ "bitflags 2.6.0", "rustix 0.38.37", @@ -4958,9 +4984,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.3" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" dependencies = [ "bitflags 2.6.0", "wayland-backend", @@ -4970,14 +4996,14 @@ dependencies = [ [[package]] name = "wayland-protocols-misc" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe44d48a0e51909c89da297f6b43bb814b881c78b69e254a4558a5fa8752887" +checksum = "d40dd9d2f7f2713724d84b920d6f73ff878f6a353712942f75f78f4dadb72886" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.3", + "wayland-protocols 0.32.4", "wayland-scanner", ] @@ -4990,7 +5016,7 @@ dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.3", + "wayland-protocols 0.32.4", "wayland-scanner", ] @@ -5009,22 +5035,22 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd993de54a40a40fbe5601d9f1fbcaef0aebcc5fda447d7dc8f6dcbaae4f8953" +checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.3", + "wayland-protocols 0.32.4", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", "quick-xml", @@ -5033,9 +5059,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -5126,11 +5152,11 @@ dependencies = [ [[package]] name = "windows" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.56.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -5149,19 +5175,20 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ - "windows-result", + "windows-result 0.1.2", "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement 0.56.0", - "windows-interface 0.56.0", - "windows-result", + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings", "windows-targets 0.52.6", ] @@ -5178,9 +5205,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", @@ -5200,9 +5227,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", @@ -5218,6 +5245,25 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[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 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -5453,7 +5499,7 @@ dependencies = [ "dpi", "js-sys", "libc", - "memmap2 0.9.4", + "memmap2", "ndk", "objc2", "objc2-app-kit", @@ -5467,14 +5513,14 @@ dependencies = [ "rustix 0.38.37", "sctk-adwaita", "smithay-client-toolkit", - "smol_str", + "smol_str 0.2.2", "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.3", + "wayland-protocols 0.32.4", "wayland-protocols-plasma", "web-sys", "web-time", @@ -5495,9 +5541,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -5585,7 +5631,6 @@ dependencies = [ "libwayshot", "libwaysip", "notify", - "once_cell", "pipewire", "rustix 0.38.37", "screenshotdialog", @@ -5599,10 +5644,10 @@ dependencies = [ "tracing-subscriber", "url", "wayland-client", - "wayland-protocols 0.32.3", + "wayland-protocols 0.32.4", "wayland-protocols-misc", - "wayland-protocols-wlr 0.3.3", - "xkbcommon 0.8.0", + "wayland-protocols-wlr 0.3.4", + "xkbcommon", "zbus 4.4.0", ] @@ -5616,17 +5661,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "xkbcommon" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" -dependencies = [ - "libc", - "memmap2 0.8.0", - "xkeysym", -] - [[package]] name = "xkbcommon" version = "0.8.0" @@ -5634,7 +5668,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" dependencies = [ "libc", - "memmap2 0.9.4", + "memmap2", "xkeysym", ] diff --git a/Cargo.toml b/Cargo.toml index 0a0a944..c44fdb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ accessdialog = { path = "libs/accessdialog" } zbus = { version = "4", default-features = false, features = ["tokio", "url"] } tokio = { version = "1.40.0", features = ["full"] } -serde = { version = "1.0.204", features = ["derive"] } +serde = { version = "1.0.210", features = ["derive"] } tracing = "0.1.40" tracing-subscriber = "0.3.18" url = { version = "2.5", features = ["serde"] } @@ -26,35 +26,32 @@ image = { version = "0.25", default-features = false, features = [ bitflags = "2.6.0" enumflags2 = "0.7.10" -once_cell = "1.20.1" -anyhow = "1.0.86" +anyhow = "1.0.89" # pipewire pipewire = "0.8.0" libspa-sys = "0.8.0" libwayshot = { version = "0.3.0" } -rustix = { version = "0.38.34", features = ["fs", "use-libc"] } +rustix = { version = "0.38.37", features = ["fs", "use-libc"] } # REMOTE -wayland-protocols = { version = "0.32.3", default-features = false, features = [ +wayland-protocols = { version = "0.32.4", default-features = false, features = [ "unstable", "client", ] } -#wayland-protocols = { version = "=0.30.0-beta.13", features = ["client", "unstable"] } - -wayland-protocols-wlr = { version = "0.3.3", default-features = false, features = [ +wayland-protocols-wlr = { version = "0.3.4", default-features = false, features = [ "client", ] } -wayland-client = { version = "0.31.5" } +wayland-client = { version = "0.31.6" } -wayland-protocols-misc = { version = "0.3.3", features = ["client"] } +wayland-protocols-misc = { version = "0.3.4", features = ["client"] } xkbcommon = "0.8.0" tempfile = "3.13.0" -thiserror = "1.0.63" -toml = "0.8.15" +thiserror = "1.0.64" +toml = "0.8.19" csscolorparser = "0.7.0" notify = "6.1.1" -futures = "0.3.30" +futures = "0.3.31" libwaysip = "0.2.3" diff --git a/libs/accessdialog/Cargo.toml b/libs/accessdialog/Cargo.toml index 2da7541..3ee2853 100644 --- a/libs/accessdialog/Cargo.toml +++ b/libs/accessdialog/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -slint = "1.7.0" +slint = "1.8.0" [build-dependencies] -slint-build = "1.7.0" +slint-build = "1.8.0" diff --git a/libs/screenshotdialog/Cargo.toml b/libs/screenshotdialog/Cargo.toml index d992203..a013967 100644 --- a/libs/screenshotdialog/Cargo.toml +++ b/libs/screenshotdialog/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -slint = "1.7.0" +slint = "1.8.0" [build-dependencies] -slint-build = "1.7.0" +slint-build = "1.8.0" diff --git a/src/remotedesktop.rs b/src/remotedesktop.rs index e50da8c..df70068 100644 --- a/src/remotedesktop.rs +++ b/src/remotedesktop.rs @@ -13,8 +13,7 @@ use zbus::zvariant::{DeserializeDict, ObjectPath, OwnedValue, SerializeDict, Typ use serde::{Deserialize, Serialize}; -use once_cell::sync::Lazy; -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; use tokio::sync::Mutex; use crate::pipewirethread::ScreencastThread; @@ -69,8 +68,8 @@ pub struct SelectDevicesOptions { } pub type RemoteSessionData = (String, ScreencastThread, RemoteControl); -pub static REMOTE_SESSIONS: Lazy>>> = - Lazy::new(|| Arc::new(Mutex::new(Vec::new()))); +pub static REMOTE_SESSIONS: LazyLock>>> = + LazyLock::new(|| Arc::new(Mutex::new(Vec::new()))); pub async fn append_remote_session(session: RemoteSessionData) { let mut sessions = REMOTE_SESSIONS.lock().await; diff --git a/src/screencast.rs b/src/screencast.rs index 8023307..f880bc5 100644 --- a/src/screencast.rs +++ b/src/screencast.rs @@ -8,8 +8,8 @@ use enumflags2::BitFlags; use serde::{Deserialize, Serialize}; -use once_cell::sync::Lazy; use std::sync::Arc; +use std::sync::LazyLock; use tokio::sync::Mutex; use crate::pipewirethread::ScreencastThread; @@ -67,8 +67,8 @@ struct StartReturnValue { } pub type CastSessionData = (String, ScreencastThread); -pub static CAST_SESSIONS: Lazy>>> = - Lazy::new(|| Arc::new(Mutex::new(Vec::new()))); +pub static CAST_SESSIONS: LazyLock>>> = + LazyLock::new(|| Arc::new(Mutex::new(Vec::new()))); pub async fn append_cast_session(session: CastSessionData) { let mut sessions = CAST_SESSIONS.lock().await; diff --git a/src/session.rs b/src/session.rs index 921fa1a..6c87ea7 100644 --- a/src/session.rs +++ b/src/session.rs @@ -5,9 +5,7 @@ use serde::{Deserialize, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; use zbus::zvariant::Type; -use once_cell::sync::Lazy; - -use std::sync::Arc; +use std::sync::{Arc, LazyLock}; use tokio::sync::Mutex; use crate::{ @@ -15,8 +13,8 @@ use crate::{ screencast::{remove_cast_session, SelectSourcesOptions}, }; -pub static SESSIONS: Lazy>>> = - Lazy::new(|| Arc::new(Mutex::new(Vec::new()))); +pub static SESSIONS: LazyLock>>> = + LazyLock::new(|| Arc::new(Mutex::new(Vec::new()))); pub async fn append_session(session: Session) { let mut sessions = SESSIONS.lock().await; diff --git a/src/settings.rs b/src/settings.rs index f38706f..d06aed5 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -12,14 +12,14 @@ const APPEARANCE: &str = "org.freedesktop.appearance"; const COLOR_SCHEME: &str = "color-scheme"; const ACCENT_COLOR: &str = "accent-color"; -use once_cell::sync::Lazy; use std::collections::HashMap; use std::sync::Arc; +use std::sync::LazyLock; pub use self::config::SettingsConfig; -pub static SETTING_CONFIG: Lazy>> = - Lazy::new(|| Arc::new(Mutex::new(SettingsConfig::config_from_file()))); +pub static SETTING_CONFIG: LazyLock>> = + LazyLock::new(|| Arc::new(Mutex::new(SettingsConfig::config_from_file()))); #[derive(DeserializeDict, SerializeDict, Clone, Copy, PartialEq, Type, OwnedValue, Value)] pub struct AccentColor { diff --git a/src/utils.rs b/src/utils.rs index a269009..4a18565 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; -use once_cell::sync::Lazy; +use std::sync::LazyLock; -pub static USER_RUNNING_DIR: Lazy = Lazy::new(|| { +pub static USER_RUNNING_DIR: LazyLock = LazyLock::new(|| { let cache_dir = std::env::var("XDG_RUNTIME_DIR").unwrap_or("/tmp".to_string()); PathBuf::from(cache_dir) });