From f55aa2481126241c0067d3d46381ab567da6f9e3 Mon Sep 17 00:00:00 2001 From: johnpyp Date: Tue, 28 Nov 2023 16:02:36 -0800 Subject: [PATCH] new: Use temporary, backported trivial caching implemention in extism Results in significant tool resolution performance gains. In my testing, trivial calling of `node` goes from ~100ms to ~18.5ms. No config change is needed, wasmtime will do the caching transparently in the background. Tested on linux, not sure how or if it'll work on Windows. --- Cargo.lock | 21 ++++++++++++++------- Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 159ede78c..678533245 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1104,11 +1104,10 @@ dependencies = [ [[package]] name = "extism" version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e81d3e7d1592412579984e773bd553703a664bbfb1ddded742bf6dfae63847" +source = "git+https://github.com/extism/extism.git?branch=backport-cache#66c3c78c56be262e9bdf38a32272a2b43b9a69b8" dependencies = [ "anyhow", - "extism-manifest", + "extism-manifest 0.5.0 (git+https://github.com/extism/extism.git?branch=backport-cache)", "extism-runtime", "log", "serde_json", @@ -1125,6 +1124,15 @@ dependencies = [ "serde", ] +[[package]] +name = "extism-manifest" +version = "0.5.0" +source = "git+https://github.com/extism/extism.git?branch=backport-cache#66c3c78c56be262e9bdf38a32272a2b43b9a69b8" +dependencies = [ + "base64 0.21.0", + "serde", +] + [[package]] name = "extism-pdk" version = "0.3.4" @@ -1133,7 +1141,7 @@ checksum = "09c20fe9cafa572607e22192bf2040849e7456664895bdc589c89387876e2067" dependencies = [ "anyhow", "base64 0.21.0", - "extism-manifest", + "extism-manifest 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "extism-pdk-derive", "rmp-serde", "serde", @@ -1154,12 +1162,11 @@ dependencies = [ [[package]] name = "extism-runtime" version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126b884cfa74fc386eedff1095bac8ef6c2ae5efdb656e508f12a41434d0bf0c" +source = "git+https://github.com/extism/extism.git?branch=backport-cache#66c3c78c56be262e9bdf38a32272a2b43b9a69b8" dependencies = [ "anyhow", "cbindgen", - "extism-manifest", + "extism-manifest 0.5.0 (git+https://github.com/extism/extism.git?branch=backport-cache)", "glob", "libc", "log", diff --git a/Cargo.toml b/Cargo.toml index d40c04ae0..6d4cfc31b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ cached = "0.46.1" clap = "4.4.8" clap_complete = "4.4.4" convert_case = "0.6.0" -extism = { version = "0.5.4" } +extism = { git = "https://github.com/extism/extism.git", branch = "backport-cache"} extism-pdk = "0.3.4" human-sort = "0.2.2" miette = "5.10.0"