From b14858ee557db5b5433806b8268624c551f21b5a Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Fri, 31 Mar 2023 22:19:03 -1000 Subject: [PATCH 1/8] Empty implementation of registration function. --- crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/impl.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index 8adc5b9b3bb8..d5b31d7cef3a 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit 8adc5b9b3bb8f885d44f55b464718e24af892c94 +Subproject commit d5b31d7cef3a8cf482a8710d724fbcd72aeb5ae8 diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index 0f8da5247a7b..08a7af60660f 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -1,4 +1,5 @@ //! Implements the wasi-nn API. +use openvino::TensorDesc; use crate::ctx::WasiNnResult as Result; use crate::witx::types::{ ExecutionTarget, Graph, GraphBuilderArray, GraphEncoding, GraphExecutionContext, Tensor, @@ -41,6 +42,14 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(graph_id) } + fn register( + &mut self, + url: &GuestPtr<'_, u8>, + name: &GuestPtr<'_, u8>, + ) -> Result<()> { + Ok(()) + } + fn init_execution_context(&mut self, graph_id: Graph) -> Result { let exec_context = if let Some(graph) = self.graphs.get_mut(graph_id) { graph.init_execution_context()? From 689e58623b8cc4c3cc4e9f9c9331e45991204b48 Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Sun, 2 Apr 2023 15:38:34 -1000 Subject: [PATCH 2/8] Implementation for spec changes associatied with WebAssembly/wasi-nn#36 This also updates wasmtime to use the latest version of the wasi-nn spec instead of older commit. --- crates/wasi-nn/Cargo.toml | 1 + crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/api.rs | 6 +++ crates/wasi-nn/src/ctx.rs | 11 ++++- crates/wasi-nn/src/impl.rs | 89 ++++++++++++++++++++++++++++++++-- crates/wasi-nn/src/openvino.rs | 27 ++++++++++- crates/wasi-nn/src/witx.rs | 2 +- 7 files changed, 129 insertions(+), 9 deletions(-) diff --git a/crates/wasi-nn/Cargo.toml b/crates/wasi-nn/Cargo.toml index a778a4bf62a9..b556fd4e9677 100644 --- a/crates/wasi-nn/Cargo.toml +++ b/crates/wasi-nn/Cargo.toml @@ -19,6 +19,7 @@ wiggle = { workspace = true } # These dependencies are necessary for the wasi-nn implementation: openvino = { version = "0.4.2", features = ["runtime-linking"] } thiserror = { workspace = true } +dashmap = "5.4.0" [build-dependencies] walkdir = "2.3" diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index d5b31d7cef3a..f7dc344e6603 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit d5b31d7cef3a8cf482a8710d724fbcd72aeb5ae8 +Subproject commit f7dc344e6603649e2534fe38468a8fc71b001090 diff --git a/crates/wasi-nn/src/api.rs b/crates/wasi-nn/src/api.rs index 2ad6e0edf94e..83774474d6b0 100644 --- a/crates/wasi-nn/src/api.rs +++ b/crates/wasi-nn/src/api.rs @@ -14,6 +14,12 @@ pub(crate) trait Backend: Send + Sync { builders: &GraphBuilderArray<'_>, target: ExecutionTarget, ) -> Result, BackendError>; + + fn load_from_bytes( + &mut self, + model_bytes: &Vec>, + target: ExecutionTarget, + ) -> Result, BackendError>; } /// A [BackendGraph] can create [BackendExecutionContext]s; this is the backing diff --git a/crates/wasi-nn/src/ctx.rs b/crates/wasi-nn/src/ctx.rs index 988bc27bcb03..1dd2e7f8280e 100644 --- a/crates/wasi-nn/src/ctx.rs +++ b/crates/wasi-nn/src/ctx.rs @@ -3,9 +3,10 @@ use crate::api::{Backend, BackendError, BackendExecutionContext, BackendGraph}; use crate::openvino::OpenvinoBackend; use crate::r#impl::UsageError; -use crate::witx::types::{Graph, GraphEncoding, GraphExecutionContext}; +use crate::witx::types::{Graph, GraphEncoding, GraphExecutionContext, ExecutionTarget, GraphBuilderArray}; use std::collections::HashMap; use std::hash::Hash; +use dashmap::DashMap; use thiserror::Error; use wiggle::GuestError; @@ -14,6 +15,13 @@ pub struct WasiNnCtx { pub(crate) backends: HashMap>, pub(crate) graphs: Table>, pub(crate) executions: Table>, + pub(crate) model_registry: DashMap +} + +pub(crate) struct RegisteredModel { + pub(crate) model_bytes: Vec>, + pub(crate) encoding: GraphEncoding, + pub(crate) target: ExecutionTarget } impl WasiNnCtx { @@ -30,6 +38,7 @@ impl WasiNnCtx { backends, graphs: Table::default(), executions: Table::default(), + model_registry: DashMap::new() }) } } diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index 08a7af60660f..9829f3f10e29 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -1,14 +1,18 @@ //! Implements the wasi-nn API. + use openvino::TensorDesc; -use crate::ctx::WasiNnResult as Result; +use crate::ctx::{RegisteredModel, WasiNnResult as Result}; use crate::witx::types::{ - ExecutionTarget, Graph, GraphBuilderArray, GraphEncoding, GraphExecutionContext, Tensor, + ExecutionTarget, Graph, GraphBuilderArray, GraphBuilder, GraphEncoding, GraphExecutionContext, Tensor, }; use crate::witx::wasi_ephemeral_nn::WasiEphemeralNn; use crate::WasiNnCtx; use thiserror::Error; use wiggle::GuestPtr; + +const MAX_GUEST_MODEL_REGISTRATION_SIZE: usize = 10 * 1024 * 1024; //10M + #[derive(Debug, Error)] pub enum UsageError { #[error("Invalid context; has the load function been called?")] @@ -23,6 +27,8 @@ pub enum UsageError { InvalidExecutionContextHandle, #[error("Not enough memory to copy tensor data of size: {0}")] NotEnoughMemory(u32), + #[error("Model size {0} exceeds allowed quota of {1}")] + ModelTooLarge(usize, usize), } impl<'a> WasiEphemeralNn for WasiNnCtx { @@ -42,10 +48,83 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(graph_id) } - fn register( + fn load_by_name<'b>( + &mut self, + model_name: &GuestPtr<'_, [u8]>, + ) -> Result { + let model_name = String::from_utf8(model_name.to_vec().unwrap()).unwrap(); + let registered_model = self.model_registry.get(&model_name).unwrap(); + let model_bytes = ®istered_model.model_bytes; + let encoding: GraphEncoding = registered_model.encoding; + let target: ExecutionTarget = registered_model.target; + let encoding_id: u8 = encoding.into(); + + let graph = if let Some(backend) = self.backends.get_mut(&encoding_id) { + backend.load_from_bytes(model_bytes, target)? + } else { + return Err(UsageError::InvalidEncoding(encoding).into()); + }; + let graph_id = self.graphs.insert(graph); + Ok(graph_id) + } + + fn register_model_bytes( + &mut self, + model_name: &GuestPtr<'_, [u8]>, + model_bytes: &GraphBuilderArray<'_>, + encoding: GraphEncoding, + target: ExecutionTarget, + ) -> Result<()> { + let length: usize = model_bytes.len().try_into().unwrap(); + if (length > MAX_GUEST_MODEL_REGISTRATION_SIZE) { + return Err(UsageError::ModelTooLarge(length, MAX_GUEST_MODEL_REGISTRATION_SIZE).into()); + } + let model_name_bytes = model_name.to_vec().unwrap(); + let mut model_bytes_vec: Vec> = Vec::with_capacity(length.try_into().unwrap()); + let mut model_bytes = model_bytes.as_ptr(); + for i in 0..length { + let v = model_bytes + .read()? + .as_slice()? + .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)") + .to_vec(); + model_bytes_vec.push(v); + model_bytes = model_bytes.add(1)?; + } + + self.model_registry.insert(String::from_utf8(model_name_bytes).unwrap(), RegisteredModel { + model_bytes: model_bytes_vec, + encoding, + target, + }); + Ok(()) + } + + fn unregister( + &mut self, + model_name: &GuestPtr<'_, [u8]>, + ) -> Result<()> { + let model_name_bytes = model_name.to_vec().unwrap(); + self.model_registry.remove(&String::from_utf8(model_name_bytes).unwrap()); + Ok(()) + } + + fn is_registered( &mut self, - url: &GuestPtr<'_, u8>, - name: &GuestPtr<'_, u8>, + model_name: &GuestPtr<'_, [u8]>, + ) -> Result { + let model_name_bytes = model_name.to_vec().unwrap(); + if self.model_registry.contains_key(&String::from_utf8(model_name_bytes).unwrap()) { + Ok(1) + } else { Ok(0) } + } + + fn register_model_uri( + &mut self, + url: &GuestPtr<'_, [u8]>, + model_name: &GuestPtr<'_, [u8]>, + encoding: GraphEncoding, + target: ExecutionTarget, ) -> Result<()> { Ok(()) } diff --git a/crates/wasi-nn/src/openvino.rs b/crates/wasi-nn/src/openvino.rs index 769beb3dad70..c6b7941fe321 100644 --- a/crates/wasi-nn/src/openvino.rs +++ b/crates/wasi-nn/src/openvino.rs @@ -44,6 +44,31 @@ impl Backend for OpenvinoBackend { .read()? .as_slice()? .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); + self.load_from_bytes( &vec![xml.to_vec(), weights.to_vec()], target) + } + + fn load_from_bytes( + &mut self, + model_bytes: &Vec>, + target: ExecutionTarget, + ) -> Result, BackendError> { + if model_bytes.len() != 2 { + return Err(BackendError::InvalidNumberOfBuilders(2, model_bytes.len().try_into().unwrap()).into()); + } + + // Construct the context if none is present; this is done lazily (i.e. + // upon actually loading a model) because it may fail to find and load + // the OpenVINO libraries. The laziness limits the extent of the error + // only to wasi-nn users, not all WASI users. + if self.0.is_none() { + self.0.replace(openvino::Core::new(None)?); + } + + // Read the guest array. + let xml = model_bytes[0].as_slice(); + // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); + let weights = model_bytes[1].as_slice(); + // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); // Construct OpenVINO graph structures: `cnn_network` contains the graph // structure, `exec_network` can perform inference. @@ -51,7 +76,7 @@ impl Backend for OpenvinoBackend { .0 .as_mut() .expect("openvino::Core was previously constructed"); - let mut cnn_network = core.read_network_from_buffer(&xml, &weights)?; + let mut cnn_network = core.read_network_from_buffer(xml, weights)?; // TODO this is a temporary workaround. We need a more eligant way to specify the layout in the long run. // However, without this newer versions of OpenVINO will fail due to parameter mismatch. diff --git a/crates/wasi-nn/src/witx.rs b/crates/wasi-nn/src/witx.rs index e7c877bd907e..be7ad70834f5 100644 --- a/crates/wasi-nn/src/witx.rs +++ b/crates/wasi-nn/src/witx.rs @@ -5,7 +5,7 @@ use anyhow::Result; // Generate the traits and types of wasi-nn in several Rust modules (e.g. `types`). wiggle::from_witx!({ - witx: ["$WASI_ROOT/phases/ephemeral/witx/wasi_ephemeral_nn.witx"], + witx: ["$WASI_ROOT/wasi-nn.witx"], errors: { nn_errno => WasiNnError } }); From 4d946c78b31022a87a5b426f566b17177f681beb Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Sun, 2 Apr 2023 17:19:38 -1000 Subject: [PATCH 3/8] Fix rust formatting. --- Cargo.lock | 1006 +++++++++++++++++--------------- crates/wasi-nn/src/ctx.rs | 16 +- crates/wasi-nn/src/impl.rs | 113 ++-- crates/wasi-nn/src/openvino.rs | 12 +- 4 files changed, 630 insertions(+), 517 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36182b4548ea..d24068ae68e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", "once_cell", @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] @@ -86,28 +86,28 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "arbitrary" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38b6b6b79f671c25e1a3e785b7b82d7562ffc9cd3efdc98627e5668a2472490" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" dependencies = [ "derive_arbitrary", ] [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ "bit-vec", ] @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -224,9 +224,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byteorder" @@ -236,44 +236,44 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cap-fs-ext" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff40fd8a96d57a204080e5debd621342612f6d6b60901201a51f518baf72691d" +checksum = "2767fc3595843a8cfb4b95ac507d1535fb6df994cd3566092786591b770542fb" dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "cap-primitives" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9554a7698c8db4b7777f01b2237de111c5ecea169efb1190004d9069ceb289aa" +checksum = "68c5812f1b3818f5132a8ea1ddcc09c32bc4374874616c6093f2d352e93f1d30" dependencies = [ "ambient-authority", - "fs-set-times", + "fs-set-times 0.19.0", "io-extras", "io-lifetimes", "ipnet", "maybe-owned", - "rustix", - "windows-sys", + "rustix 0.37.6", + "windows-sys 0.45.0", "winx", ] [[package]] name = "cap-rand" -version = "1.0.1" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dcd5285cc063c837f10d80010a29eda2f22fe4ce507229a03a7886f074ee6fd" +checksum = "b494c41f7d3ce72095f5fe9f61d732313ac959d91e1c863518073d234b69720e" dependencies = [ "ambient-authority", "rand 0.8.5", @@ -281,38 +281,37 @@ dependencies = [ [[package]] name = "cap-std" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b68a8ac703cc7bed0a46666a04b386cca214844897a69f599dcd82ea59422c" +checksum = "a83342c1f448b1d092cc55c6127ffe88841e9c98dd9f652a283a89279b12376c" dependencies = [ "cap-primitives", "io-extras", "io-lifetimes", - "ipnet", - "rustix", + "rustix 0.37.6", ] [[package]] name = "cap-tempfile" -version = "1.0.1" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad935d619cca685eb3a93e31f27c5217e0d2fd90ae47977ff178039084e19c34" +checksum = "cde501aaab86517eb70b98f68e54b8fac0a42516cc3f3a8a5d4617ff8a288c9d" dependencies = [ "cap-std", "rand 0.8.5", - "rustix", + "rustix 0.37.6", "uuid", ] [[package]] name = "cap-time-ext" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "472931750f90fbf0731c886c2937521e25772942577a182e7ace5bc561d10e3b" +checksum = "1c36aba6f39b14951cc10cc331441ffbdb471960d27e2f0813eb05f33d786e56" dependencies = [ "cap-primitives", "once_cell", - "rustix", + "rustix 0.37.6", "winx", ] @@ -344,9 +343,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -359,9 +358,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b72a433d0cf2aef113ba70f62634c56fddb0f244e6377185c56a7cadbd8f91" +checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ "cfg-if", "cipher", @@ -371,9 +370,9 @@ dependencies = [ [[package]] name = "chacha20poly1305" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b84ed6d1d5f7aa9bdde921a5090e0ca4d934d250ea3b402a5fab3a994e28a2a" +checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" dependencies = [ "aead", "chacha20", @@ -420,9 +419,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.8" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190814073e85d238f31ff738fcb0bf6910cedeb73376c87cd69291028966fd83" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", @@ -437,15 +436,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.2.7" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -484,7 +483,7 @@ version = "0.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -501,23 +500,21 @@ version = "0.0.0" dependencies = [ "anyhow", "arbitrary", - "env_logger 0.9.0", + "env_logger 0.9.3", "wasmtime", ] [[package]] name = "console" -version = "0.15.0" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", - "regex", - "terminal_size", "unicode-width", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -537,9 +534,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -574,11 +571,11 @@ dependencies = [ "cranelift-isle", "criterion", "gimli", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "log", "regalloc2", "serde", - "sha2 0.10.2", + "sha2 0.10.6", "similar", "smallvec", "souper-ir", @@ -636,7 +633,7 @@ name = "cranelift-frontend" version = "0.95.0" dependencies = [ "cranelift-codegen", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "log", "similar", "smallvec", @@ -695,7 +692,7 @@ dependencies = [ "region", "target-lexicon", "wasmtime-jit-icache-coherence", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -704,7 +701,7 @@ version = "0.95.0" dependencies = [ "anyhow", "cranelift-codegen", - "hashbrown 0.13.1", + "hashbrown 0.13.2", ] [[package]] @@ -793,7 +790,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "itertools", "log", "serde", @@ -851,9 +848,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -861,9 +858,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -872,26 +869,24 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.9" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg 1.1.0", "cfg-if", "crossbeam-utils", - "memoffset 0.6.5", - "once_cell", + "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.10" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -901,7 +896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -954,6 +949,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "dashmap" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +dependencies = [ + "cfg-if", + "hashbrown 0.12.3", + "lock_api", + "once_cell", + "parking_lot_core 0.9.7", +] + [[package]] name = "der" version = "0.4.5" @@ -972,18 +980,18 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "derive_arbitrary" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98e23c06c035dac87bd802d98f368df73a7f2cb05a66ffbd1f377e821fac4af9" +checksum = "f3cdeb9ec472d588e539a818b2dee436825730da08ad0017c4b1a17676bdc8b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -997,11 +1005,11 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.4", "crypto-common", ] @@ -1016,13 +1024,23 @@ dependencies = [ ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "dirs" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "cfg-if", - "dirs-sys-next", + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", ] [[package]] @@ -1044,9 +1062,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dunce" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" +checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" [[package]] name = "ecdsa" @@ -1062,9 +1080,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.4.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "signature", ] @@ -1099,9 +1117,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" @@ -1114,7 +1132,7 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1127,9 +1145,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if", ] @@ -1149,9 +1167,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime 2.1.0", @@ -1160,6 +1178,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime 2.1.0", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "errno" version = "0.2.8" @@ -1171,6 +1202,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -1201,22 +1243,22 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] [[package]] name = "fd-lock" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef1a30ae415c3a691a4f41afddc2dbcd6d70baf338368d85ebc1e8ed92cedb9" +checksum = "9799aefb4a2e4a01cc47610b1dd47c18ab13d991f27bbcaed9296f5a53d5cbad" dependencies = [ "cfg-if", - "rustix", - "windows-sys", + "rustix 0.37.6", + "windows-sys 0.45.0", ] [[package]] @@ -1225,17 +1267,17 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] [[package]] name = "file-per-thread-logger" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f" +checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.9.0", + "env_logger 0.10.0", "log", ] @@ -1251,14 +1293,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "winapi", + "redox_syscall 0.2.16", + "windows-sys 0.45.0", ] [[package]] @@ -1289,8 +1331,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "857cf27edcb26c2a36d84b2954019573d335bb289876113aceacacdca47a4fd4" dependencies = [ "io-lifetimes", - "rustix", - "windows-sys", + "rustix 0.36.11", + "windows-sys 0.45.0", +] + +[[package]] +name = "fs-set-times" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bba733060df596995a5b3945c5d4c7362cfe9ab006baaddac633733908ec2814" +dependencies = [ + "io-lifetimes", + "rustix 0.37.6", + "windows-sys 0.45.0", ] [[package]] @@ -1314,9 +1367,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1335,13 +1388,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -1356,9 +1409,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" dependencies = [ "fallible-iterator", "indexmap", @@ -1367,9 +1420,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "group" @@ -1378,7 +1431,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -1396,18 +1449,18 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ "ahash", ] [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1429,9 +1482,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b5cb0902c2b6d65d5fd97dfa30f9b70c7538e770b98eab5ed52d8db923e01" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "hkdf" @@ -1486,9 +1539,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg 1.1.0", "hashbrown 0.12.3", @@ -1529,35 +1582,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d79107d6e60d78351e11f0a2dc9d0eaf304a7efb592e92603783afb8479c7d97" dependencies = [ "io-lifetimes", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" dependencies = [ - "hermit-abi 0.3.0", + "hermit-abi 0.3.1", "io-lifetimes", - "rustix", - "windows-sys", + "rustix 0.37.6", + "windows-sys 0.45.0", ] [[package]] @@ -1565,7 +1619,7 @@ name = "isle-fuzz" version = "0.0.0" dependencies = [ "cranelift-isle", - "env_logger 0.9.0", + "env_logger 0.9.3", "libfuzzer-sys", "log", ] @@ -1576,23 +1630,23 @@ version = "0.0.0" dependencies = [ "clap", "cranelift-isle", - "env_logger 0.9.0", + "env_logger 0.9.3", ] [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "ittapi" @@ -1616,18 +1670,18 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -1661,15 +1715,15 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.133" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libfuzzer-sys" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fff891139ee62800da71b7fd5b508d570b9ad95e614a53c6f453ca08366038" +checksum = "beb09950ae85a0a94b27676cccf37da5ff13f27076aa1adbc6545dd0d0e1bd4e" dependencies = [ "arbitrary", "cc", @@ -1678,9 +1732,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", "winapi", @@ -1688,21 +1742,27 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ce35d4899fa3c0558d4f5082c98927789a01024270711cf113999b66ced65a" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "linux-raw-sys" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "linux-raw-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" [[package]] name = "listenfd" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4fcc00ff6731d94b70e16e71f43bda62883461f31230742e3bc6dddf12988" +checksum = "e0500463acd96259d219abb05dc57e5a076ef04b2db9a2112846929b5f174c96" dependencies = [ "libc", "uuid", @@ -1711,9 +1771,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg 1.1.0", "scopeguard", @@ -1751,11 +1811,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix", + "rustix 0.37.6", ] [[package]] @@ -1767,15 +1827,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "memoffset" version = "0.8.0" @@ -1796,34 +1847,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", + "windows-sys 0.45.0", ] [[package]] @@ -1899,7 +1930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "crc32fast", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "indexmap", "memchr", ] @@ -1935,9 +1966,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.16.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -1995,9 +2026,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "p256" @@ -2018,28 +2049,41 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.6", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "windows-sys 0.45.0", +] + [[package]] name = "paste" -version = "1.0.7" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pem-rfc7468" @@ -2086,11 +2130,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + [[package]] name = "plotters" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" dependencies = [ "num-traits", "plotters-backend", @@ -2101,15 +2151,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] @@ -2139,9 +2189,9 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pqcrypto" @@ -2161,15 +2211,15 @@ checksum = "0127cbc0239f585139a56effd7867921eae3425a000a72dde2b0a156062346b2" dependencies = [ "cc", "dunce", - "getrandom 0.2.6", + "getrandom 0.2.8", "libc", ] [[package]] name = "pqcrypto-kyber" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a17989a978f7d7c1496e38806ad9ff11f36eb8e419c562eafddbbf176af4a8a" +checksum = "fe9d9695c19e525d5366c913562a331fbeef9a2ad801d9a9ded61a0e4c2fe0fb" dependencies = [ "cc", "glob", @@ -2203,7 +2253,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -2220,18 +2270,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "1d0dd4be24fcdcfeaa12a432d588dc59bbad6cad3510c67e74a2b6b2fc950564" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "proptest" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" dependencies = [ "bit-set", "bitflags", @@ -2245,13 +2295,14 @@ dependencies = [ "regex-syntax", "rusty-fork", "tempfile", + "unarray", ] [[package]] name = "psm" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", ] @@ -2281,9 +2332,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.18" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -2309,7 +2360,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2329,7 +2380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2343,11 +2394,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.8", ] [[package]] @@ -2365,7 +2416,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2376,21 +2427,19 @@ checksum = "04d0088f16afb86d12c7f239d8de4637fa68ecc99a3db227e1ab58a294713e60" [[package]] name = "rayon" -version = "1.5.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2400,9 +2449,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags", ] @@ -2413,8 +2471,8 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.6", - "redox_syscall", + "getrandom 0.2.8", + "redox_syscall 0.2.16", "thiserror", ] @@ -2433,9 +2491,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -2450,9 +2508,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "region" @@ -2466,15 +2524,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "rsa" version = "0.5.0" @@ -2498,24 +2547,38 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustix" +version = "0.37.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d097081ed288dfe45699b72f5b5d648e5f15d64d900c7080273baa20c16a6849" +dependencies = [ + "bitflags", + "errno 0.3.0", "io-lifetimes", "itoa", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.1", "once_cell", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -2532,9 +2595,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "same-file" @@ -2553,29 +2616,29 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "serde_json" -version = "1.0.80" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f972498cf015f7c0746cac89ebe1d6ef10c293b94175a243a2d9442c163d9944" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -2597,13 +2660,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -2617,11 +2680,11 @@ dependencies = [ [[package]] name = "shellexpand" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdb7831b2d85ddf4a7b148aa19d0587eddbe8671a436b7bd1182eaad0f2829" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" dependencies = [ - "dirs-next", + "dirs", ] [[package]] @@ -2643,14 +2706,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" dependencies = [ "digest 0.9.0", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] name = "similar" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e24979f63a11545f5f2c60141afe249d4f19f84581ea2138065e400941d83d3" +checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "slice-group-by" @@ -2660,18 +2723,18 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "smallvec" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -2694,9 +2757,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.4" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +checksum = "c0959fd6f767df20b231736396e4f602171e00d95205676286e79d4a4eb67bef" [[package]] name = "spki" @@ -2739,82 +2802,70 @@ checksum = "7c68d531d83ec6c531150584c42a4290911964d5f0d79132b193b67252a23b71" [[package]] name = "syn" -version = "1.0.92" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn" +version = "2.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" dependencies = [ "proc-macro2", "quote", - "syn", - "unicode-xid", + "unicode-ident", ] [[package]] name = "system-interface" -version = "0.25.4" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f355df185d945435f24c51fda9bf01bea6acb6c0b753e1241e5cc05413a659d4" +checksum = "12a638b21790634294d82697a110052af16bf88d88bec7c8f8e57989e2f922b7" dependencies = [ "bitflags", "cap-fs-ext", "cap-std", "fd-lock", "io-lifetimes", - "rustix", - "windows-sys", + "rustix 0.37.6", + "windows-sys 0.45.0", "winx", ] [[package]] name = "target-lexicon" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" +checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix 0.37.6", + "windows-sys 0.45.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "test-programs" version = "0.0.0" @@ -2836,36 +2887,37 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] @@ -2890,52 +2942,52 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.18.4" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfb875c82dc0a4f1f37a30e720dee181a2b3a06a428b0fc6873ea38d6407850" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ + "autocfg 1.1.0", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.7.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "toml" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", @@ -2946,30 +2998,29 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", - "valuable", ] [[package]] name = "tracing-subscriber" -version = "0.3.11" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" dependencies = [ "sharded-slab", "thread_local", @@ -2978,9 +3029,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" @@ -2993,30 +3050,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + +[[package]] +name = "unicode-ident" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" @@ -3041,11 +3104,11 @@ dependencies = [ [[package]] name = "uuid" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" +checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" dependencies = [ - "getrandom 0.2.6", + "getrandom 0.2.8", ] [[package]] @@ -3061,12 +3124,6 @@ dependencies = [ "which", ] -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "version_check" version = "0.9.4" @@ -3084,12 +3141,11 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -3099,12 +3155,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3121,17 +3171,17 @@ dependencies = [ "cap-rand", "cap-std", "cap-time-ext", - "fs-set-times", + "fs-set-times 0.18.1", "io-extras", "io-lifetimes", "is-terminal", "once_cell", - "rustix", + "rustix 0.36.11", "system-interface", "tempfile", "tracing", "wasi-common", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3144,12 +3194,12 @@ dependencies = [ "cap-std", "io-extras", "log", - "rustix", + "rustix 0.36.11", "thiserror", "tracing", "wasmtime", "wiggle", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3171,7 +3221,7 @@ dependencies = [ "parking_lot", "pqcrypto", "rand_core 0.5.1", - "rand_core 0.6.3", + "rand_core 0.6.4", "rsa", "serde", "sha2 0.9.9", @@ -3190,7 +3240,7 @@ dependencies = [ "cap-tempfile", "io-extras", "io-lifetimes", - "rustix", + "rustix 0.36.11", "tempfile", "tokio", "wasi-cap-std-sync", @@ -3200,9 +3250,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3210,24 +3260,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3235,28 +3285,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.80" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-coredump-builder" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158180f35c9ba89a3e7763f20be93e77d5e41535c18e22c85d6dd5b5bce18108" +checksum = "189a9a7d8952ac4103a59ab849a291a40b7d97c55e24a859344e9e240ac08aed" dependencies = [ "wasm-coredump-encoder", "wasm-coredump-types", @@ -3265,9 +3315,9 @@ dependencies = [ [[package]] name = "wasm-coredump-encoder" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0c99cdf3a88363570f1027e2f337de6647cac9fed5d474f86103d7c45c8700" +checksum = "b855c0e9989e3e54ddbd744b3b5d3d7e2ad39e6a3357d2168f63e93d044c65b3" dependencies = [ "leb128", "wasm-coredump-types", @@ -3275,9 +3325,9 @@ dependencies = [ [[package]] name = "wasm-coredump-types" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e35729a021e44c20511e23ac2b215df05da243bdc4bad336fd3686552539fc" +checksum = "349ae066a33052159feb4261988bb813f3b58f3ad9c60ded5dfce7c75ff7d064" [[package]] name = "wasm-encoder" @@ -3340,7 +3390,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01bf50edb2ea9d922aa75a7bf3c15e26a6c9e2d18c56e862b49737a582901729" dependencies = [ - "spin 0.9.4", + "spin 0.9.7", "wasmi_arena", "wasmi_core", "wasmparser-nostd", @@ -3424,7 +3474,7 @@ dependencies = [ "wasmtime-runtime", "wasmtime-wasi", "wat", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3458,7 +3508,7 @@ version = "8.0.0" dependencies = [ "anyhow", "cap-std", - "env_logger 0.9.0", + "env_logger 0.9.3", "once_cell", "wasi-cap-std-sync", "wasi-common", @@ -3489,12 +3539,12 @@ dependencies = [ "log", "once_cell", "pretty_env_logger", - "rustix", + "rustix 0.36.11", "serde", - "sha2 0.10.2", + "sha2 0.10.6", "tempfile", "toml", - "windows-sys", + "windows-sys 0.45.0", "zstd", ] @@ -3509,7 +3559,7 @@ dependencies = [ "component-macro-test", "component-test-util", "criterion", - "env_logger 0.9.0", + "env_logger 0.9.3", "filecheck", "humantime 2.1.0", "libc", @@ -3519,7 +3569,7 @@ dependencies = [ "num_cpus", "once_cell", "rayon", - "rustix", + "rustix 0.36.11", "serde", "serde_json", "target-lexicon", @@ -3543,7 +3593,7 @@ dependencies = [ "wasmtime-wast", "wast 55.0.0", "wat", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3566,7 +3616,7 @@ dependencies = [ "component-macro-test-helpers", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "tracing", "wasmtime", "wasmtime-component-util", @@ -3619,7 +3669,7 @@ dependencies = [ "atty", "clap", "cranelift-entity", - "env_logger 0.9.0", + "env_logger 0.9.3", "gimli", "indexmap", "log", @@ -3641,7 +3691,7 @@ version = "0.0.0" dependencies = [ "arbitrary", "component-fuzz-util", - "env_logger 0.9.0", + "env_logger 0.9.3", "libfuzzer-sys", "wasmparser", "wasmprinter", @@ -3669,9 +3719,9 @@ dependencies = [ "backtrace", "cc", "cfg-if", - "rustix", + "rustix 0.36.11", "wasmtime-asm-macros", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3708,7 +3758,7 @@ dependencies = [ "arbitrary", "component-fuzz-util", "component-test-util", - "env_logger 0.9.0", + "env_logger 0.9.3", "log", "rand 0.8.5", "rayon", @@ -3747,7 +3797,7 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3756,7 +3806,7 @@ version = "8.0.0" dependencies = [ "object", "once_cell", - "rustix", + "rustix 0.36.11", ] [[package]] @@ -3765,7 +3815,7 @@ version = "8.0.0" dependencies = [ "cfg-if", "libc", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3781,16 +3831,16 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.8.0", + "memoffset", "once_cell", "paste", "rand 0.8.5", - "rustix", + "rustix 0.36.11", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit-debug", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -3831,6 +3881,7 @@ name = "wasmtime-wasi-nn" version = "8.0.0" dependencies = [ "anyhow", + "dashmap", "openvino", "thiserror", "walkdir", @@ -3915,9 +3966,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.57" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -3925,13 +3976,13 @@ dependencies = [ [[package]] name = "which" -version = "4.2.5" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] @@ -3960,7 +4011,7 @@ dependencies = [ "proc-macro2", "quote", "shellexpand", - "syn", + "syn 1.0.109", "witx", ] @@ -3970,7 +4021,7 @@ version = "8.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wiggle", "wiggle-generate", ] @@ -3980,7 +4031,7 @@ name = "wiggle-test" version = "0.0.0" dependencies = [ "anyhow", - "env_logger 0.9.0", + "env_logger 0.9.3", "proptest", "thiserror", "tracing", @@ -4066,7 +4117,7 @@ dependencies = [ "glob", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4091,6 +4142,21 @@ dependencies = [ "winch-test-macros", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -4102,9 +4168,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -4117,45 +4183,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winx" @@ -4165,7 +4231,7 @@ checksum = "129cd8ee937d535e1a239d9d3c9c0525af0454bc0967d9211a251be062513520" dependencies = [ "bitflags", "io-lifetimes", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -4215,30 +4281,29 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", - "synstructure", + "syn 2.0.13", ] [[package]] name = "zstd" -version = "0.11.1+zstd.1.5.2" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a16b8414fde0414e90c612eba70985577451c4c504b99885ebed24762cb81a" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.1+zstd.1.5.2" +version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c12659121420dd6365c5c3de4901f97145b79651fb1d25814020ed2ed0585ae" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ "libc", "zstd-sys", @@ -4246,10 +4311,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.7+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/crates/wasi-nn/src/ctx.rs b/crates/wasi-nn/src/ctx.rs index 1dd2e7f8280e..7ceec1ce0f7c 100644 --- a/crates/wasi-nn/src/ctx.rs +++ b/crates/wasi-nn/src/ctx.rs @@ -3,10 +3,10 @@ use crate::api::{Backend, BackendError, BackendExecutionContext, BackendGraph}; use crate::openvino::OpenvinoBackend; use crate::r#impl::UsageError; -use crate::witx::types::{Graph, GraphEncoding, GraphExecutionContext, ExecutionTarget, GraphBuilderArray}; +use crate::witx::types::{ExecutionTarget, Graph, GraphEncoding, GraphExecutionContext}; +use dashmap::DashMap; use std::collections::HashMap; use std::hash::Hash; -use dashmap::DashMap; use thiserror::Error; use wiggle::GuestError; @@ -15,13 +15,18 @@ pub struct WasiNnCtx { pub(crate) backends: HashMap>, pub(crate) graphs: Table>, pub(crate) executions: Table>, - pub(crate) model_registry: DashMap + pub(crate) model_registry: DashMap, + pub(crate) loaded_models: DashMap, } pub(crate) struct RegisteredModel { pub(crate) model_bytes: Vec>, pub(crate) encoding: GraphEncoding, - pub(crate) target: ExecutionTarget + pub(crate) target: ExecutionTarget, +} + +pub(crate) struct LoadedModel { + pub(crate) graph: Graph, } impl WasiNnCtx { @@ -38,7 +43,8 @@ impl WasiNnCtx { backends, graphs: Table::default(), executions: Table::default(), - model_registry: DashMap::new() + model_registry: DashMap::new(), + loaded_models: DashMap::new(), }) } } diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index 9829f3f10e29..0f1d82e1e41c 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -1,17 +1,16 @@ //! Implements the wasi-nn API. -use openvino::TensorDesc; -use crate::ctx::{RegisteredModel, WasiNnResult as Result}; +use crate::ctx::{LoadedModel, RegisteredModel, WasiNnResult as Result}; use crate::witx::types::{ - ExecutionTarget, Graph, GraphBuilderArray, GraphBuilder, GraphEncoding, GraphExecutionContext, Tensor, + ExecutionTarget, Graph, GraphBuilder, GraphBuilderArray, GraphEncoding, GraphExecutionContext, + Tensor, }; use crate::witx::wasi_ephemeral_nn::WasiEphemeralNn; use crate::WasiNnCtx; use thiserror::Error; use wiggle::GuestPtr; - -const MAX_GUEST_MODEL_REGISTRATION_SIZE: usize = 10 * 1024 * 1024; //10M +const MAX_GUEST_MODEL_REGISTRATION_SIZE: usize = 20 * 1024 * 1024; //20M #[derive(Debug, Error)] pub enum UsageError { @@ -31,36 +30,35 @@ pub enum UsageError { ModelTooLarge(usize, usize), } -impl<'a> WasiEphemeralNn for WasiNnCtx { - fn load<'b>( +impl WasiNnCtx { + fn build_graph( &mut self, - builders: &GraphBuilderArray<'_>, + model_bytes: &Vec>, encoding: GraphEncoding, target: ExecutionTarget, ) -> Result { let encoding_id: u8 = encoding.into(); let graph = if let Some(backend) = self.backends.get_mut(&encoding_id) { - backend.load(builders, target)? + backend.load_from_bytes(model_bytes, target)? } else { return Err(UsageError::InvalidEncoding(encoding).into()); }; + let graph_id = self.graphs.insert(graph); Ok(graph_id) } +} - fn load_by_name<'b>( +impl<'a> WasiEphemeralNn for WasiNnCtx { + fn load<'b>( &mut self, - model_name: &GuestPtr<'_, [u8]>, + builders: &GraphBuilderArray<'_>, + encoding: GraphEncoding, + target: ExecutionTarget, ) -> Result { - let model_name = String::from_utf8(model_name.to_vec().unwrap()).unwrap(); - let registered_model = self.model_registry.get(&model_name).unwrap(); - let model_bytes = ®istered_model.model_bytes; - let encoding: GraphEncoding = registered_model.encoding; - let target: ExecutionTarget = registered_model.target; let encoding_id: u8 = encoding.into(); - let graph = if let Some(backend) = self.backends.get_mut(&encoding_id) { - backend.load_from_bytes(model_bytes, target)? + backend.load(builders, target)? } else { return Err(UsageError::InvalidEncoding(encoding).into()); }; @@ -68,6 +66,31 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(graph_id) } + fn load_by_name<'b>(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result { + let model_name = String::from_utf8(model_name.to_vec().unwrap()).unwrap(); + let maybe_loaded_model = self.loaded_models.get(&model_name); + + match maybe_loaded_model { + Some(model) => Ok(model.graph), + None => { + let registered_model = self.model_registry.get(&model_name).unwrap(); + let model_bytes = ®istered_model.model_bytes; + let encoding: GraphEncoding = registered_model.encoding; + let target: ExecutionTarget = registered_model.target; + + let encoding_id: u8 = encoding.into(); + let graph = if let Some(backend) = self.backends.get_mut(&encoding_id) { + backend.load_from_bytes(model_bytes, target)? + } else { + return Err(UsageError::InvalidEncoding(encoding).into()); + }; + let graph_id = self.graphs.insert(graph); + + Ok(graph_id) + } + } + } + fn register_model_bytes( &mut self, model_name: &GuestPtr<'_, [u8]>, @@ -76,8 +99,10 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { target: ExecutionTarget, ) -> Result<()> { let length: usize = model_bytes.len().try_into().unwrap(); - if (length > MAX_GUEST_MODEL_REGISTRATION_SIZE) { - return Err(UsageError::ModelTooLarge(length, MAX_GUEST_MODEL_REGISTRATION_SIZE).into()); + if length > MAX_GUEST_MODEL_REGISTRATION_SIZE { + return Err( + UsageError::ModelTooLarge(length, MAX_GUEST_MODEL_REGISTRATION_SIZE).into(), + ); } let model_name_bytes = model_name.to_vec().unwrap(); let mut model_bytes_vec: Vec> = Vec::with_capacity(length.try_into().unwrap()); @@ -91,32 +116,44 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { model_bytes_vec.push(v); model_bytes = model_bytes.add(1)?; } - - self.model_registry.insert(String::from_utf8(model_name_bytes).unwrap(), RegisteredModel { - model_bytes: model_bytes_vec, - encoding, - target, - }); + let model_name_key = String::from_utf8(model_name_bytes).unwrap(); + match target { + ExecutionTarget::Cpu => { + let graph = self.build_graph(&model_bytes_vec, encoding, target)?; + self.loaded_models + .insert(model_name_key, LoadedModel { graph }); + } + _ => { + self.model_registry.insert( + model_name_key, + RegisteredModel { + model_bytes: model_bytes_vec, + encoding, + target, + }, + ); + } + }; Ok(()) } - fn unregister( - &mut self, - model_name: &GuestPtr<'_, [u8]>, - ) -> Result<()> { + fn unregister(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result<()> { let model_name_bytes = model_name.to_vec().unwrap(); - self.model_registry.remove(&String::from_utf8(model_name_bytes).unwrap()); + self.model_registry + .remove(&String::from_utf8(model_name_bytes).unwrap()); Ok(()) } - fn is_registered( - &mut self, - model_name: &GuestPtr<'_, [u8]>, - ) -> Result { + fn is_registered(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result { let model_name_bytes = model_name.to_vec().unwrap(); - if self.model_registry.contains_key(&String::from_utf8(model_name_bytes).unwrap()) { + if self + .model_registry + .contains_key(&String::from_utf8(model_name_bytes).unwrap()) + { Ok(1) - } else { Ok(0) } + } else { + Ok(0) + } } fn register_model_uri( @@ -126,7 +163,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { encoding: GraphEncoding, target: ExecutionTarget, ) -> Result<()> { - Ok(()) + unimplemented!() } fn init_execution_context(&mut self, graph_id: Graph) -> Result { diff --git a/crates/wasi-nn/src/openvino.rs b/crates/wasi-nn/src/openvino.rs index c6b7941fe321..f99310c48abd 100644 --- a/crates/wasi-nn/src/openvino.rs +++ b/crates/wasi-nn/src/openvino.rs @@ -44,7 +44,7 @@ impl Backend for OpenvinoBackend { .read()? .as_slice()? .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); - self.load_from_bytes( &vec![xml.to_vec(), weights.to_vec()], target) + self.load_from_bytes(&vec![xml.to_vec(), weights.to_vec()], target) } fn load_from_bytes( @@ -53,7 +53,11 @@ impl Backend for OpenvinoBackend { target: ExecutionTarget, ) -> Result, BackendError> { if model_bytes.len() != 2 { - return Err(BackendError::InvalidNumberOfBuilders(2, model_bytes.len().try_into().unwrap()).into()); + return Err(BackendError::InvalidNumberOfBuilders( + 2, + model_bytes.len().try_into().unwrap(), + ) + .into()); } // Construct the context if none is present; this is done lazily (i.e. @@ -66,9 +70,9 @@ impl Backend for OpenvinoBackend { // Read the guest array. let xml = model_bytes[0].as_slice(); - // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); + // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); let weights = model_bytes[1].as_slice(); - // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); + // .expect("cannot use with shared memories; see https://github.com/bytecodealliance/wasmtime/issues/5235 (TODO)"); // Construct OpenVINO graph structures: `cnn_network` contains the graph // structure, `exec_network` can perform inference. From 01e4f7f4414cf2f08e575a26751f693f6664f290 Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Tue, 11 Apr 2023 15:04:58 -1000 Subject: [PATCH 4/8] Update for spec changes (ttl). --- crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/ctx.rs | 1 + crates/wasi-nn/src/impl.rs | 18 +++++------------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index f7dc344e6603..5fa53e3a765f 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit f7dc344e6603649e2534fe38468a8fc71b001090 +Subproject commit 5fa53e3a765f26167fa6b46d2e893726f7abe7ce diff --git a/crates/wasi-nn/src/ctx.rs b/crates/wasi-nn/src/ctx.rs index 7ceec1ce0f7c..fa6096fa6f2a 100644 --- a/crates/wasi-nn/src/ctx.rs +++ b/crates/wasi-nn/src/ctx.rs @@ -23,6 +23,7 @@ pub(crate) struct RegisteredModel { pub(crate) model_bytes: Vec>, pub(crate) encoding: GraphEncoding, pub(crate) target: ExecutionTarget, + pub(crate) ttl: u32 } pub(crate) struct LoadedModel { diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index 0f1d82e1e41c..d7aa06e89521 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -2,7 +2,7 @@ use crate::ctx::{LoadedModel, RegisteredModel, WasiNnResult as Result}; use crate::witx::types::{ - ExecutionTarget, Graph, GraphBuilder, GraphBuilderArray, GraphEncoding, GraphExecutionContext, + ExecutionTarget, Graph, GraphBuilderArray, GraphEncoding, GraphExecutionContext, Tensor, }; use crate::witx::wasi_ephemeral_nn::WasiEphemeralNn; @@ -54,7 +54,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { &mut self, builders: &GraphBuilderArray<'_>, encoding: GraphEncoding, - target: ExecutionTarget, + target: ExecutionTarget ) -> Result { let encoding_id: u8 = encoding.into(); let graph = if let Some(backend) = self.backends.get_mut(&encoding_id) { @@ -97,6 +97,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { model_bytes: &GraphBuilderArray<'_>, encoding: GraphEncoding, target: ExecutionTarget, + ttl: u32 ) -> Result<()> { let length: usize = model_bytes.len().try_into().unwrap(); if length > MAX_GUEST_MODEL_REGISTRATION_SIZE { @@ -107,7 +108,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { let model_name_bytes = model_name.to_vec().unwrap(); let mut model_bytes_vec: Vec> = Vec::with_capacity(length.try_into().unwrap()); let mut model_bytes = model_bytes.as_ptr(); - for i in 0..length { + for _ in 0..length { let v = model_bytes .read()? .as_slice()? @@ -130,6 +131,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { model_bytes: model_bytes_vec, encoding, target, + ttl }, ); } @@ -156,16 +158,6 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { } } - fn register_model_uri( - &mut self, - url: &GuestPtr<'_, [u8]>, - model_name: &GuestPtr<'_, [u8]>, - encoding: GraphEncoding, - target: ExecutionTarget, - ) -> Result<()> { - unimplemented!() - } - fn init_execution_context(&mut self, graph_id: Graph) -> Result { let exec_context = if let Some(graph) = self.graphs.get_mut(graph_id) { graph.init_execution_context()? From 73c842d8a11bb7fcaefbe0272d40a397919c5c58 Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Tue, 11 Apr 2023 15:16:43 -1000 Subject: [PATCH 5/8] Updates for wasi-nn proposal changes. --- crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/impl.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index 5fa53e3a765f..2648c6e3eb71 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit 5fa53e3a765f26167fa6b46d2e893726f7abe7ce +Subproject commit 2648c6e3eb71c13ad243370dfaf2328724a8f0d2 diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index d7aa06e89521..e0ea590a86ac 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -91,7 +91,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { } } - fn register_model_bytes( + fn register_named_model( &mut self, model_name: &GuestPtr<'_, [u8]>, model_bytes: &GraphBuilderArray<'_>, From cae12eda6633d874d3d86392f691976d23e5326e Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Tue, 11 Apr 2023 21:59:34 -1000 Subject: [PATCH 6/8] Update to remove string and remove ttl from spec. --- crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/ctx.rs | 1 - crates/wasi-nn/src/impl.rs | 26 +++++++++++--------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index 2648c6e3eb71..736462fbcbbc 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit 2648c6e3eb71c13ad243370dfaf2328724a8f0d2 +Subproject commit 736462fbcbbc1139556f3c044bbce9a9ddfb1324 diff --git a/crates/wasi-nn/src/ctx.rs b/crates/wasi-nn/src/ctx.rs index fa6096fa6f2a..7ceec1ce0f7c 100644 --- a/crates/wasi-nn/src/ctx.rs +++ b/crates/wasi-nn/src/ctx.rs @@ -23,7 +23,6 @@ pub(crate) struct RegisteredModel { pub(crate) model_bytes: Vec>, pub(crate) encoding: GraphEncoding, pub(crate) target: ExecutionTarget, - pub(crate) ttl: u32 } pub(crate) struct LoadedModel { diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index e0ea590a86ac..a8dfddc8fd6c 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -66,8 +66,8 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(graph_id) } - fn load_by_name<'b>(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result { - let model_name = String::from_utf8(model_name.to_vec().unwrap()).unwrap(); + fn load_by_name<'b>(&mut self, model_name: &GuestPtr<'_,str>) -> Result { + let model_name = model_name.as_str().unwrap().unwrap().to_string(); let maybe_loaded_model = self.loaded_models.get(&model_name); match maybe_loaded_model { @@ -93,11 +93,10 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { fn register_named_model( &mut self, - model_name: &GuestPtr<'_, [u8]>, + model_name: &GuestPtr<'_, str>, model_bytes: &GraphBuilderArray<'_>, encoding: GraphEncoding, - target: ExecutionTarget, - ttl: u32 + target: ExecutionTarget ) -> Result<()> { let length: usize = model_bytes.len().try_into().unwrap(); if length > MAX_GUEST_MODEL_REGISTRATION_SIZE { @@ -105,7 +104,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { UsageError::ModelTooLarge(length, MAX_GUEST_MODEL_REGISTRATION_SIZE).into(), ); } - let model_name_bytes = model_name.to_vec().unwrap(); + let mut model_bytes_vec: Vec> = Vec::with_capacity(length.try_into().unwrap()); let mut model_bytes = model_bytes.as_ptr(); for _ in 0..length { @@ -117,7 +116,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { model_bytes_vec.push(v); model_bytes = model_bytes.add(1)?; } - let model_name_key = String::from_utf8(model_name_bytes).unwrap(); + let model_name_key = model_name.as_str().unwrap().unwrap().to_string(); match target { ExecutionTarget::Cpu => { let graph = self.build_graph(&model_bytes_vec, encoding, target)?; @@ -130,8 +129,7 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { RegisteredModel { model_bytes: model_bytes_vec, encoding, - target, - ttl + target }, ); } @@ -139,18 +137,16 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(()) } - fn unregister(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result<()> { - let model_name_bytes = model_name.to_vec().unwrap(); + fn unregister(&mut self, model_name: &GuestPtr<'_, str>) -> Result<()> { self.model_registry - .remove(&String::from_utf8(model_name_bytes).unwrap()); + .remove(&model_name.as_str().unwrap().unwrap().to_string()); Ok(()) } - fn is_registered(&mut self, model_name: &GuestPtr<'_, [u8]>) -> Result { - let model_name_bytes = model_name.to_vec().unwrap(); + fn is_registered(&mut self, model_name: &GuestPtr<'_, str>) -> Result { if self .model_registry - .contains_key(&String::from_utf8(model_name_bytes).unwrap()) + .contains_key(&model_name.as_str().unwrap().unwrap().to_string()) { Ok(1) } else { From d4206c1abe357b3abd32542751a54c28439316a1 Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Thu, 20 Apr 2023 04:08:42 -0600 Subject: [PATCH 7/8] Implement getting model list. --- crates/wasi-nn/spec | 2 +- crates/wasi-nn/src/impl.rs | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/crates/wasi-nn/spec b/crates/wasi-nn/spec index 736462fbcbbc..d54aa2a51452 160000 --- a/crates/wasi-nn/spec +++ b/crates/wasi-nn/spec @@ -1 +1 @@ -Subproject commit 736462fbcbbc1139556f3c044bbce9a9ddfb1324 +Subproject commit d54aa2a514523377f543f6d36d7028213e1077a3 diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index a8dfddc8fd6c..5d90578a3fb8 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -137,21 +137,26 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { Ok(()) } - fn unregister(&mut self, model_name: &GuestPtr<'_, str>) -> Result<()> { - self.model_registry - .remove(&model_name.as_str().unwrap().unwrap().to_string()); + fn get_model_list<'b>(&mut self, + buffer: &GuestPtr<'b, u8>, + model_list: &GuestPtr<'b, GuestPtr<'b, u8>>, + length: u32) -> Result<()> { + let mut model_names: Vec = self.model_registry.iter().map(|e| e.key().to_string()).collect(); + self.loaded_models.iter().for_each(|e| model_names.push(e.key().to_string())); + + println!("Model names: {:?}", model_names); + let model_names_array = StringArray { elems: model_names }; + model_names_array.write_to_guest(buffer, model_list); Ok(()) } - fn is_registered(&mut self, model_name: &GuestPtr<'_, str>) -> Result { - if self - .model_registry - .contains_key(&model_name.as_str().unwrap().unwrap().to_string()) - { - Ok(1) - } else { - Ok(0) - } + fn get_model_list_sizes(&mut self) -> Result<(u32, u32)> { + let mut model_names: Vec = self.model_registry.iter().map(|e| e.key().to_string()).collect(); + self.loaded_models.iter().for_each(|e| model_names.push(e.key().to_string())); + let lengths: Vec = model_names.iter().map(|e| e.len() as u32).collect(); + let string_count = lengths.len() as u32; + let buffer_size = lengths.iter().sum::() as u32 + string_count; + Ok((string_count, buffer_size)) } fn init_execution_context(&mut self, graph_id: Graph) -> Result { From 1ffce303e8b1480d46daf6312b194b2202060f6c Mon Sep 17 00:00:00 2001 From: Matthew Tamayo-Rios Date: Thu, 20 Apr 2023 04:09:55 -0600 Subject: [PATCH 8/8] Add unaccessible string array classes. --- crates/wasi-nn/src/impl.rs | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/crates/wasi-nn/src/impl.rs b/crates/wasi-nn/src/impl.rs index 5d90578a3fb8..10c13f08fd8a 100644 --- a/crates/wasi-nn/src/impl.rs +++ b/crates/wasi-nn/src/impl.rs @@ -209,3 +209,52 @@ impl<'a> WasiEphemeralNn for WasiNnCtx { } } } + +pub struct StringArray { + elems: Vec, +} + +impl StringArray { + pub fn new() -> Self { + StringArray { elems: Vec::new() } + } + + pub fn number_elements(&self) -> u32 { + self.elems.len() as u32 + } + + pub fn cumulative_size(&self) -> u32 { + self.elems + .iter() + .map(|e| e.as_bytes().len() + 1) + .sum::() as u32 + } + + pub fn write_to_guest<'a>( + &self, + buffer: &GuestPtr<'a, u8>, + element_heads: &GuestPtr<'a, GuestPtr<'a, u8>>, + ) -> Result<()> { + println!("Model names to guest: {:?}", self.elems); + let element_heads = element_heads.as_array(self.number_elements()); + let buffer = buffer.as_array(self.cumulative_size()); + let mut cursor = 0; + for (elem, head) in self.elems.iter().zip(element_heads.iter()) { + let bytes = elem.as_bytes(); + let len = bytes.len() as u32; + { + let elem_buffer = buffer + .get_range(cursor..(cursor + len)) + .ok_or(UsageError::InvalidContext)?; // Elements don't fit in buffer provided + elem_buffer.copy_from_slice(bytes)?; + } + buffer + .get(cursor + len) + .ok_or(UsageError::InvalidContext)? + .write(0)?; // 0 terminate + head?.write(buffer.get(cursor).expect("already validated"))?; + cursor += len + 1; + } + Ok(()) + } +} \ No newline at end of file