diff --git a/.vscode/launch.json b/.vscode/launch.json index 01cb304..50599e9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,101 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - // this can be used to debug tests - "version": "0.2.0", + "inputs": [ + { + "id": "program", + "type": "promptString", + "default": "x64/debug/wasm_runtime", + "description": "Path to the program to debug", + } + ], "configurations": [ { "type": "lldb", "request": "launch", - "name": "Cargo test", + "name": "Debug example 'guest-debugging'", + "cargo": { + "args": [ + "build", + "--example=guest-debugging", + "--package=hyperlight-wasm", + "--features=gdb", + ], + "filter": { + "name": "guest-debugging", + "kind": "example" + } + }, + "env": { + "RUST_DIR_FOR_DEBUGGING_TESTS": "${workspaceFolder}/src/hyperlight_wasm", + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug example 'rust_wasm_examples'", "cargo": { - "args": [ - "test", - "--profile=dev", - "--lib", - "--no-run" - - ], - "filter": { - "name": "hyperlight_wasm", - "kind": "lib" - } + "args": [ + "build", + "--example=rust_wasm_examples", + "--package=hyperlight-wasm", + ], + "filter": { + "name": "rust_wasm_examples", + "kind": "example" + } }, "env": { - "RUST_DIR_FOR_DEBUGGING_TESTS": "${workspaceFolder}/src/hyperlight_wasm" + "RUST_DIR_FOR_DEBUGGING_TESTS": "${workspaceFolder}/src/hyperlight_wasm", + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "name": "Remote GDB attach", + "type": "cppdbg", + "request": "launch", + "program": "${input:program}", + "args": [], + "stopAtEntry": true, + "hardwareBreakpoints": { + "require": false, + "limit": 4 }, - "args": [ - "--exact", - "sandbox::loaded_wasm_sandbox::tests::test_call_host_func_with_vecbytes" + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "miDebuggerServerAddress": "localhost:8080", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + }, + //{ + //"description": "Add symbols", + //"text": "symbol-file ${workspaceFolder}/x64/debug/rust_wasm_samples.wasm", + //"ignoreFailures": true + //} ] - } + }, + { + "name": "Remote LLDB attach", + "type": "lldb", + "request": "launch", + "targetCreateCommands": [ + "target create ${input:program}", + ], + "processCreateCommands": [ + "gdb-remote localhost:8080" + ], + }, ] } \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 9a65acf..d622238 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,16 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli", + "gimli 0.31.1", +] + +[[package]] +name = "addr2line" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9acbfca36652500c911ddb767ed433e3ed99b032b5d935be73c6923662db1d43" +dependencies = [ + "gimli 0.32.0", ] [[package]] @@ -26,7 +35,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy 0.8.25", + "zerocopy 0.8.26", ] [[package]] @@ -158,15 +167,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.13.1" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" +checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" dependencies = [ "aws-lc-sys", "zeroize", @@ -174,9 +183,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" +checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" dependencies = [ "bindgen", "cc", @@ -191,11 +200,11 @@ version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ - "addr2line", + "addr2line 0.24.2", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.7", "rustc-demangle", "windows-targets 0.52.6", ] @@ -285,9 +294,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.18.1" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" dependencies = [ "allocator-api2", ] @@ -361,9 +370,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.26" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "jobserver", "libc", @@ -527,36 +536,32 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce81edaca6167d1f78da026afa92d7ff957a80aa82a79076e11cd34cde20165" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0d51e12f958551165969c6e8767e1e461729f6c1ccae923b0ba1d5cbcbbbf8" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41294c755094d2c8a514cea903039742474423f2e91601332eab5f4094f76333" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb6f5d0df5bd0d02c63ec48e8f2e38a176b123f59e084f22caf89a0d0593e7e" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "serde", "serde_derive", @@ -564,9 +569,8 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e543cdb278b7c15f739021cf880ee1808c68fa2402febb87edb9307f552c8fec" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -577,7 +581,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.32.0", "hashbrown", "log", "pulley-interpreter", @@ -586,41 +590,38 @@ dependencies = [ "serde", "smallvec", "target-lexicon", - "wasmtime-math", + "wasmtime-internal-math", ] [[package]] name = "cranelift-codegen-meta" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f979c75cfd712dbc754799dfe4a4d0db7a51defc2e36d006b27a8a63e018eece" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", "cranelift-srcgen", + "heck", "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f36e74ba4033490587a47952f74390cb7d4f1fc1fa28ace50564e491f1e38f" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "cranelift-control" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6671962c7d65b9a7ad038cd92da6784744d8a9ecf8ded8bb9a1f7046dbe2ccf" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee832f8329fa87c5df6c1d64a8506a58031e6f8a190d9b21b1900272a4dbb47d" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-bitset", "serde", @@ -629,9 +630,8 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7bc17aa3277214eab4b63a03544b1b46962154012b751c9f14c2a5419c6471" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-codegen", "log", @@ -641,15 +641,13 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff02dcecae2e7e9c61b713f1fb46eabecdca9f55b49f99859ceb1a3e7f4a9cb" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "cranelift-native" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f76fd681f35bdf17be9c3e516b9acc0c7bd61b81faf95496decd8e0000979c" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-codegen", "libc", @@ -658,15 +656,14 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3d9071bc5ee5573e723d9d84a45b7025a29e8f2c5ad81b3b9d0293129541d9" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -749,9 +746,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" @@ -899,12 +896,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1008,6 +1005,30 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "gdbstub" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d66e32caf5dd59f561be0143e413e01d651bd8498eb9aa0be8c482c81c8d31" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "log", + "managed", + "num-traits", + "paste", +] + +[[package]] +name = "gdbstub_arch" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22dde0e1b68787036ccedd0b1ff6f953527a0e807e571fbe898975203027278f" +dependencies = [ + "gdbstub", + "num-traits", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1046,6 +1067,12 @@ name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "gimli" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93563d740bc9ef04104f9ed6f86f1e3275c2cdafb95664e26584b9ca807a8ffe" dependencies = [ "fallible-iterator", "indexmap", @@ -1097,9 +1124,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" dependencies = [ "atomic-waker", "bytes", @@ -1241,9 +1268,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "bytes", "futures-channel", @@ -1254,7 +1281,7 @@ dependencies = [ "hyper", "libc", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -1284,7 +1311,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "wasmparser 0.235.0", + "wasmparser", ] [[package]] @@ -1298,7 +1325,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "wasmparser 0.235.0", + "wasmparser", ] [[package]] @@ -1314,6 +1341,8 @@ dependencies = [ "crossbeam-channel", "elfcore", "flatbuffers", + "gdbstub", + "gdbstub_arch", "goblin", "hyperlight-common", "kvm-bindings", @@ -1355,6 +1384,7 @@ dependencies = [ "chrono", "criterion", "crossbeam-queue", + "env_logger", "examples_common", "goblin", "hyperlight-component-macro", @@ -1521,15 +1551,26 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown", "serde", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -1675,9 +1716,9 @@ checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libgit2-sys" -version = "0.18.1+1.9.0" +version = "0.18.2+1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" +checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" dependencies = [ "cc", "libc", @@ -1703,9 +1744,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" dependencies = [ "bitflags 2.9.1", "libc", @@ -1767,6 +1808,12 @@ dependencies = [ "libc", ] +[[package]] +name = "managed" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d" + [[package]] name = "memchr" version = "2.7.5" @@ -1880,7 +1927,7 @@ dependencies = [ "libc", "num_enum", "vmm-sys-util", - "zerocopy 0.8.25", + "zerocopy 0.8.26", ] [[package]] @@ -1948,18 +1995,19 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" dependencies = [ "num_enum_derive", + "rustversion", ] [[package]] name = "num_enum_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ "proc-macro2", "quote", @@ -1971,6 +2019,15 @@ name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a" dependencies = [ "crc32fast", "hashbrown", @@ -2036,6 +2093,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -2136,7 +2199,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.25", + "zerocopy 0.8.26", ] [[package]] @@ -2158,32 +2221,21 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "psm" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" -dependencies = [ - "cc", -] - [[package]] name = "pulley-interpreter" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14280b69a9cbb6ada02a7aa5f7b3f1b72d1043b5bc9336990b700525dea6e3" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-bitset", "log", "pulley-macros", - "wasmtime-math", + "wasmtime-internal-math", ] [[package]] name = "pulley-macros" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076f1be746801280af4c96c4407b5fd1d09cfa53ab27ba0ac7dd8f207e7bbf83" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "proc-macro2", "quote", @@ -2216,9 +2268,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radix_trie" @@ -2232,9 +2284,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", "rand_core", @@ -2299,9 +2351,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.13" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" dependencies = [ "bitflags 2.9.1", ] @@ -2452,22 +2504,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ "aws-lc-rs", "once_cell", @@ -2500,9 +2552,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "aws-lc-rs", "ring", @@ -2650,9 +2702,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "itoa", "memchr", @@ -2725,12 +2777,9 @@ checksum = "c1e9a774a6c28142ac54bb25d25562e6bcf957493a184f15ad4eebccb23e410a" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" @@ -2751,6 +2800,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.10.0" @@ -2888,16 +2947,18 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "pin-project-lite", - "socket2", + "slab", + "socket2 0.5.10", "windows-sys 0.52.0", ] @@ -3000,9 +3061,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b679217f2848de74cabd3e8fc5e6d66f40b7da40f8e1954d92054d9010690fd5" +checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "tower-service" @@ -3024,9 +3085,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", @@ -3235,25 +3296,12 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9679ae3cf7cfa2ca3a327f7fab97f27f3294d402fd1a76ca8ab514e17973e4d3" +checksum = "b3bc393c395cb621367ff02d854179882b9a351b4e0c93d1397e6090b53a5c2a" dependencies = [ "leb128fmt", - "wasmparser 0.233.0", -] - -[[package]] -name = "wasmparser" -version = "0.233.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51cb03afce7964bbfce46602d6cb358726f36430b6ba084ac6020d8ce5bc102" -dependencies = [ - "bitflags 2.9.1", - "hashbrown", - "indexmap", - "semver", - "serde", + "wasmparser", ] [[package]] @@ -3271,22 +3319,21 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf8e5b732895c99b21aa615f1b73352e51bbe2b2cb6c87eae7f990d07c1ac18" +checksum = "75aa8e9076de6b9544e6dab4badada518cca0bf4966d35b131bbd057aed8fa0a" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.233.0", + "wasmparser", ] [[package]] name = "wasmtime" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec10e50038f22ab407fdd8708120b8feed3450a02618efcf26ca47e82122927d" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ - "addr2line", + "addr2line 0.25.0", "anyhow", "bitflags 2.9.1", "bumpalo", @@ -3299,67 +3346,88 @@ dependencies = [ "log", "mach2", "memfd", - "object", + "object 0.37.1", "once_cell", "postcard", - "psm", "pulley-interpreter", - "rustix 1.0.7", + "rustix 1.0.8", "semver", "serde", "serde_derive", "smallvec", "target-lexicon", - "wasmparser 0.233.0", - "wasmtime-asm-macros", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-icache-coherence", - "wasmtime-math", - "wasmtime-slab", - "wasmtime-versioned-export-macros", - "wasmtime-winch", - "windows-sys 0.59.0", + "wasmtime-internal-asm-macros", + "wasmtime-internal-component-macro", + "wasmtime-internal-component-util", + "wasmtime-internal-cranelift", + "wasmtime-internal-fiber", + "wasmtime-internal-jit-debug", + "wasmtime-internal-jit-icache-coherence", + "wasmtime-internal-math", + "wasmtime-internal-slab", + "wasmtime-internal-unwinder", + "wasmtime-internal-versioned-export-macros", + "wasmtime-internal-winch", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-asm-macros" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d379cda46d6fd18619e282a75fbb09b70b3d0f166b605f45b4059dfaf9dc6ce" +name = "wasmtime-environ" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" +dependencies = [ + "anyhow", + "cranelift-bitset", + "cranelift-entity", + "gimli 0.32.0", + "indexmap", + "log", + "object 0.37.1", + "postcard", + "semver", + "serde", + "serde_derive", + "smallvec", + "target-lexicon", + "wasm-encoder", + "wasmparser", + "wasmprinter", + "wasmtime-internal-component-util", +] + +[[package]] +name = "wasmtime-internal-asm-macros" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cfg-if", ] [[package]] -name = "wasmtime-component-macro" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b08be093e0a876da45f79070c2ada4656f2785eb77c01b86ce60be3153920a5" +name = "wasmtime-internal-component-macro" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "proc-macro2", "quote", "syn", - "wasmtime-component-util", - "wasmtime-wit-bindgen", + "wasmtime-internal-component-util", + "wasmtime-internal-wit-bindgen", "wit-parser", ] [[package]] -name = "wasmtime-component-util" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0451ce0dd94a33d0dbd57934ce666a04c2753a5262ca2bc84cf6a67cf5303dc" +name = "wasmtime-internal-component-util" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] -name = "wasmtime-cranelift" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15aa836683d7398f13f2f26bbe74c404ceaba66b6bbb96700d6b7f91bec90e03" +name = "wasmtime-internal-cranelift" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cfg-if", @@ -3368,93 +3436,87 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "gimli", + "gimli 0.32.0", "itertools 0.14.0", "log", - "object", + "object 0.37.1", "pulley-interpreter", "smallvec", "target-lexicon", "thiserror 2.0.12", - "wasmparser 0.233.0", + "wasmparser", "wasmtime-environ", - "wasmtime-math", - "wasmtime-versioned-export-macros", + "wasmtime-internal-math", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-environ" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317081a0cbbb1f749d348b262575608fc082d47ab11b6247bbe9163eeb955777" +name = "wasmtime-internal-fiber" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", - "cranelift-bitset", - "cranelift-entity", - "gimli", - "indexmap", - "log", - "object", - "postcard", - "semver", - "serde", - "serde_derive", - "smallvec", - "target-lexicon", - "wasm-encoder", - "wasmparser 0.233.0", - "wasmprinter", - "wasmtime-component-util", + "cc", + "cfg-if", + "libc", + "rustix 1.0.8", + "wasmtime-internal-asm-macros", + "wasmtime-internal-versioned-export-macros", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-fiber" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6763b33eceefc443f6477d84dc8751df5f23d280d7e01f28339fa3ec4b00ff13" +name = "wasmtime-internal-jit-debug" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ - "anyhow", "cc", - "cfg-if", - "libc", - "rustix 1.0.7", - "wasmtime-asm-macros", - "wasmtime-versioned-export-macros", - "windows-sys 0.59.0", + "object 0.37.1", + "rustix 1.0.8", + "spin", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-jit-icache-coherence" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea6b740d1a35f2cebfe88e013ac8a4a84ff8dabc3a392df920abf554e871cf2" +name = "wasmtime-internal-jit-icache-coherence" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cfg-if", "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-math" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fa317691aedc64aae3a86b3d786e4b2b0007bc0b56e0b6098b8b5a85ab2134" +name = "wasmtime-internal-math" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "libm", ] [[package]] -name = "wasmtime-slab" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a06819d24370273021054b50589e3078e7f5cfac15515e58b3fbbebf5e5b39" +name = "wasmtime-internal-slab" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] -name = "wasmtime-versioned-export-macros" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca100ed168ffc9b37aefc07a5be440645eab612a2ff6e2ff884e8cc3740e666" +name = "wasmtime-internal-unwinder" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" +dependencies = [ + "anyhow", + "cfg-if", + "cranelift-codegen", + "log", + "object 0.37.1", +] + +[[package]] +name = "wasmtime-internal-versioned-export-macros" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "proc-macro2", "quote", @@ -3462,27 +3524,25 @@ dependencies = [ ] [[package]] -name = "wasmtime-winch" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595f51430606a7b5578f34e0d7c73dca52a22ed24756f2ba9d4d0c1bde8631af" +name = "wasmtime-internal-winch" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", - "object", + "gimli 0.32.0", + "object 0.37.1", "target-lexicon", - "wasmparser 0.233.0", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", + "wasmtime-internal-cranelift", "winch-codegen", ] [[package]] -name = "wasmtime-wit-bindgen" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233fdcb96f9097be697319ba647ef42bdbdb40e89f04c8ae3713103813b5b793" +name = "wasmtime-internal-wit-bindgen" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "heck", @@ -3545,22 +3605,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "34.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf007d7940f62127ce4f33a8aa92dadedfdc78c3860a057e06c8c24e26e180d" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cranelift-assembler-x64", "cranelift-codegen", - "gimli", + "gimli 0.32.0", "regalloc2", "smallvec", "target-lexicon", "thiserror 2.0.12", - "wasmparser 0.233.0", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", - "wasmtime-math", + "wasmtime-internal-cranelift", + "wasmtime-internal-math", ] [[package]] @@ -3840,9 +3899,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -3858,9 +3917,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22f1cd55247a2e616870b619766e9522df36b7abafbb29bbeb34b7a9da7e9f0" +checksum = "0a1f95a87d03a33e259af286b857a95911eb46236a0f726cbaec1227b3dfc67a" dependencies = [ "anyhow", "id-arena", @@ -3871,7 +3930,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.233.0", + "wasmparser", ] [[package]] @@ -3882,12 +3941,12 @@ checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "xattr" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" +checksum = "af3a19837351dc82ba89f8a125e22a3c475f05aba604acc023d62b2739ae2909" dependencies = [ "libc", - "rustix 1.0.7", + "rustix 1.0.8", ] [[package]] @@ -3926,11 +3985,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ - "zerocopy-derive 0.8.25", + "zerocopy-derive 0.8.26", ] [[package]] @@ -3946,9 +4005,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", diff --git a/Justfile b/Justfile index 5cc4e74..647cb92 100644 --- a/Justfile +++ b/Justfile @@ -19,10 +19,10 @@ ensure-tools: cargo install cargo-component --locked --version 0.21.1 cargo install wit-bindgen-cli --locked --version 0.43.0 -build-all target=default-target: (build target) (build-wasm-examples target) (build-rust-wasm-examples target) (build-wasm-runtime target) (build-rust-component-examples target) +build-all target=default-target features="": (build target features) (build-wasm-examples target features) (build-rust-wasm-examples target features) (build-wasm-runtime target features) (build-rust-component-examples target features) -build target=default-target features="": (build-wasm-runtime target) (fmt-check) - cargo build {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --verbose --profile={{ if target == "debug" {"dev"} else { target } }} +build target=default-target features="": (build-wasm-runtime target features) (fmt-check) + cargo build {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--features " + features } }} --verbose --profile={{ if target == "debug" {"dev"} else { target } }} mkdir-redist target=default-target: mkdir {{ mkdir-arg }} x64 @@ -32,23 +32,23 @@ compile-wit: wasm-tools component wit ./src/wasmsamples/components/runcomponent.wit -w -o ./src/wasmsamples/components/runcomponent-world.wasm wasm-tools component wit ./src/component_sample/wit/example.wit -w -o ./src/component_sample/wit/component-world.wasm -build-wasm-runtime target=default-target: - cd ./src/wasm_runtime && cargo build --verbose --profile={{ if target == "debug" {"dev"} else { target } }} && rm -R target +build-wasm-runtime target=default-target features="": + cd ./src/wasm_runtime && cargo build --verbose {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--features " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} && rm -R target -build-wasm-examples target=default-target: (compile-wit) - {{ build-wasm-examples-command }} {{target}} +build-wasm-examples target=default-target features="": (compile-wit) + {{ build-wasm-examples-command }} {{target}} {{features}} -build-rust-wasm-examples target=default-target: (mkdir-redist target) +build-rust-wasm-examples target=default-target features="": (mkdir-redist target) rustup target add wasm32-unknown-unknown cd ./src/rust_wasm_samples && cargo build --target wasm32-unknown-unknown --profile={{ if target == "debug" {"dev"} else { target } }} - cargo run -p hyperlight-wasm-aot compile ./src/rust_wasm_samples/target/wasm32-unknown-unknown/{{ target }}/rust_wasm_samples.wasm ./x64/{{ target }}/rust_wasm_samples.aot + cargo run {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--features " + features } }} -p hyperlight-wasm-aot compile ./src/rust_wasm_samples/target/wasm32-unknown-unknown/{{ target }}/rust_wasm_samples.wasm ./x64/{{ target }}/rust_wasm_samples.aot -build-rust-component-examples target=default-target: (compile-wit) +build-rust-component-examples target=default-target features="": (compile-wit) # use cargo component so we don't get all the wasi imports https://github.com/bytecodealliance/cargo-component?tab=readme-ov-file#relationship-with-wasm32-wasip2 # we also explicitly target wasm32-unknown-unknown since cargo component might try to pull in wasi imports https://github.com/bytecodealliance/cargo-component/issues/290 rustup target add wasm32-unknown-unknown cd ./src/component_sample && cargo component build --target wasm32-unknown-unknown --profile={{ if target == "debug" {"dev"} else { target } }} - cargo run -p hyperlight-wasm-aot compile --component ./src/component_sample/target/wasm32-unknown-unknown/{{ target }}/component_sample.wasm ./x64/{{ target }}/component_sample.aot + cargo run {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--features " + features } }} -p hyperlight-wasm-aot compile --component ./src/component_sample/target/wasm32-unknown-unknown/{{ target }}/component_sample.wasm ./x64/{{ target }}/component_sample.aot check target=default-target: cargo check --profile={{ if target == "debug" {"dev"} else { target } }} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c1bc0a6..cf6d0f5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.85.0" +channel = "1.86.0" diff --git a/src/hyperlight_wasm/Cargo.toml b/src/hyperlight_wasm/Cargo.toml index e7a22b3..dba3572 100644 --- a/src/hyperlight_wasm/Cargo.toml +++ b/src/hyperlight_wasm/Cargo.toml @@ -29,6 +29,11 @@ name = "helloworld" path = "examples/helloworld/main.rs" test = true +[[example]] +name = "guest-debugging" +path = "examples/guest-debugging/main.rs" +test = true + [[example]] name = "hostfuncs" path = "examples/hostfuncs/main.rs" @@ -52,6 +57,7 @@ tracing = "0.1.27" log = "0.4.27" cfg-if = { version = "1" } metrics = "0.24.2" +env_logger = "0.11.8" [target.'cfg(windows)'.dependencies] windows = { version = "0.61", features = ["Win32_System_Threading"] } @@ -81,6 +87,7 @@ function_call_metrics = ["hyperlight-host/function_call_metrics"] seccomp = ["hyperlight-host/seccomp"] print_debug = ["hyperlight-host/print_debug"] crashdump = ["hyperlight-host/crashdump"] +gdb = ["hyperlight-host/gdb"] kvm = ["hyperlight-host/kvm"] mshv2 = ["hyperlight-host/mshv2"] mshv3 = ["hyperlight-host/mshv3"] diff --git a/src/hyperlight_wasm/build.rs b/src/hyperlight_wasm/build.rs index 7ed72a5..6bd102a 100644 --- a/src/hyperlight_wasm/build.rs +++ b/src/hyperlight_wasm/build.rs @@ -114,7 +114,7 @@ fn build_wasm_runtime() -> PathBuf { let mut env_vars = env::vars().collect::>(); env_vars.retain(|(key, _)| !key.starts_with("CARGO_")); - let cmd = cmd + let mut cmd = cmd .arg("build") .arg("--profile") .arg(cargo_profile) @@ -125,6 +125,11 @@ fn build_wasm_runtime() -> PathBuf { .env_clear() .envs(env_vars); + // Add --features gdb if the gdb feature is enabled for this build script + if std::env::var("CARGO_FEATURE_GDB").is_ok() { + cmd = cmd.arg("--features").arg("gdb"); + } + let status = cmd .status() .unwrap_or_else(|e| panic!("could not run cargo build: {}", e)); diff --git a/src/hyperlight_wasm/examples/guest-debugging/main.rs b/src/hyperlight_wasm/examples/guest-debugging/main.rs new file mode 100644 index 0000000..3b57a07 --- /dev/null +++ b/src/hyperlight_wasm/examples/guest-debugging/main.rs @@ -0,0 +1,91 @@ +/* +Copyright 2025 The Hyperlight Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +use examples_common::get_wasm_module_path; +use hyperlight_host::HyperlightError; +use hyperlight_wasm::{Result, SandboxBuilder}; + +fn get_time_since_boot_microsecond() -> Result { + let res = std::time::SystemTime::now() + .duration_since(std::time::SystemTime::UNIX_EPOCH)? + .as_micros(); + i64::try_from(res).map_err(HyperlightError::IntConversionFailure) +} + +fn main() -> Result<()> { + let tests = [ + ( + "HelloWorld.aot", + "HelloWorld", + "Message from Rust Example to Wasm Function".to_string(), + ), + // ( + // "rust_wasm_samples.aot", + // "add", + // (5i32, 3i32), + // ), + ]; + for (idx, case) in tests.iter().enumerate() { + let (mod_path, fn_name, params_opt) = case; + + let mut sandbox = SandboxBuilder::new() + .with_guest_input_buffer_size(2 * 1024 * 1024) // 2 MiB + .with_guest_heap_size(10 * 1024 * 1024) // 4 MiB + .with_debugging_enabled(8080) + .build()?; + + let wasm_sandbox = match mod_path.starts_with("RunWasm") { + true => { + sandbox + .register( + "GetTimeSinceBootMicrosecond", + get_time_since_boot_microsecond, + ) + .unwrap(); + + sandbox.load_runtime()? + } + false => sandbox.load_runtime()?, + }; + + let mod_path = get_wasm_module_path(mod_path)?; + + // Load a Wasm module into the sandbox + let mut loaded_wasm_sandbox = wasm_sandbox.load_module(mod_path)?; + + if *fn_name == "Echo" { + // Call a function in the Wasm module + let result: String = + loaded_wasm_sandbox.call_guest_function(fn_name, params_opt.clone())?; + println!( + "Result from calling Echo Function in Wasm Module \ + test case {idx}) is: {}", + result + ); + } else if *fn_name == "HelloWorld" { + // Call a function in the Wasm module + let result: i32 = + loaded_wasm_sandbox.call_guest_function(fn_name, params_opt.clone())?; + + println!( + "Result from calling HelloWorld Function in Wasm Module \ + test case {idx}) is: {}", + result + ); + } + } + Ok(()) +} diff --git a/src/hyperlight_wasm/scripts/build-wasm-examples.sh b/src/hyperlight_wasm/scripts/build-wasm-examples.sh index ae0e29c..d28932b 100755 --- a/src/hyperlight_wasm/scripts/build-wasm-examples.sh +++ b/src/hyperlight_wasm/scripts/build-wasm-examples.sh @@ -6,9 +6,23 @@ set -o pipefail pushd "$(dirname "${BASH_SOURCE[0]}")/../../wasmsamples" OUTPUT_DIR="../../x64/${1:-"debug"}" +BUILD_TYPE="${1:-"debug"}" +FEATURES="${2:-""}" mkdir -p ${OUTPUT_DIR} OUTPUT_DIR=$(realpath $OUTPUT_DIR) +# Set stripping flags based on whether features are enabled +if [ -n "$FEATURES" ]; then + AOT_FEATURES="--features $FEATURES" + STRIP_FLAGS="" + DEBUG_FLAGS="-g" + OPT_FLAGS="-O0" +else + AOT_FEATURES="" + STRIP_FLAGS="-Wl,--strip-all" + DEBUG_FLAGS="" + OPT_FLAGS="-O3" +fi if [ -f "/.dockerenv" ] || grep -q docker /proc/1/cgroup; then # running in a container so use the installed wasi-sdk as the devcontainer has this installed @@ -16,9 +30,9 @@ if [ -f "/.dockerenv" ] || grep -q docker /proc/1/cgroup; then do echo Building ${FILENAME} # Build the wasm file with wasi-libc for wasmtime - /opt/wasi-sdk/bin/clang -flto -ffunction-sections -mexec-model=reactor -O3 -z stack-size=4096 -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors -Wl,--strip-all,--no-entry -Wl,--allow-undefined -Wl,--gc-sections -o ${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm ${FILENAME} + /opt/wasi-sdk/bin/clang ${DEBUG_FLAGS} -flto -ffunction-sections -mexec-model=reactor ${OPT_FLAGS} -z stack-size=4096 -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors ${STRIP_FLAGS} -Wl,--no-entry -Wl,--allow-undefined -Wl,--gc-sections -o ${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm ${FILENAME} - cargo run -p hyperlight-wasm-aot compile ${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm ${OUTPUT_DIR}/${FILENAME%.*}.aot + cargo run ${AOT_FEATURES} -p hyperlight-wasm-aot compile ${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm ${OUTPUT_DIR}/${FILENAME%.*}.aot done for WIT_FILE in ${PWD}/components/*.wit; do @@ -30,16 +44,16 @@ if [ -f "/.dockerenv" ] || grep -q docker /proc/1/cgroup; then # Build the wasm file with wasi-libc for wasmtime /opt/wasi-sdk/bin/wasm32-wasip2-clang \ - -ffunction-sections -mexec-model=reactor -O3 -z stack-size=4096 \ + -ffunction-sections -mexec-model=reactor ${OPT_FLAGS} -z stack-size=4096 \ -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors \ - -Wl,--strip-all,--no-entry -Wl,--allow-undefined -Wl,--gc-sections \ + ${STRIP_FLAGS} -Wl,--no-entry -Wl,--allow-undefined -Wl,--gc-sections \ -o ${OUTPUT_DIR}/${COMPONENT_NAME}-p2.wasm \ ${PWD}/components/${COMPONENT_NAME}.c \ ${PWD}/components/bindings/${COMPONENT_NAME}.c \ ${PWD}/components/bindings/${COMPONENT_NAME}_component_type.o # Build AOT for Wasmtime - cargo run -p hyperlight-wasm-aot compile --component ${OUTPUT_DIR}/${COMPONENT_NAME}-p2.wasm ${OUTPUT_DIR}/${COMPONENT_NAME}.aot + cargo run ${AOT_FEATURES} -p hyperlight-wasm-aot compile --component ${OUTPUT_DIR}/${COMPONENT_NAME}-p2.wasm ${OUTPUT_DIR}/${COMPONENT_NAME}.aot done else @@ -55,10 +69,20 @@ else for FILENAME in $(find . -name '*.c' -not -path './components/*') do echo Building ${FILENAME} - # Build the wasm file with wasi-libc for wasmtime - docker run --rm -i -v "${PWD}:/tmp/host" -v "${OUTPUT_DIR}:/tmp/output/" wasm-clang-builder:latest /opt/wasi-sdk/bin/clang -flto -ffunction-sections -mexec-model=reactor -O3 -z stack-size=4096 -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors -Wl,--strip-all,--no-entry -Wl,--allow-undefined -Wl,--gc-sections -o /tmp/output/${FILENAME%.*}-wasi-libc.wasm /tmp/host/${FILENAME} - - cargo run -p hyperlight-wasm-aot compile ${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm ${OUTPUT_DIR}/${FILENAME%.*}.aot + OUTPUT_WASM="${OUTPUT_DIR}/${FILENAME%.*}-wasi-libc.wasm" + ABS_INPUT="$(realpath ${FILENAME})" + ABS_OUTPUT="$(realpath ${OUTPUT_WASM})" + INPUT_DIR="$(dirname ${ABS_INPUT})" + OUTPUT_DIR_REAL="$(dirname ${ABS_OUTPUT})" + INPUT_BASE="$(basename ${ABS_INPUT})" + OUTPUT_BASE="$(basename ${ABS_OUTPUT})" + # Map parent directories to the same path in the container + docker run --rm -i \ + -v "${INPUT_DIR}:${INPUT_DIR}" \ + -v "${OUTPUT_DIR_REAL}:${OUTPUT_DIR_REAL}" \ + wasm-clang-builder:latest /bin/bash -c "/opt/wasi-sdk/bin/clang ${DEBUG_FLAGS} -flto -ffunction-sections -mexec-model=reactor ${OPT_FLAGS} -z stack-size=4096 -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors ${STRIP_FLAGS} -Wl,--no-entry -Wl,--allow-undefined -Wl,--gc-sections -o ${ABS_OUTPUT} ${ABS_INPUT}" + + cargo run ${AOT_FEATURES} -p hyperlight-wasm-aot compile ${OUTPUT_WASM} ${OUTPUT_DIR}/${FILENAME%.*}.aot done echo Building components @@ -70,18 +94,35 @@ else # Generate bindings for the component wit-bindgen c ${WIT_FILE} --out-dir ${PWD}/components/bindings - # Build the wasm file with wasi-libc for wasmtime - docker run --rm -i -v "${PWD}:/tmp/host" -v "${OUTPUT_DIR}:/tmp/output/" wasm-clang-builder:latest /opt/wasi-sdk/bin/wasm32-wasip2-clang \ - -ffunction-sections -mexec-model=reactor -O3 -z stack-size=4096 \ + COMPONENT_C="${PWD}/components/${COMPONENT_NAME}.c" + BINDINGS_C="${PWD}/components/bindings/${COMPONENT_NAME}.c" + BINDINGS_TYPE_O="${PWD}/components/bindings/${COMPONENT_NAME}_component_type.o" + OUTPUT_WASM="${OUTPUT_DIR}/${COMPONENT_NAME}-p2.wasm" + ABS_COMPONENT_C="$(realpath ${COMPONENT_C})" + ABS_BINDINGS_C="$(realpath ${BINDINGS_C})" + ABS_BINDINGS_TYPE_O="$(realpath ${BINDINGS_TYPE_O})" + ABS_OUTPUT_WASM="$(realpath ${OUTPUT_WASM})" + COMPONENT_C_DIR="$(dirname ${ABS_COMPONENT_C})" + BINDINGS_C_DIR="$(dirname ${ABS_BINDINGS_C})" + BINDINGS_TYPE_O_DIR="$(dirname ${ABS_BINDINGS_TYPE_O})" + OUTPUT_WASM_DIR="$(dirname ${ABS_OUTPUT_WASM})" + # Map all parent directories to the same path in the container + docker run --rm -i \ + -v "${COMPONENT_C_DIR}:${COMPONENT_C_DIR}" \ + -v "${BINDINGS_C_DIR}:${BINDINGS_C_DIR}" \ + -v "${BINDINGS_TYPE_O_DIR}:${BINDINGS_TYPE_O_DIR}" \ + -v "${OUTPUT_WASM_DIR}:${OUTPUT_WASM_DIR}" \ + wasm-clang-builder:latest /bin/bash -c "/opt/wasi-sdk/bin/wasm32-wasip2-clang \ + -ffunction-sections -mexec-model=reactor ${OPT_FLAGS} -z stack-size=4096 \ -Wl,--initial-memory=65536 -Wl,--export=__data_end -Wl,--export=__heap_base,--export=malloc,--export=free,--export=__wasm_call_ctors \ - -Wl,--strip-all,--no-entry -Wl,--allow-undefined -Wl,--gc-sections \ - -o /tmp/output/${COMPONENT_NAME}-p2.wasm \ - /tmp/host/components/${COMPONENT_NAME}.c \ - /tmp/host/components/bindings/${COMPONENT_NAME}.c \ - /tmp/host/components/bindings/${COMPONENT_NAME}_component_type.o + ${STRIP_FLAGS} -Wl,--no-entry -Wl,--allow-undefined -Wl,--gc-sections \ + -o ${ABS_OUTPUT_WASM} \ + ${ABS_COMPONENT_C} \ + ${ABS_BINDINGS_C} \ + ${ABS_BINDINGS_TYPE_O}" # Build AOT for Wasmtime - cargo run -p hyperlight-wasm-aot compile --component ${OUTPUT_DIR}/${COMPONENT_NAME}-p2.wasm ${OUTPUT_DIR}/${COMPONENT_NAME}.aot + cargo run ${AOT_FEATURES} -p hyperlight-wasm-aot compile --component ${OUTPUT_WASM} ${OUTPUT_DIR}/${COMPONENT_NAME}.aot done fi diff --git a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs index ce9292c..5ecf100 100644 --- a/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs +++ b/src/hyperlight_wasm/src/sandbox/sandbox_builder.rs @@ -46,6 +46,30 @@ impl SandboxBuilder { } } + /// Enable debugging for the guest + /// This will allow the guest to be natively debugged using GDB or other debugging tools + /// + /// # Example: + /// ```rust + /// use hyperlight_host::sandbox::SandboxBuilder; + /// let sandbox = SandboxBuilder::new() + /// .with_debugging_enabled(8080) // Enable debugging on port 8080 + /// .build() + /// .expect("Failed to build sandbox"); + /// ``` + /// # Note: + /// This feature is only available when the `gdb` feature is enabled. + /// If the `gdb` feature is not enabled, this method will have no effect. + pub fn with_debugging_enabled(mut self, port: u16) -> Self { + #[cfg(feature = "gdb")] + { + let debug_info = hyperlight_host::sandbox::config::DebugInfo { port }; + self.config.set_guest_debug_info(debug_info); + } + + self + } + /// Set the host print function pub fn with_host_print_fn( mut self, diff --git a/src/hyperlight_wasm_aot/Cargo.toml b/src/hyperlight_wasm_aot/Cargo.toml index 6c27b0a..cf2541f 100644 --- a/src/hyperlight_wasm_aot/Cargo.toml +++ b/src/hyperlight_wasm_aot/Cargo.toml @@ -12,7 +12,10 @@ Application to precompile WebAssembly binaries to for hyperlight-wasm. """ [dependencies] -wasmtime = { version = "34.0.2", default-features = false, features = ["cranelift", "runtime", "component-model" ] } +wasmtime = { git = "https://github.com/dblnz/wasmtime.git", rev = "21981ef3663779fc83650bcaf84f677d13675a3d", default-features = false, features = ["cranelift", "runtime", "component-model" ] } clap = "4.5" cargo_metadata = "0.20" cargo-util-schemas = "=0.2.0" + +[features] +gdb = ["wasmtime/debug-builtins"] diff --git a/src/hyperlight_wasm_aot/src/main.rs b/src/hyperlight_wasm_aot/src/main.rs index 6d6dd64..93578e8 100644 --- a/src/hyperlight_wasm_aot/src/main.rs +++ b/src/hyperlight_wasm_aot/src/main.rs @@ -19,7 +19,10 @@ use std::path::Path; use cargo_metadata::{MetadataCommand, Package}; use cargo_util_schemas::manifest::PackageName; use clap::{Arg, Command}; +#[cfg(feature = "gdb")] +use wasmtime::OptLevel; use wasmtime::{Config, Engine, Module, Precompiled}; + fn main() { let hyperlight_wasm_aot_version = env!("CARGO_PKG_VERSION"); let matches = Command::new("hyperlight-wasm-aot") @@ -149,8 +152,17 @@ fn main() { } } +/// Returns a new `Config` for the Wasmtime engine with additional settings for AOT compilation. fn get_config() -> Config { let mut config = Config::new(); config.target("x86_64-unknown-none").unwrap(); + + // Enable the default features for the Wasmtime engine. + #[cfg(feature = "gdb")] + { + config.debug_info(true); + config.cranelift_opt_level(OptLevel::None); + } + config } diff --git a/src/rust_wasm_samples/build.rs b/src/rust_wasm_samples/build.rs index 93ce36a..e2daa3e 100644 --- a/src/rust_wasm_samples/build.rs +++ b/src/rust_wasm_samples/build.rs @@ -17,6 +17,6 @@ limitations under the License. fn main() { println!("cargo:rustc-link-arg=-zstack-size=4096"); println!("cargo:rustc-link-arg=--initial-memory=65536"); - println!("cargo:rustc-link-arg=--strip-all"); + //println!("cargo:rustc-link-arg=--strip-all"); println!("cargo:rustc-target-feature=+bulk-memory"); } diff --git a/src/wasm_runtime/Cargo.lock b/src/wasm_runtime/Cargo.lock index c48991f..b335ed6 100644 --- a/src/wasm_runtime/Cargo.lock +++ b/src/wasm_runtime/Cargo.lock @@ -8,7 +8,7 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli", + "gimli 0.31.1", ] [[package]] @@ -37,9 +37,9 @@ checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -51,9 +51,9 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.7", "rustc-demangle", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -79,9 +79,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.18.1" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" dependencies = [ "allocator-api2", ] @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.26" +version = "1.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" +checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362" dependencies = [ "shlex", ] @@ -147,42 +147,41 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "cobs" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror", +] [[package]] name = "cranelift-assembler-x64" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b7077389885873ffad5d778e8512742580a6e11b0f723072f41f305d3652f" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9cfeae5a23c8cf9c43381f49211f3ce6dc1da1d46f1c5d06966e6258cc483fa" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c88c577c6af92b550cb83455c331cf8e1bc89fe0ccc3e7eb0fa617ed1d63056" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370f0aa7f1816bf0f838048d69b72d6cf12ef2fc3b37f6997fe494ffb9feb3ad" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "serde", "serde_derive", @@ -190,9 +189,8 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d1a10a8a2958b68ecd261e565eef285249e242a8447ac959978319eabbb4a55" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -203,7 +201,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.32.0", "hashbrown", "log", "pulley-interpreter", @@ -212,41 +210,38 @@ dependencies = [ "serde", "smallvec", "target-lexicon", - "wasmtime-math", + "wasmtime-internal-math", ] [[package]] name = "cranelift-codegen-meta" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f319986d5ae1386cfec625c70f8c01e52dc1f910aa6aaee7740bf8842d4e19c7" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", "cranelift-srcgen", + "heck", "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed52f5660397039c3c741c3acf18746445f4e20629b7280d9f2ccfe57e2b1efd" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "cranelift-control" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79bde8d48e1840702574e28c5d7d4499441435af71e6c47450881f84ce2b60a5" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0335ac187211ac94c254826b6e78d23b8654ae09ebf0830506a827a2647162f" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-bitset", "serde", @@ -255,9 +250,8 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fce5fcf93c1fece95d0175b15fbaf0808b187430bc06c8ecde80db0ed58c5e" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-codegen", "log", @@ -267,15 +261,13 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13fc8d838a2bf28438dbaf6ccdbc34531b6a972054f43fd23be7f124121ce6e0" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "cranelift-native" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0975ce66adcf2e0729d06b1d3efea0398d793d1f39c2e0a6f52a347537836693" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-codegen", "libc", @@ -284,15 +276,14 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.121.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4493a9b500bb02837ea2fb7d4b58c1c21c37a470ae33c92659f4e637aad14c9" +version = "0.123.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -343,12 +334,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -470,6 +461,12 @@ name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "gimli" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93563d740bc9ef04104f9ed6f86f1e3275c2cdafb95664e26584b9ca807a8ffe" dependencies = [ "fallible-iterator", "indexmap", @@ -576,9 +573,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" dependencies = [ "base64", "bytes", @@ -620,7 +617,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "wasmparser 0.235.0", + "wasmparser", ] [[package]] @@ -775,15 +772,26 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown", "serde", ] +[[package]] +name = "io-uring" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -833,9 +841,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libm" @@ -885,18 +893,18 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "mach2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" dependencies = [ "libc", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memfd" @@ -932,6 +940,15 @@ name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.37.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a" dependencies = [ "crc32fast", "hashbrown", @@ -965,9 +982,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "postcard" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" +checksum = "6c1de96e20f51df24ca73cafcc4690e044854d803259db27a00a461cb3b9d17a" dependencies = [ "cobs", "embedded-io 0.4.0", @@ -1012,32 +1029,21 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "psm" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" -dependencies = [ - "cc", -] - [[package]] name = "pulley-interpreter" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0e8f39bc99694ce6fc8df7df7ed258d38d255a9268e2ff964f67f4a6588cdb" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cranelift-bitset", "log", "pulley-macros", - "wasmtime-math", + "wasmtime-internal-math", ] [[package]] name = "pulley-macros" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9276d404009cc49f3b8befeb8ffc1d868c5ea732bd9d72ab3e64231187f908c5" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "proc-macro2", "quote", @@ -1087,9 +1093,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" dependencies = [ "cfg_aliases", "libc", @@ -1110,9 +1116,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" @@ -1159,9 +1165,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.20" +version = "0.12.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" dependencies = [ "base64", "bytes", @@ -1247,22 +1253,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ "once_cell", "ring", @@ -1284,9 +1290,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring", "rustls-pki-types", @@ -1372,12 +1378,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" @@ -1521,15 +1524,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "pin-project-lite", + "slab", "socket2", "windows-sys 0.52.0", ] @@ -1746,12 +1751,12 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9679ae3cf7cfa2ca3a327f7fab97f27f3294d402fd1a76ca8ab514e17973e4d3" +checksum = "b3bc393c395cb621367ff02d854179882b9a351b4e0c93d1397e6090b53a5c2a" dependencies = [ "leb128fmt", - "wasmparser 0.233.0", + "wasmparser", ] [[package]] @@ -1770,19 +1775,6 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "wasmparser" -version = "0.233.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51cb03afce7964bbfce46602d6cb358726f36430b6ba084ac6020d8ce5bc102" -dependencies = [ - "bitflags", - "hashbrown", - "indexmap", - "semver", - "serde", -] - [[package]] name = "wasmparser" version = "0.235.0" @@ -1798,20 +1790,19 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf8e5b732895c99b21aa615f1b73352e51bbe2b2cb6c87eae7f990d07c1ac18" +checksum = "75aa8e9076de6b9544e6dab4badada518cca0bf4966d35b131bbd057aed8fa0a" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.233.0", + "wasmparser", ] [[package]] name = "wasmtime" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2523d3347356a74e9c312c2c96e709c82d998dcafdca97f6d620e69c032fd043" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "bitflags", @@ -1825,65 +1816,84 @@ dependencies = [ "log", "mach2", "memfd", - "object", + "object 0.37.1", "postcard", - "psm", "pulley-interpreter", - "rustix 1.0.7", "semver", "serde", "serde_derive", "smallvec", "target-lexicon", - "wasmparser 0.233.0", - "wasmtime-asm-macros", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", - "wasmtime-jit-icache-coherence", - "wasmtime-math", - "wasmtime-slab", - "wasmtime-versioned-export-macros", - "wasmtime-winch", - "windows-sys 0.59.0", + "wasmtime-internal-asm-macros", + "wasmtime-internal-component-macro", + "wasmtime-internal-component-util", + "wasmtime-internal-cranelift", + "wasmtime-internal-jit-debug", + "wasmtime-internal-math", + "wasmtime-internal-slab", + "wasmtime-internal-unwinder", + "wasmtime-internal-versioned-export-macros", + "wasmtime-internal-winch", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-asm-macros" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c45ecc343d3ad4629d5882e94f3b0f0fac22a043c07e64373381168ae00c259" +name = "wasmtime-environ" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" +dependencies = [ + "anyhow", + "cranelift-bitset", + "cranelift-entity", + "gimli 0.32.0", + "indexmap", + "log", + "object 0.37.1", + "postcard", + "semver", + "serde", + "serde_derive", + "smallvec", + "target-lexicon", + "wasm-encoder", + "wasmparser", + "wasmprinter", + "wasmtime-internal-component-util", +] + +[[package]] +name = "wasmtime-internal-asm-macros" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "cfg-if", ] [[package]] -name = "wasmtime-component-macro" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3491c0f2511be561a92ac9b086351abc3a0f48c5f5f7d14f3975e246c13838be" +name = "wasmtime-internal-component-macro" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "proc-macro2", "quote", "syn", - "wasmtime-component-util", - "wasmtime-wit-bindgen", + "wasmtime-internal-component-util", + "wasmtime-internal-wit-bindgen", "wit-parser", ] [[package]] -name = "wasmtime-component-util" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26bc084e249f74e61c79077d8937c34fb0af223752b9b1725e3d7ed94b006f23" +name = "wasmtime-internal-component-util" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] -name = "wasmtime-cranelift" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0010bd93362c634837e6bb13e213c2d83673b28dc12208b64ddd821fa55f7d33" +name = "wasmtime-internal-cranelift" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cfg-if", @@ -1892,77 +1902,60 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "gimli", + "gimli 0.32.0", "itertools", "log", - "object", + "object 0.37.1", "pulley-interpreter", "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.233.0", + "wasmparser", "wasmtime-environ", - "wasmtime-math", - "wasmtime-versioned-export-macros", + "wasmtime-internal-math", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-environ" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a035dc308ff6be3d790dafdc2e41a128415e20ad864580da49470073e21dc1" +name = "wasmtime-internal-jit-debug" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ - "anyhow", - "cranelift-bitset", - "cranelift-entity", - "gimli", - "indexmap", - "log", - "object", - "postcard", - "semver", - "serde", - "serde_derive", - "smallvec", - "target-lexicon", - "wasm-encoder", - "wasmparser 0.233.0", - "wasmprinter", - "wasmtime-component-util", + "cc", + "object 0.37.1", + "rustix 1.0.8", + "spin 0.10.0", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-jit-icache-coherence" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c71d64e8ebe132cd45e9d299a4d0daf261d66bd05cf50a204a1bf8cf96ff1f" +name = "wasmtime-internal-math" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ - "anyhow", - "cfg-if", - "libc", - "windows-sys 0.59.0", + "libm", ] [[package]] -name = "wasmtime-math" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222bfa4769c6931c985711eb49a92748ea0acc4ca85fcd24e945a2f1bacda0c1" -dependencies = [ - "libm", -] +name = "wasmtime-internal-slab" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" [[package]] -name = "wasmtime-slab" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac42c7fb0639f7c3e0c1ed0c984050245c55410f3fae334dd5b102e0edfab14" +name = "wasmtime-internal-unwinder" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" +dependencies = [ + "anyhow", + "cfg-if", + "log", + "object 0.37.1", +] [[package]] -name = "wasmtime-versioned-export-macros" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e052e1d9c30b8f31aff64380caaaff492a9890a412658bcc8866fe626b8e91f" +name = "wasmtime-internal-versioned-export-macros" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "proc-macro2", "quote", @@ -1970,27 +1963,25 @@ dependencies = [ ] [[package]] -name = "wasmtime-winch" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d71e002033124221f6633a462c26067280519fdd7527ba2751f585db779cc6" +name = "wasmtime-internal-winch" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", - "object", + "gimli 0.32.0", + "object 0.37.1", "target-lexicon", - "wasmparser 0.233.0", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", + "wasmtime-internal-cranelift", "winch-codegen", ] [[package]] -name = "wasmtime-wit-bindgen" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f967f5efaaac7694e6bd0d67542a5a036830860e4adf95684260181e85a5d299" +name = "wasmtime-internal-wit-bindgen" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "heck", @@ -2020,9 +2011,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" dependencies = [ "rustls-pki-types", ] @@ -2038,22 +2029,21 @@ dependencies = [ [[package]] name = "winch-codegen" -version = "34.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2bf456780101aff8950642fdf984f182816d7f555d5375699200242be78762" +version = "36.0.0" +source = "git+https://github.com/dblnz/wasmtime.git?rev=21981ef3663779fc83650bcaf84f677d13675a3d#21981ef3663779fc83650bcaf84f677d13675a3d" dependencies = [ "anyhow", "cranelift-assembler-x64", "cranelift-codegen", - "gimli", + "gimli 0.32.0", "regalloc2", "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.233.0", - "wasmtime-cranelift", + "wasmparser", "wasmtime-environ", - "wasmtime-math", + "wasmtime-internal-cranelift", + "wasmtime-internal-math", ] [[package]] @@ -2062,7 +2052,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2071,7 +2061,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", ] [[package]] @@ -2080,14 +2079,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -2096,48 +2111,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "wit-bindgen-rt" version = "0.39.0" @@ -2149,9 +2212,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.233.0" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22f1cd55247a2e616870b619766e9522df36b7abafbb29bbeb34b7a9da7e9f0" +checksum = "0a1f95a87d03a33e259af286b857a95911eb46236a0f726cbaec1227b3dfc67a" dependencies = [ "anyhow", "id-arena", @@ -2162,7 +2225,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.233.0", + "wasmparser", ] [[package]] @@ -2197,18 +2260,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", diff --git a/src/wasm_runtime/Cargo.toml b/src/wasm_runtime/Cargo.toml index 51d6e40..8178beb 100644 --- a/src/wasm_runtime/Cargo.toml +++ b/src/wasm_runtime/Cargo.toml @@ -14,7 +14,7 @@ bench = false hyperlight-common = { version = "0.7.0", git = "https://github.com/hyperlight-dev/hyperlight", rev = "ea6fa8f", default-features = false } hyperlight-guest-bin = { version = "0.7.0", git = "https://github.com/hyperlight-dev/hyperlight", rev = "ea6fa8f", features = [ "printf" ] } hyperlight-guest = { version = "0.7.0", git = "https://github.com/hyperlight-dev/hyperlight", rev = "ea6fa8f" } -wasmtime = { version = "34.0.2", default-features = false, features = [ "runtime", "custom-virtual-memory", "custom-native-signals", "component-model" ] } +wasmtime = { git = "https://github.com/dblnz/wasmtime.git", rev = "21981ef3663779fc83650bcaf84f677d13675a3d", default-features = false, features = [ "runtime", "custom-virtual-memory", "custom-native-signals", "component-model" ] } hyperlight-wasm-macro = { path = "../hyperlight_wasm_macro" } spin = "0.9.8" @@ -25,3 +25,6 @@ cargo_metadata = "0.19" reqwest = {version = "0.12", default-features = false, features = ["blocking","rustls-tls"] } [workspace] # indicate that this crate is not part of any workspace + +[features] +gdb = ["wasmtime/debug-builtins"] \ No newline at end of file diff --git a/src/wasm_runtime/src/component.rs b/src/wasm_runtime/src/component.rs index c14f8cb..a3a7860 100644 --- a/src/wasm_runtime/src/component.rs +++ b/src/wasm_runtime/src/component.rs @@ -103,6 +103,8 @@ pub extern "C" fn hyperlight_main() { let mut config = Config::new(); config.with_custom_code_memory(Some(alloc::sync::Arc::new(platform::WasmtimeCodeMemory {}))); + #[cfg(feature = "gdb")] + config.debug_info(true); let engine = Engine::new(&config).unwrap(); let linker = Linker::new(&engine); *CUR_ENGINE.lock() = Some(engine); diff --git a/src/wasm_runtime/src/module.rs b/src/wasm_runtime/src/module.rs index c9aec48..c132bf8 100644 --- a/src/wasm_runtime/src/module.rs +++ b/src/wasm_runtime/src/module.rs @@ -90,6 +90,8 @@ pub fn guest_dispatch_function(function_call: &FunctionCall) -> Result> fn init_wasm_runtime() -> Result> { let mut config = Config::new(); config.with_custom_code_memory(Some(alloc::sync::Arc::new(platform::WasmtimeCodeMemory {}))); + #[cfg(feature = "gdb")] + config.debug_info(true); let engine = Engine::new(&config)?; let mut linker = Linker::new(&engine); wasip1::register_handlers(&mut linker)?;