From 7128c29125d4b484da21089fe4f75d47b0b8a93d Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:20:26 +0100 Subject: [PATCH 1/7] [nix] Add Nix development shell Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- flake.lock | 44 ++++++++ flake.nix | 304 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 348 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..faf4c21f --- /dev/null +++ b/flake.lock @@ -0,0 +1,44 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1782723713, + "narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-mozilla": { + "locked": { + "lastModified": 1762256096, + "narHash": "sha256-Hzj/d8eRpfRfjHSRX6gGRf0jSg2zIJMXl6S5opuKsHc=", + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "rev": "80c058cf774c198fb838fc3549806b232dd3e320", + "type": "github" + }, + "original": { + "owner": "mozilla", + "ref": "master", + "repo": "nixpkgs-mozilla", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-mozilla": "nixpkgs-mozilla" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..3f162ab9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,304 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs-mozilla.url = "github:mozilla/nixpkgs-mozilla/master"; + outputs = { self, nixpkgs, nixpkgs-mozilla, ... } @ inputs: + rec { + overlays.fix-rust = self: super: { + # Work around the nixpkgs-mozilla equivalent of + # https://github.com/NixOS/nixpkgs/issues/278508 and an + # incompatibility between nixpkgs-mozilla and makeRustPlatform + rustChannelOf = args: let + orig = super.rustChannelOf args; + patchRustPkg = pkg: (pkg.overrideAttrs (oA: { + buildCommand = (builtins.replaceStrings + [ "rustc,rustdoc" "librustc_driver-*.so" ] + [ "rustc,rustdoc,clippy-driver,cargo-clippy,miri,cargo-miri" "librustc_driver-*.{so,dylib}" ] + oA.buildCommand) + (let + wrapperPath = self.path + "/pkgs/build-support/bintools-wrapper/ld-wrapper.sh"; + baseOut = self.clangStdenv.cc.bintools.out; + getStdenvAttrs = drv: (drv.overrideAttrs (oA: { + passthru.origAttrs = oA; + })).origAttrs; + baseEnv = (getStdenvAttrs self.clangStdenv.cc.bintools).env; + baseSubstitutedWrapper = self.replaceVars wrapperPath + { + inherit (baseEnv) + shell coreutils_bin suffixSalt mktemp rm; + use_response_file_by_default = "0"; + prog = null; + out = null; + }; + in '' + # work around a bug in the overlay + ${oA.postInstall} + + # copy over helper scripts that the wrapper needs + (cd "${baseOut}"; find . -type f \( -name '*.sh' -or -name '*.bash' \) -print0) | while read -d $'\0' script; do + mkdir -p "$out/$(dirname "$script")" + substitute "${baseOut}/$script" "$out/$script" --replace-quiet "${baseOut}" "$out" + done + + # TODO: Work out how to make this work with cross builds + ldlld="$out/lib/rustlib/${self.clangStdenv.targetPlatform.config}/bin/gcc-ld/ld.lld"; + if [ -e "$ldlld" ]; then + export prog="$(readlink -f "$ldlld")" + rm "$ldlld" + substitute ${baseSubstitutedWrapper} "$ldlld" --subst-var "out" --subst-var "prog" + chmod +x "$ldlld" + fi + ''); + passthru = (oA.passthru or {}) // { + toolchainVersionAttrs = args; + }; + })) // { + targetPlatforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" ]; + badTargetPlatforms = [ ]; + }; + overrideRustPkg = pkg: self.lib.makeOverridable (origArgs: + patchRustPkg (pkg.override origArgs) + ) {}; + in builtins.mapAttrs (_: overrideRustPkg) orig; + }; + gcroots = + let gcrootForShell = pkg: pkg // derivation (pkg.drvAttrs // { + origArgs = pkg.drvAttrs.args; + # assume the builder is bash for now (it always is for + # stdenv, which is the only thing that we will encounter + # in this flake). + args = [ "-c" "declare > $out" ]; + }); + in { + shells.x86_64-linux.default = gcrootForShell devShells.x86_64-linux.default; + shells.aarch64-linux.default = gcrootForShell devShells.aarch64-linux.default; + }; + devShells = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: { + default = let pkgs = import nixpkgs { + inherit system; + overlays = [ (import (nixpkgs-mozilla + "/rust-overlay.nix")) overlays.fix-rust ]; + }; in with pkgs; let + customisedRustChannelOf = args: + lib.flip builtins.mapAttrs (rustChannelOf args) (_: pkg: pkg.override { + targets = [ + "x86_64-unknown-linux-gnu" + "x86_64-pc-windows-msvc" "x86_64-unknown-none" + "wasm32-wasip1" "wasm32-wasip2" "wasm32-unknown-unknown" + "aarch64-unknown-none" "aarch64-apple-darwin" + ]; + extensions = [ "rust-src" ] ++ (if args.channel == "nightly" then [ "miri-preview" ] else []); + }); + + # Hyperlight needs a variety of toolchains, since we use Nightly + # for rustfmt and old toolchains to verify MSRV + toolchains = lib.mapAttrs (_: customisedRustChannelOf) { + stable = { + date = "2026-03-05"; + channel = "stable"; + sha256 = "sha256-qqF33vNuAdU5vua96VKVIwuc43j4EFeEXbjQ6+l4mO4="; + }; + nightly = { + date = "2026-09-22"; + channel = "nightly"; + sha256 = "sha256-7qsyGDZErke6MdrngELbKaqs1Xgx8ols/e/HIygUIXg="; + }; + "1.89" = { + date = "2025-08-07"; + channel = "stable"; + sha256 = "sha256-+9FmLhAOezBZCOziO0Qct1NOrfpjNsXxc/8I0c7BdKE="; + }; + }; + + rust-platform = makeRustPlatform { + cargo = toolchains.stable.rust; + rustc = toolchains.stable.rust; + }; + + manifests = { + "Cargo.toml" = { + }; + "src/tests/rust_guests/component_sample/Cargo.toml" = { + }; + "src/tests/rust_guests/greeter_sample/Cargo.toml" = { + }; + "src/tests/rust_guests/rust_wasm_samples/Cargo.toml" = { + }; + }; + manifestDeps = lib.mapAttrsToList (manifest: importArguments: + let lockPath = builtins.replaceStrings [ "toml" ] [ "lock" ] manifest; in + let lockFile = ./${lockPath}; in + rust-platform.importCargoLock ({ + inherit lockFile; + } // importArguments)) manifests; + # when building a guest with cargo-hyperlight, or when + # building a miri sysroot for the main workspace, we need to + # include any crates.io dependencies of the standard library + # (e.g. rustc-literal-escaper) + stdlibLocks = lib.mapAttrsToList (_: toolchain: + "${toolchain.rust}/lib/rustlib/src/rust/library/Cargo.lock" + ) toolchains; + stdlibDeps = builtins.map (lockFile: + rust-platform.importCargoLock { inherit lockFile; }) stdlibLocks; + deps = pkgs.symlinkJoin { + name = "cargo-deps"; + paths = stdlibDeps ++ manifestDeps; + }; + + # Script snippet, used in the cargo/rustc wrappers below, + # which creates a number of .cargo/config.toml files in + # order to allow using Nix-fetched dependencies (this must + # be done for the guests, as well as for the main + # workspace). Ideally, we would just use environment + # variables or the --config option to Cargo, but + # unfortunately that tends not to play well with subcommands + # like `cargo clippy` and `cargo hyperlight` (see + # https://github.com/rust-lang/cargo/issues/11031). + materialiseDeps = let + sortedManifests = lib.lists.sort (p: q: p > q) (lib.attrNames manifests); + matchClause = path: '' */${path}) root="''${manifest%${path}}" ;;''; + matchClauses = lib.strings.concatStringsSep "\n" + (builtins.map matchClause sortedManifests); + in '' + base_cargo() { + PATH="$base/bin:$PATH" "$base/bin/cargo" "$@" + } + + manifest=$(base_cargo locate-project --message-format plain --workspace) + case "$manifest" in + ${matchClauses} + esac + if [ -f ''${root}/flake.nix ]; then + + sed -i '/# vendor dependency configuration generated by nix/{N;N;N;N;N;d;}' $root/.cargo/config.toml + cat >>$root/.cargo/config.toml <> $root/.git/info/exclude + fi + + # libgit2-sys and cargo-hyperlight sysroot builds both end up + # copying vendored files into the target/ directory. If the + # files involved came from the Nix store, they will be readonly + # and a subsequent copy of the same file to the same place will + # fail. Hack around this issue by making any existing vendored + # files writable before a build can be run + find "$(base_cargo metadata --format-version 1 | jq -r '.target_directory')" \( -path '*/build/libgit2-sys-*/out/include' -or -path '*/sysroot/include' -or -path '*/libwit_bindgen_cabi*' \) -print0 | xargs -r -0 chmod u+w -R + ''; + + # Hyperlight scripts use cargo in a bunch of ways that don't + # make sense for Nix cargo, including the `rustup +toolchain` + # syntax to use a specific toolchain and `cargo install`, so we + # build wrappers for rustc and cargo that enable this. The + # scripts also use `rustup toolchain install` in some cases, in + # order to work in CI, so we provide a fake rustup that does + # nothing as well. + rustup-like-wrapper = name: pkgs.writeShellScriptBin name + (let + clause = name: toolchain: '' + +${name}) base="${toolchain.rust}"; shift 1; ;; + +${name}-${toolchain.rust.toolchainVersionAttrs.date}) base="${toolchain.rust}"; shift 1; ;; + ''; + clauses = lib.strings.concatStringsSep "\n" + (lib.mapAttrsToList clause toolchains); + in '' + base="${toolchains.stable.rust}" + ${materialiseDeps} + case "$1" in + ${clauses} + install) exit 0; ;; + esac + export PATH="$base/bin:$PATH" + exec "$base/bin/${name}" "$@" + ''); + fake-rustup = pkgs.symlinkJoin { + name = "fake-rustup"; + paths = [ + (pkgs.writeShellScriptBin "rustup" "") + (rustup-like-wrapper "rustc") + (rustup-like-wrapper "cargo") + ]; + }; + + buildRustPackageClang = rust-platform.buildRustPackage.override { stdenv = clangStdenv; }; + + # Keep the version in lockstep with the one pinned in the Justfile. + # `dev/update-cargo-hyperlight-version.sh` updates both. + cargo-hyperlight = let + version = "0.1.14"; + # The .crate tarball is hashed flat, so the pin can be refreshed + # from the checksum crates.io publishes, without running Nix. + src = fetchurl { + url = "https://static.crates.io/crates/cargo-hyperlight/cargo-hyperlight-${version}.crate"; + name = "cargo-hyperlight-${version}.tar.gz"; + hash = "sha256-xS8cnUthc677Zv3C4+ES3bNZ/i+9uq/hubol96xXizk="; + }; + in buildRustPackageClang { + pname = "cargo-hyperlight"; + inherit version src; + # The tarball ships a Cargo.lock, so the dependencies need no + # vendor hash of their own. + cargoDeps = rust-platform.importCargoLock { + lockFile = runCommand "cargo-hyperlight-${version}-Cargo.lock" {} + "tar -xzOf ${src} cargo-hyperlight-${version}/Cargo.lock > $out"; + }; + doCheck = false; + }; + in (buildRustPackageClang (mkDerivationAttrs: { + pname = "hyperlight"; + version = "0.0.0"; + src = lib.cleanSource ./.; + cargoDeps = deps; + + nativeBuildInputs = [ + azure-cli + just + dotnet-sdk_9 + llvmPackages_18.llvm + gh + lld + pkg-config + ffmpeg + mkvtoolnix + wasm-tools + jq + jaq + gdb + zlib + cargo-hyperlight + cargo-component + typos + flatbuffers + cargo-fuzz + wit-bindgen + ] ++ (if system == "x86_64-linux" || system == "aarch64-linux" + then [ valgrind ] + else []); + buildInputs = [ + pango + cairo + openssl + ]; + + auditable = false; + + LIBCLANG_PATH = "${pkgs.llvmPackages_18.libclang.lib}/lib"; + # Use unwrapped clang for compiling guests + HYPERLIGHT_GUEST_clang = "${clang.cc}/bin/clang"; + + RUST_NIGHTLY = "${toolchains.nightly.rust}"; + # Set this through shellHook rather than nativeBuildInputs to be + # really sure that it overrides the real cargo. + postHook = '' + export PATH="${fake-rustup}/bin:$PATH" + ''; + })).overrideAttrs(oA: { + hardeningDisable = [ "all" ]; + }); + }); + }; +} From 813af45255a662203377821b83a2b2ed45d4b184 Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:23:41 +0100 Subject: [PATCH 2/7] [deps] Update hyperlight core packages to 0.18.0 Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- Cargo.lock | 841 ++++++++++-------- Cargo.toml | 12 +- .../src/sandbox/sandbox_builder.rs | 55 +- src/hyperlight_wasm_macro/src/wasmguest.rs | 4 +- src/hyperlight_wasm_runtime/src/component.rs | 15 +- src/hyperlight_wasm_runtime/src/hostfuncs.rs | 3 + src/hyperlight_wasm_runtime/src/marshal.rs | 42 +- src/hyperlight_wasm_runtime/src/module.rs | 18 +- src/hyperlight_wasm_runtime/src/platform.rs | 2 + 9 files changed, 552 insertions(+), 440 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07f8e81f..b1d4b559 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,9 +117,9 @@ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "arbitrary" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" [[package]] name = "arrayvec" @@ -135,7 +135,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -152,9 +152,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.18.0" +version = "1.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +checksum = "faac5829c2b74c28f830747e7818ccfb684261b5f48a1118b1e2a13d36dfab13" dependencies = [ "aws-lc-sys", "zeroize", @@ -162,9 +162,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.44.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +checksum = "f1622d8446a2d4b2ce0c7eefc73dd43a99779028d5ee5c2dd8073a658ba8a2bc" dependencies = [ "cc", "cmake", @@ -179,13 +179,19 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bindgen" version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "cexpr", "clang-sys", "itertools 0.13.0", @@ -207,9 +213,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.1" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" [[package]] name = "blake3" @@ -221,7 +227,7 @@ dependencies = [ "cc", "cfg-if", "constant_time_eq", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", ] [[package]] @@ -291,13 +297,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -308,9 +314,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "camino" -version = "1.2.5" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" dependencies = [ "serde_core", ] @@ -389,9 +395,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.4.7" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54413ede23c2daf518f35156dfde027feb2374004d63bd497f983c8db9c0e313" +checksum = "877bf67ac8e52449eb2f9e98a344ea163beb70dd1f9eebe3cc5357dcfeaee4df" dependencies = [ "find-msvc-tools", "jobserver", @@ -422,12 +428,12 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "rand_core 0.10.1", ] @@ -513,14 +519,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" [[package]] name = "cmake" @@ -548,9 +554,9 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "console" -version = "0.16.4" +version = "0.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe5f465a4f6fee88fad41b85d990f84c835335e85b5d9e6e63e0d06d28cba7c" +checksum = "e96a4956774c13c126a8b5af4daa79384f4d826534c95a02d76afb39e2ab64e3" dependencies = [ "encode_unicode", "libc", @@ -607,6 +613,12 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + [[package]] name = "cpp_demangle" version = "0.5.1" @@ -627,20 +639,20 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [ "libc", ] [[package]] name = "cranelift-assembler-x64" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6835dba958b2ab7ab523e7e99296e0524317f60430a00cf5850562ef78ea7001" +checksum = "9e92993516bcc43fd4e511b31d2e0c0c24f6b7ac18bb39e32cac2bfc05ea378e" dependencies = [ - "cranelift-assembler-x64-meta 0.123.14", + "cranelift-assembler-x64-meta 0.123.18", ] [[package]] @@ -654,11 +666,11 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64-meta" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6e4ce8ee6d899381fbdd9e6561336c651189d46cecaeee09b29e8d80aa786e" +checksum = "97eeeb61b08ec484f274119faf3a8a1b80dd300b0208c0247d16d05982fc89fe" dependencies = [ - "cranelift-srcgen 0.123.14", + "cranelift-srcgen 0.123.18", ] [[package]] @@ -672,11 +684,11 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb6d37015df7ea4b60450c1229ad5f5819a1fb27434b063f8e6216dfbd0c42a" +checksum = "782eb44158681a105d157cb0ce63e3dc83f78ef5674266c12234f49da3f5c6e8" dependencies = [ - "cranelift-entity 0.123.14", + "cranelift-entity 0.123.18", ] [[package]] @@ -691,9 +703,9 @@ dependencies = [ [[package]] name = "cranelift-bitset" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986bea0b0858b55192782120032ce9c15943fa073f186f6e479653c59e62c329" +checksum = "edd59af193204c4f025fb2c2d9ee0aeb1f60929edf000b0dfa3d45543a62f264" dependencies = [ "serde", "serde_derive", @@ -712,23 +724,23 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f30aeb2de7f97d6f26b4a1642615834daad58e2e4d7c027810010a3a32f22be" +checksum = "b1c29bd985057d790db25f6bc60b369b311aa2d75c2f496a7e9993585bfc7d60" dependencies = [ "bumpalo", - "cranelift-assembler-x64 0.123.14", - "cranelift-bforest 0.123.14", - "cranelift-bitset 0.123.14", - "cranelift-codegen-meta 0.123.14", - "cranelift-codegen-shared 0.123.14", - "cranelift-control 0.123.14", - "cranelift-entity 0.123.14", - "cranelift-isle 0.123.14", + "cranelift-assembler-x64 0.123.18", + "cranelift-bforest 0.123.18", + "cranelift-bitset 0.123.18", + "cranelift-codegen-meta 0.123.18", + "cranelift-codegen-shared 0.123.18", + "cranelift-control 0.123.18", + "cranelift-entity 0.123.18", + "cranelift-isle 0.123.18", "gimli 0.32.3", "hashbrown 0.15.5", "log", - "pulley-interpreter 36.0.14", + "pulley-interpreter 36.0.18", "regalloc2 0.12.2", "rustc-hash", "serde", @@ -770,15 +782,15 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd5dd137fcdedef33b6fd40edf1ced024460d764ceb75833e8198a843395945c" +checksum = "d9ef8a8495f19212f92db8425f768ffc67000c5cb417a0664475a8d09596700f" dependencies = [ - "cranelift-assembler-x64-meta 0.123.14", - "cranelift-codegen-shared 0.123.14", - "cranelift-srcgen 0.123.14", + "cranelift-assembler-x64-meta 0.123.18", + "cranelift-codegen-shared 0.123.18", + "cranelift-srcgen 0.123.18", "heck", - "pulley-interpreter 36.0.14", + "pulley-interpreter 36.0.18", ] [[package]] @@ -796,9 +808,9 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab54b260ef23a8f0f536679b9fc3b3b3e05353e8d1448f3ab83df02078e8be9b" +checksum = "a3aa5099097666baf45bd68ef036327c8f29d8785fffaaa7db3b3b6b7e94bcc6" [[package]] name = "cranelift-codegen-shared" @@ -808,9 +820,9 @@ checksum = "ad4db1e87a65e9c5a832e3ede160830d4e34df938ac38b5604819f8825687e73" [[package]] name = "cranelift-control" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3e569779ad70537f34a670d444ee3d75ae583b2023913f4682814b0979f7e8" +checksum = "26f67f4f4e92c2934f40c2ff4574400bd27326932aad937a438b7fb459f60a63" dependencies = [ "arbitrary", ] @@ -826,11 +838,11 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff53acc85f5c5f7d9315ff133a6671d329a0f04aa2d1a8a2e81d59709ccddcb" +checksum = "8393d09f0abaa504896069e79f4eb6f15eb1853e5645732b082dac1ed292aaa8" dependencies = [ - "cranelift-bitset 0.123.14", + "cranelift-bitset 0.123.18", "serde", "serde_derive", ] @@ -849,11 +861,11 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5976c0ff5bfadf61cd8bda81fea78ee5a07018b9cd03e66c0952c56684928b" +checksum = "580cfaecbd11476dd82f6a393123dcbd9dfe583467df8d0c8441c641444d4985" dependencies = [ - "cranelift-codegen 0.123.14", + "cranelift-codegen 0.123.18", "log", "smallvec", "target-lexicon", @@ -874,9 +886,9 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b4f73d2288e9480fd2d1d9ab576394dce4805443d6148c6d819dbf78865ce4" +checksum = "8c044843adb7d94b1facebaad846c0a762f79a77953417e3f0182093bcbbdc38" [[package]] name = "cranelift-isle" @@ -886,11 +898,11 @@ checksum = "b6a658670f779afc2df083be201ebe54805f69b7b9ffa8dab04142b72ed751c9" [[package]] name = "cranelift-native" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9650c2baf22fa1e2542a5bdd8152616ec2023d929c4cbb450ff677ad8d9c21" +checksum = "b9d4c1707214e53f2040e4d13430069ea22623287b2750ed6d62e40eba88d91a" dependencies = [ - "cranelift-codegen 0.123.14", + "cranelift-codegen 0.123.18", "libc", "target-lexicon", ] @@ -908,9 +920,9 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.123.14" +version = "0.123.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad4f61ae701d73c326d3df08c366b29ad10f1ba06c245092f217b8d2306746b" +checksum = "d355a35edc49f628db7b793f3527eed31b560e77c3e8ed0e5258aad8df8a5249" [[package]] name = "cranelift-srcgen" @@ -920,9 +932,9 @@ checksum = "244d9cd0759b0a3ccdd587cafb13434f9ea43b5c9d07701d277daf5cd0f7b7c1" [[package]] name = "crc32fast" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" dependencies = [ "cfg-if", ] @@ -964,18 +976,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -983,9 +995,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.20" +version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" dependencies = [ "crossbeam-utils", ] @@ -1001,9 +1013,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" [[package]] name = "crunchy" @@ -1067,9 +1079,9 @@ dependencies = [ [[package]] name = "defmt" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" dependencies = [ "bitflags 1.3.2", "defmt-macros", @@ -1077,21 +1089,21 @@ dependencies = [ [[package]] name = "defmt-macros" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" dependencies = [ "defmt-parser", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", ] [[package]] name = "defmt-parser" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" dependencies = [ "thiserror", ] @@ -1177,7 +1189,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -1188,9 +1200,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "elfcore" @@ -1226,11 +1238,16 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.35" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" dependencies = [ "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", ] [[package]] @@ -1264,9 +1281,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "erased-serde" @@ -1331,9 +1348,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25905e51abafe4dcea6c15fec58c57b601cdbd0ee53d22ea1d3016c587d39b" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" [[package]] name = "fixedbitset" @@ -1347,7 +1364,7 @@ version = "25.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "rustc_version", ] @@ -1439,7 +1456,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -1477,7 +1494,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bafc7e33650ab9f05dcc16325f05d56b8d10393114e31a19a353b86fa60cfe7" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "cfg-if", "log", "managed", @@ -1497,9 +1514,9 @@ dependencies = [ [[package]] name = "generator" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b854b0e584ead1a33f18b2fcad7cf7be18b3875c78816b753639aa501513ae" +checksum = "1be81b31c9ce4caf7f3178eeb90662bb1864d3ad363ec6bdada3201adff19c37" dependencies = [ "cc", "cfg-if", @@ -1595,7 +1612,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddddbf932745a6be37109b6112d3ee09696106f848449069d3a57bba937ab82e" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "libc", "libgit2-sys", "log", @@ -1633,9 +1650,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" dependencies = [ "atomic-waker", "bytes", @@ -1756,18 +1773,18 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hybrid-array" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" dependencies = [ "typenum", ] [[package]] name = "hyper" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" dependencies = [ "atomic-waker", "bytes", @@ -1787,9 +1804,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.9" +version = "0.27.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" dependencies = [ "http", "hyper", @@ -1816,16 +1833,17 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "futures-channel", "futures-util", "http", "http-body", + "httparse", "hyper", "ipnet", "libc", @@ -1839,12 +1857,12 @@ dependencies = [ [[package]] name = "hyperlight-common" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad5576d6ef947dc2822c2f5038ddff8325c158ddef4cbabf9d0b125294cdb0f" +checksum = "360d5876788b26af66bf055bca6b4f2c9c930a0fdcaebda4bd7f808c6bd93068" dependencies = [ "anyhow", - "bitflags 2.13.1", + "bitflags 2.13.2", "bytemuck", "bytes", "fixedbitset", @@ -1859,9 +1877,9 @@ dependencies = [ [[package]] name = "hyperlight-component-macro" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14abdc36d8ca8091524d2e02b06a3af85416831ca98afbb93741375febebc17f" +checksum = "ec066e71934ebaddf70345ead15c4d01df880a9cd52fafb2934a559c4fa8a991" dependencies = [ "env_logger", "hyperlight-component-util", @@ -1869,46 +1887,47 @@ dependencies = [ "prettyplease 0.3.0", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] name = "hyperlight-component-util" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dd660389ceaabca31e24c963d6080e0286638def0c2b2b54dac52924395896" +checksum = "271a2a808bc2e6b0058ca8dd6aea81c0dca91ec7919d167315289190bb64e767" dependencies = [ "itertools 0.15.0", "prettyplease 0.3.0", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", "tracing", - "wasmparser 0.257.1", + "wasmparser 0.259.0", "wat", "wit-component", - "wit-parser 0.257.1", + "wit-parser 0.259.0", ] [[package]] name = "hyperlight-guest" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816f673f3f8ef6d5703796bf92927b85177ad1baac6f391551a88451a9e46a7e" +checksum = "7faceeab52cbc0f128e75fa4b0ee9fce17c3c462d7776feca66f41e98bf2a4bb" dependencies = [ "anyhow", "flatbuffers", "hyperlight-common", "hyperlight-guest-tracing", + "itertools 0.15.0", "serde_json", "tracing", ] [[package]] name = "hyperlight-guest-bin" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2d0ea739be89822992706da9dc6812ce359b654b328efd6141ba1549751907" +checksum = "e7eff3c3b94ae4da51f03d535e9a13a4132f5f87694a19514c038a9517cfd750" dependencies = [ "buddy_system_allocator", "flatbuffers", @@ -1925,21 +1944,21 @@ dependencies = [ [[package]] name = "hyperlight-guest-macro" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875d03a9e4d302f29d8feb57faff937f80c6f69ec9d31b32f41c41721144e25d" +checksum = "f957baa8d97e2787589bf084a18096c08ab4dd22d4f5a040f153f9f719330ec3" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] name = "hyperlight-guest-tracing" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f43a3d5d3fa245ce0fccee8a48ad7d94ec479e0898fc8f91fd440a1d65830c6" +checksum = "6a12c240f87acd92e80ea08e9a405e781e4a15b9f38fee5fe261e9ce69b816d3" dependencies = [ "hyperlight-common", "spin 0.12.3", @@ -1949,13 +1968,13 @@ dependencies = [ [[package]] name = "hyperlight-host" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85dcf5ae7a578e1b09bdeb76cc3b3ca8e6e57d6395d2f57204aec45c1bbbde9" +checksum = "40f8b85ddd688890477158b9921b228973d1b70c84b866698838df0f32d2aa44" dependencies = [ "anyhow", "bindgen", - "bitflags 2.13.1", + "bitflags 2.13.2", "blake3", "bytemuck", "cc", @@ -1983,11 +2002,11 @@ dependencies = [ "opentelemetry", "page_size", "parking_lot", - "rand 0.10.2", + "rand 0.10.3", "rust-embed", "serde", "serde_json", - "sha2 0.11.0", + "sha2 0.11.1", "tempfile", "termcolor", "thiserror", @@ -2004,9 +2023,9 @@ dependencies = [ [[package]] name = "hyperlight-libc" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108dd0e7335821a2ef0dfa375c08236c3302a117045822e2aa68c64147f8e895" +checksum = "a74af1c1cc60140c000a6ebd4eba3121bc2b8f56f134163c25eadca1146b73e0" dependencies = [ "anyhow", "bindgen", @@ -2068,7 +2087,7 @@ dependencies = [ "cargo_metadata", "clap", "object 0.39.1", - "wasmtime 36.0.14", + "wasmtime 36.0.18", "wasmtime 47.0.4", ] @@ -2097,7 +2116,7 @@ dependencies = [ "hyperlight-wasm-macro", "spin 0.12.3", "tracing", - "wasmtime 36.0.14", + "wasmtime 36.0.18", "wasmtime 47.0.4", ] @@ -2243,9 +2262,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.14.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", "hashbrown 0.17.1", @@ -2255,9 +2274,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.12.1" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] name = "is_terminal_polyfill" @@ -2300,9 +2319,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.35" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" dependencies = [ "defmt", "jiff-core", @@ -2315,18 +2334,19 @@ dependencies = [ [[package]] name = "jiff-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" dependencies = [ "defmt", + "log", ] [[package]] name = "jiff-static" -version = "0.2.35" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" dependencies = [ "jiff-core", "proc-macro2", @@ -2346,9 +2366,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.104" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" dependencies = [ "cfg-if", "futures-util", @@ -2357,9 +2377,9 @@ dependencies = [ [[package]] name = "junction" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "160f2eade097f30263b548aae5deb12ad349c909baa710fa24b92c9090b2e006" +checksum = "cde48f36530cbd91b65f050101e6c056d6eb743cea2a8f0f19beef69c6742ff8" dependencies = [ "scopeguard", "windows-sys 0.61.2", @@ -2382,20 +2402,20 @@ checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" [[package]] name = "kvm-bindings" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cf0ca75d59e9d298647c59cf6c5286fa048120caa77972a7a504a0824d234f" +checksum = "e3819cba3d5b448587dbed4b186fb61b0a8d02c5eb88846c9463aa514afe61a8" dependencies = [ "vmm-sys-util", ] [[package]] name = "kvm-ioctls" -version = "0.25.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ac372c120eb893b086d1a12027669cf2b478d1f71204021ffa7adf57948d63" +checksum = "d7a59b7ac62625a405112180b56a99acb4498e1d18f5a7c0cd0916c79a076b0a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "kvm-bindings", "libc", "vmm-sys-util", @@ -2403,9 +2423,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "leb128fmt" @@ -2426,9 +2446,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.189" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "libgit2-sys" @@ -2460,18 +2480,18 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.20" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ "libc", ] [[package]] name = "libz-sys" -version = "1.1.29" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bc9657773828b90eeb625adff10eeac83cc21bbfd8e23a03eaa8a33c9e28d9" +checksum = "f710a23e6dbf193214fd46ca56a9d6864e550abe86202184532ae7275e46de19" dependencies = [ "cc", "libc", @@ -2496,7 +2516,7 @@ checksum = "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -2577,9 +2597,9 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "memfd" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" +checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90" dependencies = [ "rustix", ] @@ -2600,7 +2620,7 @@ version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db0d8f1fc9e62caebd0319e11eaec5822b0186c171568f0480b46a0137f9108" dependencies = [ - "base64", + "base64 0.22.1", "evmap", "http-body-util", "hyper", @@ -2662,9 +2682,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "1.2.2" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", "wasi", @@ -2673,9 +2693,9 @@ dependencies = [ [[package]] name = "mshv-bindings" -version = "0.6.9" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83303108160c2b7a7bdd25000ee679384e19471386d23e501ed832574c9229ef" +checksum = "9b4b2414499597c6e31b1cd25239f19e8e8c55023b3bf8fcfa44d927cff6a123" dependencies = [ "libc", "num_enum", @@ -2685,9 +2705,9 @@ dependencies = [ [[package]] name = "mshv-ioctls" -version = "0.6.9" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db4449ac7012237b133da366f5b32ce4af1f8caf770486e5a9d54f7f6b73c4c" +checksum = "c30d1b5b76a709e30b46248f52bbb44dde04a659d6d58255c7f06c88d528d210" dependencies = [ "libc", "mshv-bindings", @@ -2695,6 +2715,12 @@ dependencies = [ "vmm-sys-util", ] +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + [[package]] name = "nibble_vec" version = "0.1.0" @@ -2710,7 +2736,7 @@ version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "cfg-if", "cfg_aliases", "libc", @@ -2891,9 +2917,9 @@ dependencies = [ [[package]] name = "opentelemetry-semantic-conventions" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d288b1e1bc3590052fbb8f0f635ef248dd9022cf1fbaeb6582b7ad6081a17b87" +checksum = "7a3cf639fefd3e852869114f9925b578da6dd8e99281a2089bb0e773ead46962" [[package]] name = "opentelemetry_sdk" @@ -3065,9 +3091,9 @@ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "portable-atomic-util" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" dependencies = [ "portable-atomic", ] @@ -3119,7 +3145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0" dependencies = [ "proc-macro2", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -3174,13 +3200,13 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb0a4b56042e461cc64456650182938e2d1ede98fa0c8a975027416a2809c414" +checksum = "334ae8982dcf354e5f28e79fc6f935601e028b729cc174d3937eeeaa859057b8" dependencies = [ - "cranelift-bitset 0.123.14", + "cranelift-bitset 0.123.18", "log", - "pulley-macros 36.0.14", + "pulley-macros 36.0.18", "wasmtime-internal-math", ] @@ -3198,9 +3224,9 @@ dependencies = [ [[package]] name = "pulley-macros" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244667bea2e214273442a71f26adb12b88a41f66718fb2c6eea47c00f0dc325f" +checksum = "9cd207bca4bc5e46cb4fcea87196dcbd78befc628c64c67d11dc99fce5cd5369" dependencies = [ "proc-macro2", "quote", @@ -3276,9 +3302,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -3334,7 +3360,7 @@ version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] @@ -3363,16 +3389,15 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] name = "redox_users" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ - "getrandom 0.2.17", "libredox", "thiserror", ] @@ -3437,11 +3462,11 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "futures-channel", "futures-core", @@ -3482,9 +3507,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.12.0" +version = "8.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e7760e252aaba7b09f4be00e36476cf585bdb68a53552ac954cdf504ab4bc9" +checksum = "19afa5b4b6a611de00bd1bdae6ae6f39084c9399f0679c3f52d8469cf335cc23" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -3493,9 +3518,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.12.0" +version = "8.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcfc4d6f53af43755f7a723e4b6b8794fcce052a178dd8c6c1dadc5f5343097" +checksum = "e0d8afda6374eac59e066abee06d265247ebbaf3006cf878e2879e8356e34053" dependencies = [ "mime_guess", "proc-macro2", @@ -3508,12 +3533,12 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "8.12.0" +version = "8.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ffa149f6aa81b58a5b3011d01a857c4ed12c7a732d2c51947a4c7c692185f0" +checksum = "0d84e8ba78bd384263e5922f084cbe1b081c3b7e69add59c8fb097b879ba968a" dependencies = [ "globset", - "sha2 0.11.0", + "sha2 0.11.1", "walkdir", ] @@ -3540,11 +3565,11 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys", @@ -3553,9 +3578,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "aws-lc-rs", "once_cell", @@ -3567,9 +3592,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -3615,9 +3640,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" dependencies = [ "windows-sys 0.61.2", ] @@ -3645,13 +3670,13 @@ dependencies = [ [[package]] name = "scroll_derive" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed76efe62313ab6610570951494bdaa81568026e0318eaa55f167de70eeea67d" +checksum = "e1a36a382ed65dbcc0ab47fd5e9a94112417ccd34560a392ef3b7b0f0ec39148" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", ] [[package]] @@ -3660,7 +3685,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "core-foundation", "core-foundation-sys", "libc", @@ -3736,14 +3761,14 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] name = "serde_json" -version = "1.0.151" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "itoa", "memchr", @@ -3754,9 +3779,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" dependencies = [ "serde_core", ] @@ -3774,12 +3799,12 @@ dependencies = [ [[package]] name = "sha2" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "digest 0.11.3", ] @@ -3823,6 +3848,12 @@ dependencies = [ "libc", ] +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "sketches-ddsketch" version = "0.3.1" @@ -3837,9 +3868,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.2" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" dependencies = [ "serde", ] @@ -3918,9 +3949,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" dependencies = [ "proc-macro2", "quote", @@ -3938,13 +3969,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", ] [[package]] @@ -3988,22 +4019,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] @@ -4037,9 +4068,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.53.1" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "a0c168a474b95bfecfe908a65d4bdffc523144b649a74c09c286afb35d53e0bc" dependencies = [ "bytes", "libc", @@ -4060,14 +4091,14 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] name = "tokio-rustls" -version = "0.26.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" dependencies = [ "rustls", "tokio", @@ -4086,9 +4117,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" dependencies = [ "bytes", "futures-core", @@ -4100,9 +4131,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.6+spec-1.1.0" +version = "1.1.8+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" dependencies = [ "indexmap", "serde_core", @@ -4115,18 +4146,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.1+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.13+spec-1.1.0" +version = "0.25.17+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ "indexmap", "toml_datetime", @@ -4136,18 +4167,18 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.3+spec-1.1.0" +version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" [[package]] name = "tonic" @@ -4156,7 +4187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", - "base64", + "base64 0.22.1", "bytes", "http", "http-body", @@ -4222,7 +4253,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "bytes", "futures-util", "http", @@ -4359,15 +4390,15 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "unicase" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "unicode-width" @@ -4413,9 +4444,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.26.1" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -4463,9 +4494,9 @@ dependencies = [ [[package]] name = "want" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" dependencies = [ "try-lock", ] @@ -4487,9 +4518,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.127" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" dependencies = [ "cfg-if", "once_cell", @@ -4500,19 +4531,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.77" +version = "0.4.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" dependencies = [ "js-sys", + "tokio", "wasm-bindgen", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.127" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4520,22 +4552,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.127" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.127" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" dependencies = [ "unicode-ident", ] @@ -4562,24 +4594,34 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.257.1" +version = "0.259.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8ad9f0a39050867bda22e6486c316e2e52d20a42154d5bc433934bf738d085" +checksum = "b1d0246511d901aacf25d2dc9111f0054947de5e093fe662099e709ff7530dc3" dependencies = [ "leb128fmt", - "wasmparser 0.257.1", + "wasmparser 0.259.0", +] + +[[package]] +name = "wasm-encoder" +version = "0.262.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4495a6f85dd94c411c749303efcbc5defade0b0cbdbc0541495241ab917a9b5a" +dependencies = [ + "leb128fmt", + "wasmparser 0.262.0", ] [[package]] name = "wasm-metadata" -version = "0.257.1" +version = "0.259.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57460ad9bce753e8a80d47a445cb87c8724ea57f463d9c906a947c41032ce1ac" +checksum = "4e7bf119eb01f4a246864c10bd87c8f26c566350abb25aa4d5273c415bbab338" dependencies = [ "anyhow", "indexmap", - "wasm-encoder 0.257.1", - "wasmparser 0.257.1", + "wasm-encoder 0.259.0", + "wasmparser 0.259.0", ] [[package]] @@ -4588,7 +4630,7 @@ version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "hashbrown 0.15.5", "indexmap", "semver", @@ -4601,7 +4643,7 @@ version = "0.252.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "hashbrown 0.17.1", "indexmap", "semver", @@ -4610,17 +4652,28 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.257.1" +version = "0.259.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92fc335fb6d48f46bda1d8b26b69e28320c15ac3272208333833d6e217e2b4a" +checksum = "0f7c12eac7bb587801590f6a67ff0bc84d0748513864b71108e4b311cc3df694" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "hashbrown 0.17.1", "indexmap", "semver", "serde", ] +[[package]] +name = "wasmparser" +version = "0.262.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "974d643b125b272607e2fff8012ea14a8328acd7621e4bafa7afb32500052b1b" +dependencies = [ + "bitflags 2.13.2", + "indexmap", + "semver", +] + [[package]] name = "wasmprinter" version = "0.236.1" @@ -4645,13 +4698,13 @@ dependencies = [ [[package]] name = "wasmtime" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d05c745dc0978e589ef295958f3130122afc33d96af6bad3f0f06dbe7ac43a8" +checksum = "70095b9fe63cc2a87ed206729e11544610decc184c62898c5d201ff1d666d82e" dependencies = [ "addr2line 0.25.1", "anyhow", - "bitflags 2.13.1", + "bitflags 2.13.2", "bumpalo", "cc", "cfg-if", @@ -4665,7 +4718,7 @@ dependencies = [ "object 0.37.3", "once_cell", "postcard", - "pulley-interpreter 36.0.14", + "pulley-interpreter 36.0.18", "rustix", "semver", "serde", @@ -4673,18 +4726,18 @@ dependencies = [ "smallvec", "target-lexicon", "wasmparser 0.236.1", - "wasmtime-environ 36.0.14", + "wasmtime-environ 36.0.18", "wasmtime-internal-asm-macros", - "wasmtime-internal-component-macro 36.0.14", - "wasmtime-internal-component-util 36.0.14", - "wasmtime-internal-cranelift 36.0.14", - "wasmtime-internal-fiber 36.0.14", - "wasmtime-internal-jit-debug 36.0.14", - "wasmtime-internal-jit-icache-coherence 36.0.14", + "wasmtime-internal-component-macro 36.0.18", + "wasmtime-internal-component-util 36.0.18", + "wasmtime-internal-cranelift 36.0.18", + "wasmtime-internal-fiber 36.0.18", + "wasmtime-internal-jit-debug 36.0.18", + "wasmtime-internal-jit-icache-coherence 36.0.18", "wasmtime-internal-math", "wasmtime-internal-slab", - "wasmtime-internal-unwinder 36.0.14", - "wasmtime-internal-versioned-export-macros 36.0.14", + "wasmtime-internal-unwinder 36.0.18", + "wasmtime-internal-versioned-export-macros 36.0.18", "wasmtime-internal-winch", "windows-sys 0.60.2", ] @@ -4697,7 +4750,7 @@ checksum = "4cdaf5b8af5713146e3a62d940c71e3eb2ad1ebacfa6b55f0c8509a5b4b87718" dependencies = [ "addr2line 0.26.1", "async-trait", - "bitflags 2.13.1", + "bitflags 2.13.2", "bumpalo", "cc", "cfg-if", @@ -4733,13 +4786,13 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd1d43cfaa1a0859d2f4fccc15e7e571e2a88b357e81bc88ba6c501b83d925d" +checksum = "a67ea8904b6e369e2218780bd1f9186f1980cb616445eb2c1f3c4e45c8397865" dependencies = [ "anyhow", - "cranelift-bitset 0.123.14", - "cranelift-entity 0.123.14", + "cranelift-bitset 0.123.18", + "cranelift-entity 0.123.18", "gimli 0.32.3", "indexmap", "log", @@ -4753,7 +4806,7 @@ dependencies = [ "wasm-encoder 0.236.1", "wasmparser 0.236.1", "wasmprinter 0.236.1", - "wasmtime-internal-component-util 36.0.14", + "wasmtime-internal-component-util 36.0.18", ] [[package]] @@ -4789,25 +4842,25 @@ dependencies = [ [[package]] name = "wasmtime-internal-asm-macros" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515dd7158bf1719b41290cd2e6a2a46ec944484146816992f195af3720e49b3f" +checksum = "d0488a52ae93e654baecb08ce04d15d478756eb2168c2bdab7915710109161ce" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-internal-component-macro" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfca017b7daa80ff217c66f105ee20e674d87b7c11dca85bbb9d0146e9f443fb" +checksum = "377e406c3f8e7bea64db3cb3ee0d406c331e8fc09d8cb2e7bf9ad74cb5d3b31a" dependencies = [ "anyhow", "proc-macro2", "quote", "syn 2.0.119", - "wasmtime-internal-component-util 36.0.14", - "wasmtime-internal-wit-bindgen 36.0.14", + "wasmtime-internal-component-util 36.0.18", + "wasmtime-internal-wit-bindgen 36.0.18", "wit-parser 0.236.1", ] @@ -4828,9 +4881,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-component-util" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c3e218b51d2ef9eb181499e42c691512c1bc11dd6dc7746807a9b2b9290369c" +checksum = "97c24503bb712afe2c797dc291b96e57556ee62c35fd951f87e96088324de37c" [[package]] name = "wasmtime-internal-component-util" @@ -4851,29 +4904,29 @@ dependencies = [ [[package]] name = "wasmtime-internal-cranelift" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba1736927b58e50e741e407da7c037c0250f3e213833a09c89dcd8f73ae2eac" +checksum = "f63ea7ee133de9109a4a1fc63dae3afc9ea32e92b8dada824fa4595dbf175f80" dependencies = [ "anyhow", "cfg-if", - "cranelift-codegen 0.123.14", - "cranelift-control 0.123.14", - "cranelift-entity 0.123.14", - "cranelift-frontend 0.123.14", - "cranelift-native 0.123.14", + "cranelift-codegen 0.123.18", + "cranelift-control 0.123.18", + "cranelift-entity 0.123.18", + "cranelift-frontend 0.123.18", + "cranelift-native 0.123.18", "gimli 0.32.3", "itertools 0.14.0", "log", "object 0.37.3", - "pulley-interpreter 36.0.14", + "pulley-interpreter 36.0.18", "smallvec", "target-lexicon", "thiserror", "wasmparser 0.236.1", - "wasmtime-environ 36.0.14", + "wasmtime-environ 36.0.18", "wasmtime-internal-math", - "wasmtime-internal-versioned-export-macros 36.0.14", + "wasmtime-internal-versioned-export-macros 36.0.18", ] [[package]] @@ -4905,9 +4958,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-fiber" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b238e4c20bddb900ec0cb380252d63e8d0644fd94de001119574f5921e895d9" +checksum = "69662a0a4dbe9784d1e8add9e3c5d2db0ca348085c624c27a70992dbe2eff4a3" dependencies = [ "anyhow", "cc", @@ -4915,7 +4968,7 @@ dependencies = [ "libc", "rustix", "wasmtime-internal-asm-macros", - "wasmtime-internal-versioned-export-macros 36.0.14", + "wasmtime-internal-versioned-export-macros 36.0.18", "windows-sys 0.60.2", ] @@ -4936,12 +4989,12 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-debug" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f259b13685ad51e3dcf58cb69031279ed0d79c25bc3ccc8b50e7160ed04fbfe" +checksum = "00cb07d23903c0be359d6b920d94774ea322759c3f4d6721b61afa03602e4804" dependencies = [ "cc", - "wasmtime-internal-versioned-export-macros 36.0.14", + "wasmtime-internal-versioned-export-macros 36.0.18", ] [[package]] @@ -4956,9 +5009,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-icache-coherence" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fed85537936b16460bac352ad149052c025db50467c7bc539dd47b31439374" +checksum = "aa2b47c37a6d026e2755fe2cf7ec5c1f4b0fba62e448ea910cdf6a07a4982c6a" dependencies = [ "anyhow", "cfg-if", @@ -4980,28 +5033,28 @@ dependencies = [ [[package]] name = "wasmtime-internal-math" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82fff10da41d0d15d90ebba70946a0aa16ed0957ae7b77e0b6d2a46e8221e555" +checksum = "b269f0ba44102c57fd5f94f1bf4395ccd4fc2b84698fc78f627a6f2a47131a62" dependencies = [ "libm", ] [[package]] name = "wasmtime-internal-slab" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44a8c097bab08d349d57dce1ab818859fefbe261ab3632b38fe127b1b551108" +checksum = "0e35ac9d503d503703cd24d532e53e2e93c86109b451df40a9801500045aee25" [[package]] name = "wasmtime-internal-unwinder" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f40a57d5e7c221ce56391d7dca0a918ba17ea00185462c7facbf534d7745184" +checksum = "83ce1d0930da44ed375701e6b4f187b46249f7efe2b1d8c1c77229a4adc82de9" dependencies = [ "anyhow", "cfg-if", - "cranelift-codegen 0.123.14", + "cranelift-codegen 0.123.18", "log", "object 0.37.3", ] @@ -5021,9 +5074,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-versioned-export-macros" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e085bfce1cb2089dbeef6e280a5d598666923d3dcd308712fe429fe43c9d19f5" +checksum = "3b6633be262400bd7abab4ff767a16e8b6a41ff117be54bf76dabecea9f96225" dependencies = [ "proc-macro2", "quote", @@ -5043,29 +5096,29 @@ dependencies = [ [[package]] name = "wasmtime-internal-winch" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4916cd526e1ce294984cc5b70264cfc0ca103b41ca665b58728bde250b6b82f" +checksum = "509d1e1cf8e3b3306f291407c92bca8381d9294f8c54ad74b692538f1f5b23c7" dependencies = [ "anyhow", - "cranelift-codegen 0.123.14", + "cranelift-codegen 0.123.18", "gimli 0.32.3", "object 0.37.3", "target-lexicon", "wasmparser 0.236.1", - "wasmtime-environ 36.0.14", - "wasmtime-internal-cranelift 36.0.14", + "wasmtime-environ 36.0.18", + "wasmtime-internal-cranelift 36.0.18", "winch-codegen", ] [[package]] name = "wasmtime-internal-wit-bindgen" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ad2f9d9c3baa70ee4d157b55b4c08e5dc00f1d80aad3692b1e0806393914ea" +checksum = "a6d9a5b51b3400b4df1055724c4536ad5aa58fafe83cea5ca94f88cc9eb97563" dependencies = [ "anyhow", - "bitflags 2.13.1", + "bitflags 2.13.2", "heck", "indexmap", "wit-parser 0.236.1", @@ -5078,7 +5131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdbdd9d6fab1ecb67a7dc189e32c9e341444945fb709437bf8aab25d9a88459" dependencies = [ "anyhow", - "bitflags 2.13.1", + "bitflags 2.13.2", "heck", "indexmap", "wit-parser 0.252.0", @@ -5086,31 +5139,31 @@ dependencies = [ [[package]] name = "wast" -version = "257.0.1" +version = "262.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c416ee8044cf88c5280e3d87c322b009525eb25142cf7428f0a90ea88febc3b" +checksum = "30612a0c29249b5f185888a107e8a519d920226b7d07f9d351fd094e9f75eb23" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width", - "wasm-encoder 0.257.1", + "wasm-encoder 0.262.0", ] [[package]] name = "wat" -version = "1.257.1" +version = "1.262.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672e5495f00c5fc6c6b502205bae4708aa4dd13d969754438743afe0a8af0f1d" +checksum = "e228027f2b07bbaf946980ebbe2437fca73be6f54c40c2a8d4f42f277075f8d1" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.104" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" dependencies = [ "js-sys", "wasm-bindgen", @@ -5128,9 +5181,9 @@ dependencies = [ [[package]] name = "which" -version = "8.0.5" +version = "8.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3ef584124b911bcc3875c2f1472e80f24361ceb789bd1c62b3e9a3df9ff43c" +checksum = "bae2f2b2b816647a1cab1acc91f5bd20812d53cb344382635ec2181940c8034f" dependencies = [ "libc", "regex", @@ -5169,21 +5222,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "36.0.14" +version = "36.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e826c012c68403725e77adf6b904c2ea809e5d464aaf25aa6eda14559300b3df" +checksum = "8e470d7e674c41ad32dddc02d8d8a94983e0a4c516028bda60747e6dd862a567" dependencies = [ "anyhow", - "cranelift-assembler-x64 0.123.14", - "cranelift-codegen 0.123.14", + "cranelift-assembler-x64 0.123.18", + "cranelift-codegen 0.123.18", "gimli 0.32.3", "regalloc2 0.12.2", "smallvec", "target-lexicon", "thiserror", "wasmparser 0.236.1", - "wasmtime-environ 36.0.14", - "wasmtime-internal-cranelift 36.0.14", + "wasmtime-environ 36.0.18", + "wasmtime-internal-cranelift 36.0.18", "wasmtime-internal-math", ] @@ -5479,21 +5532,21 @@ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "wit-component" -version = "0.257.1" +version = "0.259.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8b7d04a4c9491ffea354923ed70c8826d52c699fe20a52e8ceca95017dddb8" +checksum = "092f783dee3253265fcde131475055f8c275ac0176a9c0396db1dc7b5544bfb4" dependencies = [ "anyhow", - "bitflags 2.13.1", + "bitflags 2.13.2", "indexmap", "log", "serde", "serde_derive", "serde_json", - "wasm-encoder 0.257.1", + "wasm-encoder 0.259.0", "wasm-metadata", - "wasmparser 0.257.1", - "wit-parser 0.257.1", + "wasmparser 0.259.0", + "wit-parser 0.259.0", ] [[package]] @@ -5535,9 +5588,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.257.1" +version = "0.259.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f815340f0bb65d9775ae21e56b503b496683557b9b627b195d2766c25fb24ae" +checksum = "6390f4f02493ce678d509c859cf1698e38929fb75c8012a6ee2f7d6b6cb66cd7" dependencies = [ "anyhow", "hashbrown 0.17.1", @@ -5549,7 +5602,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-ident", - "wasmparser 0.257.1", + "wasmparser 0.259.0", ] [[package]] @@ -5581,30 +5634,30 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.56" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.56" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" dependencies = [ "proc-macro2", "quote", @@ -5622,21 +5675,21 @@ dependencies = [ [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", "synstructure", ] [[package]] name = "zeroize" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" [[package]] name = "zerotrie" @@ -5668,7 +5721,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.9", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8f50bdbb..72a6df1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,11 @@ repository = "https://github.com/hyperlight-dev/hyperlight-wasm" readme = "README.md" [workspace.dependencies] -hyperlight-common = { version = "0.17.0", default-features = false } -hyperlight-component-macro = "0.17.0" -hyperlight-component-util = "0.17.0" -hyperlight-guest = "0.17.0" -hyperlight-guest-bin = "0.17.0" -hyperlight-host = { version = "0.17.0", default-features = false } +hyperlight-common = { version = "0.18.0", default-features = false } +hyperlight-component-macro = "0.18.0" +hyperlight-component-util = "0.18.0" +hyperlight-guest = "0.18.0" +hyperlight-guest-bin = "0.18.0" +hyperlight-host = { version = "0.18.0", default-features = false } hyperlight-wasm-macro = { version = "0.15.0", path = "src/hyperlight_wasm_macro" } hyperlight-wasm-runtime = { version = "0.15.0", path = "src/hyperlight_wasm_runtime" } diff --git a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs index c3fb35a6..e6417e87 100644 --- a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs +++ b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs @@ -37,7 +37,7 @@ impl SandboxBuilder { /// Create a new SandboxBuilder pub fn new() -> Self { let mut config: SandboxConfiguration = Default::default(); - config.set_input_data_size(MIN_INPUT_DATA_SIZE); + config.set_h2g_pool_pages(MIN_INPUT_DATA_SIZE / hyperlight_common::vmem::PAGE_SIZE); config.set_heap_size(MIN_HEAP_SIZE); config.set_scratch_size(MIN_SCRATCH_SIZE); @@ -79,8 +79,13 @@ impl SandboxBuilder { } /// Set the guest output buffer size + #[deprecated( + since = "0.16.0", + note = "use with_g2h_{pool_pages,buffer_size,queue_size}" + )] pub fn with_guest_output_buffer_size(mut self, guest_output_buffer_size: usize) -> Self { - self.config.set_output_data_size(guest_output_buffer_size); + self.config + .set_g2h_pool_pages(guest_output_buffer_size / hyperlight_common::vmem::PAGE_SIZE + 1); self } @@ -89,13 +94,57 @@ impl SandboxBuilder { /// to send data to the host /// The host can read from this buffer /// The guest can write to this buffer + #[deprecated( + since = "0.16.0", + note = "use with_h2g_{pool_pages,buffer_size,queue_size}" + )] pub fn with_guest_input_buffer_size(mut self, guest_input_buffer_size: usize) -> Self { if guest_input_buffer_size > MIN_INPUT_DATA_SIZE { - self.config.set_input_data_size(guest_input_buffer_size); + self.config.set_h2g_pool_pages( + guest_input_buffer_size / hyperlight_common::vmem::PAGE_SIZE + 1, + ); } self } + /// Set the maximum number of guest pages used for Guest2Host buffers + pub fn with_g2h_pool_pages(mut self, pages: usize) -> Self { + self.config.set_g2h_pool_pages(pages); + self + } + + /// Set the maximum number of in-flight Guest2Host descriptors + pub fn with_g2h_queue_size(mut self, entries: usize) -> Self { + self.config.set_g2h_queue_size(entries); + self + } + + /// Set the size of each in-flight GuestToHost buffer + pub fn with_g2h_buffer_size(mut self, size: usize) -> Self { + self.config.set_g2h_buffer_size(size); + self + } + + /// Set the maximum number of guest pages used for Host2Guest buffers + pub fn with_h2g_pool_pages(mut self, pages: usize) -> Self { + if pages > (MIN_INPUT_DATA_SIZE / hyperlight_common::vmem::PAGE_SIZE + 1) { + self.config.set_h2g_pool_pages(pages); + } + self + } + + /// Set the maximum number of in-flight Host2Guest descriptors + pub fn with_h2g_queue_size(mut self, entries: usize) -> Self { + self.config.set_h2g_queue_size(entries); + self + } + + /// Set the size of each in-flight Host2Guest buffer + pub fn with_h2g_buffer_size(mut self, size: usize) -> Self { + self.config.set_h2g_buffer_size(size); + self + } + /// Set the guest scratch size in bytes. /// The scratch region provides writable memory for the guest, including the /// dynamically-sized stack. Increase this if your guest code needs deep diff --git a/src/hyperlight_wasm_macro/src/wasmguest.rs b/src/hyperlight_wasm_macro/src/wasmguest.rs index 3ca79c44..a086b554 100644 --- a/src/hyperlight_wasm_macro/src/wasmguest.rs +++ b/src/hyperlight_wasm_macro/src/wasmguest.rs @@ -166,7 +166,7 @@ fn emit_export_extern_decl<'b>( let (function_call, ret) = emit_wasm_function_call(s, &ft.result, pwts, pus); let marshal_result = emit_hl_marshal_result(s, ret.clone(), &ft.result); quote! { - fn #n(fc: ::hyperlight_common::flatbuffer_wrappers::function_call::FunctionCall) -> ::hyperlight_guest::error::Result<::alloc::vec::Vec> { + fn #n(fc: ::hyperlight_common::flatbuffer_wrappers::function_call::FunctionCall) -> ::hyperlight_guest::error::Result<::hyperlight_common::flatbuffer_wrappers::function_types::ReturnValue> { #(#pds)* let mut store = CUR_STORE.lock(); let mut store = store.as_mut().unwrap(); let instance = CUR_INSTANCE.lock(); let mut instance = instance.unwrap(); @@ -174,7 +174,7 @@ fn emit_export_extern_decl<'b>( #(#get_instance;)* let func_idx = instance.get_export_index(&mut *store, instance_idx.as_ref(), #nlit).unwrap(); #function_call - ::core::result::Result::Ok(::hyperlight_common::flatbuffer_wrappers::util::get_flatbuffer_result::<&[u8]>(&#marshal_result)) + ::core::result::Result::Ok(::hyperlight_common::flatbuffer_wrappers::function_types::ReturnValue::VecBytes(#marshal_result)) } ::hyperlight_guest_bin::guest_function::register::register_function( ::hyperlight_guest_bin::guest_function::definition::GuestFunctionDefinition::new( diff --git a/src/hyperlight_wasm_runtime/src/component.rs b/src/hyperlight_wasm_runtime/src/component.rs index 986f8599..3c050ef2 100644 --- a/src/hyperlight_wasm_runtime/src/component.rs +++ b/src/hyperlight_wasm_runtime/src/component.rs @@ -21,10 +21,9 @@ use core::result::Result::*; use hyperlight_common::flatbuffer_wrappers::function_call::FunctionCall; use hyperlight_common::flatbuffer_wrappers::function_types::{ - ParameterType, ParameterValue, ReturnType, + ParameterType, ParameterValue, ReturnType, ReturnValue, }; use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode; -use hyperlight_common::flatbuffer_wrappers::util::get_flatbuffer_result; use hyperlight_guest::error::{HyperlightGuestError, Result}; use hyperlight_guest_bin::guest_function::definition::GuestFunctionDefinition; use hyperlight_guest_bin::guest_function::register::register_function; @@ -45,8 +44,8 @@ hyperlight_wasm_macro::wasm_guest_bindgen!(); // dummy for compatibility with the module loading approach #[instrument(skip_all, level = "Info")] -fn init_wasm_runtime(_function_call: FunctionCall) -> Result> { - Ok(get_flatbuffer_result::(0)) +fn init_wasm_runtime(_function_call: FunctionCall) -> Result { + Ok(ReturnValue::Int(0)) } #[instrument(skip_all, level = "Info")] @@ -63,7 +62,7 @@ fn load_component_common(engine: &Engine, component: Component) -> Result<()> { } #[instrument(skip_all, level = "Info")] -fn load_wasm_module(function_call: FunctionCall) -> Result> { +fn load_wasm_module(function_call: FunctionCall) -> Result { if let ( ParameterValue::VecBytes(ref wasm_bytes), ParameterValue::Int(ref _len), @@ -76,7 +75,7 @@ fn load_wasm_module(function_call: FunctionCall) -> Result> { let component = unsafe { Component::deserialize(engine, wasm_bytes).map_err(map_wasmtime_error)? }; load_component_common(engine, component)?; - Ok(get_flatbuffer_result::(0)) + Ok(ReturnValue::Int(0)) } else { Err(HyperlightGuestError::new( ErrorCode::GuestFunctionParameterTypeMismatch, @@ -86,7 +85,7 @@ fn load_wasm_module(function_call: FunctionCall) -> Result> { } #[instrument(skip_all, level = "Info")] -fn load_wasm_module_phys(function_call: FunctionCall) -> Result> { +fn load_wasm_module_phys(function_call: FunctionCall) -> Result { if let (ParameterValue::ULong(ref phys), ParameterValue::ULong(ref len), Some(ref engine)) = ( &function_call.parameters.as_ref().unwrap()[0], &function_call.parameters.as_ref().unwrap()[1], @@ -97,7 +96,7 @@ fn load_wasm_module_phys(function_call: FunctionCall) -> Result> { .map_err(map_wasmtime_error)? }; load_component_common(engine, component)?; - Ok(get_flatbuffer_result::<()>(())) + Ok(ReturnValue::Void(())) } else { Err(HyperlightGuestError::new( ErrorCode::GuestFunctionParameterTypeMismatch, diff --git a/src/hyperlight_wasm_runtime/src/hostfuncs.rs b/src/hyperlight_wasm_runtime/src/hostfuncs.rs index ebf46df9..b29f8b39 100644 --- a/src/hyperlight_wasm_runtime/src/hostfuncs.rs +++ b/src/hyperlight_wasm_runtime/src/hostfuncs.rs @@ -54,6 +54,7 @@ pub(crate) fn hostfunc_type(d: &HostFunctionDefinition, e: &Engine) -> Result todo!(), }); } let mut results = Vec::new(); @@ -71,6 +72,7 @@ pub(crate) fn hostfunc_type(d: &HostFunctionDefinition, e: &Engine) -> Result results.push(ValType::I64), + ReturnType::ByteChunks => todo!(), } Ok(FuncType::new(e, params, results)) } @@ -121,6 +123,7 @@ fn return_type_from_val(val: &ReturnValue) -> ReturnType { ReturnValue::Double(_) => ReturnType::Double, ReturnValue::String(_) => ReturnType::String, ReturnValue::VecBytes(_) => ReturnType::VecBytes, + ReturnValue::ByteChunks(_) => ReturnType::ByteChunks, ReturnValue::Bool(_) => ReturnType::Bool, ReturnValue::Void(_) => ReturnType::Void, } diff --git a/src/hyperlight_wasm_runtime/src/marshal.rs b/src/hyperlight_wasm_runtime/src/marshal.rs index 01694128..de8e3c99 100644 --- a/src/hyperlight_wasm_runtime/src/marshal.rs +++ b/src/hyperlight_wasm_runtime/src/marshal.rs @@ -54,7 +54,6 @@ use hyperlight_common::flatbuffer_wrappers::function_types::{ ParameterType, ParameterValue, ReturnType, ReturnValue, }; use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode; -use hyperlight_common::flatbuffer_wrappers::util::get_flatbuffer_result; use hyperlight_guest::error::{HyperlightGuestError, Result}; use spin::Mutex; use tracing::instrument; @@ -238,6 +237,9 @@ pub fn hl_param_to_val( Ok(Val::I32(addr)) // TODO: check that the next parameter is the correct length } + ParameterValue::ByteChunks(_) => { + todo!() + } } } @@ -252,28 +254,31 @@ pub fn val_to_hl_result( get_export: impl Fn(&mut C, &str) -> Option, rt: ReturnType, rvs: &[Val], -) -> Result> { +) -> Result { if let ReturnType::Void = rt { - return Ok(get_flatbuffer_result::<()>(())); + return Ok(ReturnValue::Void(())); } match (rt, rvs[0]) { - (ReturnType::Int, Val::I32(i)) => Ok(get_flatbuffer_result::(i)), - (ReturnType::UInt, Val::I32(u)) => Ok(get_flatbuffer_result::(u as u32)), - (ReturnType::Long, Val::I64(l)) => Ok(get_flatbuffer_result::(l)), - (ReturnType::ULong, Val::I64(u)) => Ok(get_flatbuffer_result::(u as u64)), + (ReturnType::Int, Val::I32(i)) => Ok(ReturnValue::Int(i)), + (ReturnType::UInt, Val::I32(u)) => Ok(ReturnValue::UInt(u as u32)), + (ReturnType::Long, Val::I64(l)) => Ok(ReturnValue::Long(l)), + (ReturnType::ULong, Val::I64(u)) => Ok(ReturnValue::ULong(u as u64)), /* todo: get_flatbuffer_result_from_bool is missing */ - (ReturnType::Float, Val::F32(f)) => Ok(get_flatbuffer_result::(f32::from_bits(f))), - (ReturnType::Double, Val::F64(f)) => Ok(get_flatbuffer_result::(f64::from_bits(f))), + (ReturnType::Float, Val::F32(f)) => Ok(ReturnValue::Float(f32::from_bits(f))), + (ReturnType::Double, Val::F64(f)) => Ok(ReturnValue::Double(f64::from_bits(f))), (ReturnType::String, Val::I32(p)) => { // Track this allocation so it can be freed on next VM entry track_return_value_allocation(p); - Ok(get_flatbuffer_result::<&str>( - read_cstr(&mut ctx, &get_export, p)?.to_str().map_err(|e| { - HyperlightGuestError::new( - ErrorCode::GuestError, - format!("non-UTF-8 c string in guest function return: {}", e), - ) - })?, + Ok(ReturnValue::String( + read_cstr(&mut ctx, &get_export, p)? + .to_str() + .map_err(|e| { + HyperlightGuestError::new( + ErrorCode::GuestError, + format!("non-UTF-8 c string in guest function return: {}", e), + ) + })? + .to_string(), )) } (ReturnType::VecBytes, Val::I32(ret)) => { @@ -284,7 +289,7 @@ pub fn val_to_hl_result( let size = i32::from_le_bytes(size_bytes); let mut bytes = vec![0; size as usize]; read(&mut ctx, &get_export, ret + 4, &mut bytes)?; - Ok(get_flatbuffer_result::<&[u8]>(&bytes)) + Ok(ReturnValue::VecBytes(bytes)) } (_, _) => Err(HyperlightGuestError::new( ErrorCode::GuestError, @@ -384,6 +389,9 @@ pub fn hl_return_to_val( Ok(Val::I32(addr)) // TODO: check that the next parameter is the correct length } + ReturnValue::ByteChunks(_) => { + todo!() + } ReturnValue::Void(()) => Ok(Val::I32(0)), } } diff --git a/src/hyperlight_wasm_runtime/src/module.rs b/src/hyperlight_wasm_runtime/src/module.rs index 1ff24b46..c28fae78 100644 --- a/src/hyperlight_wasm_runtime/src/module.rs +++ b/src/hyperlight_wasm_runtime/src/module.rs @@ -15,16 +15,14 @@ limitations under the License. */ use alloc::string::ToString; -use alloc::vec::Vec; use alloc::{format, vec}; use core::ops::{Deref, DerefMut}; use hyperlight_common::flatbuffer_wrappers::function_call::FunctionCall; use hyperlight_common::flatbuffer_wrappers::function_types::{ - ParameterType, ParameterValue, ReturnType, + ParameterType, ParameterValue, ReturnType, ReturnValue, }; use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode; -use hyperlight_common::flatbuffer_wrappers::util::get_flatbuffer_result; use hyperlight_guest::error::{HyperlightGuestError, Result}; use hyperlight_guest_bin::guest_function::definition::GuestFunctionDefinition; use hyperlight_guest_bin::guest_function::register::register_function; @@ -45,7 +43,7 @@ static CUR_INSTANCE: Mutex> = Mutex::new(None); #[no_mangle] #[instrument(skip_all, level = "Info")] -pub fn guest_dispatch_function(function_call: FunctionCall) -> Result> { +pub fn guest_dispatch_function(function_call: FunctionCall) -> Result { let mut store = CUR_STORE.lock(); let store = store.deref_mut().as_mut().ok_or(HyperlightGuestError::new( ErrorCode::GuestError, @@ -97,7 +95,7 @@ pub fn guest_dispatch_function(function_call: FunctionCall) -> Result> { } #[instrument(skip_all, level = "Info")] -fn init_wasm_runtime(function_call: FunctionCall) -> Result> { +fn init_wasm_runtime(function_call: FunctionCall) -> Result { let mut config = Config::new(); // Enable x86_float_abi_ok only for the latest Wasmtime native x86 target. // Safety: @@ -173,11 +171,11 @@ fn init_wasm_runtime(function_call: FunctionCall) -> Result> { *CUR_ENGINE.lock() = Some(engine); *CUR_LINKER.lock() = Some(linker); - Ok(get_flatbuffer_result::(0)) + Ok(ReturnValue::Int(0)) } #[instrument(skip_all, level = "Info")] -fn load_wasm_module(function_call: FunctionCall) -> Result> { +fn load_wasm_module(function_call: FunctionCall) -> Result { if let ( ParameterValue::VecBytes(ref wasm_bytes), ParameterValue::Int(ref _len), @@ -203,7 +201,7 @@ fn load_wasm_module(function_call: FunctionCall) -> Result> { *CUR_MODULE.lock() = Some(module); *CUR_STORE.lock() = Some(store); *CUR_INSTANCE.lock() = Some(instance); - Ok(get_flatbuffer_result::(0)) + Ok(ReturnValue::Int(0)) } else { Err(HyperlightGuestError::new( ErrorCode::GuestFunctionParameterTypeMismatch, @@ -213,7 +211,7 @@ fn load_wasm_module(function_call: FunctionCall) -> Result> { } #[instrument(skip_all, level = "Info")] -fn load_wasm_module_phys(function_call: FunctionCall) -> Result> { +fn load_wasm_module_phys(function_call: FunctionCall) -> Result { if let (ParameterValue::ULong(ref phys), ParameterValue::ULong(ref len), Some(ref engine)) = ( &function_call.parameters.as_ref().unwrap()[0], &function_call.parameters.as_ref().unwrap()[1], @@ -237,7 +235,7 @@ fn load_wasm_module_phys(function_call: FunctionCall) -> Result> { *CUR_MODULE.lock() = Some(module); *CUR_STORE.lock() = Some(store); *CUR_INSTANCE.lock() = Some(instance); - Ok(get_flatbuffer_result::<()>(())) + Ok(ReturnValue::Void(())) } else { Err(HyperlightGuestError::new( ErrorCode::GuestFunctionParameterTypeMismatch, diff --git a/src/hyperlight_wasm_runtime/src/platform.rs b/src/hyperlight_wasm_runtime/src/platform.rs index bd0ff413..74f3ea90 100644 --- a/src/hyperlight_wasm_runtime/src/platform.rs +++ b/src/hyperlight_wasm_runtime/src/platform.rs @@ -19,6 +19,7 @@ use core::ptr::NonNull; use core::sync::atomic::{AtomicPtr, AtomicU64, Ordering}; use hyperlight_common::vmem; +#[allow(deprecated)] use hyperlight_guest_bin::exception::arch; use hyperlight_guest_bin::paging; @@ -205,6 +206,7 @@ fn copy_va_mapping(base: *const u8, len: usize, to_va: *mut u8, remap_original: // Skip unmapped pages, since they will be unmapped in // both the original and the new copy vmem::MappingKind::Unmapped => continue, + vmem::MappingKind::ZeroInit(bm) => (vmem::MappingKind::ZeroInit(bm), false), vmem::MappingKind::Basic(bm) if bm.writable => ( vmem::MappingKind::Cow(vmem::CowMapping { readable: bm.readable, From 196a7337a2aaea770ad06f1904ab7bda7b866f2d Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Wed, 21 Oct 2026 18:25:56 +0100 Subject: [PATCH 3/7] [deps] Update hyperlight core packages to 0.18.0 Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- src/hyperlight_wasm/src/sandbox/sandbox_builder.rs | 9 +++------ src/hyperlight_wasm_runtime/src/component.rs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs index e6417e87..2a4e94b9 100644 --- a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs +++ b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs @@ -99,11 +99,8 @@ impl SandboxBuilder { note = "use with_h2g_{pool_pages,buffer_size,queue_size}" )] pub fn with_guest_input_buffer_size(mut self, guest_input_buffer_size: usize) -> Self { - if guest_input_buffer_size > MIN_INPUT_DATA_SIZE { - self.config.set_h2g_pool_pages( - guest_input_buffer_size / hyperlight_common::vmem::PAGE_SIZE + 1, - ); - } + self.config + .set_h2g_pool_pages(guest_input_buffer_size / hyperlight_common::vmem::PAGE_SIZE + 1); self } @@ -127,7 +124,7 @@ impl SandboxBuilder { /// Set the maximum number of guest pages used for Host2Guest buffers pub fn with_h2g_pool_pages(mut self, pages: usize) -> Self { - if pages > (MIN_INPUT_DATA_SIZE / hyperlight_common::vmem::PAGE_SIZE + 1) { + if pages > (MIN_INPUT_DATA_SIZE / hyperlight_common::vmem::PAGE_SIZE) { self.config.set_h2g_pool_pages(pages); } self diff --git a/src/hyperlight_wasm_runtime/src/component.rs b/src/hyperlight_wasm_runtime/src/component.rs index 3c050ef2..3e871445 100644 --- a/src/hyperlight_wasm_runtime/src/component.rs +++ b/src/hyperlight_wasm_runtime/src/component.rs @@ -163,7 +163,7 @@ pub extern "C" fn hyperlight_main() { #[no_mangle] #[instrument(skip_all, level = "Info")] -pub fn guest_dispatch_function(function_call: FunctionCall) -> Result> { +pub fn guest_dispatch_function(function_call: FunctionCall) -> Result { Err(HyperlightGuestError::new( ErrorCode::GuestFunctionNotFound, function_call.function_name.clone(), From ab4614e2b599673d96e619602a70400efb8f3376 Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:55:48 +0100 Subject: [PATCH 4/7] [deps] Update wit-bindgen Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- Justfile | 2 +- .../wasmsamples/components/bindings/runcomponent.c | 9 ++++++++- .../wasmsamples/components/bindings/runcomponent.h | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Justfile b/Justfile index dcdd22bd..360bf132 100644 --- a/Justfile +++ b/Justfile @@ -18,7 +18,7 @@ make-vendor-tar: ensure-tools: cargo install wasm-tools --locked --version 1.235.0 cargo install cargo-component --locked --version 0.21.1 - cargo install wit-bindgen-cli --locked --version 0.43.0 + cargo install wit-bindgen-cli --locked --version 0.58.0 cargo install cargo-hyperlight --locked build-all target=default-target features="": (build target features) (build-examples target features) diff --git a/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.c b/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.c index f3813f35..9c1ac423 100644 --- a/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.c +++ b/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.c @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.43.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.58.0. DO NOT EDIT! #include "runcomponent.h" #include #include @@ -45,6 +45,12 @@ void runcomponent_string_dup(runcomponent_string_t *ret, const char*s) { memcpy(ret->ptr, s, ret->len * 1); } +void runcomponent_string_dup_n(runcomponent_string_t *ret, const char*s, size_t len) { + ret->len = len; + ret->ptr = (uint8_t*) cabi_realloc(NULL, 0, 1, ret->len * 1); + memcpy(ret->ptr, s, ret->len * 1); +} + void runcomponent_string_free(runcomponent_string_t *ret) { if (ret->len > 0) { free(ret->ptr); @@ -80,6 +86,7 @@ int32_t __wasm_export_exports_example_runcomponent_guest_round_to_nearest_int(fl // Ensure that the *_component_type.o object is linked in extern void __component_type_object_force_link_runcomponent(void); +__attribute__((used)) void __component_type_object_force_link_runcomponent_public_use_in_this_compilation_unit(void) { __component_type_object_force_link_runcomponent(); } diff --git a/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.h b/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.h index d64663e0..57efeb2c 100644 --- a/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.h +++ b/src/tests/c_guests/wasmsamples/components/bindings/runcomponent.h @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.43.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.58.0. DO NOT EDIT! #ifndef __BINDINGS_RUNCOMPONENT_H #define __BINDINGS_RUNCOMPONENT_H #ifdef __cplusplus @@ -30,6 +30,11 @@ void runcomponent_string_set(runcomponent_string_t *ret, const char*s); // stores it into the component model string `ret`. void runcomponent_string_dup(runcomponent_string_t *ret, const char*s); +// Creates a copy of the input string `s` with length `len` and +// stores it into the component model string `ret`. +// The length is specified in code units (bytes for UTF-8, 16-bit values for UTF-16). +void runcomponent_string_dup_n(runcomponent_string_t *ret, const char*s, size_t len); + // Deallocates the string pointed to by `ret`, deallocating // the memory behind the string. void runcomponent_string_free(runcomponent_string_t *ret); From b7e745106dd24c33bfd08aed0796ae183990a34f Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:57:32 +0100 Subject: [PATCH 5/7] Remove uses of deprecated hyperlight_host::MultiUseSandbox alias Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- .../src/sandbox/loaded_wasm_sandbox.rs | 20 +++++++------- .../src/sandbox/wasm_sandbox.rs | 27 +++++++++---------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs b/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs index f8a96895..acdafd9b 100644 --- a/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs +++ b/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs @@ -21,7 +21,7 @@ use hyperlight_host::func::{ParameterTuple, SupportedReturnType}; use hyperlight_host::hypervisor::InterruptHandle; use hyperlight_host::sandbox::snapshot::Snapshot; use hyperlight_host::sandbox::{Callable, SandboxStatus}; -use hyperlight_host::{MultiUseSandbox, Result, log_then_return, new_error}; +use hyperlight_host::{Result, Sandbox, log_then_return, new_error}; use super::metrics::METRIC_TOTAL_LOADED_WASM_SANDBOXES; use super::wasm_sandbox::WasmSandbox; @@ -37,10 +37,10 @@ use crate::sandbox::metrics::{METRIC_ACTIVE_LOADED_WASM_SANDBOXES, METRIC_SANDBO /// a new `LoadedWasmSandbox` -- either from another `WasmSandbox` or by /// calling `my_loaded_wasm_sandbox.devolve()?.evolve()?` pub struct LoadedWasmSandbox { - // inner is an Option as we need to take ownership of it + // inner is an Option as we need to take ownership of it // We implement drop on the LoadedWasmSandbox to decrement the count of Sandboxes when it is dropped - // because of this we cannot implement drop without making inner an Option (alternatively we could make MultiUseSandbox Copy but that would introduce other issues) - inner: Option, + // because of this we cannot implement drop without making inner an Option (alternatively we could make Sandbox Copy but that would introduce other issues) + inner: Option, // The state the sandbox was in before loading a wasm module. Used for transitioning back to a `WasmSandbox` (unloading the wasm module). runtime_snapshot: Option>, } @@ -72,7 +72,7 @@ impl LoadedWasmSandbox { ) -> Result { match &mut self.inner { Some(inner) => inner.call(fn_name, params), - None => log_then_return!("No inner MultiUseSandbox to call"), + None => log_then_return!("No inner Sandbox to call"), } } @@ -89,7 +89,7 @@ impl LoadedWasmSandbox { pub fn snapshot(&mut self) -> Result> { match &mut self.inner { Some(inner) => inner.snapshot(), - None => log_then_return!("No inner MultiUseSandbox to snapshot"), + None => log_then_return!("No inner Sandbox to snapshot"), } } @@ -108,7 +108,7 @@ impl LoadedWasmSandbox { pub fn restore(&mut self, snapshot: Arc) -> Result<()> { match &mut self.inner { Some(inner) => inner.restore(snapshot), - None => log_then_return!("No inner MultiUseSandbox to restore"), + None => log_then_return!("No inner Sandbox to restore"), } } @@ -124,7 +124,7 @@ impl LoadedWasmSandbox { let sandbox = self .inner .take() - .ok_or_else(|| new_error!("No inner MultiUseSandbox to unload"))?; + .ok_or_else(|| new_error!("No inner Sandbox to unload"))?; let snapshot = self .runtime_snapshot @@ -137,7 +137,7 @@ impl LoadedWasmSandbox { } pub(super) fn new( - inner: MultiUseSandbox, + inner: Sandbox, runtime_snapshot: Arc, ) -> Result { metrics::gauge!(METRIC_ACTIVE_LOADED_WASM_SANDBOXES).increment(1); @@ -168,7 +168,7 @@ impl LoadedWasmSandbox { pub fn status(&self) -> Result { match &self.inner { Some(inner) => Ok(inner.status()), - None => log_then_return!("No inner MultiUseSandbox to check status"), + None => log_then_return!("No inner Sandbox to check status"), } } diff --git a/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs b/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs index 952be86a..52a57ec0 100644 --- a/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs +++ b/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs @@ -20,7 +20,7 @@ use std::sync::Arc; #[cfg(target_os = "linux")] use hyperlight_host::mem::memory_region::{MemoryRegion, MemoryRegionFlags, MemoryRegionType}; use hyperlight_host::sandbox::snapshot::Snapshot; -use hyperlight_host::{MultiUseSandbox, Result, new_error}; +use hyperlight_host::{Result, Sandbox, new_error}; use super::loaded_wasm_sandbox::LoadedWasmSandbox; use crate::sandbox::metrics::{ @@ -35,13 +35,13 @@ mod backing_sandbox { #[derive(Debug)] pub(super) enum BackingSandbox { /// A sandbox which has a clean copy of the runtime in it - Clean(MultiUseSandbox), + Clean(Sandbox), /// A sandbox which has had a wasm component/module loaded into /// it, but has not yet run any code from that - Loaded(MultiUseSandbox), + Loaded(Sandbox), /// A sandbox which came from a `LoadedWasmSandbox`, and /// therefore presumably has run user code - Dirty(MultiUseSandbox), + Dirty(Sandbox), /// A non-existent sandbox, used as an internal implementation /// detail of a few methods. Missing, @@ -88,7 +88,7 @@ mod backing_sandbox { } pub(super) fn load_via_fn( &mut self, - load: impl FnOnce(&mut MultiUseSandbox) -> Result<()>, + load: impl FnOnce(&mut Sandbox) -> Result<()>, ) -> Result<()> { *self = match std::mem::replace(self, BackingSandbox::Missing) { BackingSandbox::Clean(mut x) => { @@ -103,7 +103,7 @@ mod backing_sandbox { }; Ok(()) } - pub(super) fn get_loaded(&mut self) -> Result { + pub(super) fn get_loaded(&mut self) -> Result { match std::mem::replace(self, BackingSandbox::Missing) { BackingSandbox::Loaded(x) => Ok(x), _ => Err(new_error!( @@ -169,9 +169,9 @@ use backing_sandbox::*; /// function to load a Wasm module into memory. That function will return a /// `LoadedWasmSandbox` able to execute code in the loaded Wasm Module. pub struct WasmSandbox { - // inner is an Option as we need to take ownership of it + // inner is an Option as we need to take ownership of it // We implement drop on the WasmSandbox to decrement the count of Sandboxes when it is dropped - // because of this we cannot implement drop without making inner an Option (alternatively we could make MultiUseSandbox Copy but that would introduce other issues) + // because of this we cannot implement drop without making inner an Option (alternatively we could make Sandbox Copy but that would introduce other issues) inner: BackingSandbox, // Snapshot of state of an initial WasmSandbox (runtime loaded, but no guest module code loaded). // Used for LoadedWasmSandbox to be able restore state back to WasmSandbox @@ -180,11 +180,11 @@ pub struct WasmSandbox { const MAPPED_BINARY_VA: u64 = 0x1_0000_0000u64; impl WasmSandbox { - /// Create a new WasmSandBox from a `MultiUseSandbox`. + /// Create a new WasmSandBox from a `Sandbox`. /// This function should be used to create a new `WasmSandbox` from a ProtoWasmSandbox. /// The difference between this function and creating a `WasmSandbox` directly is that /// this function will increment the metrics for the number of `WasmSandbox`es in the system. - pub(super) fn new(mut inner: MultiUseSandbox) -> Result { + pub(super) fn new(mut inner: Sandbox) -> Result { let snapshot = inner.snapshot()?; metrics::gauge!(METRIC_ACTIVE_WASM_SANDBOXES).increment(1); metrics::counter!(METRIC_TOTAL_WASM_SANDBOXES).increment(1); @@ -198,10 +198,7 @@ impl WasmSandbox { /// for example when creating a `WasmSandbox` from a `LoadedWasmSandbox`, since /// the snapshot has already been created in that case. /// Expects a snapshot of the state where wasm runtime is loaded, but no guest module code is loaded. - pub(super) fn new_from_loaded( - loaded: MultiUseSandbox, - snapshot: Arc, - ) -> Result { + pub(super) fn new_from_loaded(loaded: Sandbox, snapshot: Arc) -> Result { metrics::gauge!(METRIC_ACTIVE_WASM_SANDBOXES).increment(1); metrics::counter!(METRIC_TOTAL_WASM_SANDBOXES).increment(1); Ok(WasmSandbox { @@ -315,7 +312,7 @@ impl WasmSandbox { } } -fn load_wasm_module_from_bytes(inner: &mut MultiUseSandbox, wasm_bytes: Vec) -> Result<()> { +fn load_wasm_module_from_bytes(inner: &mut Sandbox, wasm_bytes: Vec) -> Result<()> { let res: i32 = inner.call( "LoadWasmModule", (wasm_bytes.clone(), wasm_bytes.len() as i32), From a363a292f18cbfcd68eecddb10b754394c63a0bd Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Tue, 20 Oct 2026 01:09:41 +0100 Subject: [PATCH 6/7] Remove old-style input buffer sizes in examples/tests It turns out that these mostly do not need to be replaced with new-style h2g queue changes because all the tests end up using mmap regions instead of copying the buffer around. Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- .../examples/component_example/main.rs | 1 - .../examples/component_greeter_example/main.rs | 1 - .../examples/guest-debugging/main.rs | 5 ++++- src/hyperlight_wasm/examples/hostfuncs/main.rs | 1 - src/hyperlight_wasm/examples/metrics/main.rs | 4 +--- .../examples/rust_wasm_examples/main.rs | 1 - src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs | 16 ++++++++++++---- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/hyperlight_wasm/examples/component_example/main.rs b/src/hyperlight_wasm/examples/component_example/main.rs index ef4b6d07..46e2b6c7 100644 --- a/src/hyperlight_wasm/examples/component_example/main.rs +++ b/src/hyperlight_wasm/examples/component_example/main.rs @@ -50,7 +50,6 @@ impl bindings::component_sample::example::ExampleImports SandboxBuilder { #[cfg(gdb)] { SandboxBuilder::new() - .with_guest_input_buffer_size(2 * 1024 * 1024) // 2 MiB + .with_h2g_pool_pages(512) + .with_h2g_queue_size(128) + .with_h2g_buffer_size(16384) + .with_guest_scratch_size(0xc0_0000) .with_guest_heap_size(10 * 1024 * 1024) // 4 MiB .with_debugging_enabled(8080) // debugging on port 8080 } diff --git a/src/hyperlight_wasm/examples/hostfuncs/main.rs b/src/hyperlight_wasm/examples/hostfuncs/main.rs index ee5c7d59..98886796 100644 --- a/src/hyperlight_wasm/examples/hostfuncs/main.rs +++ b/src/hyperlight_wasm/examples/hostfuncs/main.rs @@ -21,7 +21,6 @@ fn main() { // Create a Wasm Sandbox (this is running in the local Hypervisor) let mut proto_wasm_sandbox = SandboxBuilder::new() - .with_guest_input_buffer_size(0x40000) .with_guest_heap_size(0x70000) .build() .unwrap(); diff --git a/src/hyperlight_wasm/examples/metrics/main.rs b/src/hyperlight_wasm/examples/metrics/main.rs index 381a4b26..8b4fb928 100644 --- a/src/hyperlight_wasm/examples/metrics/main.rs +++ b/src/hyperlight_wasm/examples/metrics/main.rs @@ -32,9 +32,7 @@ fn main() -> Result<()> { a + 1 }; - let mut wasm_sandbox = SandboxBuilder::new() - .with_guest_input_buffer_size(1000000) - .build()?; + let mut wasm_sandbox = SandboxBuilder::new().build()?; wasm_sandbox.register("TestHostFunc", host_func)?; diff --git a/src/hyperlight_wasm/examples/rust_wasm_examples/main.rs b/src/hyperlight_wasm/examples/rust_wasm_examples/main.rs index d4055874..e1252a35 100644 --- a/src/hyperlight_wasm/examples/rust_wasm_examples/main.rs +++ b/src/hyperlight_wasm/examples/rust_wasm_examples/main.rs @@ -39,7 +39,6 @@ fn main() -> Result<()> { }; let mut proto_wasm_sandbox = SandboxBuilder::new() - .with_guest_input_buffer_size(256 * 1024) .with_guest_heap_size(1280 * 1024) .build()?; diff --git a/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs b/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs index 52a57ec0..4ead108a 100644 --- a/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs +++ b/src/hyperlight_wasm/src/sandbox/wasm_sandbox.rs @@ -662,7 +662,10 @@ mod tests { #[test] fn test_load_module_buffer() { - let sandboxes = get_test_wasm_sandboxes().unwrap(); + let sandboxes = get_test_wasm_sandboxes_with_config(|builder| { + builder.with_h2g_pool_pages(128).with_h2g_queue_size(128) + }) + .unwrap(); for sbox_test in sandboxes { let name = sbox_test.name; @@ -715,12 +718,13 @@ mod tests { name: String, } - fn get_test_wasm_sandboxes() -> Result> { + fn get_test_wasm_sandboxes_with_config( + f: impl FnOnce(SandboxBuilder) -> SandboxBuilder, + ) -> Result> { let builder = SandboxBuilder::new() - .with_guest_input_buffer_size(0x8000) - .with_guest_output_buffer_size(0x8000) .with_guest_scratch_size(0x2000) .with_guest_heap_size(0x100000); + let builder = f(builder); let mut sandboxes: Vec = Vec::new(); if is_hypervisor_present() { @@ -732,4 +736,8 @@ mod tests { Ok(sandboxes) } + + fn get_test_wasm_sandboxes() -> Result> { + get_test_wasm_sandboxes_with_config(|b| b) + } } From a681cbf058e061bf8bacae7c739a585a95cdb5b5 Mon Sep 17 00:00:00 2001 From: Lucy Menon <168595099+syntactically@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:00:09 +0100 Subject: [PATCH 7/7] [module] Add rudimentary support for ByteChunks Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com> --- Cargo.lock | 2 + src/hyperlight_wasm/Cargo.toml | 1 + .../src/sandbox/loaded_wasm_sandbox.rs | 66 ++++++++++++++ src/hyperlight_wasm_runtime/Cargo.toml | 1 + src/hyperlight_wasm_runtime/src/hostfuncs.rs | 7 +- src/hyperlight_wasm_runtime/src/marshal.rs | 89 ++++++++++++------- 6 files changed, 133 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b1d4b559..b19931cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2040,6 +2040,7 @@ dependencies = [ "anyhow", "blake3", "built", + "bytes", "cargo-hyperlight", "cfg-if", "cfg_aliases", @@ -2106,6 +2107,7 @@ dependencies = [ name = "hyperlight-wasm-runtime" version = "0.15.0" dependencies = [ + "bytes", "cargo_metadata", "cc", "cfg-if", diff --git a/src/hyperlight_wasm/Cargo.toml b/src/hyperlight_wasm/Cargo.toml index cf02f133..70100f95 100644 --- a/src/hyperlight_wasm/Cargo.toml +++ b/src/hyperlight_wasm/Cargo.toml @@ -94,6 +94,7 @@ uuid = { version = "1.23.3", features = ["v4"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" semver = "1.0.28" +bytes = { version = "1", default-features = false } [build-dependencies] cfg_aliases = "0.2.1" diff --git a/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs b/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs index acdafd9b..a12cc0be 100644 --- a/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs +++ b/src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs @@ -230,6 +230,7 @@ mod tests { use std::sync::Arc; use std::thread; + use bytes::Bytes; use crossbeam_queue::ArrayQueue; use examples_common::get_wasm_module_path; use hyperlight_host::{HyperlightError, new_error}; @@ -438,6 +439,49 @@ mod tests { assert_eq!(r, 0); } + #[test] + fn test_call_host_func_with_bytechunks() { + let host_func = |b: Vec, l: i32| { + // get the C String from the vec of bytes + + let b = b.iter().flatten().cloned().collect::>(); + let s = std::str::from_utf8(&b).unwrap(); + println!("Host function received buffer: {}", s); + + // check that s is the expected value if not return an error + if s != "Hello World!" { + return Err(new_error!("Unexpected value in buffer {}", s)); + } + + if l != 12 { + return Err(new_error!("Unexpected length of buffer {}", l)); + } + Ok(0i32) + }; + + let mut proto_wasm_sandbox = SandboxBuilder::new().build().unwrap(); + + proto_wasm_sandbox + .register("HostFuncWithBufferAndLength", host_func) + .unwrap(); + + let wasm_sandbox = proto_wasm_sandbox.load_runtime().unwrap(); + + let mut loaded_wasm_sandbox: LoadedWasmSandbox = { + let mod_path = get_wasm_module_path("HostFunction.aot").unwrap(); + wasm_sandbox.load_module(mod_path) + } + .unwrap(); + + // Call a guest function that calls a host function that takes a buffer and a length + + let r: i32 = loaded_wasm_sandbox + .call_guest_function("PassBufferAndLengthToHost", ()) + .unwrap(); + + assert_eq!(r, 0); + } + #[test] fn test_load_module_fails_with_missing_host_function() { // HostFunction.aot imports "HostFuncWithBufferAndLength" from "env". @@ -526,6 +570,28 @@ mod tests { ); } + // The same, but using ByteChunks instead of VecBytes + + for i in 0..iterations { + let result: Vec = loaded_wasm_sandbox + .call_guest_function( + "ReceiveByteArray", + ( + vec![ + Bytes::from_owner(vec![0x01, 0x02]), + Bytes::from_owner(vec![0x03]), + ], + 3i32, + ), + ) + .unwrap(); + + println!( + "Got result: {:?} from the host function! iteration {}", + result, i, + ); + } + // Call a guest function that Prints a string using HostPrint Host function for i in 0..iterations { diff --git a/src/hyperlight_wasm_runtime/Cargo.toml b/src/hyperlight_wasm_runtime/Cargo.toml index f5343179..641853c4 100644 --- a/src/hyperlight_wasm_runtime/Cargo.toml +++ b/src/hyperlight_wasm_runtime/Cargo.toml @@ -34,6 +34,7 @@ wasmtime = { version = "47.0.4", default-features = false, features = [ "runtime wasmtime_lts = { package = "wasmtime", version = "36.0.14", default-features = false, features = [ "runtime", "custom-virtual-memory", "custom-native-signals", "component-model" ], optional = true } spin = "0.12.0" tracing = { version = "0.1.44", default-features = false, features = ["attributes", "log"] } +bytes = { version = "1", default-features = false } [build-dependencies] cfg_aliases = "0.2.1" diff --git a/src/hyperlight_wasm_runtime/src/hostfuncs.rs b/src/hyperlight_wasm_runtime/src/hostfuncs.rs index b29f8b39..bc30cf99 100644 --- a/src/hyperlight_wasm_runtime/src/hostfuncs.rs +++ b/src/hyperlight_wasm_runtime/src/hostfuncs.rs @@ -54,7 +54,10 @@ pub(crate) fn hostfunc_type(d: &HostFunctionDefinition, e: &Engine) -> Result todo!(), + ParameterType::ByteChunks => { + last_was_vec = true; + ValType::I32 + } }); } let mut results = Vec::new(); @@ -72,7 +75,7 @@ pub(crate) fn hostfunc_type(d: &HostFunctionDefinition, e: &Engine) -> Result results.push(ValType::I64), - ReturnType::ByteChunks => todo!(), + ReturnType::ByteChunks => results.push(ValType::I64), } Ok(FuncType::new(e, params, results)) } diff --git a/src/hyperlight_wasm_runtime/src/marshal.rs b/src/hyperlight_wasm_runtime/src/marshal.rs index de8e3c99..0c4ba42a 100644 --- a/src/hyperlight_wasm_runtime/src/marshal.rs +++ b/src/hyperlight_wasm_runtime/src/marshal.rs @@ -50,6 +50,7 @@ use alloc::string::ToString; use alloc::vec::Vec; use alloc::{format, vec}; +use bytes::Bytes; use hyperlight_common::flatbuffer_wrappers::function_types::{ ParameterType, ParameterValue, ReturnType, ReturnValue, }; @@ -205,6 +206,21 @@ fn read_cstr( }) } +fn to_val_bytes<'a, C: AsContextMut>( + ctx: &mut C, + get_export: impl Fn(&mut C, &str) -> Option, + mut bs: impl Iterator + Clone, +) -> Result { + let len = bs.clone().map(|x| x.len()).sum(); + let addr = malloc(ctx, &get_export, len)?; + let _ = bs.try_fold(addr, |a, b| { + write(ctx, &get_export, a, b)?; + Result::Ok(a + b.len() as i32) + })?; + Result::Ok(Val::I32(addr)) + // TODO: check that the next parameter is the correct length +} + /// Convert a hyperlight parameter value to a wasmtime value. /// /// For String and VecBytes parameter types, this allocates memory in the guest's memory space @@ -232,13 +248,10 @@ pub fn hl_param_to_val( Ok(Val::I32(addr)) } ParameterValue::VecBytes(b) => { - let addr = malloc(&mut ctx, &get_export, b.len())?; - write(&mut ctx, &get_export, addr, b)?; - Ok(Val::I32(addr)) - // TODO: check that the next parameter is the correct length + to_val_bytes(&mut ctx, get_export, core::iter::once(b.as_ref())) } - ParameterValue::ByteChunks(_) => { - todo!() + ParameterValue::ByteChunks(bs) => { + to_val_bytes(&mut ctx, get_export, bs.iter().map(|x| x.as_ref())) } } } @@ -258,6 +271,16 @@ pub fn val_to_hl_result( if let ReturnType::Void = rt { return Ok(ReturnValue::Void(())); } + let mut get_bytes = |ret| { + // Track this allocation so it can be freed on next VM entry + track_return_value_allocation(ret); + let mut size_bytes = [0; 4]; + read(&mut ctx, &get_export, ret, &mut size_bytes)?; + let size = i32::from_le_bytes(size_bytes); + let mut bytes = vec![0; size as usize]; + read(&mut ctx, &get_export, ret + 4, &mut bytes)?; + Result::Ok(bytes) + }; match (rt, rvs[0]) { (ReturnType::Int, Val::I32(i)) => Ok(ReturnValue::Int(i)), (ReturnType::UInt, Val::I32(u)) => Ok(ReturnValue::UInt(u as u32)), @@ -281,15 +304,11 @@ pub fn val_to_hl_result( .to_string(), )) } - (ReturnType::VecBytes, Val::I32(ret)) => { - // Track this allocation so it can be freed on next VM entry - track_return_value_allocation(ret); - let mut size_bytes = [0; 4]; - read(&mut ctx, &get_export, ret, &mut size_bytes)?; - let size = i32::from_le_bytes(size_bytes); - let mut bytes = vec![0; size as usize]; - read(&mut ctx, &get_export, ret + 4, &mut bytes)?; - Ok(ReturnValue::VecBytes(bytes)) + (ReturnType::VecBytes, Val::I32(ret)) => Ok(ReturnValue::VecBytes(get_bytes(ret)?)), + (ReturnType::ByteChunks, Val::I32(ret)) => { + Ok(ReturnValue::ByteChunks(vec![Bytes::from_owner(get_bytes( + ret, + )?)])) } (_, _) => Err(HyperlightGuestError::new( ErrorCode::GuestError, @@ -301,6 +320,22 @@ pub fn val_to_hl_result( } } +fn val_to_bytes<'a, C: AsContextMut>( + ctx: &mut C, + get_export: impl Fn(&mut C, &str) -> Option, + ps: &mut impl Iterator, + last_vec_len: &mut Option, + p: i32, +) -> Vec { + let Some(Val::I32(l)) = ps.next() else { + panic!("Host function call missing vecbytes length parameter"); + }; + *last_vec_len = Some(*l as u32); + let mut bytes = vec![0; *l as usize]; + read(ctx, &get_export, p, &mut bytes).unwrap(); + bytes.clone() +} + /// Convert guest-provided WASM values to hyperlight parameters for host function calls. /// /// For String and VecBytes parameter types, the guest passes pointers to data in its own @@ -342,13 +377,12 @@ pub fn val_to_hl_param<'a, C: AsContextMut>( .to_string(), )), (ParameterType::VecBytes, Val::I32(p)) => { - let Some(Val::I32(l)) = ps.next() else { - panic!("Host function call missing vecbytes length parameter"); - }; - *last_vec_len = Some(*l as u32); - let mut bytes = vec![0; *l as usize]; - read(ctx, &get_export, *p, &mut bytes).unwrap(); - Some(ParameterValue::VecBytes(bytes.clone())) + let bs = val_to_bytes(ctx, get_export, ps, last_vec_len, *p); + Some(ParameterValue::VecBytes(bs)) + } + (ParameterType::ByteChunks, Val::I32(p)) => { + let bs = val_to_bytes(ctx, get_export, ps, last_vec_len, *p); + Some(ParameterValue::ByteChunks(vec![Bytes::from_owner(bs)])) } (_, _) => panic!( "Host function return type combination unsupported: {:?} / {:?}", @@ -383,15 +417,8 @@ pub fn hl_return_to_val( write(ctx, &get_export, addr, s.as_bytes_with_nul())?; Ok(Val::I32(addr)) } - ReturnValue::VecBytes(b) => { - let addr = malloc(ctx, &get_export, b.len())?; - write(ctx, &get_export, addr, b.as_ref())?; - Ok(Val::I32(addr)) - // TODO: check that the next parameter is the correct length - } - ReturnValue::ByteChunks(_) => { - todo!() - } + ReturnValue::VecBytes(b) => to_val_bytes(ctx, get_export, core::iter::once(b.as_ref())), + ReturnValue::ByteChunks(bs) => to_val_bytes(ctx, get_export, bs.iter().map(|x| x.as_ref())), ReturnValue::Void(()) => Ok(Val::I32(0)), } }