diff --git a/application/apps/indexer/Cargo.lock b/application/apps/indexer/Cargo.lock index 3dd533e8d..1b5b1f121 100644 --- a/application/apps/indexer/Cargo.lock +++ b/application/apps/indexer/Cargo.lock @@ -844,18 +844,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac89549be94911dd0e839b4a7db99e9ed29c17517e1c026f61066884c168aa3c" +checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bd49369f76c77e34e641af85d0956869237832c118964d08bf5f51f210875a" +checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34" dependencies = [ "serde", "serde_derive", @@ -863,9 +863,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd96ce9cf8efebd7f5ab8ced5a0ce44250280bbae9f593d74a6d7effc3582a35" +checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e" dependencies = [ "bumpalo", "cranelift-bforest", @@ -887,33 +887,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a68e358827afe4bfb6239fcbf6fbd5ac56206ece8a99c8f5f9bbd518773281a" +checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e184c9767afbe73d50c55ec29abcf4c32f9baf0d9d22b86d58c4d55e06dee181" +checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb" [[package]] name = "cranelift-control" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7664f2a66f053e33f149e952bb5971d138e3af637f5097727ed6dc0ed95dd" +checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118597e3a9cf86c3556fa579a7a23b955fa18231651a52a77a2475d305a9cf84" +checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323" dependencies = [ "cranelift-bitset", "serde", @@ -922,9 +922,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7638ea1efb069a0aa18d8ee67401b6b0d19f6bfe5de5e9ede348bfc80bb0d8c7" +checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57" dependencies = [ "cranelift-codegen", "log", @@ -934,15 +934,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c53e1152a0b01c4ed2b1e0535602b8e86458777dd9d18b28732b16325c7dc0" +checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d" [[package]] name = "cranelift-native" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7d8f895444fa52dd7bdd0bed11bf007a7fb43af65a6deac8fcc4094c6372f7" +checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7" dependencies = [ "cranelift-codegen", "libc", @@ -3003,13 +3003,14 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403a1a95f4c18a45c86c7bff13df00347afd0abcbf2e54af273c837339ffcf77" +checksum = "62d95f8575df49a2708398182f49a888cf9dc30210fb1fd2df87c889edcee75d" dependencies = [ "cranelift-bitset", "log", "sptr", + "wasmtime-math", ] [[package]] @@ -3722,9 +3723,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.16" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77" [[package]] name = "tempfile" @@ -4026,6 +4027,17 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "trait-variant" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ts-rs" version = "10.1.0" @@ -4336,9 +4348,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639ecae347b9a2227e453a7b7671e84370a0b61f47a15e0390fe9b7725e47b3" +checksum = "11976a250672556d1c4c04c6d5d7656ac9192ac9edc42a4587d6c21460010e69" dependencies = [ "addr2line", "anyhow", @@ -4354,7 +4366,6 @@ dependencies = [ "indexmap", "ittapi", "libc", - "libm", "log", "mach2", "memfd", @@ -4373,6 +4384,7 @@ dependencies = [ "smallvec", "sptr", "target-lexicon", + "trait-variant", "wasm-encoder 0.221.2", "wasmparser 0.221.2", "wasmtime-asm-macros", @@ -4384,6 +4396,7 @@ dependencies = [ "wasmtime-fiber", "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", + "wasmtime-math", "wasmtime-slab", "wasmtime-versioned-export-macros", "wasmtime-winch", @@ -4393,18 +4406,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a18800471cfc063c8b3ccf75723784acc3fd534009ac09421f2fac2fcdcec" +checksum = "1f178b0d125201fbe9f75beaf849bd3e511891f9e45ba216a5b620802ccf64f2" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368d974999abe6095341da9b9e2c0908a6272e796001e06b7022ad60b2d19710" +checksum = "8b1161c8f62880deea07358bc40cceddc019f1c81d46007bc390710b2fe24ffc" dependencies = [ "anyhow", "base64", @@ -4422,9 +4435,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5c0a77c9e1927c3d471f53cc13767c3d3438e5d5ffd394e3eb31c86445fd60" +checksum = "d74de6592ed945d0a602f71243982a304d5d02f1e501b638addf57f42d57dfaf" dependencies = [ "anyhow", "proc-macro2", @@ -4437,15 +4450,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43702ca98bf5162eca0573db691ed9ecd36d716f8c6688410fe26ec16b6f9bcb" +checksum = "707dc7b3c112ab5a366b30cfe2fb5b2f8e6a0f682f16df96a5ec582bfe6f056e" [[package]] name = "wasmtime-cranelift" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20070aa5b75080a8932ec328419faf841df2bc6ceb16b55b0df2b952098392a2" +checksum = "366be722674d4bf153290fbcbc4d7d16895cc82fb3e869f8d550ff768f9e9e87" dependencies = [ "anyhow", "cfg-if", @@ -4468,9 +4481,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2604ddb24879d4dc1dedcb7081d7a8e017259bce916fdae097a97db52cbaab80" +checksum = "cdadc1af7097347aa276a4f008929810f726b5b46946971c660b6d421e9994ad" dependencies = [ "anyhow", "cpp_demangle", @@ -4495,9 +4508,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98593412d2b167ebe2b59d4a17a184978a72f976b53b3a0ec05629451079ac1d" +checksum = "ccba90d4119f081bca91190485650730a617be1fff5228f8c4757ce133d21117" dependencies = [ "anyhow", "cc", @@ -4510,9 +4523,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2caed0122664573c2bbcde649515f9e1bc783b14f2ba74b999720cf0225e234d" +checksum = "3e7b61488a5ee00c35c8c22de707c36c0aecacf419a3be803a6a2ba5e860f56a" dependencies = [ "object", "rustix", @@ -4521,9 +4534,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40d7722b9e1fbeae135715710a8a2570b1e6cf72b74dd653962d89831c6c70d" +checksum = "ec5e8552e01692e6c2e5293171704fed8abdec79d1a6995a0870ab190e5747d1" dependencies = [ "anyhow", "cfg-if", @@ -4531,17 +4544,26 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "wasmtime-math" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29210ec2aa25e00f4d54605cedaf080f39ec01a872c5bd520ad04c67af1dde17" +dependencies = [ + "libm", +] + [[package]] name = "wasmtime-slab" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8579c335220b4ece9aa490a0e8b46de78cd342b195ab21ff981d095e14b52383" +checksum = "fcb5821a96fa04ac14bc7b158bb3d5cd7729a053db5a74dad396cd513a5e5ccf" [[package]] name = "wasmtime-versioned-export-macros" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7de0a56fb0a69b185968f2d7a9ba54750920a806470dff7ad8de91ac06d277e" +checksum = "86ff86db216dc0240462de40c8290887a613dddf9685508eb39479037ba97b5b" dependencies = [ "proc-macro2", "quote", @@ -4550,9 +4572,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d557dc5783b9ee7e8db1c6b0d4a9103b676f1ab7fcbb30c7e86f307a8cae04a" +checksum = "8d1be69bfcab1bdac74daa7a1f9695ab992b9c8e21b9b061e7d66434097e0ca4" dependencies = [ "anyhow", "async-trait", @@ -4572,6 +4594,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tracing", + "trait-variant", "url", "wasmtime", "wiggle", @@ -4580,9 +4603,9 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd309943c443f5590d12f9aba9ba63c481091c955a0a14de0c2a9e0e3aaeca9" +checksum = "fdbabfb8f20502d5e1d81092b9ead3682ae59988487aafcd7567387b7a43cf8f" dependencies = [ "anyhow", "cranelift-codegen", @@ -4597,9 +4620,9 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969f83022dac3435d6469edb582ceed04cfe32aa44dc3ef16e5cb55574633df8" +checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6" dependencies = [ "anyhow", "heck 0.5.0", @@ -4660,9 +4683,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bccfa2095b348aa6de0efcc4c621ba14d6ecc2371433232f337b1d2f089fa3" +checksum = "4b9af35bc9629c52c261465320a9a07959164928b4241980ba1cf923b9e6751d" dependencies = [ "anyhow", "async-trait", @@ -4675,9 +4698,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1fda112fc9de89fc4af51ea8b4c8e745ce1f01cd19f08c36c37aa11563ad41" +checksum = "2cf267dd05673912c8138f4b54acabe6bd53407d9d1536f0fadb6520dd16e101" dependencies = [ "anyhow", "heck 0.5.0", @@ -4690,9 +4713,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9a143339de27ff05ce30366c58b741afb38c803b5ffb68e9546fd2e0629c4a" +checksum = "08c5c473d4198e6c2d377f3809f713ff0c110cab88a0805ae099a82119ee250c" dependencies = [ "proc-macro2", "quote", @@ -4733,9 +4756,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9110decc2983ed94de904804dcd979ba59cbabc78a94fec6b1d8468ec513d0f6" +checksum = "2f849ef2c5f46cb0a20af4b4487aaa239846e52e2c03f13fa3c784684552859c" dependencies = [ "anyhow", "cranelift-codegen", @@ -4743,6 +4766,7 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", + "thiserror 1.0.69", "wasmparser 0.221.2", "wasmtime-cranelift", "wasmtime-environ", diff --git a/application/apps/indexer/plugins_host/Cargo.toml b/application/apps/indexer/plugins_host/Cargo.toml index 8ad6e46f3..32af37290 100644 --- a/application/apps/indexer/plugins_host/Cargo.toml +++ b/application/apps/indexer/plugins_host/Cargo.toml @@ -13,8 +13,8 @@ log.workspace = true dirs.workspace = true toml.workspace = true -wasmtime = "28.0" -wasmtime-wasi = "28.0" +wasmtime = "29.0" +wasmtime-wasi = "29.0" parsers = { path = "../parsers" } sources = { path = "../sources" } diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs index 4147e7710..df2dafdb2 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs @@ -1,16 +1,17 @@ use std::io; -use crate::PluginGuestInitError; - -pub use self::chipmunk::plugin::{bytesource_types, shared_types}; -use self::shared_types::{ConfigItem, ConfigSchemaItem, ConfigSchemaType, ConfigValue, Version}; +pub use self::chipmunk::bytesource::bytesource_types; wasmtime::component::bindgen!({ - path: "../plugins_api/wit/v_0.1.0/", - world: "bytesource-plugin", + path: "../plugins_api/wit/v0.1.0", + world: "chipmunk:bytesource/bytesource", async: { only_imports: [], }, + with: { + "chipmunk:shared/logging@0.1.0": crate::v0_1_0::shared::logging, + "chipmunk:shared/shared-types@0.1.0": crate::v0_1_0::shared::shared_types, + } }); impl From<&stypes::PluginByteSourceGeneralSettings> for bytesource_types::SourceConfig { @@ -19,7 +20,7 @@ impl From<&stypes::PluginByteSourceGeneralSettings> for bytesource_types::Source // functionality to log the message from the plugins. let current_log_level = log::max_level().to_level().unwrap_or(log::Level::Error); - use chipmunk::plugin::logging::Level as PlugLevel; + use crate::v0_1_0::shared::logging::Level as PlugLevel; let level = match current_log_level { log::Level::Error => PlugLevel::Error, log::Level::Warn => PlugLevel::Warn, @@ -32,93 +33,15 @@ impl From<&stypes::PluginByteSourceGeneralSettings> for bytesource_types::Source } } -impl From for PluginGuestInitError { - fn from(value: shared_types::InitError) -> Self { - use shared_types::InitError as E; - use PluginGuestInitError as GuestE; - match value { - E::Config(msg) => GuestE::Config(msg), - E::Io(msg) => GuestE::IO(msg), - E::Unsupported(msg) => GuestE::Unsupported(msg), - E::Other(msg) => GuestE::Other(msg), - } - } -} - impl From for io::Error { fn from(value: bytesource_types::SourceError) -> Self { use bytesource_types::SourceError as E; let msg = match value { E::Io(msg) => format!("IO Error from bytesoruce plugin. Error: {msg}"), - E::Unsupported => String::from("Unsupported Error from bytesource plugin"), + E::Unsupported(msg) => format!("Unsupported Error from bytesource plugin: {msg}"), E::Other(msg) => format!("Unknown Error from bytesoruce plugin. Error: {msg}"), }; io::Error::new(io::ErrorKind::Other, msg) } } - -use stypes::PluginConfigValue as HostConfValue; -impl From for ConfigValue { - fn from(value: HostConfValue) -> Self { - match value { - HostConfValue::Boolean(val) => ConfigValue::Boolean(val), - HostConfValue::Integer(val) => ConfigValue::Integer(val), - HostConfValue::Float(val) => ConfigValue::Float(val), - HostConfValue::Text(val) => ConfigValue::Text(val), - HostConfValue::Files(val) => ConfigValue::Files( - val.into_iter() - .map(|p| p.to_string_lossy().to_string()) - .collect(), - ), - HostConfValue::Directories(val) => ConfigValue::Directories( - val.into_iter() - .map(|p| p.to_string_lossy().to_string()) - .collect(), - ), - HostConfValue::Dropdown(val) => ConfigValue::Dropdown(val), - } - } -} - -impl From for ConfigItem { - fn from(item: stypes::PluginConfigItem) -> Self { - Self { - id: item.id, - value: item.value.into(), - } - } -} - -use stypes::PluginConfigSchemaType as HostSchemaType; -use stypes::SemanticVersion; -impl From for HostSchemaType { - fn from(value: ConfigSchemaType) -> Self { - match value { - ConfigSchemaType::Boolean => HostSchemaType::Boolean, - ConfigSchemaType::Integer => HostSchemaType::Integer, - ConfigSchemaType::Float => HostSchemaType::Float, - ConfigSchemaType::Text => HostSchemaType::Text, - ConfigSchemaType::Directories => HostSchemaType::Directories, - ConfigSchemaType::Files(exts) => HostSchemaType::Files(exts), - ConfigSchemaType::Dropdown(items) => HostSchemaType::Dropdown(items), - } - } -} - -impl From for stypes::PluginConfigSchemaItem { - fn from(item: ConfigSchemaItem) -> Self { - Self { - id: item.id, - title: item.title, - description: item.description, - input_type: item.input_type.into(), - } - } -} - -impl From for SemanticVersion { - fn from(value: Version) -> Self { - Self::new(value.major, value.minor, value.patch) - } -} diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs index 5003068ff..3cc35fac2 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs @@ -2,8 +2,7 @@ use wasmtime_wasi::{ResourceTable, WasiCtx, WasiView}; use super::bindings::{ bytesource_types::{self, Level}, - chipmunk::plugin::logging, - shared_types, + chipmunk::shared::{logging, shared_types}, }; pub struct ByteSourcePluginState { diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs index a3c41d86c..13726a269 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs @@ -3,7 +3,7 @@ mod bytesource_plugin_state; use std::io; -use bindings::BytesourcePlugin; +use bindings::Bytesource; use bytesource_plugin_state::ByteSourcePluginState; use stypes::{RenderOptions, SemanticVersion}; use wasmtime::{ @@ -20,7 +20,7 @@ use crate::{ pub struct PluginByteSource { store: Store, - plugin_bindings: BytesourcePlugin, + plugin_bindings: Bytesource, } impl PluginByteSource { @@ -51,14 +51,14 @@ impl PluginByteSource { let mut linker: Linker = Linker::new(engine); wasmtime_wasi::add_to_linker_async(&mut linker)?; - BytesourcePlugin::add_to_linker(&mut linker, |state| state)?; + Bytesource::add_to_linker(&mut linker, |state| state)?; let resource_table = ResourceTable::new(); let mut store = Store::new(engine, ByteSourcePluginState::new(ctx, resource_table)); let plugin_bindings = - BytesourcePlugin::instantiate_async(&mut store, &component, &linker).await?; + Bytesource::instantiate_async(&mut store, &component, &linker).await?; Ok(Self { store, @@ -81,7 +81,7 @@ impl PluginByteSource { byte_source .plugin_bindings - .chipmunk_plugin_byte_source() + .chipmunk_bytesource_byte_source() .call_init( &mut byte_source.store, general_config.into(), @@ -100,7 +100,7 @@ impl PluginByteSource { ) -> Result, PluginError> { let schemas = self .plugin_bindings - .chipmunk_plugin_byte_source() + .chipmunk_bytesource_byte_source() .call_get_config_schemas(&mut self.store) .await?; @@ -110,7 +110,7 @@ impl PluginByteSource { pub async fn plugin_version(&mut self) -> Result { let version = self .plugin_bindings - .chipmunk_plugin_byte_source() + .chipmunk_bytesource_byte_source() .call_get_version(&mut self.store) .await?; @@ -120,7 +120,7 @@ impl PluginByteSource { pub async fn read_next(&mut self, len: usize) -> io::Result> { let bytes_result = self .plugin_bindings - .chipmunk_plugin_byte_source() + .chipmunk_bytesource_byte_source() .call_read(&mut self.store, len as u64) .await .map_err(|err| { diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/mod.rs b/application/apps/indexer/plugins_host/src/v0_1_0/mod.rs index 24d695da1..e1d9f25e8 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/mod.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/mod.rs @@ -1,2 +1,3 @@ pub mod bytesource; pub mod parser; +pub mod shared; diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs b/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs index c93c96d5d..dc06621cc 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs @@ -1,15 +1,19 @@ -use crate::{parser_shared::COLUMN_SEP, PluginGuestInitError, PluginParseMessage}; +use crate::{parser_shared::COLUMN_SEP, PluginParseMessage}; -pub use self::chipmunk::plugin::{parse_types::*, shared_types::*}; +pub use self::chipmunk::parser::parse_types::*; -use stypes::{ParserRenderOptions, PluginConfigValue as HostConfValue, SemanticVersion}; +use stypes::ParserRenderOptions; wasmtime::component::bindgen!({ - path: "../plugins_api/wit/v_0.1.0/", - world: "parse-plugin", + path: "../plugins_api/wit/v0.1.0", + world: "chipmunk:parser/parse", async: { only_imports: [], }, + with: { + "chipmunk:shared/logging@0.1.0": crate::v0_1_0::shared::logging, + "chipmunk:shared/shared-types@0.1.0": crate::v0_1_0::shared::shared_types, + } }); impl From<&stypes::PluginParserGeneralSettings> for ParserConfig { @@ -18,7 +22,7 @@ impl From<&stypes::PluginParserGeneralSettings> for ParserConfig { // functionality to log the message from the plugins. let current_log_level = log::max_level().to_level().unwrap_or(log::Level::Error); - use chipmunk::plugin::logging::Level as PlugLevel; + use crate::v0_1_0::shared::logging::Level as PlugLevel; let level = match current_log_level { log::Level::Error => PlugLevel::Error, log::Level::Warn => PlugLevel::Warn, @@ -31,18 +35,6 @@ impl From<&stypes::PluginParserGeneralSettings> for ParserConfig { } } -impl From for PluginGuestInitError { - fn from(value: InitError) -> Self { - use PluginGuestInitError as GuestErr; - match value { - InitError::Config(msg) => GuestErr::Config(msg), - InitError::Io(msg) => GuestErr::IO(msg), - InitError::Unsupported(msg) => GuestErr::Unsupported(msg), - InitError::Other(msg) => GuestErr::Other(msg), - } - } -} - use parsers as p; impl From for p::ParseYield { @@ -92,69 +84,6 @@ impl From for PluginParseMessage { } } -impl From for ConfigValue { - fn from(value: HostConfValue) -> Self { - match value { - HostConfValue::Boolean(val) => ConfigValue::Boolean(val), - HostConfValue::Integer(val) => ConfigValue::Integer(val), - HostConfValue::Float(val) => ConfigValue::Float(val), - HostConfValue::Text(val) => ConfigValue::Text(val), - HostConfValue::Files(val) => ConfigValue::Files( - val.into_iter() - .map(|p| p.to_string_lossy().to_string()) - .collect(), - ), - HostConfValue::Directories(val) => ConfigValue::Directories( - val.into_iter() - .map(|p| p.to_string_lossy().to_string()) - .collect(), - ), - HostConfValue::Dropdown(val) => ConfigValue::Dropdown(val), - } - } -} - -impl From for ConfigItem { - fn from(item: stypes::PluginConfigItem) -> Self { - Self { - id: item.id, - value: item.value.into(), - } - } -} - -use stypes::PluginConfigSchemaType as HostSchemaType; -impl From for HostSchemaType { - fn from(value: ConfigSchemaType) -> Self { - match value { - ConfigSchemaType::Boolean => HostSchemaType::Boolean, - ConfigSchemaType::Integer => HostSchemaType::Integer, - ConfigSchemaType::Float => HostSchemaType::Float, - ConfigSchemaType::Text => HostSchemaType::Text, - ConfigSchemaType::Directories => HostSchemaType::Directories, - ConfigSchemaType::Files(exts) => HostSchemaType::Files(exts), - ConfigSchemaType::Dropdown(items) => HostSchemaType::Dropdown(items), - } - } -} - -impl From for stypes::PluginConfigSchemaItem { - fn from(item: ConfigSchemaItem) -> Self { - Self { - id: item.id, - title: item.title, - description: item.description, - input_type: item.input_type.into(), - } - } -} - -impl From for SemanticVersion { - fn from(value: Version) -> Self { - Self::new(value.major, value.minor, value.patch) - } -} - impl From for ParserRenderOptions { fn from(value: RenderOptions) -> Self { Self { diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs b/application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs index cbb3e25dd..ba3446f54 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs @@ -15,11 +15,11 @@ use crate::{ PluginGuestInitError, PluginHostInitError, PluginParseMessage, }; -use self::{bindings::ParsePlugin, parser_plugin_state::ParserPluginState}; +use self::{bindings::Parse, parser_plugin_state::ParserPluginState}; pub struct PluginParser { store: Store, - plugin_bindings: ParsePlugin, + plugin_bindings: Parse, } impl PluginParser { @@ -50,14 +50,13 @@ impl PluginParser { let mut linker: Linker = Linker::new(engine); wasmtime_wasi::add_to_linker_async(&mut linker)?; - ParsePlugin::add_to_linker(&mut linker, |state| state)?; + Parse::add_to_linker(&mut linker, |state| state)?; let resource_table = ResourceTable::new(); let mut store = Store::new(engine, ParserPluginState::new(ctx, resource_table)); - let plugin_bindings = - ParsePlugin::instantiate_async(&mut store, &component, &linker).await?; + let plugin_bindings = Parse::instantiate_async(&mut store, &component, &linker).await?; Ok(Self { store, @@ -81,7 +80,7 @@ impl PluginParser { parser .plugin_bindings - .chipmunk_plugin_parser() + .chipmunk_parser_parser() .call_init(&mut parser.store, general_config.into(), &plugin_configs) .await? .map_err(|guest_err| { @@ -96,7 +95,7 @@ impl PluginParser { ) -> Result, PluginError> { let schemas = self .plugin_bindings - .chipmunk_plugin_parser() + .chipmunk_parser_parser() .call_get_config_schemas(&mut self.store) .await?; @@ -106,7 +105,7 @@ impl PluginParser { pub async fn plugin_version(&mut self) -> Result { let version = self .plugin_bindings - .chipmunk_plugin_parser() + .chipmunk_parser_parser() .call_get_version(&mut self.store) .await?; @@ -116,7 +115,7 @@ impl PluginParser { pub async fn get_render_options(&mut self) -> Result { let options = self .plugin_bindings - .chipmunk_plugin_parser() + .chipmunk_parser_parser() .call_get_render_options(&mut self.store) .await?; @@ -132,7 +131,7 @@ impl p::Parser for PluginParser { timestamp: Option, ) -> Result>)>, p::Error> { - let call_res = block_on(self.plugin_bindings.chipmunk_plugin_parser().call_parse( + let call_res = block_on(self.plugin_bindings.chipmunk_parser_parser().call_parse( &mut self.store, input, timestamp, diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs b/application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs index 676a11c3d..e5bf2f533 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs +++ b/application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs @@ -1,8 +1,9 @@ use wasmtime_wasi::{ResourceTable, WasiCtx, WasiView}; -use super::bindings::chipmunk::plugin::{ +use super::bindings::chipmunk::parser::parse_types; +use super::bindings::chipmunk::shared::{ logging::{self, Level}, - parse_types, shared_types, + shared_types, }; pub struct ParserPluginState { diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs b/application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs new file mode 100644 index 000000000..b6b4d350e --- /dev/null +++ b/application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs @@ -0,0 +1,92 @@ +use self::chipmunk::shared::shared_types::{ + ConfigItem, ConfigSchemaItem, ConfigSchemaType, ConfigValue, InitError, Version, +}; +use crate::PluginGuestInitError; +use stypes::{ + PluginConfigSchemaType as HostSchemaType, PluginConfigValue as HostConfValue, + SemanticVersion as HostVersion, +}; +wasmtime::component::bindgen!({ + path: "../plugins_api/wit/v0.1.0", + // TODO AAZ: This is workaround because referencing bindings world won't generate + // the types which aren't referenced in functions in the same world. + world: "chipmunk:parser/parse", + // world: "chipmunk:shared/bindings", + async: { + only_imports: [], + } +}); + +impl From for PluginGuestInitError { + fn from(value: InitError) -> Self { + use PluginGuestInitError as GuestErr; + match value { + InitError::Config(msg) => GuestErr::Config(msg), + InitError::Io(msg) => GuestErr::IO(msg), + InitError::Unsupported(msg) => GuestErr::Unsupported(msg), + InitError::Other(msg) => GuestErr::Other(msg), + } + } +} + +impl From for ConfigValue { + fn from(value: HostConfValue) -> Self { + match value { + HostConfValue::Boolean(val) => ConfigValue::Boolean(val), + HostConfValue::Integer(val) => ConfigValue::Integer(val), + HostConfValue::Float(val) => ConfigValue::Float(val), + HostConfValue::Text(val) => ConfigValue::Text(val), + HostConfValue::Files(val) => ConfigValue::Files( + val.into_iter() + .map(|p| p.to_string_lossy().to_string()) + .collect(), + ), + HostConfValue::Directories(val) => ConfigValue::Directories( + val.into_iter() + .map(|p| p.to_string_lossy().to_string()) + .collect(), + ), + HostConfValue::Dropdown(val) => ConfigValue::Dropdown(val), + } + } +} + +impl From for ConfigItem { + fn from(item: stypes::PluginConfigItem) -> Self { + Self { + id: item.id, + value: item.value.into(), + } + } +} + +impl From for HostSchemaType { + fn from(value: ConfigSchemaType) -> Self { + match value { + ConfigSchemaType::Boolean => HostSchemaType::Boolean, + ConfigSchemaType::Integer => HostSchemaType::Integer, + ConfigSchemaType::Float => HostSchemaType::Float, + ConfigSchemaType::Text => HostSchemaType::Text, + ConfigSchemaType::Directories => HostSchemaType::Directories, + ConfigSchemaType::Files(exts) => HostSchemaType::Files(exts), + ConfigSchemaType::Dropdown(items) => HostSchemaType::Dropdown(items), + } + } +} + +impl From for stypes::PluginConfigSchemaItem { + fn from(item: ConfigSchemaItem) -> Self { + Self { + id: item.id, + title: item.title, + description: item.description, + input_type: item.input_type.into(), + } + } +} + +impl From for HostVersion { + fn from(value: Version) -> Self { + Self::new(value.major, value.minor, value.patch) + } +} diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/shared/mod.rs b/application/apps/indexer/plugins_host/src/v0_1_0/shared/mod.rs new file mode 100644 index 000000000..f1d2df7f9 --- /dev/null +++ b/application/apps/indexer/plugins_host/src/v0_1_0/shared/mod.rs @@ -0,0 +1,4 @@ +mod bindings; + +pub use bindings::chipmunk::shared::logging; +pub use bindings::chipmunk::shared::shared_types; diff --git a/application/apps/rustcore/rs-bindings/Cargo.lock b/application/apps/rustcore/rs-bindings/Cargo.lock index af885a835..0afb22eea 100644 --- a/application/apps/rustcore/rs-bindings/Cargo.lock +++ b/application/apps/rustcore/rs-bindings/Cargo.lock @@ -645,18 +645,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac89549be94911dd0e839b4a7db99e9ed29c17517e1c026f61066884c168aa3c" +checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bd49369f76c77e34e641af85d0956869237832c118964d08bf5f51f210875a" +checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34" dependencies = [ "serde", "serde_derive", @@ -664,9 +664,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd96ce9cf8efebd7f5ab8ced5a0ce44250280bbae9f593d74a6d7effc3582a35" +checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e" dependencies = [ "bumpalo", "cranelift-bforest", @@ -688,33 +688,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a68e358827afe4bfb6239fcbf6fbd5ac56206ece8a99c8f5f9bbd518773281a" +checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e184c9767afbe73d50c55ec29abcf4c32f9baf0d9d22b86d58c4d55e06dee181" +checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb" [[package]] name = "cranelift-control" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7664f2a66f053e33f149e952bb5971d138e3af637f5097727ed6dc0ed95dd" +checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118597e3a9cf86c3556fa579a7a23b955fa18231651a52a77a2475d305a9cf84" +checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323" dependencies = [ "cranelift-bitset", "serde", @@ -723,9 +723,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7638ea1efb069a0aa18d8ee67401b6b0d19f6bfe5de5e9ede348bfc80bb0d8c7" +checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57" dependencies = [ "cranelift-codegen", "log", @@ -735,15 +735,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c53e1152a0b01c4ed2b1e0535602b8e86458777dd9d18b28732b16325c7dc0" +checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d" [[package]] name = "cranelift-native" -version = "0.115.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7d8f895444fa52dd7bdd0bed11bf007a7fb43af65a6deac8fcc4094c6372f7" +checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7" dependencies = [ "cranelift-codegen", "libc", @@ -2618,13 +2618,14 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403a1a95f4c18a45c86c7bff13df00347afd0abcbf2e54af273c837339ffcf77" +checksum = "62d95f8575df49a2708398182f49a888cf9dc30210fb1fd2df87c889edcee75d" dependencies = [ "cranelift-bitset", "log", "sptr", + "wasmtime-math", ] [[package]] @@ -3266,9 +3267,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.16" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77" [[package]] name = "tempfile" @@ -3547,6 +3548,17 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "trait-variant" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "typemap-ors" version = "1.0.0" @@ -3831,9 +3843,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639ecae347b9a2227e453a7b7671e84370a0b61f47a15e0390fe9b7725e47b3" +checksum = "11976a250672556d1c4c04c6d5d7656ac9192ac9edc42a4587d6c21460010e69" dependencies = [ "addr2line", "anyhow", @@ -3849,7 +3861,6 @@ dependencies = [ "indexmap", "ittapi", "libc", - "libm", "log", "mach2", "memfd", @@ -3868,6 +3879,7 @@ dependencies = [ "smallvec", "sptr", "target-lexicon", + "trait-variant", "wasm-encoder 0.221.2", "wasmparser 0.221.2", "wasmtime-asm-macros", @@ -3879,6 +3891,7 @@ dependencies = [ "wasmtime-fiber", "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", + "wasmtime-math", "wasmtime-slab", "wasmtime-versioned-export-macros", "wasmtime-winch", @@ -3888,18 +3901,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a18800471cfc063c8b3ccf75723784acc3fd534009ac09421f2fac2fcdcec" +checksum = "1f178b0d125201fbe9f75beaf849bd3e511891f9e45ba216a5b620802ccf64f2" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368d974999abe6095341da9b9e2c0908a6272e796001e06b7022ad60b2d19710" +checksum = "8b1161c8f62880deea07358bc40cceddc019f1c81d46007bc390710b2fe24ffc" dependencies = [ "anyhow", "base64", @@ -3917,9 +3930,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5c0a77c9e1927c3d471f53cc13767c3d3438e5d5ffd394e3eb31c86445fd60" +checksum = "d74de6592ed945d0a602f71243982a304d5d02f1e501b638addf57f42d57dfaf" dependencies = [ "anyhow", "proc-macro2", @@ -3932,15 +3945,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43702ca98bf5162eca0573db691ed9ecd36d716f8c6688410fe26ec16b6f9bcb" +checksum = "707dc7b3c112ab5a366b30cfe2fb5b2f8e6a0f682f16df96a5ec582bfe6f056e" [[package]] name = "wasmtime-cranelift" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20070aa5b75080a8932ec328419faf841df2bc6ceb16b55b0df2b952098392a2" +checksum = "366be722674d4bf153290fbcbc4d7d16895cc82fb3e869f8d550ff768f9e9e87" dependencies = [ "anyhow", "cfg-if", @@ -3963,9 +3976,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2604ddb24879d4dc1dedcb7081d7a8e017259bce916fdae097a97db52cbaab80" +checksum = "cdadc1af7097347aa276a4f008929810f726b5b46946971c660b6d421e9994ad" dependencies = [ "anyhow", "cpp_demangle", @@ -3990,9 +4003,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98593412d2b167ebe2b59d4a17a184978a72f976b53b3a0ec05629451079ac1d" +checksum = "ccba90d4119f081bca91190485650730a617be1fff5228f8c4757ce133d21117" dependencies = [ "anyhow", "cc", @@ -4005,9 +4018,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2caed0122664573c2bbcde649515f9e1bc783b14f2ba74b999720cf0225e234d" +checksum = "3e7b61488a5ee00c35c8c22de707c36c0aecacf419a3be803a6a2ba5e860f56a" dependencies = [ "object", "rustix", @@ -4016,9 +4029,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40d7722b9e1fbeae135715710a8a2570b1e6cf72b74dd653962d89831c6c70d" +checksum = "ec5e8552e01692e6c2e5293171704fed8abdec79d1a6995a0870ab190e5747d1" dependencies = [ "anyhow", "cfg-if", @@ -4026,17 +4039,26 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "wasmtime-math" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29210ec2aa25e00f4d54605cedaf080f39ec01a872c5bd520ad04c67af1dde17" +dependencies = [ + "libm", +] + [[package]] name = "wasmtime-slab" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8579c335220b4ece9aa490a0e8b46de78cd342b195ab21ff981d095e14b52383" +checksum = "fcb5821a96fa04ac14bc7b158bb3d5cd7729a053db5a74dad396cd513a5e5ccf" [[package]] name = "wasmtime-versioned-export-macros" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7de0a56fb0a69b185968f2d7a9ba54750920a806470dff7ad8de91ac06d277e" +checksum = "86ff86db216dc0240462de40c8290887a613dddf9685508eb39479037ba97b5b" dependencies = [ "proc-macro2", "quote", @@ -4045,9 +4067,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d557dc5783b9ee7e8db1c6b0d4a9103b676f1ab7fcbb30c7e86f307a8cae04a" +checksum = "8d1be69bfcab1bdac74daa7a1f9695ab992b9c8e21b9b061e7d66434097e0ca4" dependencies = [ "anyhow", "async-trait", @@ -4067,6 +4089,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tracing", + "trait-variant", "url", "wasmtime", "wiggle", @@ -4075,9 +4098,9 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd309943c443f5590d12f9aba9ba63c481091c955a0a14de0c2a9e0e3aaeca9" +checksum = "fdbabfb8f20502d5e1d81092b9ead3682ae59988487aafcd7567387b7a43cf8f" dependencies = [ "anyhow", "cranelift-codegen", @@ -4092,9 +4115,9 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969f83022dac3435d6469edb582ceed04cfe32aa44dc3ef16e5cb55574633df8" +checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6" dependencies = [ "anyhow", "heck", @@ -4145,9 +4168,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bccfa2095b348aa6de0efcc4c621ba14d6ecc2371433232f337b1d2f089fa3" +checksum = "4b9af35bc9629c52c261465320a9a07959164928b4241980ba1cf923b9e6751d" dependencies = [ "anyhow", "async-trait", @@ -4160,9 +4183,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1fda112fc9de89fc4af51ea8b4c8e745ce1f01cd19f08c36c37aa11563ad41" +checksum = "2cf267dd05673912c8138f4b54acabe6bd53407d9d1536f0fadb6520dd16e101" dependencies = [ "anyhow", "heck", @@ -4175,9 +4198,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9a143339de27ff05ce30366c58b741afb38c803b5ffb68e9546fd2e0629c4a" +checksum = "08c5c473d4198e6c2d377f3809f713ff0c110cab88a0805ae099a82119ee250c" dependencies = [ "proc-macro2", "quote", @@ -4218,9 +4241,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "28.0.0" +version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9110decc2983ed94de904804dcd979ba59cbabc78a94fec6b1d8468ec513d0f6" +checksum = "2f849ef2c5f46cb0a20af4b4487aaa239846e52e2c03f13fa3c784684552859c" dependencies = [ "anyhow", "cranelift-codegen", @@ -4228,6 +4251,7 @@ dependencies = [ "regalloc2", "smallvec", "target-lexicon", + "thiserror 1.0.69", "wasmparser 0.221.2", "wasmtime-cranelift", "wasmtime-environ",