From bf7080654d7382eba9b890dc4838c598a909b563 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Wed, 16 Sep 2026 02:21:12 +0000 Subject: [PATCH] chore: use gpui image cache (#47) Reviewed-on: https://git.reya.info/reya/coop/pulls/47 --- Cargo.lock | 616 +++++++++++--------- PLAN.md | 452 -------------- crates/chat_ui/src/lib.rs | 8 +- crates/common/src/caching.rs | 135 ----- crates/common/src/lib.rs | 2 - crates/state/src/constants.rs | 3 - crates/workspace/src/lib.rs | 46 +- crates/workspace/src/panels/contact_list.rs | 3 +- crates/workspace/src/panels/profile.rs | 3 +- crates/workspace/src/sidebar/mod.rs | 8 +- 10 files changed, 364 insertions(+), 912 deletions(-) delete mode 100644 PLAN.md delete mode 100644 crates/common/src/caching.rs diff --git a/Cargo.lock b/Cargo.lock index bed8c985..3c325347 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,38 +14,18 @@ dependencies = [ [[package]] name = "accesskit_atspi_common" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954" +checksum = "023da0e5097f46df7092d5280b02efb9bbf8d93298daeced42652463e357d636" dependencies = [ "accesskit", - "accesskit_consumer 0.36.0", + "accesskit_consumer", "atspi-common", "phf 0.13.1", "serde", "zvariant", ] -[[package]] -name = "accesskit_consumer" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60" -dependencies = [ - "accesskit", - "hashbrown 0.16.1", -] - -[[package]] -name = "accesskit_consumer" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb" -dependencies = [ - "accesskit", - "hashbrown 0.16.1", -] - [[package]] name = "accesskit_consumer" version = "0.38.0" @@ -63,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076" dependencies = [ "accesskit", - "accesskit_consumer 0.38.0", + "accesskit_consumer", "hashbrown 0.16.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", @@ -72,9 +52,9 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.21.1" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c" +checksum = "03e156ed3802e35eefe894ef2671bc6c889303d8a7e110b5e1b48f504b91362f" dependencies = [ "accesskit", "accesskit_atspi_common", @@ -90,12 +70,12 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.33.1" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e93ac7bf50b964f1cbb75f741629a4e950571baa1ef1274457ab5a80d9bcc2" +checksum = "106c2b961215864d1c2e703ee63269c25c4e80a577ffb2c1017b9c17dcdf83a1" dependencies = [ "accesskit", - "accesskit_consumer 0.37.0", + "accesskit_consumer", "hashbrown 0.16.1", "static_assertions", "windows 0.62.2", @@ -321,9 +301,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.43" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3976abdc8fe7d1133d43d304afd42abdf5bc3e1319d263d223bde07b5efc4be8" +checksum = "ef217a77a86a6e3dab9a5b3c81dc445b603fe743a90c1cb10a2f2144628d8cfa" dependencies = [ "compression-codecs", "compression-core", @@ -457,7 +437,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -608,9 +588,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.18.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +checksum = "b281d307588d634de920874890732659e2e7672f72b5e10e81badc1a8a83621e" dependencies = [ "aws-lc-sys", "zeroize", @@ -618,9 +598,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.44.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +checksum = "9bff6c3b54fad79a2e60b8102caf565819711497c1f5f092f49508e2f5c31b27" dependencies = [ "cc", "cmake", @@ -664,11 +644,11 @@ checksum = "efbd3e1070bbdf4cd88a75264e18e8a26f7cb5c6949eadf0ceb85fb159cf08f8" [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "cexpr", "clang-sys", "itertools 0.13.0", @@ -721,7 +701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6712f9c6fd6785b3b270884e57c441c403dc5d7e19ca45368c97c7a1de3000ec" dependencies = [ "bitcoin-internals", - "hex-conservative 1.2.0", + "hex-conservative 1.3.0", "serde", ] @@ -747,7 +727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2" dependencies = [ "bitcoin-io", - "hex-conservative 0.2.2", + "hex-conservative 0.2.3", ] [[package]] @@ -758,7 +738,7 @@ checksum = "5304e53726dbe5f93141535e102ed97b5bf4714fbecefdda8f9fb98d7fdaff0e" dependencies = [ "bitcoin-consensus-encoding", "bitcoin-internals", - "hex-conservative 1.2.0", + "hex-conservative 1.3.0", "serde", ] @@ -770,9 +750,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.1" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" dependencies = [ "serde_core", ] @@ -914,13 +894,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -956,7 +936,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "polling", "rustix", "slab", @@ -1004,9 +984,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.4.4" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273" +checksum = "a3eb0f42d6c360dc3f8a821f6bf2fdea7f72bfd36b3076eb0e6d1e9e0752fff4" dependencies = [ "find-msvc-tools", "jobserver", @@ -1210,7 +1190,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block", "cocoa-foundation 0.2.1", "core-foundation 0.10.1", @@ -1240,7 +1220,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block", "core-foundation 0.10.1", "core-graphics-types 0.2.0", @@ -1261,7 +1241,7 @@ dependencies = [ [[package]] name = "collections" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "gpui_util", "indexmap", @@ -1303,9 +1283,9 @@ dependencies = [ [[package]] name = "compression-codecs" -version = "0.4.38" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +checksum = "257c7085cbb71be72d8fb97edff08b03d86d5d9f2222b9cc34a6bec87093bc10" dependencies = [ "bzip2", "compression-core", @@ -1315,9 +1295,9 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" +checksum = "6e8ccc4ea9f6acc32d102c0f6d471d11d913ad15f20c04de743374861fa1d414" [[package]] name = "concurrent-queue" @@ -1512,7 +1492,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation 0.10.1", "core-graphics-types 0.2.0", "foreign-types", @@ -1525,7 +1505,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32eb7c354ae9f6d437a6039099ce7ecd049337a8109b23d73e48e8ffba8e9cd5" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation 0.9.4", "core-graphics-types 0.1.3", "foreign-types", @@ -1549,7 +1529,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation 0.10.1", "libc", ] @@ -1560,7 +1540,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4416167a69126e617f8d0a214af0e3c1dbdeffcb100ddf72dcd1a1ac9893c146" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block", "cfg-if", "core-foundation 0.10.1", @@ -1593,6 +1573,12 @@ dependencies = [ "metal", ] +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + [[package]] name = "core_maths" version = "0.1.1" @@ -1608,7 +1594,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "fontdb", "harfrust", "linebender_resource_handle", @@ -1646,18 +1632,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8498c871161e1742aaa9d52551b2d6ebdd4c3d45a3be423e3728f33b955be550" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-deque" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1665,27 +1651,27 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.20" +version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" [[package]] name = "crunchy" @@ -1785,7 +1771,7 @@ dependencies = [ [[package]] name = "derive_refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "proc-macro2", "quote", @@ -1889,7 +1875,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.6.2", "libc", "objc2 0.6.4", @@ -1903,7 +1889,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -1978,18 +1964,24 @@ dependencies = [ "cc", "memchr", "rustc_version", - "toml 1.1.4+spec-1.1.0", + "toml 1.1.6+spec-1.1.0", "vswhom", "winreg", ] [[package]] name = "encoding_rs" -version = "0.8.35" +version = "0.8.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "7b5ef0006ac9ab233c38522f5ae99cae3625151de8f706cacee1cba4b8e2832a" dependencies = [ "cfg-if", + "core_detect", + "multiversion", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", ] [[package]] @@ -2180,9 +2172,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" +checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d" [[package]] name = "fixedbitset" @@ -2196,7 +2188,7 @@ version = "25.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "rustc_version", ] @@ -2290,9 +2282,9 @@ dependencies = [ [[package]] name = "font-types" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64eb721ca85a34323425f4041adc5d82704d3782d5f8f03793bc012419dce23" +checksum = "b8eb065f3251655b3c90e22e5e363f310fc5332fb3402e37bbc94752283248f6" dependencies = [ "bytemuck", ] @@ -2338,7 +2330,7 @@ checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -2455,7 +2447,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -2675,7 +2667,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2686,20 +2678,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] name = "gpui" version = "0.2.2" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "accesskit", "anyhow", "async-channel", "async-task", "bindgen", - "bitflags 2.13.1", + "bitflags 2.13.2", "chrono", "collections", "core-video", @@ -2744,7 +2736,6 @@ dependencies = [ "sum_tree", "taffy", "thiserror 2.0.20", - "tracing", "ttf-parser", "url", "usvg", @@ -2752,10 +2743,9 @@ dependencies = [ "uuid", "waker-fn", "web-time", - "windows 0.61.3", + "windows 0.62.2", "zed-font-kit", "zed-scap", - "ztracing", ] [[package]] @@ -2777,7 +2767,7 @@ dependencies = [ [[package]] name = "gpui_apple" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "block", @@ -2794,20 +2784,21 @@ dependencies = [ "log", "metal", "objc", + "objc2 0.6.4", "parking_lot", ] [[package]] name = "gpui_linux" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "accesskit", "accesskit_unix", "anyhow", "as-raw-xcb-connection", "ashpd", - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "calloop", "calloop-wayland-source", @@ -2846,7 +2837,7 @@ dependencies = [ [[package]] name = "gpui_macos" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "accesskit", "accesskit_macos", @@ -2878,6 +2869,7 @@ dependencies = [ "objc2 0.6.4", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", + "objc2-screen-capture-kit", "objc2-user-notifications", "parking_lot", "pathfinder_geometry", @@ -2892,7 +2884,7 @@ dependencies = [ [[package]] name = "gpui_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -2903,7 +2895,7 @@ dependencies = [ [[package]] name = "gpui_platform" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "console_error_panic_hook", "gpui", @@ -2916,7 +2908,7 @@ dependencies = [ [[package]] name = "gpui_shared_string" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "schemars", "serde", @@ -2926,7 +2918,7 @@ dependencies = [ [[package]] name = "gpui_tokio" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "gpui", @@ -2937,7 +2929,7 @@ dependencies = [ [[package]] name = "gpui_util" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "log", @@ -2947,7 +2939,7 @@ dependencies = [ [[package]] name = "gpui_web" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "console_error_panic_hook", @@ -2960,6 +2952,10 @@ dependencies = [ "parking_lot", "raw-window-handle", "scheduler", + "smallvec", + "unicode-properties", + "unicode-script", + "unicode-segmentation", "uuid", "wasm-bindgen", "wasm-bindgen-futures", @@ -2971,7 +2967,7 @@ dependencies = [ [[package]] name = "gpui_wgpu" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "bytemuck", @@ -2997,7 +2993,7 @@ dependencies = [ [[package]] name = "gpui_windows" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "accesskit", "accesskit_windows", @@ -3016,10 +3012,10 @@ dependencies = [ "raw-window-handle", "smallvec", "uuid", - "windows 0.61.3", - "windows-core 0.61.2", - "windows-numerics 0.2.0", - "windows-registry 0.5.3", + "windows 0.62.2", + "windows-core 0.62.2", + "windows-numerics 0.3.1", + "windows-registry 0.6.1", ] [[package]] @@ -3059,7 +3055,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "core_maths", "read-fonts 0.37.0", @@ -3145,7 +3141,7 @@ version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "byteorder", "heed-traits", "heed-types", @@ -3175,9 +3171,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" [[package]] name = "hex" @@ -3187,18 +3183,18 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-conservative" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" +checksum = "db3fef046dca3ca91ee1408a8c1b80ab777e80a4d308d1bf4e7adb3fcb047e08" dependencies = [ "arrayvec", ] [[package]] name = "hex-conservative" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35431185f361ccf3ffc58254628af5f1f5d5f28531da2e02e5d6c82bbc282a10" +checksum = "271e0d19bcb473b6675739a2b536076b24a082316cb5199ad918edce10c599e8" dependencies = [ "arrayvec", ] @@ -3272,7 +3268,7 @@ dependencies = [ [[package]] name = "http_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "async-compression", @@ -3292,7 +3288,7 @@ dependencies = [ [[package]] name = "http_client_tls" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "log", "rustls", @@ -3308,9 +3304,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hybrid-array" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" dependencies = [ "typenum", ] @@ -3551,9 +3547,9 @@ checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" [[package]] name = "indexmap" -version = "2.14.1" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", "hashbrown 0.17.1", @@ -3626,9 +3622,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.12.1" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] name = "is-docker" @@ -3743,9 +3739,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.104" +version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" dependencies = [ "cfg-if", "futures-util", @@ -3848,9 +3844,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.21" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7955dfc218a8afb29dfeffd540e3a6e96baeb94fe7138228dd7cc6937fbbf96" +checksum = "6480ccc157a1389bb2e4891b24751b0f798ba640d22386f23143fbcc89da195a" dependencies = [ "libc", ] @@ -3941,15 +3937,15 @@ dependencies = [ [[package]] name = "lru" -version = "0.18.3" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d317b4b9eb398e6acce275758ec6125535505e7a146fb1a9b8bda2451b0ff4c" +checksum = "ff9840bcc50b71349309900da0ce7279aa336ae71d73250b07998932c7d97c25" [[package]] name = "lru-slab" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" [[package]] name = "lsp-types" @@ -3976,9 +3972,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8575c0d003ae459399623c4def180c63b77f343b1a7fee64f249b349e7699a31" +checksum = "cdfa8785f95e57914ddb35e3b59994aeba6f5e79e9cfd03da1c269f010f36009" dependencies = [ "lyon_path", "num-traits", @@ -4007,9 +4003,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e43b7e44161571868f5c931d12583592c223c5583eef86b08aa02b7048a3552" +checksum = "43b8dcf906637ecef61b3c0740c7a4e7f27caeb31257cfac0cc579ce15be6005" dependencies = [ "float_next_after", "lyon_path", @@ -4071,7 +4067,7 @@ dependencies = [ [[package]] name = "media" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "bindgen", @@ -4112,7 +4108,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -4171,9 +4167,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" dependencies = [ "libc", "wasi", @@ -4190,6 +4186,33 @@ dependencies = [ "pxfm", ] +[[package]] +name = "multiversion" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ca4bea16ffc3f443cf7d866912118196bfef4c6a1556ca00f9f9b00bb43f7c" +dependencies = [ + "multiversion-macros", +] + +[[package]] +name = "multiversion-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d416831a7317ef4b08bee00b69cbbb9c8763da7959a7026244d6266869f9c83" +dependencies = [ + "proc-macro2", + "quote", + "rustversion", + "syn 3.0.5", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + [[package]] name = "naga" version = "29.0.4" @@ -4198,7 +4221,7 @@ checksum = "b2bf919621e7975acb27d881bae2fb993e0d45c8e0446e85e6272971e00dc8df" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.13.1", + "bitflags 2.13.2", "cfg-if", "cfg_aliases", "codespan-reporting", @@ -4280,7 +4303,7 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" [[package]] name = "nostr" version = "0.45.4" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "aes", "base64 0.22.1", @@ -4306,7 +4329,7 @@ dependencies = [ [[package]] name = "nostr-blossom" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "base64 0.22.1", "bitcoin_hashes 1.2.0", @@ -4319,7 +4342,7 @@ dependencies = [ [[package]] name = "nostr-connect" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "async-utility", "futures-core", @@ -4333,7 +4356,7 @@ dependencies = [ [[package]] name = "nostr-database" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "nostr", "opaquerr 0.2.0", @@ -4342,7 +4365,7 @@ dependencies = [ [[package]] name = "nostr-gossip" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "nostr", "opaquerr 0.2.0", @@ -4351,7 +4374,7 @@ dependencies = [ [[package]] name = "nostr-gossip-memory" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "indexmap", "lru", @@ -4363,7 +4386,7 @@ dependencies = [ [[package]] name = "nostr-lmdb" version = "0.45.2" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "async-utility", "flatbuffers", @@ -4378,7 +4401,7 @@ dependencies = [ [[package]] name = "nostr-memory" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "btreecap", "nostr", @@ -4389,7 +4412,7 @@ dependencies = [ [[package]] name = "nostr-sdk" version = "0.45.2" -source = "git+https://github.com/rust-nostr/nostr#472c8839ea3f532259435d0513bf155ddeb467ba" +source = "git+https://github.com/rust-nostr/nostr#b230cecf9dbb38e0228e6fff4544ed9d261326fc" dependencies = [ "async-utility", "async-wsocket", @@ -4610,7 +4633,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -4626,7 +4649,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", + "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -4638,7 +4662,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4650,11 +4674,24 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "dispatch2", "objc2 0.6.4", ] +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-io-surface", +] + [[package]] name = "objc2-core-image" version = "0.2.2" @@ -4689,7 +4726,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -4701,20 +4738,31 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.6.2", "libc", "objc2 0.6.4", "objc2-core-foundation", ] +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.4", + "objc2-core-foundation", +] + [[package]] name = "objc2-metal" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4726,7 +4774,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.6.2", "objc2 0.6.4", "objc2-foundation 0.3.2", @@ -4738,7 +4786,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4751,20 +4799,32 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", "objc2-metal 0.3.2", ] +[[package]] +name = "objc2-screen-capture-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b7c5390f477482f001bc354d6571a70db7e4f8d5288e860c45521fbce11394" +dependencies = [ + "block2 0.6.2", + "objc2 0.6.4", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-user-notifications" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.6.2", "objc2 0.6.4", "objc2-core-location", @@ -4859,9 +4919,9 @@ checksum = "4f933a4265d5cdad61d19bbdfc972ea5726d56cd8d3d57b8f2d3c365dd42bee9" [[package]] name = "open" -version = "5.4.2" +version = "5.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade3be4664bc1ef537ce133015f04c176b737815c2ba9fd60edf212d6e90dd55" +checksum = "aa576c76302b7b808eecc68061e67336c47833ef9d22caa74dda10fa9675eebc" dependencies = [ "is-wsl", "libc", @@ -4997,7 +5057,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "perf" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "collections", "serde", @@ -5172,7 +5232,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "crc32fast", "fdeflate", "flate2", @@ -5245,9 +5305,9 @@ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "portable-atomic-util" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" dependencies = [ "portable-atomic", ] @@ -5315,7 +5375,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.13+spec-1.1.0", + "toml_edit 0.25.15+spec-1.1.0", ] [[package]] @@ -5352,7 +5412,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "getopts", "memchr", "pulldown-cmark-escape", @@ -5429,9 +5489,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" dependencies = [ "bytes", "cfg_aliases", @@ -5449,9 +5509,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.17" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83" +checksum = "a9746dbde176634f4f2f1faf2404e30a31b2bc1e9cafb5329c95d8177a18c9fc" dependencies = [ "bytes", "getrandom 0.4.3", @@ -5657,7 +5717,7 @@ version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] @@ -5716,7 +5776,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" dependencies = [ "bytemuck", - "font-types 0.12.4", + "font-types 0.12.5", "once_cell", ] @@ -5732,7 +5792,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] @@ -5774,13 +5834,13 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] name = "refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "derive_refineable", ] @@ -5862,7 +5922,7 @@ dependencies = [ [[package]] name = "reqwest_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "bytes", @@ -6009,7 +6069,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys", @@ -6018,9 +6078,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ "aws-lc-rs", "log", @@ -6114,7 +6174,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "core_maths", "log", @@ -6163,7 +6223,7 @@ dependencies = [ [[package]] name = "scheduler" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "async-task", "backtrace", @@ -6199,7 +6259,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -6281,7 +6341,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -6351,7 +6411,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -6362,7 +6422,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -6396,7 +6456,7 @@ checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -6599,9 +6659,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.2" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891" [[package]] name = "smol" @@ -6664,7 +6724,7 @@ version = "0.4.0+sdk-1.4.341.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] @@ -6760,7 +6820,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sum_tree" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "heapless 0.9.3", "log", @@ -6888,9 +6948,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f" +checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" dependencies = [ "proc-macro2", "quote", @@ -6917,13 +6977,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.5", ] [[package]] @@ -6955,7 +7015,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501336eb7ba9e417300a6a0fa985721065467aa83a6dcf0422a8e43e4c0328fa" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation 0.10.1", "system-configuration-sys", ] @@ -7078,7 +7138,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] @@ -7181,18 +7241,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.12.0" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" [[package]] name = "tokio" @@ -7226,14 +7277,14 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] name = "tokio-rustls" -version = "0.26.4" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +checksum = "b0c85f2c3ef0b1cd58b36682f4b17aaa995f0e5db534d85692b4903abce21f67" dependencies = [ "rustls", "tokio", @@ -7307,9 +7358,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.4+spec-1.1.0" +version = "1.1.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a" dependencies = [ "indexmap", "serde_core", @@ -7354,9 +7405,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.13+spec-1.1.0" +version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ "indexmap", "toml_datetime 1.1.1+spec-1.1.0", @@ -7406,7 +7457,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "bytes", "futures-util", "http", @@ -7646,9 +7697,9 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-script" @@ -7709,9 +7760,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "3.4.0" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972d7902c8735f2695410b8aed7df6ed12a47394aa1c8d7af49f0497b731a94d" +checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc" dependencies = [ "base64 0.23.1", "cookie_store", @@ -7728,9 +7779,9 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da5f78b09e6941e1a0f2e30e695e4b120377b54d5e0aec11b594bb57b3971613" +checksum = "5b0809a01d1ca5a51ca70db32bb2a19157582a526505ef3c19e3b343a59aa5ad" dependencies = [ "base64 0.23.1", "http", @@ -7799,7 +7850,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "util_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "perf", "quote", @@ -7808,9 +7859,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.26.0" +version = "1.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812" +checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -7838,9 +7889,9 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "value-bag" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d4788a546b899f8656382fe210e0c478fe3d2dcd6263d50cb6cc268240de6c" +checksum = "2799ffb329a792ecfd902b71306c8a815a6ef1c0470fa9953a6aa4d4cecbe511" dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -7848,9 +7899,9 @@ dependencies = [ [[package]] name = "value-bag-serde1" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27780e3aec98b13ac796bc0d5770205ee6e976d1ccb33a52da70b73ff0ff880d" +checksum = "0941feceafbe7a8f59ea1096d45b97002884a41306315ad797b3684b63a81d8c" dependencies = [ "erased-serde", "serde_core", @@ -7859,9 +7910,9 @@ dependencies = [ [[package]] name = "value-bag-sval2" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c093d229c7ead9974b640e61170976e0eff3dac447cf6792c645f0b7f28b3de" +checksum = "839752af8179287d27eb2b94164641b1ede9e60ab7424163388dc21ebd0508cd" dependencies = [ "sval", "sval_buffer", @@ -7940,9 +7991,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" dependencies = [ "cfg-if", "once_cell", @@ -7953,9 +8004,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.77" +version = "0.4.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" dependencies = [ "js-sys", "wasm-bindgen", @@ -7963,9 +8014,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7973,22 +8024,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.5", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.127" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" dependencies = [ "unicode-ident", ] @@ -8025,6 +8076,7 @@ checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", + "log", "rustix", "scoped-tls", "smallvec", @@ -8037,7 +8089,7 @@ version = "0.31.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "rustix", "wayland-backend", "wayland-scanner", @@ -8060,7 +8112,7 @@ version = "0.32.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "wayland-backend", "wayland-client", "wayland-scanner", @@ -8072,7 +8124,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "wayland-backend", "wayland-client", "wayland-protocols", @@ -8085,7 +8137,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "wayland-backend", "wayland-client", "wayland-protocols", @@ -8117,9 +8169,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.104" +version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" dependencies = [ "js-sys", "wasm-bindgen", @@ -8191,7 +8243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76e8840e1ba2881d4cbb18d2147627a56af426ff064c0401eb0c8410c6325d07" dependencies = [ "arrayvec", - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "cfg-if", "cfg_aliases", @@ -8223,7 +8275,7 @@ dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "cfg_aliases", "document-features", @@ -8294,7 +8346,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.13.1", + "bitflags 2.13.2", "block2 0.6.2", "bytemuck", "cfg-if", @@ -8354,7 +8406,7 @@ version = "29.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84bf84cd9ca8ca45e2b223a3868f1adf9bfc0c66aeac212e76ee7e40fdadf8f5" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "js-sys", "log", @@ -8617,13 +8669,13 @@ dependencies = [ [[package]] name = "windows-registry" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] @@ -9049,7 +9101,7 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6c2ad15e0e922856ee89afe862b8992334bbe7953adad56cd1199358cb30566" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "libc", "quick-xml", "x11", @@ -9074,7 +9126,7 @@ name = "xim-parser" version = "0.2.1" source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] @@ -9143,13 +9195,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.5", "synstructure", ] @@ -9221,7 +9273,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", "zbus_names", "zvariant", "zvariant_utils", @@ -9264,7 +9316,7 @@ name = "zed-font-kit" version = "0.14.1-zed" source = "git+https://github.com/zed-industries/font-kit?rev=94b0f28166665e8fd2f53ff6d268a14955c82269#94b0f28166665e8fd2f53ff6d268a14955c82269" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "byteorder", "core-foundation 0.10.1", "core-graphics 0.24.0", @@ -9374,18 +9426,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.56" +version = "0.8.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.56" +version = "0.8.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc" dependencies = [ "proc-macro2", "quote", @@ -9403,13 +9455,13 @@ dependencies = [ [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.5", "synstructure", ] @@ -9463,19 +9515,19 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", ] [[package]] name = "zlib-rs" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" [[package]] name = "zlog" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "anyhow", "chrono", @@ -9492,7 +9544,7 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "ztracing" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" dependencies = [ "tracing", "tracing-subscriber", @@ -9503,7 +9555,7 @@ dependencies = [ [[package]] name = "ztracing_macro" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#bce0c5785bfd9172c939aca4083fd70bc4930927" +source = "git+https://github.com/zed-industries/zed#739fdbef762f7e514d62e1fa650c1b7cac5bbff4" [[package]] name = "zune-core" @@ -9554,7 +9606,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.4", + "syn 3.0.5", "zvariant_utils", ] @@ -9567,7 +9619,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.4", + "syn 3.0.5", "winnow 1.0.4", ] diff --git a/PLAN.md b/PLAN.md deleted file mode 100644 index 53b1cbd2..00000000 --- a/PLAN.md +++ /dev/null @@ -1,452 +0,0 @@ -# NIP-17 Encrypted File Messages (kind 15) — Backend Plan - -Implementation plan for sending and receiving NIP-17 **file messages** in coop. - -**Scope: backend only.** This document covers crypto, blob upload/download, rumor -construction, rumor parsing and local caching. No UI work (composer button, file -rendering, image cache, decryption-on-render state) — that is a separate follow-up -once these APIs exist. - ---- - -## 1. What the protocol requires - -NIP-17 file messages are **not** a new transport. They reuse everything coop already -has (NIP-44, NIP-59 seal + gift wrap, kind 10050 inbox relays) and only add: - -1. A new inner **rumor kind: `15`** (`Kind::Custom(15)`), whose `.content` is the URL - of an **encrypted** blob and whose tags carry the MIME type and the decryption - material. -2. **AES-256-GCM** encryption of the file bytes before upload. - -Kind 15 tags (per NIP-17): - -| Tag | Required | Meaning | -|---|---|---| -| `p` | yes | receivers (as for kind 14) | -| `e` | if reply | parent message id | -| `subject` | optional | conversation title | -| `file-type` | yes | MIME type of the **plaintext** file | -| `encryption-algorithm` | yes | `aes-gcm` (only supported value) | -| `decryption-key` | yes | key for the recipient | -| `decryption-nonce` | yes | nonce for the recipient | -| `x` | yes | SHA-256 hex of the **encrypted** file | -| `ox` | expected | SHA-256 hex of the file **before** encryption | -| `size` | optional | size of the **encrypted** file in bytes | -| `dim` | optional | `x` in pixels | -| `thumbhash` / `blurhash` | optional | placeholder previews | -| `thumb` | optional | thumbnail URL (same key/nonce) | -| `fallback` | optional | extra file sources (same key/nonce) | - -Key material travels **inside** the gift wrap, so the public blob URL is useless -without it. That property falls out of the existing seal/gift-wrap code for free. - -`thumbhash`, `blurhash`, `thumb`, `fallback` are out of scope for v1 (all optional). - ---- - -## 2. What already exists in coop (verified against the pinned deps) - -| Requirement | Location | Status | -|---|---|---| -| NIP-59 seal + gift wrap | `crates/chat/src/room.rs::send_gift_wrap` (`nip59::GiftWrapBuilder`) | exists | -| Per-recipient publish + self backup | `crates/chat/src/room.rs::send` | exists | -| Inbox relays (kind 10050) | `crates/chat/src/lib.rs::handle_notifications` | exists | -| Rumor unwrap + local cache | `crates/chat/src/lib.rs::{extract_rumor,try_unwrap_with,set_rumor,get_rumor}` | exists | -| Kind 14 rumor construction | `crates/chat/src/room.rs::rumor` | exists | -| Blossom upload | `crates/state/src/blossom.rs::upload` (plaintext, random signing key) | partial | -| **Kind 15 rumor + parse** | — | **to add** | -| **AES-256-GCM encrypt/decrypt** | — | **to add** | -| **Encrypted blob upload/download** | — | **to add** | - -Verified facts about the pinned SDK (`rust-nostr@b230cec`, `nostr 0.45.4`) and -`gpui@69af529`: - -- rust-nostr has **no** kind-15 helper and **no** AES-GCM/AES-GCM-tag support anywhere - (`FileMetadata` in NIP-94 is kind 1063, unrelated). `nip17.rs` only covers kind 14 - and 10050. -- `nip59::GiftWrapBuilder::new(receiver, rumor: UnsignedEvent)` accepts **any** - `UnsignedEvent`, so kind 15 flows through the existing wrap/send path unchanged. -- `Kind` has no named variant for 15; `Kind::Custom(15)` is required, and - `Kind: Display` prints `as_u16()`, so `rumor.kind.to_string()` yields `"15"`. -- `nostr::nips::nip94::Sha256Hash` is public (`from_byte_array`, `to_hex`, `Display`, - `from_hex`) even though it lives in the nip94 module — usable for `x`/`ox` hex - formatting without a new hashing crate. -- `gpui::App::http_client()` returns `Arc` and - `gpui_web/src/http_client.rs` implements it, so HTTP download is cross-platform. - `AsyncApp` exposes `update(|app| ...)`, which is how backend async code reaches it. -- `nostr-blossom` exposes `upload_blob`, `get_blob`, `has_blob`, `list_blobs`, - `delete_blob`. -- The `k` tag is currently hardcoded to `"14"` in two places - (`room.rs::send_gift_wrap`, `lib.rs::set_rumor`) and used as a room-list filter - (`lib.rs::get_rooms_task`, `custom_tag(LOWERCASE_K, "14")`). - ---- - -## 3. Dependencies - -Add to `[workspace.dependencies]` in `Cargo.toml`, then reference from the crates below. - -```toml -aes-gcm = "0.10" # NEW - RustCrypto: Aes256Gcm, aead::{Aead, KeyInit, OsRng} -sha2 = "0.10" # NEW (already in Cargo.lock, cached) - SHA-256 for x / ox -base64 = "0.22" # NEW as a direct dep (already in the tree transitively) -``` - -- No new RNG dependency: `aes_gcm::aead::OsRng` (the wasm getrandom backends are - already configured in `web/Cargo.toml`). -- No new hashing/hex dependency: `sha2` output → `nostr::nips::nip94::Sha256Hash::from_byte_array(...).to_hex()`. -- `aes-gcm` is the only crate that needs a crates.io fetch (`aes 0.8` / `aead 0.5` are - already in the lock file), so it is a small addition to the build graph. -- Hand-rolling AES-GCM is explicitly **not** an option. - ---- - -## 4. Layering and type ownership - -`chat` depends on `state` (see `crates/chat/Cargo.toml`), never the reverse, so the -shared types and tag names must live in `state`. - -- `crates/state/src/file.rs` (new) owns: - - `EncryptedFile`, `FileAttachment`, the tag-name constants, `ALGORITHM = "aes-gcm"` - - `encrypt` / `decrypt` / `sha256_hex` - - `FileAttachment::from_tags` / `FileAttachment::tags` (single source of truth for - tag names, so build and parse can't drift) - - `upload_encrypted`, `download_and_decrypt` - - re-exported from `crates/state/src/lib.rs`: `mod file; pub use file::*;` -- `crates/chat` consumes it: `message.rs` (parse into `Message`), `room.rs` - (build kind-15 rumor), `lib.rs` (cache tag + room list query). -- `crates/chat` should re-export the type for the future UI layer: - `pub use state::FileAttachment;` in `crates/chat/src/lib.rs`. - ---- - -## 5. Data flow (backend) - -```mermaid -flowchart TD - A[caller: path + blossom server] --> B[read bytes + guess mime] - B --> C[encrypt: random 32B key, 12B nonce, AES-256-GCM] - C --> D[sha256 ciphertext = x, sha256 plaintext = ox] - D --> E[Blossom upload ciphertext] - E --> F[FileAttachment] - F --> G[Room::file_rumor -> kind 15 rumor] - G --> H[Room::send -> existing NIP-59 wrap per member + self backup] - H --> I[existing extract_rumor on receiver] - I --> J[Message.file] - J --> K[download_and_decrypt: GET url, verify x, decrypt] -``` - ---- - -## 6. Implementation steps - -### Step 1 — Dependencies - -Add the three lines from section 3 and wire them into `crates/state/Cargo.toml` -(`aes-gcm`, `sha2`, `base64`). Run `cargo check -p state` to confirm the fetch works. - -### Step 2 — `crates/state/src/file.rs` (new, ~180 LOC) - -```rust -use aes_gcm::aead::{Aead, KeyInit, OsRng}; -use aes_gcm::{AeadCore, Aes256Gcm, Key, Nonce}; -use nostr::nips::nip94::Sha256Hash; -use sha2::{Digest, Sha256}; - -pub const ALGORITHM: &str = "aes-gcm"; -/// Ciphertext hash tag (NIP-17). -const TAG_SHA256: &str = "x"; -const TAG_ORIGINAL_SHA256: &str = "ox"; -const TAG_FILE_TYPE: &str = "file-type"; -const TAG_ALGORITHM: &str = "encryption-algorithm"; -const TAG_KEY: &str = "decryption-key"; -const TAG_NONCE: &str = "decryption-nonce"; -const TAG_SIZE: &str = "size"; -const TAG_DIM: &str = "dim"; -const TAG_ALT: &str = "alt"; - -/// Maximum blob size accepted when downloading (bytes). See edge cases. -pub const MAX_FILE_SIZE: usize = 25 * 1024 * 1024; - -/// Result of encrypting a file: ciphertext to upload plus NIP-17 key material. -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct EncryptedFile { - pub data: Vec, - /// base64-encoded 32-byte key - pub key: String, - /// base64-encoded 12-byte nonce - pub nonce: String, -} - -/// NIP-17 kind 15 attachment metadata (tags + `.content` URL). -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] -pub struct FileAttachment { - pub url: Url, - pub mime: String, - pub key: String, - pub nonce: String, - pub sha256: Option, - pub original_sha256: Option, - pub size: Option, - pub dim: Option<(u32, u32)>, - /// Non-standard display name (see "Open decisions" #2). - pub name: Option, -} - -impl FileAttachment { - /// Build the NIP-17 tags for a kind 15 rumor. - pub fn tags(&self) -> Vec; - /// Parse a kind 15 rumor's tags. Returns `None` if key material is missing - /// or `encryption-algorithm` is not `aes-gcm`. - pub fn from_tags(tags: &Tags) -> Option; - pub fn is_image(&self) -> bool; - pub fn display_name(&self) -> SharedString; // falls back to mime/size -} - -/// AES-256-GCM encrypt with a fresh random key and nonce. -pub fn encrypt(data: &[u8]) -> Result; -/// AES-256-GCM decrypt using the values from a kind 15 rumor. -pub fn decrypt(data: &[u8], key: &str, nonce: &str) -> Result>; - -/// Lowercase hex SHA-256, matching the NIP-94 `x`/`ox` convention. -pub fn sha256_hex(data: &[u8]) -> String; - -/// Read a file, encrypt it, upload the ciphertext to Blossom, return the attachment. -#[cfg(not(target_arch = "wasm32"))] -pub async fn upload_encrypted(server: Url, path: PathBuf, cx: &AsyncApp) -> Result; - -/// Fetch the blob, verify its SHA-256 against `expected_sha256`, then decrypt. -pub async fn download_and_decrypt( - url: &Url, - key: &str, - nonce: &str, - expected_sha256: Option<&str>, - cx: &AsyncApp, -) -> Result>; -``` - -Implementation notes, in priority order: - -1. **Compute `x` and `ox` locally with `sha256_hex`.** Do **not** derive `x` from - `BlobDescriptor::sha256` — that field is a `bitcoin_hashes::sha256::Hash` whose - `Display` byte order could not be confirmed from the vendored sources, and a - reversed digest would silently break integrity checks in other clients. Use the - Blossom response only for `blob.url`. (`sha2` → `Sha256Hash::from_byte_array(...).to_hex()` - gives the conventional digest order and is unambiguous.) -2. **Key/nonce decoding must be tolerant.** NIP-17 does not specify an encoding: - accept base64 standard (padded and unpadded), base64url, and hex on read; emit - base64 standard on write. See "Open decisions" #1. -3. Validate sizes after decoding: key must be exactly 32 bytes, nonce exactly 12. - Return a descriptive error otherwise. -4. `decrypt` must fail closed on a bad tag (GCM authentication failure) — never - return partial plaintext. -5. `upload_encrypted` mirrors the existing `state::blossom::upload` shape: - `smol::fs::read` + `mime_guess::from_path`, `BlossomClient::new(server)`, - `upload_blob(ciphertext, Some("application/octet-stream"), None, Some(&keys))` - wrapped in `Tokio::spawn(cx, ...)`. Note the content type describes the - **ciphertext**; the plaintext MIME goes in the `file-type` tag. - On `wasm32` return `Err(anyhow!("File upload not supported on web"))`, matching - the existing stub in `blossom.rs`. -6. `download_and_decrypt` uses gpui's HTTP client - (`cx.update(|app| app.http_client())`, then - `client.get(url.as_str(), AsyncBody::default(), true)`), reads the body with - `futures::AsyncReadExt`, caps the read at `MAX_FILE_SIZE + 1` and rejects anything - larger, verifies `sha256_hex(&ciphertext)` against `expected_sha256` - (case-insensitive) when present, then decrypts. This path works on desktop and web. -7. `size` in `FileAttachment` is the **ciphertext** size (per the NIP wording), i.e. - `encrypted.data.len()`. `dim` is optional; if wanted, decode dimensions with the - `image` crate (`image::ImageReader`) — mark as a nice-to-have, not a blocker. -8. `encrypt` should take `&[u8]` (not a path) so it stays pure and testable without I/O. - -### Step 3 — `crates/chat/src/message.rs` (~80 LOC) - -- Add the kind constant next to `Message`: - - ```rust - /// NIP-17 file message (rust-nostr has no named `Kind` variant for 15). - pub const KIND_FILE_MESSAGE: Kind = Kind::Custom(15); - ``` - -- Add the field: - - ```rust - pub struct Message { - // ... existing fields ... - /// Encrypted file attachment (NIP-17 kind 15) - pub file: Option, - } - ``` - -- In all three `From` impls (`&Event`, `&UnsignedEvent`, `&NewMessage`), parse from - tags when `kind == KIND_FILE_MESSAGE`, and when a file is present **do not** run - `extract_and_remove_media_urls` or `extract_mentions` on `.content` — for kind 15 - `.content` is a ciphertext URL that must never be rendered as text or as media: - - ```rust - let file = (val.kind == KIND_FILE_MESSAGE) - .then(|| FileAttachment::from_tags(&val.tags)) - .flatten(); - - let (media, content) = if file.is_some() { - (vec![], String::new()) - } else { - extract_and_remove_media_urls(&val.content) - }; - ``` - -- Add a helper for non-UI consumers that display a message one-line - (reply previews, notifications, copy): - - ```rust - /// Single-line representation: text for kind 14, `[File] ` for kind 15. - pub fn preview(&self) -> SharedString; - ``` - -- `Ord`/`Eq`/`Hash` are keyed on `id`/`created_at`, so adding the field does not - change `Message` ordering semantics. - -### Step 4 — `crates/chat/src/room.rs` (~70 LOC) - -- Extract the shared tag logic from `rumor()` into a private helper so kind 14 and - kind 15 cannot drift: - - ```rust - /// `subject` + reply `e` tags + receiver `p` tags (excluding `sender`). - fn conversation_tags(&self, replies: &[EventId], sender: PublicKey, cx: &App) -> Vec; - ``` - - `rumor()` then becomes `EventBuilder::new(kind, content).tags(self.conversation_tags(...))`, - and gains no behavior change. - -- Add: - - ```rust - /// Build a NIP-17 kind 15 (file message) rumor. - /// - /// WARNING: never sign and send this event to relays; it is only ever wrapped. - pub fn file_rumor(&self, file: FileAttachment, replies: I, cx: &App) -> Option - where - I: IntoIterator, - { - // tags = conversation_tags(...) ++ file.tags() - // content = file.url.to_string() - // EventBuilder::new(KIND_FILE_MESSAGE, content).tags(tags).finalize_unsigned(sender) - // then event.ensure_id() - } - ``` - -- Fix the gift wrap's `k` tag so relays see the real inner kind - (`send_gift_wrap`, currently hardcoded): - - ```rust - let k_tag = Tag::custom("k", [rumor.kind.to_string()]); - ``` - -- `Room::send` needs **no change**: it already accepts any `UnsignedEvent`, and the - self-backup branch publishes the same rumor wrapped for the sender, so the sender's - other devices receive the file message with the same key material. - -### Step 5 — `crates/chat/src/lib.rs` (~5 LOC) - -- `set_rumor`: store the real kind in the local cache tag: - - ```rust - Tag::custom("k", [rumor.kind.to_string()]), - ``` - -- `get_rooms_task` currently filters `custom_tag(SingleLetterTag::LOWERCASE_K, "14")`, - which would hide rooms whose only messages are file messages. Simplest fix: drop - the `k` filter and keep `.kind(Kind::ApplicationSpecificData)`; the existing - in-loop JSON parse plus `tags.public_keys().next().is_some()` check already - discards junk, and kind 30078 rows in the local DB exist only for this rumor cache. - Fallback if the extra rows are a concern: run two queries (`k = "14"` and - `k = "15"`) and merge the results. - -- No changes to `handle_notifications`, `extract_rumor`, `try_unwrap_with`, `new_message`, - `Room::get_messages` — all are already kind-agnostic. (`Room::get_messages` filters - only on the `r` room tag, so file messages load with the rest of the history.) - -### Step 6 — (out of scope) UI wiring - -Composer entry point, decryption cache, image/file rendering live in -`crates/chat_ui`. Not part of this plan; the APIs above are what that layer needs: -`state::upload_encrypted`, `FileAttachment::tags/from_tags`, `Room::file_rumor`, -`Room::send`, `state::download_and_decrypt`. - ---- - -## 7. Open decisions - -1. **Key/nonce encoding (interop risk — decide/verify first).** NIP-17 does not specify - how `decryption-key` / `decryption-nonce` are encoded, and no reference - implementation could be reached from this environment to confirm. Plan: emit - **base64 standard**, accept base64 std/unpadded/url-safe/hex on read. Before - release, verify against another NIP-17 client (0xchat, Amethyst) and tighten if - needed. Everything else in the plan is encoding-agnostic. -2. **Display name.** The NIP defines no filename tag and Blossom URLs end in a content - hash, so a name has to come from a non-standard tag. Proposal: emit - `["alt", ]` (NIP-94 tag; NIP-17 allows "rest of tags", and `alt` is a - benign a11y field), tolerate its absence, fall back to mime + size. Alternative: - ship strictly spec-shaped and show mime + size only. -3. **`thumbhash`/`blurhash`/`thumb`/`fallback`/`dim`**: all optional; recommend skipping - in v1 (and letting the UI show a placeholder until the blob is decrypted). -4. **Web (wasm)**: encrypted upload stays unsupported on web, matching today's - `state::blossom::upload` stub. Download/decrypt is cross-platform via gpui's client. -5. **Ciphertext caching**: recommend *not* persisting decrypted plaintext in the local - database in v1; decryption happens on demand from the blob URL. - ---- - -## 8. Edge cases and failure handling - -| Case | Behavior | -|---|---| -| `encryption-algorithm` != `aes-gcm` | do not decrypt; report "unsupported encryption" (forward compatibility) | -| missing `decryption-key` / `decryption-nonce` | `FileAttachment::from_tags` returns `None` → surfaced as a failed message, not a panic | -| key != 32 bytes or nonce != 12 bytes | descriptive error | -| GCM authentication failure | error; never emit partial plaintext | -| `sha256_hex(ciphertext) != x` | error (tampered or corrupted blob), checked **before** decrypting | -| blob larger than `MAX_FILE_SIZE` | rejected while reading the body | -| HTTP error / non-200 | error message including status | -| `content` not a valid URL | error; message still cached so it renders as a failed attachment | -| sender's own copy | works automatically via the existing self-backup gift wrap | -| multiple receivers | one blob, one key, key re-sent inside each recipient's gift wrap | - ---- - -## 9. Verification - -The feature cannot be exercised end-to-end without the UI step (out of scope), so -backend verification is: - -1. `cargo check -p state -p chat` after each step. -2. `cargo check -p coop_web --target wasm32-unknown-unknown` to confirm the - `cfg(target_arch = "wasm32")` stubs and the new module compile for web. -3. Cheap unit checks (no network, ~15 LOC in `state/src/file.rs`), despite "no tests - required" for the feature, because these are pure functions and catch the two - riskiest bugs — encoding and tag ordering: - - `encrypt` → `decrypt` round trip returns the original bytes. - - flipping one ciphertext bit makes `decrypt` fail. - - `sha256_hex(b"abc") == "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"` - (confirms the digest order used for `x`/`ox`). - - `FileAttachment` tags → `from_tags` round trip preserves key/nonce/mime/url. -4. End-to-end (requires the UI step or a temporary call site): send to self with - `RoomConfig::backup` enabled and confirm the rumor unwraps, downloads, verifies and - decrypts; then a second account; then a cross-client check for decision #1. - ---- - -## 10. Estimated size - -| File | Change | ~LOC | -|---|---|---| -| `Cargo.toml`, `crates/state/Cargo.toml` | deps | 6 | -| `crates/state/src/file.rs` | new | 180 | -| `crates/state/src/lib.rs` | module + re-export | 2 | -| `crates/chat/src/message.rs` | parse + preview | 80 | -| `crates/chat/src/room.rs` | `file_rumor` + tag refactor + `k` tag | 70 | -| `crates/chat/src/lib.rs` | cache tag + room list query | 5 | - -Order of work: 1 → 2 → 3 → 4 → 5, each step compiling on its own. Steps 2–4 are -independent of any UI change, so the branch stays green without touching `chat_ui`. diff --git a/crates/chat_ui/src/lib.rs b/crates/chat_ui/src/lib.rs index c2e95e60..ecf0efd1 100644 --- a/crates/chat_ui/src/lib.rs +++ b/crates/chat_ui/src/lib.rs @@ -5,7 +5,7 @@ use std::sync::{Arc, LazyLock, RwLock}; pub use actions::*; use anyhow::Error; use chat::{ChatRegistry, Message, Room, RoomEvent, SendReport, SendStatus}; -use common::{TimestampExt, coop_cache}; +use common::TimestampExt; use futures::lock::Mutex; use gpui::prelude::FluentBuilder; use gpui::{ @@ -13,8 +13,8 @@ use gpui::{ Focusable, InteractiveElement, IntoElement, ListAlignment, ListOffset, ListState, MouseButton, ObjectFit, ParentElement, PathPromptOptions, Render, SharedString, SharedUri, StatefulInteractiveElement, Styled, StyledImage, Subscription, SystemNotification, - SystemNotificationAction, Task, WeakEntity, Window, div, img, list, px, red, relative, svg, - white, + SystemNotificationAction, Task, WeakEntity, Window, div, img, list, px, red, relative, + retain_all, svg, white, }; use itertools::Itertools; use nostr_sdk::prelude::*; @@ -2024,7 +2024,7 @@ impl Render for ChatPanel { let pending_attachments = !self.encrypted_attachments.read(cx).is_empty(); v_flex() - .image_cache(coop_cache(self.id.clone(), 100)) + .image_cache(retain_all(self.id.clone())) .on_action(cx.listener(Self::on_command)) .size_full() .when(*self.subject_bar.read(cx), |this| { diff --git a/crates/common/src/caching.rs b/crates/common/src/caching.rs deleted file mode 100644 index c7ea380d..00000000 --- a/crates/common/src/caching.rs +++ /dev/null @@ -1,135 +0,0 @@ -use std::collections::{HashMap, VecDeque}; -use std::mem::take; - -use futures::FutureExt; -use gpui::{ - App, AppContext, Asset, AssetLogger, ElementId, Entity, ImageAssetLoader, ImageCache, - ImageCacheItem, ImageCacheProvider, ImageSource, Resource, hash, -}; - -pub fn coop_cache(id: impl Into, max_items: usize) -> CoopImageCacheProvider { - CoopImageCacheProvider { - id: id.into(), - max_items, - } -} - -pub struct CoopImageCacheProvider { - id: ElementId, - max_items: usize, -} - -impl ImageCacheProvider for CoopImageCacheProvider { - fn provide(&mut self, window: &mut gpui::Window, cx: &mut App) -> gpui::AnyImageCache { - window - .with_global_id(self.id.clone(), |id, window| { - window.with_element_state(id, |cache, _| { - let cache = cache.unwrap_or_else(|| CoopImageCache::new(self.max_items, cx)); - (cache.clone(), cache) - }) - }) - .into() - } -} - -pub struct CoopImageCache { - max_items: usize, - usage_list: VecDeque, - cache: HashMap, -} - -impl CoopImageCache { - pub fn new(max_items: usize, cx: &mut App) -> Entity { - cx.new(|cx| { - log::info!("Creating CoopImageCache"); - cx.on_release(|this: &mut Self, cx| { - for (ix, (mut image, resource)) in take(&mut this.cache) { - if let Some(Ok(image)) = image.get() { - log::info!("Dropping image {ix}"); - cx.drop_image(image, None); - } - ImageSource::Resource(resource).remove_asset(cx); - } - }) - .detach(); - - CoopImageCache { - max_items, - usage_list: VecDeque::with_capacity(max_items), - cache: HashMap::with_capacity(max_items), - } - }) - } -} - -impl ImageCache for CoopImageCache { - fn load( - &mut self, - resource: &Resource, - window: &mut gpui::Window, - cx: &mut gpui::App, - ) -> Option, gpui::ImageCacheError>> { - let hash = hash(resource); - - if let Some(item) = self.cache.get_mut(&hash) { - let current_idx = self - .usage_list - .iter() - .position(|item| *item == hash) - .expect("cache has an item usage_list doesn't"); - - self.usage_list.remove(current_idx); - self.usage_list.push_front(hash); - - return item.0.get(); - } - - let load_future = AssetLogger::::load(resource.clone(), cx); - let task = cx.background_executor().spawn(load_future).shared(); - - if self.usage_list.len() >= self.max_items { - log::info!("Image cache is full, evicting oldest item"); - - if let Some(oldest) = self.usage_list.pop_back() { - let mut image = self - .cache - .remove(&oldest) - .expect("usage_list has an item cache doesn't"); - - if let Some(Ok(image)) = image.0.get() { - log::info!("requesting image to be dropped"); - cx.drop_image(image, Some(window)); - } - - ImageSource::Resource(image.1).remove_asset(cx); - } - } - - self.cache.insert( - hash, - ( - gpui::ImageCacheItem::Loading(task.clone()), - resource.clone(), - ), - ); - self.usage_list.push_front(hash); - - let entity = window.current_view(); - - window - .spawn(cx, async move |cx| { - let result = task.await; - - if let Err(err) = result { - log::error!("error loading image into cache: {:?}", err); - } - - cx.on_next_frame(move |_, cx| { - cx.notify(entity); - }); - }) - .detach(); - - None - } -} diff --git a/crates/common/src/lib.rs b/crates/common/src/lib.rs index 8f7bcdb2..7d7720e3 100644 --- a/crates/common/src/lib.rs +++ b/crates/common/src/lib.rs @@ -1,4 +1,3 @@ -pub use caching::*; pub use debounced_delay::*; pub use display::*; pub use event::*; @@ -7,7 +6,6 @@ pub use parser::*; pub use paths::*; pub use range::*; -mod caching; mod debounced_delay; mod display; mod event; diff --git a/crates/state/src/constants.rs b/crates/state/src/constants.rs index a84bea99..d2bf9e30 100644 --- a/crates/state/src/constants.rs +++ b/crates/state/src/constants.rs @@ -14,9 +14,6 @@ pub const USER_KEYRING: &str = "Coop User Credential"; /// Default timeout for subscription pub const TIMEOUT: u64 = 2; -/// Default image cache size -pub const IMAGE_CACHE_SIZE: usize = 20; - /// Default delay for searching pub const FIND_DELAY: u64 = 600; diff --git a/crates/workspace/src/lib.rs b/crates/workspace/src/lib.rs index 9d306f62..c53f9fc5 100644 --- a/crates/workspace/src/lib.rs +++ b/crates/workspace/src/lib.rs @@ -4,18 +4,18 @@ use ::settings::AppSettings; use anyhow::Error; use auto_update::AutoUpdater; use chat::{ChatEvent, ChatRegistry}; -use common::{CoopImageCache, download_dir}; +use common::download_dir; use device::{DeviceEvent, DeviceRegistry}; use gpui::prelude::FluentBuilder; use gpui::{ Action, App, AppContext, Axis, Context, Entity, InteractiveElement, IntoElement, ParentElement, - Render, SharedString, Styled, Subscription, Task, Window, div, image_cache, px, + Render, SharedString, Styled, Subscription, Task, Window, div, px, }; use nostr_sdk::prelude::*; use person::{PersonRegistry, shorten_pubkey}; use serde::Deserialize; use smallvec::{SmallVec, smallvec}; -use state::{IMAGE_CACHE_SIZE, NostrRegistry, StateEvent}; +use state::{NostrRegistry, StateEvent}; use theme::{ActiveTheme, SIDEBAR_WIDTH, Theme, ThemeRegistry}; use ui::avatar::Avatar; use ui::button::{Button, ButtonVariants}; @@ -64,9 +64,6 @@ pub struct Workspace { /// App's Dock Area dock: Entity, - /// App's Image Cache - image_cache: Entity, - /// Async tasks tasks: Vec>>, @@ -82,7 +79,6 @@ impl Workspace { let sidebar = cx.new(|cx| Sidebar::new(window, cx)); let dock = cx.new(|cx| DockArea::new(window, cx)); - let image_cache = CoopImageCache::new(IMAGE_CACHE_SIZE, cx); let mut subscriptions = smallvec![]; @@ -233,7 +229,6 @@ impl Workspace { Self { sidebar, dock, - image_cache, tasks: vec![], _subscriptions: subscriptions, } @@ -778,31 +773,26 @@ impl Render for Workspace { .relative() .size_full() .child( - image_cache(self.image_cache.clone()) - .relative() + v_flex() .size_full() + // Title Bar .child( - v_flex() + TitleBar::new() + .child(self.titlebar_left(cx)) + .child(self.titlebar_right(cx)), + ) + // Main + .child( + h_flex() .size_full() - // Title Bar .child( - TitleBar::new() - .child(self.titlebar_left(cx)) - .child(self.titlebar_right(cx)), + div() + .flex_shrink_0() + .h_full() + .w(SIDEBAR_WIDTH) + .child(self.sidebar.clone()), ) - // Main - .child( - h_flex() - .size_full() - .child( - div() - .flex_shrink_0() - .h_full() - .w(SIDEBAR_WIDTH) - .child(self.sidebar.clone()), - ) - .child(self.dock.clone()), - ), + .child(self.dock.clone()), ), ) // Notifications diff --git a/crates/workspace/src/panels/contact_list.rs b/crates/workspace/src/panels/contact_list.rs index b6afb557..8a0e6d18 100644 --- a/crates/workspace/src/panels/contact_list.rs +++ b/crates/workspace/src/panels/contact_list.rs @@ -5,7 +5,7 @@ use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, AppContext, Context, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement, IntoElement, ParentElement, Render, SharedString, Styled, Subscription, - Task, TextAlign, Window, div, rems, + Task, TextAlign, Window, div, rems, retain_all, }; use instant::Duration; use nostr_sdk::prelude::*; @@ -297,6 +297,7 @@ impl Focusable for ContactListPanel { impl Render for ContactListPanel { fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement { v_flex() + .image_cache(retain_all("contact-list-panel")) .p_3() .gap_3() .w_full() diff --git a/crates/workspace/src/panels/profile.rs b/crates/workspace/src/panels/profile.rs index c9e46d93..5bee4cb3 100644 --- a/crates/workspace/src/panels/profile.rs +++ b/crates/workspace/src/panels/profile.rs @@ -4,7 +4,7 @@ use anyhow::Error; use gpui::{ AnyElement, App, AppContext, ClipboardItem, Context, Entity, EventEmitter, FocusHandle, Focusable, IntoElement, ParentElement, PathPromptOptions, Render, SharedString, Styled, Task, - Window, div, + Window, div, retain_all, }; use instant::Duration; use nostr_sdk::prelude::*; @@ -321,6 +321,7 @@ impl Render for ProfilePanel { let shorten_pkey = SharedString::from(shorten_pubkey(self.public_key, 8)); v_flex() + .image_cache(retain_all("profile-panel")) .p_3() .gap_3() .w_full() diff --git a/crates/workspace/src/sidebar/mod.rs b/crates/workspace/src/sidebar/mod.rs index efb74af9..b8181182 100644 --- a/crates/workspace/src/sidebar/mod.rs +++ b/crates/workspace/src/sidebar/mod.rs @@ -3,19 +3,19 @@ use std::ops::Range; use anyhow::Error; use chat::{ChatEvent, ChatRegistry, Room, RoomKind}; -use common::{DebouncedDelay, TimestampExt, coop_cache}; +use common::{DebouncedDelay, TimestampExt}; use entry::RoomEntry; use gpui::prelude::FluentBuilder; use gpui::{ App, AppContext, Context, Entity, EventEmitter, FocusHandle, Focusable, IntoElement, ParentElement, Render, SharedString, Styled, Subscription, Task, UniformListScrollHandle, - Window, div, uniform_list, + Window, div, retain_all, uniform_list, }; use instant::Duration; use nostr_sdk::prelude::*; use person::PersonRegistry; use smallvec::{SmallVec, smallvec}; -use state::{FIND_DELAY, IMAGE_CACHE_SIZE, NostrRegistry}; +use state::{FIND_DELAY, NostrRegistry}; use theme::{ActiveTheme, SIDEBAR_WIDTH}; use ui::button::{Button, ButtonVariants}; use ui::dock::{Panel, PanelEvent}; @@ -521,7 +521,7 @@ impl Render for Sidebar { }; v_flex() - .image_cache(coop_cache("sidebar", IMAGE_CACHE_SIZE)) + .image_cache(retain_all("sidebar")) .size_full() .gap_2() .child(