Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Bump tree-sitter to 0.27 and wasmtime to 48.0 (#63169)

Jakub Konka4ca9005579ad
diff --git a/Cargo.lock b/Cargo.lock
index 5aed7fa2f4a..e76b343b412 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -214,7 +214,16 @@ version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
dependencies = [
- "gimli",
+ "gimli 0.32.3",
+]
+
+[[package]]
+name = "addr2line"
+version = "0.26.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59317f77929f0e679d39364702289274de2f0f0b22cbf50b2b8cff2169a0b27a"
+dependencies = [
+ "gimli 0.33.0",
]
[[package]]
@@ -231,7 +240,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
dependencies = [
"cfg-if",
"cipher",
- "cpufeatures",
+ "cpufeatures 0.2.17",
"zeroize",
]
@@ -333,7 +342,7 @@ dependencies = [
"futures 0.3.32",
"futures-concurrency",
"rustc-hash 2.1.1",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"schemars 1.0.4",
"serde",
"serde_json",
@@ -619,7 +628,7 @@ dependencies = [
"piper",
"polling",
"regex-automata",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"rustix-openpty",
"serde",
"signal-hook",
@@ -801,9 +810,9 @@ checksum = "34cd60c5e3152cef0a592f1b296f1cc93715d89d2551d85315828c3a09575ff4"
[[package]]
name = "anyhow"
-version = "1.0.102"
+version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
[[package]]
name = "approx"
@@ -820,7 +829,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b"
dependencies = [
- "object",
+ "object 0.37.3",
]
[[package]]
@@ -1075,7 +1084,7 @@ dependencies = [
"futures-lite 2.6.1",
"parking",
"polling",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"slab",
"windows-sys 0.61.2",
]
@@ -1125,7 +1134,7 @@ dependencies = [
"cfg-if",
"event-listener 5.4.1",
"futures-lite 2.6.1",
- "rustix 1.1.2",
+ "rustix 1.1.4",
]
[[package]]
@@ -1151,7 +1160,7 @@ dependencies = [
"cfg-if",
"futures-core",
"futures-io",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"signal-hook-registry",
"slab",
"windows-sys 0.61.2",
@@ -2049,11 +2058,11 @@ version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
dependencies = [
- "addr2line",
+ "addr2line 0.25.1",
"cfg-if",
"libc",
"miniz_oxide",
- "object",
+ "object 0.37.3",
"rustc-demangle",
"windows-link 0.2.1",
]
@@ -2467,9 +2476,9 @@ checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64"
[[package]]
name = "bumpalo"
-version = "3.19.0"
+version = "3.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
dependencies = [
"allocator-api2",
]
@@ -2661,7 +2670,7 @@ source = "git+https://github.com/zed-industries/calloop#eb6b4fd17b9af5ecc226546b
dependencies = [
"bitflags 2.13.1",
"polling",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"slab",
"tracing",
]
@@ -2673,7 +2682,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
dependencies = [
"calloop",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"wayland-backend",
"wayland-client",
]
@@ -2689,80 +2698,44 @@ dependencies = [
[[package]]
name = "cap-fs-ext"
-version = "3.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "476f0d0003a760918ed4b1e039a59e11769030416f79c8222551d22785f7f70d"
-dependencies = [
- "cap-primitives",
- "cap-std",
- "io-lifetimes",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "cap-net-ext"
-version = "3.4.6"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "150941cefd3df4de2fea24604ba4949371576f62e527410298333f7d431a1bc6"
+checksum = "56ff379b70af8e08307a8f65e7040c7301cb4a572538ade16b4984f0da77847f"
dependencies = [
"cap-primitives",
"cap-std",
- "rustix 1.1.2",
- "smallvec",
+ "io-lifetimes 3.0.1",
+ "windows-sys 0.61.2",
]
[[package]]
name = "cap-primitives"
-version = "3.4.6"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e0bf07d379916947be6c4a07f43684153d710a2896c31f9e97781362895596c"
+checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18"
dependencies = [
"ambient-authority",
"fs-set-times",
"io-extras",
- "io-lifetimes",
+ "io-lifetimes 3.0.1",
"ipnet",
"maybe-owned",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"rustix-linux-procfs",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
"winx",
]
-[[package]]
-name = "cap-rand"
-version = "3.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ec6a5b75f54547c579a6b117c6fdd5f04f4ab7598de747b9f440a53592b3a4a"
-dependencies = [
- "ambient-authority",
- "rand 0.8.6",
-]
-
[[package]]
name = "cap-std"
-version = "3.4.6"
+version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a59e59fa26472d29680ece6a9f8ee8b0551a719a33df2f5240bde065ecbddfd7"
+checksum = "c1ec78e242cfa2cfe276807ac2ecc00315a6c97786977414bcd1c3963b6c91b8"
dependencies = [
"cap-primitives",
"io-extras",
- "io-lifetimes",
- "rustix 1.1.2",
-]
-
-[[package]]
-name = "cap-time-ext"
-version = "3.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b54c289326c70f1c697ebf0a31842a480932e5942b5fac92fcc46e87286b48e2"
-dependencies = [
- "ambient-authority",
- "cap-primitives",
- "iana-time-zone",
- "once_cell",
- "rustix 1.1.2",
- "winx",
+ "io-lifetimes 3.0.1",
+ "rustix 1.1.4",
]
[[package]]
@@ -2884,9 +2857,9 @@ dependencies = [
[[package]]
name = "cfg-expr"
-version = "0.20.6"
+version = "0.20.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cef5b5a1a6827c7322ae2a636368a573006b27cfa76c7ebd53e834daeaab6a"
+checksum = "fe4ece8474b5f766c63426647e7b4b316b67431ade1036a8313cee24a03ae917"
dependencies = [
"smallvec",
"target-lexicon",
@@ -2919,6 +2892,17 @@ dependencies = [
"libc",
]
+[[package]]
+name = "chacha20"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.0",
+ "rand_core 0.10.1",
+]
+
[[package]]
name = "channel"
version = "0.1.0"
@@ -4092,9 +4076,9 @@ dependencies = [
[[package]]
name = "cpp_demangle"
-version = "0.4.5"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253"
+checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def"
dependencies = [
"cfg-if",
]
@@ -4108,48 +4092,59 @@ dependencies = [
"libc",
]
+[[package]]
+name = "cpufeatures"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "cranelift-assembler-x64"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6835dba958b2ab7ab523e7e99296e0524317f60430a00cf5850562ef78ea7001"
+checksum = "9903e767cc0a95a59950de099a6b1d61e1476f774be1cdfa06d7ccdc9bfae56f"
dependencies = [
"cranelift-assembler-x64-meta",
]
[[package]]
name = "cranelift-assembler-x64-meta"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b6e4ce8ee6d899381fbdd9e6561336c651189d46cecaeee09b29e8d80aa786e"
+checksum = "e777252ea3ec9daffa71408fbfe0793ab0a7b7bc3b2cf0f417dd0fa33964b8ef"
dependencies = [
"cranelift-srcgen",
]
[[package]]
name = "cranelift-bforest"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cb6d37015df7ea4b60450c1229ad5f5819a1fb27434b063f8e6216dfbd0c42a"
+checksum = "7828208a36e6627481cea61bd24c6234e31411d5c58b48e80ca094a1d593b944"
dependencies = [
"cranelift-entity",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-bitset"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "986bea0b0858b55192782120032ce9c15943fa073f186f6e479653c59e62c329"
+checksum = "a58c8447cc59ef98c49096679f81392ad0acec2224cea2bef52011f5169f9d02"
dependencies = [
"serde",
"serde_derive",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-codegen"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f30aeb2de7f97d6f26b4a1642615834daad58e2e4d7c027810010a3a32f22be"
+checksum = "ce520e899df1de583e7b564eafd66760fbc147d72894d2278ddac57a1489fcc0"
dependencies = [
"bumpalo",
"cranelift-assembler-x64",
@@ -4160,8 +4155,9 @@ dependencies = [
"cranelift-control",
"cranelift-entity",
"cranelift-isle",
- "gimli",
- "hashbrown 0.15.5",
+ "gimli 0.33.0",
+ "hashbrown 0.17.1",
+ "libm",
"log",
"postcard",
"pulley-interpreter",
@@ -4172,14 +4168,14 @@ dependencies = [
"sha2",
"smallvec",
"target-lexicon",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-codegen-meta"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd5dd137fcdedef33b6fd40edf1ced024460d764ceb75833e8198a843395945c"
+checksum = "8d8ab23e63d78ea6bbda18ae1ed9c958bc1cb88d90fb5e95f5ba62e9c019474b"
dependencies = [
"cranelift-assembler-x64-meta",
"cranelift-codegen-shared",
@@ -4190,37 +4186,39 @@ dependencies = [
[[package]]
name = "cranelift-codegen-shared"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab54b260ef23a8f0f536679b9fc3b3b3e05353e8d1448f3ab83df02078e8be9b"
+checksum = "24319a996b1ef40ebf8af69b39c868c790b35a42cfe38edacfd8c9deb75ea712"
[[package]]
name = "cranelift-control"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f3e569779ad70537f34a670d444ee3d75ae583b2023913f4682814b0979f7e8"
+checksum = "cf9856d68cc2cefb83229cb2c55b620dd38427555c2fe87d73f8a4421616f628"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ff53acc85f5c5f7d9315ff133a6671d329a0f04aa2d1a8a2e81d59709ccddcb"
+checksum = "e0ec225d6b79c5d61358cb5ea081a1384ec541dbf8c1a8c618d187875af326ad"
dependencies = [
"cranelift-bitset",
"serde",
"serde_derive",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-frontend"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5976c0ff5bfadf61cd8bda81fea78ee5a07018b9cd03e66c0952c56684928b"
+checksum = "7d3a96a09bd9bd3cf6df2de2ea15d7418f493e946a8eaa1acfe39297a67ed3f3"
dependencies = [
"cranelift-codegen",
+ "hashbrown 0.17.1",
"log",
"smallvec",
"target-lexicon",
@@ -4228,15 +4226,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77b4f73d2288e9480fd2d1d9ab576394dce4805443d6148c6d819dbf78865ce4"
+checksum = "bd28f593c36afbdc9aa17305c0bb66c39ce0530e1caffcf389fbec053950083e"
[[package]]
name = "cranelift-native"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe9650c2baf22fa1e2542a5bdd8152616ec2023d929c4cbb450ff677ad8d9c21"
+checksum = "2987ca47affc261aa31ac643fb80dd7f8274cebf878003ba9f50cd6ff2c1055f"
dependencies = [
"cranelift-codegen",
"libc",
@@ -4245,9 +4243,9 @@ dependencies = [
[[package]]
name = "cranelift-srcgen"
-version = "0.123.14"
+version = "0.135.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ad4f61ae701d73c326d3df08c366b29ad10f1ba06c245092f217b8d2306746b"
+checksum = "b7431dd8c9def94aca43b27915dee0d42103d9b13922cfb044febcd975547d68"
[[package]]
name = "crash-context"
@@ -5920,7 +5918,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -6271,12 +6269,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c942e64b20ecd39933d5ff938ca4fdb6ef0d298cc3855b231179a5ef0b24948d"
-[[package]]
-name = "fallible-iterator"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
-
[[package]]
name = "fancy-regex"
version = "0.16.2"
@@ -6343,17 +6335,6 @@ dependencies = [
"syn 2.0.117",
]
-[[package]]
-name = "fd-lock"
-version = "4.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78"
-dependencies = [
- "cfg-if",
- "rustix 1.1.2",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "fdeflate"
version = "0.3.7"
@@ -6718,7 +6699,7 @@ dependencies = [
"paths",
"proto",
"rope",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"serde",
"serde_json",
"slotmap",
@@ -6739,9 +6720,9 @@ version = "0.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a"
dependencies = [
- "io-lifetimes",
- "rustix 1.1.2",
- "windows-sys 0.52.0",
+ "io-lifetimes 2.0.4",
+ "rustix 1.1.4",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -7024,7 +7005,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
dependencies = [
- "rustix 1.1.2",
+ "rustix 1.1.4",
"windows-link 0.2.1",
]
@@ -7064,6 +7045,7 @@ dependencies = [
"cfg-if",
"libc",
"r-efi",
+ "rand_core 0.10.1",
"wasip2",
"wasip3",
]
@@ -7110,8 +7092,15 @@ name = "gimli"
version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
+
+[[package]]
+name = "gimli"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf7f043f89559805f8c7cacc432749b2fa0d0a0a9ee46ce47164ed5ba7f126c"
dependencies = [
- "fallible-iterator",
+ "fnv",
+ "hashbrown 0.16.1",
"indexmap 2.14.0",
"stable_deref_trait",
]
@@ -7126,7 +7115,7 @@ dependencies = [
"gobject-sys",
"libc",
"system-deps",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -7998,7 +7987,6 @@ dependencies = [
"allocator-api2",
"equivalent",
"foldhash 0.1.5",
- "serde",
]
[[package]]
@@ -8510,7 +8498,7 @@ dependencies = [
"libc",
"percent-encoding",
"pin-project-lite",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"tokio",
"tower-service",
"tracing",
@@ -8528,7 +8516,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
- "windows-core 0.56.0",
+ "windows-core 0.62.2",
]
[[package]]
@@ -8684,9 +8672,9 @@ dependencies = [
[[package]]
name = "id-arena"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
[[package]]
name = "ident_case"
@@ -8972,12 +8960,12 @@ dependencies = [
[[package]]
name = "io-extras"
-version = "0.18.4"
+version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65"
+checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f"
dependencies = [
- "io-lifetimes",
- "windows-sys 0.52.0",
+ "io-lifetimes 3.0.1",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -8986,6 +8974,12 @@ version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983"
+[[package]]
+name = "io-lifetimes"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96"
+
[[package]]
name = "io-surface"
version = "0.16.1"
@@ -9059,7 +9053,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi",
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -9999,9 +9993,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "linux-raw-sys"
-version = "0.11.0"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "litemap"
@@ -10423,6 +10417,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "mach2"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b"
+
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -10658,7 +10658,7 @@ version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227"
dependencies = [
- "rustix 1.1.2",
+ "rustix 1.1.4",
]
[[package]]
@@ -11912,9 +11912,18 @@ name = "object"
version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "object"
+version = "0.39.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b"
dependencies = [
"crc32fast",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
"indexmap 2.14.0",
"memchr",
]
@@ -13516,7 +13525,7 @@ dependencies = [
"concurrent-queue",
"hermit-abi",
"pin-project-lite",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"windows-sys 0.61.2",
]
@@ -14079,7 +14088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
dependencies = [
"bytes 1.11.1",
- "heck 0.4.1",
+ "heck 0.5.0",
"itertools 0.11.0",
"log",
"multimap",
@@ -14254,21 +14263,21 @@ checksum = "bd348ff538bc9caeda7ee8cad2d1d48236a1f443c1fa3913c6a02fe0043b1dd3"
[[package]]
name = "pulley-interpreter"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb0a4b56042e461cc64456650182938e2d1ede98fa0c8a975027416a2809c414"
+checksum = "f755d75e0809a4738a3e4880eeeb852fadbe1de5a437505b84f09c381657012a"
dependencies = [
"cranelift-bitset",
"log",
"pulley-macros",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
]
[[package]]
name = "pulley-macros"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "244667bea2e214273442a71f26adb12b88a41f66718fb2c6eea47c00f0dc325f"
+checksum = "c7e69fa1c4a555946f82e7894a7df88b0e9ee03b4266829b4811467c616ce51d"
dependencies = [
"proc-macro2",
"quote",
@@ -14364,7 +14373,7 @@ dependencies = [
"quinn-udp",
"rustc-hash 2.1.1",
"rustls 0.23.40",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"thiserror 2.0.17",
"tokio",
"tracing",
@@ -14401,9 +14410,9 @@ dependencies = [
"cfg_aliases 0.2.1",
"libc",
"once_cell",
- "socket2 0.5.10",
+ "socket2 0.6.3",
"tracing",
- "windows-sys 0.52.0",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -14471,6 +14480,17 @@ dependencies = [
"rand_core 0.9.3",
]
+[[package]]
+name = "rand"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
+dependencies = [
+ "chacha20",
+ "getrandom 0.4.1",
+ "rand_core 0.10.1",
+]
+
[[package]]
name = "rand_chacha"
version = "0.3.1"
@@ -14524,6 +14544,12 @@ dependencies = [
"getrandom 0.3.4",
]
+[[package]]
+name = "rand_core"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
+
[[package]]
name = "rand_distr"
version = "0.5.1"
@@ -14816,13 +14842,13 @@ dependencies = [
[[package]]
name = "regalloc2"
-version = "0.12.2"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5216b1837de2149f8bc8e6d5f88a9326b63b8c836ed58ce4a0a29ec736a59734"
+checksum = "757712e8e61590d6d4f5d563483755538b5aa13467837a3b41cd9832509a7f85"
dependencies = [
"allocator-api2",
"bumpalo",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
"log",
"rustc-hash 2.1.1",
"serde",
@@ -15517,20 +15543,20 @@ dependencies = [
"errno 0.3.14",
"libc",
"linux-raw-sys 0.4.15",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "rustix"
-version = "1.1.2"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [
"bitflags 2.13.1",
"errno 0.3.14",
"libc",
- "linux-raw-sys 0.11.0",
- "windows-sys 0.52.0",
+ "linux-raw-sys 0.12.1",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -15540,7 +15566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056"
dependencies = [
"once_cell",
- "rustix 1.1.2",
+ "rustix 1.1.4",
]
[[package]]
@@ -15551,7 +15577,7 @@ checksum = "1de16c7c59892b870a6336f185dc10943517f1327447096bbb7bb32cd85e2393"
dependencies = [
"errno 0.3.14",
"libc",
- "rustix 1.1.2",
+ "rustix 1.1.4",
]
[[package]]
@@ -15652,7 +15678,7 @@ dependencies = [
"security-framework 3.5.1",
"security-framework-sys",
"webpki-root-certs",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -16558,7 +16584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c"
dependencies = [
"cfg-if",
- "cpufeatures",
+ "cpufeatures 0.2.17",
"digest",
]
@@ -16569,7 +16595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
- "cpufeatures",
+ "cpufeatures 0.2.17",
"digest",
]
@@ -16586,7 +16612,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
- "cpufeatures",
+ "cpufeatures 0.2.17",
"digest",
]
@@ -16910,7 +16936,7 @@ version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451"
dependencies = [
- "heck 0.4.1",
+ "heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.117",
@@ -17901,22 +17927,6 @@ dependencies = [
"version-compare",
]
-[[package]]
-name = "system-interface"
-version = "0.27.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745"
-dependencies = [
- "bitflags 2.13.1",
- "cap-fs-ext",
- "cap-std",
- "fd-lock",
- "io-lifetimes",
- "rustix 0.38.44",
- "windows-sys 0.52.0",
- "winx",
-]
-
[[package]]
name = "system_specs"
version = "0.1.0"
@@ -18015,9 +18025,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "target-lexicon"
-version = "0.13.3"
+version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
+checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
[[package]]
name = "task"
@@ -18107,8 +18117,8 @@ dependencies = [
"fastrand 2.3.0",
"getrandom 0.3.4",
"once_cell",
- "rustix 1.1.2",
- "windows-sys 0.52.0",
+ "rustix 1.1.4",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -18172,7 +18182,7 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0"
dependencies = [
- "rustix 1.1.2",
+ "rustix 1.1.4",
"windows-sys 0.60.2",
]
@@ -19021,7 +19031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fb391ac70462b3097a755618fbf9c8f95ecc1eb379a414f7b46f202ed10db1f"
dependencies = [
"cc",
- "windows-targets 0.48.5",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -19045,7 +19055,7 @@ dependencies = [
[[package]]
name = "tree-sitter"
version = "0.27.0"
-source = "git+https://github.com/tree-sitter/tree-sitter?rev=dff1fd868c750dbbae179fcd5c43ce987e4e0528#dff1fd868c750dbbae179fcd5c43ce987e4e0528"
+source = "git+https://github.com/tree-sitter/tree-sitter?rev=43623ec9bf0eaaf7113285c46e8a09018f181b18#43623ec9bf0eaaf7113285c46e8a09018f181b18"
dependencies = [
"cc",
"regex",
@@ -19203,7 +19213,7 @@ dependencies = [
[[package]]
name = "tree-sitter-language"
version = "0.1.8"
-source = "git+https://github.com/tree-sitter/tree-sitter?rev=dff1fd868c750dbbae179fcd5c43ce987e4e0528#dff1fd868c750dbbae179fcd5c43ce987e4e0528"
+source = "git+https://github.com/tree-sitter/tree-sitter?rev=43623ec9bf0eaaf7113285c46e8a09018f181b18#43623ec9bf0eaaf7113285c46e8a09018f181b18"
[[package]]
name = "tree-sitter-md"
@@ -19508,9 +19518,9 @@ checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f"
[[package]]
name = "unicode-ident"
-version = "1.0.19"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "unicode-linebreak"
@@ -20095,32 +20105,32 @@ dependencies = [
[[package]]
name = "wasm-encoder"
-version = "0.236.1"
+version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "724fccfd4f3c24b7e589d333fc0429c68042897a7e8a5f8694f31792471841e7"
+checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
dependencies = [
"leb128fmt",
- "wasmparser 0.236.1",
+ "wasmparser 0.244.0",
]
[[package]]
name = "wasm-encoder"
-version = "0.244.0"
+version = "0.252.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
+checksum = "8185ae345fa5687c054626ff9a50e7089797a343d9904d1dc9820eb4c4d3196f"
dependencies = [
"leb128fmt",
- "wasmparser 0.244.0",
+ "wasmparser 0.252.0",
]
[[package]]
name = "wasm-encoder"
-version = "0.252.0"
+version = "0.254.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8185ae345fa5687c054626ff9a50e7089797a343d9904d1dc9820eb4c4d3196f"
+checksum = "09480d646178e5fdd12bb06e812d0af9a3a191dbc9cd697fdc86687beade7393"
dependencies = [
"leb128fmt",
- "wasmparser 0.252.0",
+ "wasmparser 0.254.0",
]
[[package]]
@@ -20170,6 +20180,18 @@ dependencies = [
"wasmparser 0.244.0",
]
+[[package]]
+name = "wasm-metadata"
+version = "0.254.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b01df5f3b4ca7881e843f3bc0fb8a3905d79c68692250dcb8e33e698705ccdb6"
+dependencies = [
+ "anyhow",
+ "indexmap 2.14.0",
+ "wasm-encoder 0.254.0",
+ "wasmparser 0.254.0",
+]
+
[[package]]
name = "wasm-streams"
version = "0.4.2"
@@ -20219,34 +20241,34 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.236.1"
+version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7"
+checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
dependencies = [
"bitflags 2.13.1",
"hashbrown 0.15.5",
"indexmap 2.14.0",
"semver",
- "serde",
]
[[package]]
name = "wasmparser"
-version = "0.244.0"
+version = "0.252.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
+checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c"
dependencies = [
"bitflags 2.13.1",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
"indexmap 2.14.0",
"semver",
+ "serde",
]
[[package]]
name = "wasmparser"
-version = "0.252.0"
+version = "0.254.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c"
+checksum = "d5769a29f799fbab136aaf65b4fe5384cd7d93fe6fc9ba0dcb6c8382a1f16e27"
dependencies = [
"bitflags 2.13.1",
"hashbrown 0.17.1",
@@ -20257,70 +20279,63 @@ dependencies = [
[[package]]
name = "wasmprinter"
-version = "0.236.1"
+version = "0.254.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2df225df06a6df15b46e3f73ca066ff92c2e023670969f7d50ce7d5e695abbb1"
+checksum = "64e3ba11e024f504698f87b629b2b66c22a1231758de7607754963f7d198be39"
dependencies = [
"anyhow",
"termcolor",
- "wasmparser 0.236.1",
+ "wasmparser 0.254.0",
]
[[package]]
name = "wasmtime"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d05c745dc0978e589ef295958f3130122afc33d96af6bad3f0f06dbe7ac43a8"
+checksum = "1bd39f78fe9bc82cee4025ec9d52118269e9a1498016cc60119b14f2e1d86a8d"
dependencies = [
- "addr2line",
- "anyhow",
+ "addr2line 0.26.1",
"async-trait",
"bitflags 2.13.1",
"bumpalo",
"cc",
- "cfg-if",
"encoding_rs",
- "hashbrown 0.15.5",
- "indexmap 2.14.0",
+ "futures 0.3.32",
"libc",
"log",
- "mach2 0.4.3",
+ "mach2 0.6.0",
"memfd",
- "object",
+ "object 0.39.1",
"once_cell",
"postcard",
"pulley-interpreter",
"rayon",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"semver",
"serde",
"serde_derive",
"smallvec",
"target-lexicon",
- "wasmparser 0.236.1",
+ "wasmparser 0.254.0",
"wasmtime-environ",
- "wasmtime-internal-asm-macros",
"wasmtime-internal-component-macro",
"wasmtime-internal-component-util",
+ "wasmtime-internal-core",
"wasmtime-internal-cranelift",
"wasmtime-internal-fiber",
"wasmtime-internal-jit-debug",
"wasmtime-internal-jit-icache-coherence",
- "wasmtime-internal-math",
- "wasmtime-internal-slab",
"wasmtime-internal-unwinder",
"wasmtime-internal-versioned-export-macros",
- "wasmtime-internal-winch",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
name = "wasmtime-c-api-impl"
-version = "36.0.13"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae273769c129ee7ca247c3d849dfdda9957fece8c93307a4ef727ca0e35d62c3"
+checksum = "809b08d506d8304ddd2af1ca3ed3fa7e57f5cb623d887d6bb08890fb861abe68"
dependencies = [
- "anyhow",
"log",
"tracing",
"wasmtime",
@@ -20329,45 +20344,40 @@ dependencies = [
[[package]]
name = "wasmtime-environ"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fd1d43cfaa1a0859d2f4fccc15e7e571e2a88b357e81bc88ba6c501b83d925d"
+checksum = "00c1070d95484d048994ec109cd42c4932ac07e6ee3cc1886fb90c7a18ec29da"
dependencies = [
"anyhow",
"cpp_demangle",
+ "cranelift-bforest",
"cranelift-bitset",
"cranelift-entity",
- "gimli",
+ "gimli 0.33.0",
+ "hashbrown 0.17.1",
"indexmap 2.14.0",
"log",
- "object",
+ "object 0.39.1",
"postcard",
"rustc-demangle",
"semver",
"serde",
"serde_derive",
+ "sha2",
"smallvec",
"target-lexicon",
- "wasm-encoder 0.236.1",
- "wasmparser 0.236.1",
+ "wasm-encoder 0.254.0",
+ "wasmparser 0.254.0",
"wasmprinter",
"wasmtime-internal-component-util",
-]
-
-[[package]]
-name = "wasmtime-internal-asm-macros"
-version = "36.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "515dd7158bf1719b41290cd2e6a2a46ec944484146816992f195af3720e49b3f"
-dependencies = [
- "cfg-if",
+ "wasmtime-internal-core",
]
[[package]]
name = "wasmtime-internal-c-api-macros"
-version = "36.0.13"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fcd4661fe1146d284b5b82d26d12c4b8056b1f0aa8a3a8f6d33e9597abf147f"
+checksum = "8156bad2c4f3a7c64563c2ef01fb123392b66a8b03182078d39ab9e48e478f2e"
dependencies = [
"proc-macro2",
"quote",
@@ -20375,9 +20385,9 @@ dependencies = [
[[package]]
name = "wasmtime-internal-component-macro"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfca017b7daa80ff217c66f105ee20e674d87b7c11dca85bbb9d0146e9f443fb"
+checksum = "f3d2b2f9f89a65bb2277d82fbdd49263d27d8233bc717d750c4b13a23d57721c"
dependencies = [
"anyhow",
"proc-macro2",
@@ -20385,63 +20395,72 @@ dependencies = [
"syn 2.0.117",
"wasmtime-internal-component-util",
"wasmtime-internal-wit-bindgen",
- "wit-parser 0.236.1",
+ "wit-parser 0.254.0",
]
[[package]]
name = "wasmtime-internal-component-util"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c3e218b51d2ef9eb181499e42c691512c1bc11dd6dc7746807a9b2b9290369c"
+checksum = "2c0fe8292115fda08875f29064ae9f7f0b2c1ffbb323146eae538ae34b8a613f"
[[package]]
-name = "wasmtime-internal-cranelift"
-version = "36.0.14"
+name = "wasmtime-internal-core"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ba1736927b58e50e741e407da7c037c0250f3e213833a09c89dcd8f73ae2eac"
+checksum = "821385794cf44baf2967fd2515368429ed2bff9b9b256f62d09a0f1301474fd8"
dependencies = [
"anyhow",
- "cfg-if",
+ "hashbrown 0.17.1",
+ "libm",
+ "serde",
+]
+
+[[package]]
+name = "wasmtime-internal-cranelift"
+version = "48.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0238b4a52773457ad1b8a1a26be90486e0ca0108cf46b9be16cc1d8d8cabdfa1"
+dependencies = [
"cranelift-codegen",
"cranelift-control",
"cranelift-entity",
"cranelift-frontend",
"cranelift-native",
- "gimli",
+ "gimli 0.33.0",
"itertools 0.14.0",
"log",
- "object",
+ "object 0.39.1",
"pulley-interpreter",
"smallvec",
"target-lexicon",
"thiserror 2.0.17",
- "wasmparser 0.236.1",
+ "wasmparser 0.254.0",
"wasmtime-environ",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
+ "wasmtime-internal-unwinder",
"wasmtime-internal-versioned-export-macros",
]
[[package]]
name = "wasmtime-internal-fiber"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b238e4c20bddb900ec0cb380252d63e8d0644fd94de001119574f5921e895d9"
+checksum = "596f1d85e06cbf9c9add9c78ea135171c5753264ffe94a83dcc082a1ff49fc9b"
dependencies = [
- "anyhow",
"cc",
- "cfg-if",
"libc",
- "rustix 1.1.2",
- "wasmtime-internal-asm-macros",
+ "rustix 1.1.4",
+ "wasmtime-environ",
"wasmtime-internal-versioned-export-macros",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
name = "wasmtime-internal-jit-debug"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f259b13685ad51e3dcf58cb69031279ed0d79c25bc3ccc8b50e7160ed04fbfe"
+checksum = "365faed74827bb0116785bab5872372df1baaec9ec0003c83bc99ccdc595f689"
dependencies = [
"cc",
"wasmtime-internal-versioned-export-macros",
@@ -20449,106 +20468,66 @@ dependencies = [
[[package]]
name = "wasmtime-internal-jit-icache-coherence"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41fed85537936b16460bac352ad149052c025db50467c7bc539dd47b31439374"
+checksum = "3cce25afd9e7ac4957292a5c6a219951dd0f140b8417e7378a97f50b67c3b96f"
dependencies = [
- "anyhow",
- "cfg-if",
"libc",
- "windows-sys 0.60.2",
-]
-
-[[package]]
-name = "wasmtime-internal-math"
-version = "36.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82fff10da41d0d15d90ebba70946a0aa16ed0957ae7b77e0b6d2a46e8221e555"
-dependencies = [
- "libm",
+ "wasmtime-internal-core",
+ "windows-sys 0.61.2",
]
-[[package]]
-name = "wasmtime-internal-slab"
-version = "36.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e44a8c097bab08d349d57dce1ab818859fefbe261ab3632b38fe127b1b551108"
-
[[package]]
name = "wasmtime-internal-unwinder"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f40a57d5e7c221ce56391d7dca0a918ba17ea00185462c7facbf534d7745184"
+checksum = "a1fdea09d51e39c774984ca68a7d7486767e5b2935f5e686fa654aabcfc3c42d"
dependencies = [
- "anyhow",
- "cfg-if",
"cranelift-codegen",
"log",
- "object",
+ "object 0.39.1",
+ "wasmtime-environ",
]
[[package]]
name = "wasmtime-internal-versioned-export-macros"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e085bfce1cb2089dbeef6e280a5d598666923d3dcd308712fe429fe43c9d19f5"
+checksum = "97e48a5f514c38c2f74249724cb3501e45548d3311ca9e3881694859fd6ba116"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
-[[package]]
-name = "wasmtime-internal-winch"
-version = "36.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4916cd526e1ce294984cc5b70264cfc0ca103b41ca665b58728bde250b6b82f"
-dependencies = [
- "anyhow",
- "cranelift-codegen",
- "gimli",
- "object",
- "target-lexicon",
- "wasmparser 0.236.1",
- "wasmtime-environ",
- "wasmtime-internal-cranelift",
- "winch-codegen",
-]
-
[[package]]
name = "wasmtime-internal-wit-bindgen"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39ad2f9d9c3baa70ee4d157b55b4c08e5dc00f1d80aad3692b1e0806393914ea"
+checksum = "07429ab53576255be2d298e04b2e1f381e39645465adbaebd69314b5430165c0"
dependencies = [
"anyhow",
"bitflags 2.13.1",
"heck 0.5.0",
"indexmap 2.14.0",
- "wit-parser 0.236.1",
+ "wit-component 0.254.0",
+ "wit-parser 0.254.0",
]
[[package]]
name = "wasmtime-wasi"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841c11707aaeaf09895677757614d83a23c45d2b2689df908d0005aa191a933b"
+checksum = "85dd81ee95792682ea5b279c9ed352f6b8a2cba084c2f8abdb225e6933323fed"
dependencies = [
- "anyhow",
"async-trait",
"bitflags 2.13.1",
"bytes 1.11.1",
"cap-fs-ext",
- "cap-net-ext",
- "cap-rand",
- "cap-std",
- "cap-time-ext",
- "fs-set-times",
+ "cap-primitives",
"futures 0.3.32",
- "io-extras",
- "io-lifetimes",
- "rustix 1.1.2",
- "system-interface",
+ "rand 0.10.2",
+ "rustix 1.1.4",
"thiserror 2.0.17",
"tokio",
"tracing",
@@ -20556,19 +20535,19 @@ dependencies = [
"wasmtime",
"wasmtime-wasi-io",
"wiggle",
- "windows-sys 0.60.2",
+ "windows-sys 0.61.2",
]
[[package]]
name = "wasmtime-wasi-io"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b76b03de2cba3c036f81074c17bb1c7b77662578424887ebbc090b4c23ba33e"
+checksum = "6a557bc8a7232cd079f6b423a9bb385f3ff9148824f3c26c07a028b499fab2bf"
dependencies = [
- "anyhow",
"async-trait",
"bytes 1.11.1",
"futures 0.3.32",
+ "tracing",
"wasmtime",
]
@@ -20615,7 +20594,7 @@ checksum = "2857dd20b54e916ec7253b3d6b4d5c4d7d4ca2c33c2e11c6c76a99bd8744755d"
dependencies = [
"cc",
"downcast-rs",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"scoped-tls",
"smallvec",
"wayland-sys",
@@ -20628,7 +20607,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d"
dependencies = [
"bitflags 2.13.1",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"wayland-backend",
"wayland-scanner",
]
@@ -20639,7 +20618,7 @@ version = "0.31.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29"
dependencies = [
- "rustix 1.1.2",
+ "rustix 1.1.4",
"wayland-client",
"xcursor",
]
@@ -21053,38 +21032,37 @@ dependencies = [
[[package]]
name = "wiggle"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a333010f4b8b770a500e181e0abda564dde49a51db21aed4307fde800746ff97"
+checksum = "b871ea219ad85c1e59ee7d013563814e86d2e6aa094d3bc66b7675ec4ca58bb7"
dependencies = [
- "anyhow",
- "async-trait",
"bitflags 2.13.1",
"thiserror 2.0.17",
"tracing",
"wasmtime",
+ "wasmtime-environ",
"wiggle-macro",
]
[[package]]
name = "wiggle-generate"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e909aa247f90d2ba77b6860b36288cfeeb559fe01b140165f077b250cb1ba56"
+checksum = "ed981675756e748a4725286a4059c9be006749a8db4120d54e2021d0f167bac3"
dependencies = [
- "anyhow",
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.117",
+ "wasmtime-environ",
"witx",
]
[[package]]
name = "wiggle-macro"
-version = "36.0.14"
+version = "48.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a84de50b5bf6530a15bbb228043561d525c8e21c8929693c3078f7cad2051ad3"
+checksum = "7f3927729af874585c58b85710128e40d459a7064bb9aea9b0b420fb5eafd555"
dependencies = [
"proc-macro2",
"quote",
@@ -21114,7 +21092,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -21123,26 +21101,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-[[package]]
-name = "winch-codegen"
-version = "36.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e826c012c68403725e77adf6b904c2ea809e5d464aaf25aa6eda14559300b3df"
-dependencies = [
- "anyhow",
- "cranelift-assembler-x64",
- "cranelift-codegen",
- "gimli",
- "regalloc2",
- "smallvec",
- "target-lexicon",
- "thiserror 2.0.17",
- "wasmparser 0.236.1",
- "wasmtime-environ",
- "wasmtime-internal-cranelift",
- "wasmtime-internal-math",
-]
-
[[package]]
name = "windows"
version = "0.56.0"
@@ -21953,7 +21911,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d"
dependencies = [
"bitflags 2.13.1",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -22197,6 +22155,25 @@ dependencies = [
"wit-parser 0.244.0",
]
+[[package]]
+name = "wit-component"
+version = "0.254.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0e65bb94c369b3c4741ce3d1d2704b1fec93db7c540df0e521a097e7ceeb5be"
+dependencies = [
+ "anyhow",
+ "bitflags 2.13.1",
+ "indexmap 2.14.0",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "wasm-encoder 0.254.0",
+ "wasm-metadata 0.254.0",
+ "wasmparser 0.254.0",
+ "wit-parser 0.254.0",
+]
+
[[package]]
name = "wit-parser"
version = "0.201.0"
@@ -22235,9 +22212,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.236.1"
+version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16e4833a20cd6e85d6abfea0e63a399472d6f88c6262957c17f546879a80ba15"
+checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
dependencies = [
"anyhow",
"id-arena",
@@ -22248,16 +22225,17 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
- "wasmparser 0.236.1",
+ "wasmparser 0.244.0",
]
[[package]]
name = "wit-parser"
-version = "0.244.0"
+version = "0.254.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
+checksum = "1655131e4f7d3f0cb141f6eca71315ca40eff0f3d4de7cff0a82bacedd8c89b4"
dependencies = [
"anyhow",
+ "hashbrown 0.17.1",
"id-arena",
"indexmap 2.14.0",
"log",
@@ -22265,8 +22243,8 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
- "unicode-xid",
- "wasmparser 0.244.0",
+ "unicode-ident",
+ "wasmparser 0.254.0",
]
[[package]]
@@ -22445,7 +22423,7 @@ dependencies = [
"as-raw-xcb-connection",
"gethostname",
"libc",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"x11rb-protocol",
"xcursor",
]
@@ -22473,7 +22451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
dependencies = [
"libc",
- "rustix 1.1.2",
+ "rustix 1.1.4",
]
[[package]]
@@ -22703,7 +22681,7 @@ dependencies = [
"hex",
"libc",
"ordered-stream",
- "rustix 1.1.2",
+ "rustix 1.1.4",
"serde",
"serde_repr",
"tracing",
diff --git a/Cargo.toml b/Cargo.toml
index 80ef66aee58..df1de093d38 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -834,7 +834,7 @@ toml_edit = { version = "0.22", default-features = false, features = [
"serde",
] }
tower-http = "0.4.4"
-tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "dff1fd868c750dbbae179fcd5c43ce987e4e0528" }
+tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "43623ec9bf0eaaf7113285c46e8a09018f181b18" }
tracing = "0.1.40"
tree-sitter-bash = "0.25.1"
tree-sitter-c = "0.24.1"
@@ -874,7 +874,8 @@ vte = { version = "0.15.0", features = ["ansi"] }
walkdir = "2.5"
wasm-encoder = "0.252"
wasmparser = "0.252"
-wasmtime = { version = "36", default-features = false, features = [
+wasmtime = { version = "48", default-features = false, features = [
+ "anyhow",
"async",
"demangle",
"runtime",
@@ -885,7 +886,7 @@ wasmtime = { version = "36", default-features = false, features = [
] }
wasm-bindgen = "0.2.120"
wasm-bindgen-futures = "0.4"
-wasmtime-wasi = "36.0.14"
+wasmtime-wasi = "48"
wax = "0.7"
web-time = "1.1.0"
webrtc-sys = "0.3.23"
@@ -964,7 +965,7 @@ features = [
# Unify `tree_sitter_language::LanguageFn` between crates.io grammar crates and
# the git tree-sitter above; two instances of the crate would make grammar
# constants type-incompatible with `tree_sitter::Language`.
-tree-sitter-language = { git = "https://github.com/tree-sitter/tree-sitter", rev = "dff1fd868c750dbbae179fcd5c43ce987e4e0528" }
+tree-sitter-language = { git = "https://github.com/tree-sitter/tree-sitter", rev = "43623ec9bf0eaaf7113285c46e8a09018f181b18" }
async-process = { git = "https://github.com/zed-industries/async-process.git", rev = "0b6d6713570af61806e1e5cb40e0f757cb93fd9d" }
async-task = { git = "https://github.com/smol-rs/async-task.git", rev = "b4486cd71e4e94fbda54ce6302444de14f4d190e" }
windows-capture = { git = "https://github.com/zed-industries/windows-capture.git", rev = "f0d6c1b6691db75461b732f6d5ff56eed002eeb9" }
diff --git a/crates/extension_host/src/wasm_host.rs b/crates/extension_host/src/wasm_host.rs
index 87a2032e831..c04445f4dca 100644
--- a/crates/extension_host/src/wasm_host.rs
+++ b/crates/extension_host/src/wasm_host.rs
@@ -178,6 +178,7 @@ impl extension::Extension for WasmExtension {
.boxed()
})
.await?
+ .map_err(anyhow::Error::from)
}
async fn language_server_workspace_configuration_schema(
@@ -199,6 +200,7 @@ impl extension::Extension for WasmExtension {
.boxed()
})
.await?
+ .map_err(anyhow::Error::from)
}
async fn language_server_additional_initialization_options(
@@ -510,6 +512,7 @@ impl extension::Extension for WasmExtension {
.boxed()
})
.await?
+ .map_err(anyhow::Error::from)
}
async fn run_dap_locator(
&self,
@@ -549,7 +552,6 @@ fn wasm_engine(executor: &BackgroundExecutor) -> wasmtime::Engine {
.get_or_init(|| {
let mut config = wasmtime::Config::new();
config.wasm_component_model(true);
- config.async_support(true);
config
.enable_incremental_compilation(cache_store())
.unwrap();
@@ -649,6 +651,7 @@ impl WasmHost {
executor.spawn(async move {
let zed_api_version = parse_wasm_extension_version(&manifest_id, &wasm_bytes)?;
let component = Component::from_binary(&engine, &wasm_bytes)
+ .map_err(anyhow::Error::from)
.context("failed to compile wasm component")?;
anyhow::Ok((zed_api_version, component))
@@ -686,6 +689,7 @@ impl WasmHost {
extension
.call_init_extension(&mut store)
.await
+ .map_err(anyhow::Error::from)
.context("failed to initialize wasm extension")?;
let (tx, mut rx) = mpsc::unbounded::<ExtensionCall>();
@@ -733,8 +737,7 @@ impl WasmHost {
.await
.context("failed to create extension work dir")?;
- let file_perms = wasmtime_wasi::FilePerms::all();
- let dir_perms = wasmtime_wasi::DirPerms::all();
+ let permissions = wasmtime_wasi::FsPerms::ReadWrite;
let path = SanitizedPath::new(&extension_work_dir).to_string();
#[cfg(target_os = "windows")]
let path = path.replace('\\', "/");
@@ -744,8 +747,8 @@ impl WasmHost {
.env("PWD", &path)
.env("RUST_BACKTRACE", "full");
- ctx.preopened_dir(&path, ".", dir_perms, file_perms)?;
- ctx.preopened_dir(&path, &path, dir_perms, file_perms)?;
+ ctx.preopened_dir(&path, ".", permissions)?;
+ ctx.preopened_dir(&path, &path, permissions)?;
Ok(ctx.build())
}
diff --git a/crates/extension_host/src/wasm_host/wit.rs b/crates/extension_host/src/wasm_host/wit.rs
index 83bfdbc818e..34d75c8a896 100644
--- a/crates/extension_host/src/wasm_host/wit.rs
+++ b/crates/extension_host/src/wasm_host/wit.rs
@@ -19,7 +19,7 @@ use task::{DebugScenario, SpawnInTerminal, TaskTemplate, ZedDebugConfig};
use latest::dap::StartDebuggingRequestArgumentsRequest;
use super::{WasmState, wasm_engine};
-use anyhow::{Context as _, Result, anyhow};
+use anyhow::{Context as _, Result};
use semver::Version;
use since_v0_8_0 as latest;
use std::{ops::RangeInclusive, path::PathBuf, sync::Arc};
@@ -42,7 +42,7 @@ pub use since_v0_0_4::LanguageServerConfig;
pub fn new_linker(
executor: &BackgroundExecutor,
- f: impl FnOnce(&mut Linker<WasmState>) -> Result<()>,
+ f: impl FnOnce(&mut Linker<WasmState>) -> wasmtime::Result<()>,
) -> Linker<WasmState> {
let mut linker = Linker::new(&wasm_engine(executor));
wasmtime_wasi::p2::add_to_linker_async(&mut linker).unwrap();
@@ -121,6 +121,7 @@ impl Extension {
let extension =
latest::Extension::instantiate_async(store, component, latest::linker(executor))
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_8_0(extension))
} else if version >= since_v0_6_0::MIN_VERSION {
@@ -130,6 +131,7 @@ impl Extension {
since_v0_6_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_6_0(extension))
} else if version >= since_v0_5_0::MIN_VERSION {
@@ -139,6 +141,7 @@ impl Extension {
since_v0_5_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_5_0(extension))
} else if version >= since_v0_4_0::MIN_VERSION {
@@ -148,6 +151,7 @@ impl Extension {
since_v0_4_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_4_0(extension))
} else if version >= since_v0_3_0::MIN_VERSION {
@@ -157,6 +161,7 @@ impl Extension {
since_v0_3_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_3_0(extension))
} else if version >= since_v0_2_0::MIN_VERSION {
@@ -166,6 +171,7 @@ impl Extension {
since_v0_2_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_2_0(extension))
} else if version >= since_v0_1_0::MIN_VERSION {
@@ -175,6 +181,7 @@ impl Extension {
since_v0_1_0::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_1_0(extension))
} else if version >= since_v0_0_6::MIN_VERSION {
@@ -184,6 +191,7 @@ impl Extension {
since_v0_0_6::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_0_6(extension))
} else if version >= since_v0_0_4::MIN_VERSION {
@@ -193,6 +201,7 @@ impl Extension {
since_v0_0_4::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_0_4(extension))
} else {
@@ -202,12 +211,13 @@ impl Extension {
since_v0_0_1::linker(executor),
)
.await
+ .map_err(anyhow::Error::from)
.context("failed to instantiate wasm extension")?;
Ok(Self::V0_0_1(extension))
}
}
- pub async fn call_init_extension(&self, store: &mut Store<WasmState>) -> Result<()> {
+ pub async fn call_init_extension(&self, store: &mut Store<WasmState>) -> wasmtime::Result<()> {
match self {
Extension::V0_8_0(ext) => ext.call_init_extension(store).await,
Extension::V0_6_0(ext) => ext.call_init_extension(store).await,
@@ -228,7 +238,7 @@ impl Extension {
language_server_id: &LanguageServerName,
language_name: &LanguageName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<Command, String>> {
+ ) -> wasmtime::Result<Result<Command, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_command(store, &language_server_id.0, resource)
@@ -294,7 +304,7 @@ impl Extension {
language_server_id: &LanguageServerName,
language_name: &LanguageName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<Option<String>, String>> {
+ ) -> wasmtime::Result<Result<Option<String>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_initialization_options(
@@ -391,7 +401,7 @@ impl Extension {
store: &mut Store<WasmState>,
language_server_id: &LanguageServerName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<Option<String>, String>> {
+ ) -> wasmtime::Result<Result<Option<String>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_workspace_configuration(
@@ -466,7 +476,7 @@ impl Extension {
store: &mut Store<WasmState>,
language_server_id: &LanguageServerName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Option<String>> {
+ ) -> wasmtime::Result<Option<String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_initialization_options_schema(
@@ -493,7 +503,7 @@ impl Extension {
store: &mut Store<WasmState>,
language_server_id: &LanguageServerName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Option<String>> {
+ ) -> wasmtime::Result<Option<String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_workspace_configuration_schema(
@@ -521,7 +531,7 @@ impl Extension {
language_server_id: &LanguageServerName,
target_language_server_id: &LanguageServerName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<Option<String>, String>> {
+ ) -> wasmtime::Result<Result<Option<String>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_additional_initialization_options(
@@ -574,7 +584,7 @@ impl Extension {
language_server_id: &LanguageServerName,
target_language_server_id: &LanguageServerName,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<Option<String>, String>> {
+ ) -> wasmtime::Result<Result<Option<String>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_language_server_additional_workspace_configuration(
@@ -626,7 +636,7 @@ impl Extension {
store: &mut Store<WasmState>,
language_server_id: &LanguageServerName,
completions: Vec<latest::Completion>,
- ) -> Result<Result<Vec<Option<CodeLabel>>, String>> {
+ ) -> wasmtime::Result<Result<Vec<Option<CodeLabel>>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_labels_for_completions(store, &language_server_id.0, &completions)
@@ -732,7 +742,7 @@ impl Extension {
store: &mut Store<WasmState>,
language_server_id: &LanguageServerName,
symbols: Vec<latest::Symbol>,
- ) -> Result<Result<Vec<Option<CodeLabel>>, String>> {
+ ) -> wasmtime::Result<Result<Vec<Option<CodeLabel>>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_labels_for_symbols(store, &language_server_id.0, &symbols)
@@ -838,7 +848,7 @@ impl Extension {
store: &mut Store<WasmState>,
command: &SlashCommand,
arguments: &[String],
- ) -> Result<Result<Vec<SlashCommandArgumentCompletion>, String>> {
+ ) -> wasmtime::Result<Result<Vec<SlashCommandArgumentCompletion>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_complete_slash_command_argument(store, command, arguments)
@@ -880,7 +890,7 @@ impl Extension {
command: &SlashCommand,
arguments: &[String],
resource: Option<Resource<Arc<dyn WorktreeDelegate>>>,
- ) -> Result<Result<SlashCommandOutput, String>> {
+ ) -> wasmtime::Result<Result<SlashCommandOutput, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_run_slash_command(store, command, arguments, resource)
@@ -910,9 +920,9 @@ impl Extension {
ext.call_run_slash_command(store, command, arguments, resource)
.await
}
- Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => {
- anyhow::bail!("`run_slash_command` not available prior to v0.1.0");
- }
+ Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => Err(
+ wasmtime::Error::msg("`run_slash_command` not available prior to v0.1.0"),
+ ),
}
}
@@ -921,7 +931,7 @@ impl Extension {
store: &mut Store<WasmState>,
context_server_id: Arc<str>,
project: Resource<ExtensionProject>,
- ) -> Result<Result<Command, String>> {
+ ) -> wasmtime::Result<Result<Command, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_context_server_command(store, &context_server_id, project)
@@ -950,9 +960,9 @@ impl Extension {
Extension::V0_0_1(_)
| Extension::V0_0_4(_)
| Extension::V0_0_6(_)
- | Extension::V0_1_0(_) => {
- anyhow::bail!("`context_server_command` not available prior to v0.2.0");
- }
+ | Extension::V0_1_0(_) => Err(wasmtime::Error::msg(
+ "`context_server_command` not available prior to v0.2.0",
+ )),
}
}
@@ -961,7 +971,7 @@ impl Extension {
store: &mut Store<WasmState>,
context_server_id: Arc<str>,
project: Resource<ExtensionProject>,
- ) -> Result<Result<Option<ContextServerConfiguration>, String>> {
+ ) -> wasmtime::Result<Result<Option<ContextServerConfiguration>, String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_context_server_configuration(store, &context_server_id, project)
@@ -981,9 +991,9 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_2_0(_)
| Extension::V0_3_0(_)
- | Extension::V0_4_0(_) => {
- anyhow::bail!("`context_server_configuration` not available prior to v0.5.0");
- }
+ | Extension::V0_4_0(_) => Err(wasmtime::Error::msg(
+ "`context_server_configuration` not available prior to v0.5.0",
+ )),
}
}
@@ -991,7 +1001,7 @@ impl Extension {
&self,
store: &mut Store<WasmState>,
provider: &str,
- ) -> Result<Result<Vec<String>, String>> {
+ ) -> wasmtime::Result<Result<Vec<String>, String>> {
match self {
Extension::V0_8_0(ext) => ext.call_suggest_docs_packages(store, provider).await,
Extension::V0_6_0(ext) => ext.call_suggest_docs_packages(store, provider).await,
@@ -1000,9 +1010,9 @@ impl Extension {
Extension::V0_3_0(ext) => ext.call_suggest_docs_packages(store, provider).await,
Extension::V0_2_0(ext) => ext.call_suggest_docs_packages(store, provider).await,
Extension::V0_1_0(ext) => ext.call_suggest_docs_packages(store, provider).await,
- Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => {
- anyhow::bail!("`suggest_docs_packages` not available prior to v0.1.0");
- }
+ Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => Err(
+ wasmtime::Error::msg("`suggest_docs_packages` not available prior to v0.1.0"),
+ ),
}
}
@@ -1012,7 +1022,7 @@ impl Extension {
provider: &str,
package_name: &str,
kv_store: Resource<Arc<dyn KeyValueStoreDelegate>>,
- ) -> Result<Result<(), String>> {
+ ) -> wasmtime::Result<Result<(), String>> {
match self {
Extension::V0_8_0(ext) => {
ext.call_index_docs(store, provider, package_name, kv_store)
@@ -1042,9 +1052,9 @@ impl Extension {
ext.call_index_docs(store, provider, package_name, kv_store)
.await
}
- Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => {
- anyhow::bail!("`index_docs` not available prior to v0.1.0");
- }
+ Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => Err(
+ wasmtime::Error::msg("`index_docs` not available prior to v0.1.0"),
+ ),
}
}
@@ -1055,24 +1065,24 @@ impl Extension {
task: DebugTaskDefinition,
user_installed_path: Option<PathBuf>,
resource: Resource<Arc<dyn WorktreeDelegate>>,
- ) -> Result<Result<DebugAdapterBinary, String>> {
+ ) -> wasmtime::Result<Result<DebugAdapterBinary, String>> {
match self {
Extension::V0_8_0(ext) => {
let dap_binary = ext
.call_get_dap_binary(
store,
&adapter_name,
- &task.try_into()?,
+ &task.try_into().into_wasmtime_result()?,
user_installed_path.as_ref().and_then(|p| p.to_str()),
resource,
)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
Ok(Ok(dap_binary))
}
Extension::V0_6_0(ext) => {
- let task: latest::DebugTaskDefinition = task.try_into()?;
+ let task: latest::DebugTaskDefinition = task.try_into().into_wasmtime_result()?;
let dap_binary = ext
.call_get_dap_binary(
store,
@@ -1082,7 +1092,7 @@ impl Extension {
resource,
)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
Ok(Ok(dap_binary.into()))
}
@@ -1093,9 +1103,9 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
- | Extension::V0_0_1(_) => {
- anyhow::bail!("`get_dap_binary` not available prior to v0.6.0");
- }
+ | Extension::V0_0_1(_) => Err(wasmtime::Error::msg(
+ "`get_dap_binary` not available prior to v0.6.0",
+ )),
}
}
@@ -1104,25 +1114,27 @@ impl Extension {
store: &mut Store<WasmState>,
adapter_name: Arc<str>,
config: serde_json::Value,
- ) -> Result<Result<StartDebuggingRequestArgumentsRequest, String>> {
+ ) -> wasmtime::Result<Result<StartDebuggingRequestArgumentsRequest, String>> {
match self {
Extension::V0_8_0(ext) => {
- let config =
- serde_json::to_string(&config).context("Adapter config is not a valid JSON")?;
+ let config = serde_json::to_string(&config)
+ .context("Adapter config is not a valid JSON")
+ .into_wasmtime_result()?;
let dap_binary = ext
.call_dap_request_kind(store, &adapter_name, &config)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
Ok(Ok(dap_binary))
}
Extension::V0_6_0(ext) => {
- let config =
- serde_json::to_string(&config).context("Adapter config is not a valid JSON")?;
+ let config = serde_json::to_string(&config)
+ .context("Adapter config is not a valid JSON")
+ .into_wasmtime_result()?;
let dap_binary = ext
.call_dap_request_kind(store, &adapter_name, &config)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
Ok(Ok(dap_binary.into()))
}
@@ -1133,9 +1145,9 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
- | Extension::V0_0_1(_) => {
- anyhow::bail!("`dap_request_kind` not available prior to v0.6.0");
- }
+ | Extension::V0_0_1(_) => Err(wasmtime::Error::msg(
+ "`dap_request_kind` not available prior to v0.6.0",
+ )),
}
}
@@ -1143,26 +1155,26 @@ impl Extension {
&self,
store: &mut Store<WasmState>,
config: ZedDebugConfig,
- ) -> Result<Result<DebugScenario, String>> {
+ ) -> wasmtime::Result<Result<DebugScenario, String>> {
match self {
Extension::V0_8_0(ext) => {
let config = config.into();
let dap_binary = ext
.call_dap_config_to_scenario(store, &config)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
- Ok(Ok(dap_binary.try_into()?))
+ Ok(Ok(dap_binary.try_into().into_wasmtime_result()?))
}
Extension::V0_6_0(ext) => {
let config: latest::DebugConfig = config.into();
let dap_binary = ext
.call_dap_config_to_scenario(store, &config.into())
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
let dap_binary: latest::DebugScenario = dap_binary.into();
- Ok(Ok(dap_binary.try_into()?))
+ Ok(Ok(dap_binary.try_into().into_wasmtime_result()?))
}
Extension::V0_5_0(_)
| Extension::V0_4_0(_)
@@ -1171,9 +1183,9 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
- | Extension::V0_0_1(_) => {
- anyhow::bail!("`dap_config_to_scenario` not available prior to v0.6.0");
- }
+ | Extension::V0_0_1(_) => Err(wasmtime::Error::msg(
+ "`dap_config_to_scenario` not available prior to v0.6.0",
+ )),
}
}
@@ -1184,7 +1196,7 @@ impl Extension {
build_config_template: TaskTemplate,
resolved_label: String,
debug_adapter_name: String,
- ) -> Result<Option<DebugScenario>> {
+ ) -> wasmtime::Result<Option<DebugScenario>> {
match self {
Extension::V0_8_0(ext) => {
let build_config_template = build_config_template.into();
@@ -1198,7 +1210,10 @@ impl Extension {
)
.await?;
- Ok(dap_binary.map(TryInto::try_into).transpose()?)
+ Ok(dap_binary
+ .map(TryInto::try_into)
+ .transpose()
+ .into_wasmtime_result()?)
}
Extension::V0_6_0(ext) => {
let build_config_template: latest::dap::TaskTemplate = build_config_template.into();
@@ -1214,7 +1229,8 @@ impl Extension {
Ok(dap_binary
.map(|s| latest::DebugScenario::from(s).try_into())
- .transpose()?)
+ .transpose()
+ .into_wasmtime_result()?)
}
Extension::V0_5_0(_)
| Extension::V0_4_0(_)
@@ -1223,9 +1239,9 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
- | Extension::V0_0_1(_) => {
- anyhow::bail!("`dap_locator_create_scenario` not available prior to v0.6.0");
- }
+ | Extension::V0_0_1(_) => Err(wasmtime::Error::msg(
+ "`dap_locator_create_scenario` not available prior to v0.6.0",
+ )),
}
}
@@ -1234,24 +1250,25 @@ impl Extension {
store: &mut Store<WasmState>,
locator_name: String,
resolved_build_task: SpawnInTerminal,
- ) -> Result<Result<DebugRequest, String>> {
+ ) -> wasmtime::Result<Result<DebugRequest, String>> {
match self {
Extension::V0_8_0(ext) => {
- let build_config_template = resolved_build_task.try_into()?;
+ let build_config_template =
+ resolved_build_task.try_into().into_wasmtime_result()?;
let dap_request = ext
.call_run_dap_locator(store, &locator_name, &build_config_template)
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
Ok(Ok(dap_request.into()))
}
Extension::V0_6_0(ext) => {
let build_config_template: latest::dap::TaskTemplate =
- resolved_build_task.try_into()?;
+ resolved_build_task.try_into().into_wasmtime_result()?;
let dap_request = ext
.call_run_dap_locator(store, &locator_name, &build_config_template.into())
.await?
- .map_err(|e| anyhow!("{e:?}"))?;
+ .map_err(|error| wasmtime::Error::msg(format!("{error:?}")))?;
let dap_request: latest::DebugRequest = dap_request.into();
Ok(Ok(dap_request.into()))
@@ -1263,13 +1280,23 @@ impl Extension {
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
- | Extension::V0_0_1(_) => {
- anyhow::bail!("`run_dap_locator` not available prior to v0.6.0");
- }
+ | Extension::V0_0_1(_) => Err(wasmtime::Error::msg(
+ "`run_dap_locator` not available prior to v0.6.0",
+ )),
}
}
}
+trait IntoWasmtimeResult<T> {
+ fn into_wasmtime_result(self) -> wasmtime::Result<T>;
+}
+
+impl<T> IntoWasmtimeResult<T> for Result<T> {
+ fn into_wasmtime_result(self) -> wasmtime::Result<T> {
+ self.map_err(wasmtime::Error::from_anyhow)
+ }
+}
+
trait ToWasmtimeResult<T> {
fn to_wasmtime_result(self) -> wasmtime::Result<Result<T, String>>;
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_0_1.rs b/crates/extension_host/src/wasm_host/wit/since_v0_0_1.rs
index 55af3ae8aae..57dfa5b5afb 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_0_1.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_0_1.rs
@@ -91,7 +91,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
Ok(())
}
}
@@ -131,7 +131,7 @@ impl ExtensionImports for WasmState {
since_v0_6_0::zed::extension::github::Host::latest_github_release(self, repo, options).await
}
- async fn current_platform(&mut self) -> Result<(Os, Architecture)> {
+ async fn current_platform(&mut self) -> wasmtime::Result<(Os, Architecture)> {
since_v0_6_0::zed::extension::platform::Host::current_platform(self).await
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_0_4.rs b/crates/extension_host/src/wasm_host/wit/since_v0_0_4.rs
index b967af4ebf2..28f8b8897d8 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_0_4.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_0_4.rs
@@ -99,7 +99,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
@@ -140,7 +140,7 @@ impl ExtensionImports for WasmState {
since_v0_6_0::zed::extension::github::Host::latest_github_release(self, repo, options).await
}
- async fn current_platform(&mut self) -> Result<(Os, Architecture)> {
+ async fn current_platform(&mut self) -> wasmtime::Result<(Os, Architecture)> {
since_v0_6_0::zed::extension::platform::Host::current_platform(self).await
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs b/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs
index 8f81802ad2c..b0f4f737b7e 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs
@@ -161,7 +161,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs
index 88bcfeff8ba..f2b9adf5cf7 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs
@@ -1,4 +1,7 @@
-use crate::wasm_host::{WasmState, wit::ToWasmtimeResult};
+use crate::wasm_host::{
+ WasmState,
+ wit::{IntoWasmtimeResult, ToWasmtimeResult},
+};
use ::http_client::{AsyncBody, HttpRequestExt};
use ::settings::{Settings, WorktreeId};
use anyhow::{Context as _, Result, bail};
@@ -36,7 +39,7 @@ wasmtime::component::bindgen!({
with: {
"worktree": ExtensionWorktree,
"key-value-store": ExtensionKeyValueStore,
- "zed:extension/http-client/http-response-stream": ExtensionHttpResponseStream,
+ "zed:extension/http-client.http-response-stream": ExtensionHttpResponseStream,
"zed:extension/github": since_v0_6_0::zed::extension::github,
"zed:extension/nodejs": latest::zed::extension::nodejs,
"zed:extension/platform": since_v0_6_0::zed::extension::platform,
@@ -255,7 +258,7 @@ impl HostKeyValueStore for WasmState {
kv_store.insert(key, value).await.to_wasmtime_result()
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -296,7 +299,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
@@ -327,7 +330,7 @@ impl http_client::Host for WasmState {
&mut self,
request: http_client::HttpRequest,
) -> wasmtime::Result<Result<Resource<ExtensionHttpResponseStream>, String>> {
- let request = convert_request(&request)?;
+ let request = convert_request(&request).into_wasmtime_result()?;
let response = self.host.http_client.send(request);
maybe!(async {
let response = response.await?;
@@ -361,7 +364,10 @@ impl http_client::HostHttpResponseStream for WasmState {
.to_wasmtime_result()
}
- async fn drop(&mut self, _resource: Resource<ExtensionHttpResponseStream>) -> Result<()> {
+ async fn drop(
+ &mut self,
+ _resource: Resource<ExtensionHttpResponseStream>,
+ ) -> wasmtime::Result<()> {
Ok(())
}
}
@@ -584,7 +590,8 @@ impl ExtensionImports for WasmState {
let path = self
.host
.writeable_path_from_extension(&self.manifest.id, Path::new(&path))
- .await?;
+ .await
+ .into_wasmtime_result()?;
make_file_executable(&path)
.await
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs
index 1575c8a1d87..d1ad64d9f7d 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs
@@ -139,7 +139,7 @@ impl HostKeyValueStore for WasmState {
latest::HostKeyValueStore::insert(self, kv_store, key, value).await
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -153,7 +153,7 @@ impl HostProject for WasmState {
latest::HostProject::worktree_ids(self, project).await
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -194,7 +194,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs
index 36c48779509..b4c8979888d 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_3_0.rs
@@ -120,7 +120,7 @@ impl HostKeyValueStore for WasmState {
latest::HostKeyValueStore::insert(self, kv_store, key, value).await
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -134,7 +134,7 @@ impl HostProject for WasmState {
latest::HostProject::worktree_ids(self, project).await
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -175,7 +175,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_4_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_4_0.rs
index 75ab8c2a019..d8a03253bc3 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_4_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_4_0.rs
@@ -120,7 +120,7 @@ impl HostKeyValueStore for WasmState {
latest::HostKeyValueStore::insert(self, kv_store, key, value).await
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -134,7 +134,7 @@ impl HostProject for WasmState {
latest::HostProject::worktree_ids(self, project).await
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -175,7 +175,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_5_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_5_0.rs
index bfb75ee205d..cb3bb4ef995 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_5_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_5_0.rs
@@ -121,7 +121,7 @@ impl HostKeyValueStore for WasmState {
latest::HostKeyValueStore::insert(self, kv_store, key, value).await
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -135,7 +135,7 @@ impl HostProject for WasmState {
latest::HostProject::worktree_ids(self, project).await
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -176,7 +176,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs
index 76f93020be6..f8c991a4a77 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs
@@ -279,7 +279,7 @@ impl HostKeyValueStore for WasmState {
latest::HostKeyValueStore::insert(self, kv_store, key, value).await
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -293,7 +293,7 @@ impl HostProject for WasmState {
latest::HostProject::worktree_ids(self, project).await
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -334,7 +334,7 @@ impl HostWorktree for WasmState {
latest::HostWorktree::which(self, delegate, binary_name).await
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
@@ -403,7 +403,9 @@ impl From<latest::platform::Os> for platform::Os {
}
impl platform::Host for WasmState {
- async fn current_platform(&mut self) -> Result<(platform::Os, platform::Architecture)> {
+ async fn current_platform(
+ &mut self,
+ ) -> wasmtime::Result<(platform::Os, platform::Architecture)> {
latest::platform::Host::current_platform(self)
.await
.map(|(os, arch)| (os.into(), arch.into()))
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs
index 29971f00da5..4fed1b313aa 100644
--- a/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs
+++ b/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs
@@ -1,6 +1,9 @@
use crate::wasm_host::wit::since_v0_6_0::slash_command::SlashCommandOutputSection;
use crate::wasm_host::wit::{CompletionKind, CompletionLabelDetails, InsertTextFormat, SymbolKind};
-use crate::wasm_host::{WasmState, wit::ToWasmtimeResult};
+use crate::wasm_host::{
+ WasmState,
+ wit::{IntoWasmtimeResult, ToWasmtimeResult},
+};
use ::http_client::{AsyncBody, HttpRequestExt};
use ::settings::{Settings, WorktreeId};
use anyhow::{Context as _, Result, bail};
@@ -45,7 +48,7 @@ wasmtime::component::bindgen!({
"worktree": ExtensionWorktree,
"project": ExtensionProject,
"key-value-store": ExtensionKeyValueStore,
- "zed:extension/http-client/http-response-stream": ExtensionHttpResponseStream
+ "zed:extension/http-client.http-response-stream": ExtensionHttpResponseStream
},
});
@@ -553,7 +556,7 @@ impl HostKeyValueStore for WasmState {
kv_store.insert(key, value).await.to_wasmtime_result()
}
- async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<ExtensionKeyValueStore>) -> wasmtime::Result<()> {
// We only ever hand out borrows of key-value stores.
Ok(())
}
@@ -568,7 +571,7 @@ impl HostProject for WasmState {
Ok(project.worktree_ids())
}
- async fn drop(&mut self, _project: Resource<Project>) -> Result<()> {
+ async fn drop(&mut self, _project: Resource<Project>) -> wasmtime::Result<()> {
// We only ever hand out borrows of projects.
Ok(())
}
@@ -595,7 +598,9 @@ impl HostWorktree for WasmState {
) -> wasmtime::Result<Result<String, String>> {
let delegate = self.table.get(&delegate)?;
Ok(delegate
- .read_text_file(&RelPath::new(Path::new(&path), PathStyle::Unix)?)
+ .read_text_file(
+ &RelPath::new(Path::new(&path), PathStyle::Unix).into_wasmtime_result()?,
+ )
.await
.map_err(|error| error.to_string()))
}
@@ -617,7 +622,7 @@ impl HostWorktree for WasmState {
Ok(delegate.which(binary_name).await)
}
- async fn drop(&mut self, _worktree: Resource<Worktree>) -> Result<()> {
+ async fn drop(&mut self, _worktree: Resource<Worktree>) -> wasmtime::Result<()> {
// We only ever hand out borrows of worktrees.
Ok(())
}
@@ -648,7 +653,7 @@ impl http_client::Host for WasmState {
&mut self,
request: http_client::HttpRequest,
) -> wasmtime::Result<Result<Resource<ExtensionHttpResponseStream>, String>> {
- let request = convert_request(&request)?;
+ let request = convert_request(&request).into_wasmtime_result()?;
let response = self.host.http_client.send(request);
maybe!(async {
let response = response.await?;
@@ -682,7 +687,10 @@ impl http_client::HostHttpResponseStream for WasmState {
.to_wasmtime_result()
}
- async fn drop(&mut self, _resource: Resource<ExtensionHttpResponseStream>) -> Result<()> {
+ async fn drop(
+ &mut self,
+ _resource: Resource<ExtensionHttpResponseStream>,
+ ) -> wasmtime::Result<()> {
Ok(())
}
}
@@ -787,7 +795,8 @@ impl nodejs::Host for WasmState {
version: String,
) -> wasmtime::Result<Result<(), String>> {
self.capability_granter
- .grant_npm_install_package(&package_name)?;
+ .grant_npm_install_package(&package_name)
+ .into_wasmtime_result()?;
self.host
.node_runtime
@@ -859,18 +868,20 @@ impl github::Host for WasmState {
}
impl platform::Host for WasmState {
- async fn current_platform(&mut self) -> Result<(platform::Os, platform::Architecture)> {
+ async fn current_platform(
+ &mut self,
+ ) -> wasmtime::Result<(platform::Os, platform::Architecture)> {
Ok((
match env::consts::OS {
"macos" => platform::Os::Mac,
"linux" => platform::Os::Linux,
"windows" => platform::Os::Windows,
- _ => bail!("unsupported os"),
+ _ => return Err(wasmtime::Error::msg("unsupported os")),
},
match env::consts::ARCH {
"aarch64" => platform::Architecture::Aarch64,
"x86_64" => platform::Architecture::X8664,
- _ => bail!("unsupported architecture"),
+ _ => return Err(wasmtime::Error::msg("unsupported architecture")),
},
))
}
@@ -1139,7 +1150,8 @@ impl ExtensionImports for WasmState {
let path = self
.host
.writeable_path_from_extension(&self.manifest.id, Path::new(&path))
- .await?;
+ .await
+ .into_wasmtime_result()?;
make_file_executable(&path)
.await