From f19009e915757f7c1b066c785a46e30ddbbc4da6 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 16 Oct 2024 15:46:12 +0200 Subject: [PATCH] Update deps (#108) * Update deps Highlights are that all wasm-tools packages and wasmtime are at their latest versions. * Update to upstream wasm-convert * update wasmtime for security release * Update to wit-bindgen v0.19 * update to wit-bindgen 0.34.0 Signed-off-by: Joel Dice * Update to upstream component-init --------- Signed-off-by: Joel Dice Co-authored-by: Joel Dice --- Cargo.lock | 714 ++++++++++++++++++-------------------- Cargo.toml | 43 ++- runtime/Cargo.toml | 6 +- runtime/src/lib.rs | 24 +- src/bindings.rs | 21 +- src/lib.rs | 8 +- src/test.rs | 8 +- src/test/echoes.rs | 70 ++-- src/test/tests.rs | 16 +- src/test/wit/echoes.wit | 10 +- src/test/wit/tests.wit | 16 +- test-generator/Cargo.toml | 2 +- test-generator/src/lib.rs | 22 +- wit/matrix-math.wit | 4 +- 14 files changed, 463 insertions(+), 501 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2d40b3..522de97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,14 +8,23 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "gimli", + "gimli 0.29.0", ] [[package]] -name = "adler" -version = "1.0.2" +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli 0.31.1", +] + +[[package]] +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -104,9 +113,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" dependencies = [ "backtrace", ] @@ -119,9 +128,9 @@ checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", @@ -130,23 +139,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "addr2line", - "cc", + "addr2line 0.24.2", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -217,15 +226,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cap-fs-ext" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb23061fc1c4ead4e45ca713080fe768e6234e959f5a5c399c39eb41aa34e56e" +checksum = "712695628f77a28acd7c9135b9f05f9c1563f8eb91b317f63876bac550032403" dependencies = [ "cap-primitives", "cap-std", @@ -235,9 +244,9 @@ dependencies = [ [[package]] name = "cap-net-ext" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83ae11f116bcbafc5327c6af250341db96b5930046732e1905f7dc65887e0e1" +checksum = "7d609980992759cef960324ccece956ee87929cc05a75d6546168192063dd8b1" dependencies = [ "cap-primitives", "cap-std", @@ -247,9 +256,9 @@ dependencies = [ [[package]] name = "cap-primitives" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d00bd8d26c4270d950eaaa837387964a2089a1c3c349a690a1fa03221d29531" +checksum = "ff5bcbaf57897c8f14098cc9ad48a78052930a9948119eea01b80ca224070fa6" dependencies = [ "ambient-authority", "fs-set-times", @@ -264,9 +273,9 @@ dependencies = [ [[package]] name = "cap-rand" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcb16a619d8b8211ed61f42bd290d2a1ac71277a69cf8417ec0996fa92f5211" +checksum = "e7c780812948b31f362c3bab82d23b902529c26705d0e094888bc7fdb9656908" dependencies = [ "ambient-authority", "rand", @@ -274,9 +283,9 @@ dependencies = [ [[package]] name = "cap-std" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19eb8e3d71996828751c1ed3908a439639752ac6bdc874e41469ef7fc15fbd7f" +checksum = "e6cf1a22e6eab501e025a9953532b1e95efb8a18d6364bf8a4a7547b30c49186" dependencies = [ "cap-primitives", "io-extras", @@ -286,9 +295,9 @@ dependencies = [ [[package]] name = "cap-time-ext" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61142dc51e25b7acc970ca578ce2c3695eac22bbba46c1073f5f583e78957725" +checksum = "1e1547a95cd071db92382c649260bcc6721879ef5d1f0f442af33bff75003dd7" dependencies = [ "ambient-authority", "cap-primitives", @@ -300,9 +309,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.16" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d013ecb737093c0e86b151a7b837993cf9ec6c502946cfb44bedc392421e0b" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "jobserver", "libc", @@ -317,9 +326,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -327,9 +336,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -339,9 +348,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -370,14 +379,14 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "component-init" version = "0.1.0" -source = "git+https://github.com/dicej/component-init?rev=bc276826#bc27682684774f7ea192d73e511f4ccb636c3ba3" +source = "git+https://github.com/dicej/component-init?rev=6964d14#6964d14deeda3f60865f085f3806abfd5ddd501f" dependencies = [ "anyhow", "async-trait", "futures", "wasm-convert", - "wasm-encoder 0.216.0", - "wasmparser 0.216.0", + "wasm-encoder 0.219.1", + "wasmparser 0.219.1", ] [[package]] @@ -410,12 +419,12 @@ dependencies = [ "toml", "wasi-common", "wasm-convert", - "wasm-encoder 0.216.0", - "wasmparser 0.216.0", + "wasm-encoder 0.219.1", + "wasmparser 0.219.1", "wasmtime", "wasmtime-wasi", - "wit-component 0.216.0", - "wit-parser 0.216.0", + "wit-component", + "wit-parser 0.219.1", "zstd", ] @@ -452,27 +461,27 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80c3a50b9c4c7e5b5f73c0ed746687774fc9e36ef652b110da8daebf0c6e0e6" +checksum = "7b765ed4349e66bedd9b88c7691da42e24c7f62067a6be17ddffa949367b6e17" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38778758c2ca918b05acb2199134e0c561fb577c50574259b26190b6c2d95ded" +checksum = "9eaa2aece6237198afd32bff57699e08d4dccb8d3902c214fc1e6ba907247ca4" dependencies = [ "serde", "serde_derive", @@ -480,9 +489,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58258667ad10e468bfc13a8d620f50dfcd4bb35d668123e97defa2549b9ad397" +checksum = "351824439e59d42f0e4fa5aac1d13deded155120043565769e55cd4ad3ca8ed9" dependencies = [ "bumpalo", "cranelift-bforest", @@ -492,7 +501,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.5", "log", "regalloc2", @@ -503,33 +512,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043f0b702e529dcb07ff92bd7d40e7d5317b5493595172c5eb0983343751ee06" +checksum = "5a0ce0273d7a493ef8f31f606849a4e931c19187a4923f5f87fc1f2b13109981" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7763578888ab53eca5ce7da141953f828e82c2bfadcffc106d10d1866094ffbb" +checksum = "0f72016ac35579051913f4f07f6b36c509ed69412d852fd44c8e1d7b7fa6d92a" [[package]] name = "cranelift-control" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32db15f08c05df570f11e8ab33cb1ec449a64b37c8a3498377b77650bef33d8b" +checksum = "db28951d21512c4fd0554ef179bfb11e4eb6815062957a9173824eee5de0c46c" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5289cdb399381a27e7bbfa1b42185916007c3d49aeef70b1d01cb4caa8010130" +checksum = "14ebe592a2f81af9237cf9be29dd3854ecb72108cfffa59e85ef12389bf939e3" dependencies = [ "cranelift-bitset", "serde", @@ -538,9 +547,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ba8ab24eb9470477e98ddfa3c799a649ac5a0d9a2042868c4c952133c234e8" +checksum = "4437db9d60c7053ac91ded0802740c2ccf123ee6d6898dd906c34f8c530cd119" dependencies = [ "cranelift-codegen", "log", @@ -550,15 +559,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b72a3c5c166a70426dcb209bdd0bb71a787c1ea76023dc0974fbabca770e8f9" +checksum = "230cb33572b9926e210f2ca28145f2bc87f389e1456560932168e2591feb65c1" [[package]] name = "cranelift-native" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a42424c956bbc31fc5c2706073df896156c5420ae8fa2a5d48dbc7b295d71b" +checksum = "364524ac7aef7070b1141478724abebeec297d4ea1e87ad8b8986465e91146d9" dependencies = [ "cranelift-codegen", "libc", @@ -567,9 +576,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.111.0" +version = "0.112.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49778df4289933d735b93c30a345513e030cf83101de0036e19b760f8aa09f68" +checksum = "0572cbd9d136a62c0f39837b6bce3b0978b96b8586794042bec0c214668fd6f5" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -577,7 +586,7 @@ dependencies = [ "itertools", "log", "smallvec", - "wasmparser 0.215.0", + "wasmparser 0.217.0", "wasmtime-types", ] @@ -782,6 +791,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -804,9 +819,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -819,9 +834,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -829,15 +844,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -846,15 +861,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -863,21 +878,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -946,13 +961,10 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "gimli" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "hashbrown" @@ -964,14 +976,20 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", +] + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] [[package]] name = "heck" @@ -1005,9 +1023,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1058,12 +1076,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -1091,9 +1109,9 @@ checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -1158,9 +1176,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1179,9 +1197,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libm" @@ -1263,11 +1281,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -1313,21 +1331,21 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "crc32fast", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "indexmap", "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "parking_lot" @@ -1378,15 +1396,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "postcard" @@ -1419,11 +1437,21 @@ dependencies = [ "log", ] +[[package]] +name = "prettyplease" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -1606,9 +1634,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] @@ -1626,11 +1654,11 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.5", "log", "rustc-hash", "slice-group-by", @@ -1639,9 +1667,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -1651,9 +1679,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1662,9 +1690,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rustc-demangle" @@ -1674,15 +1702,15 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags", "errno", @@ -1728,18 +1756,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1760,9 +1788,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -1866,9 +1894,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1893,9 +1921,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -1910,9 +1938,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -1942,18 +1970,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -2025,9 +2053,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -2082,42 +2110,36 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unindent" @@ -2144,9 +2166,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "version_check" @@ -2171,9 +2193,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-common" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7336747832c6fe1086c81ef38b63dfeaeec48fc1b7c33a88fd16115cc940d178" +checksum = "5f1e63f999ecfdd96d64d35b39d0577318d9d2eae2d41603d4befda3b3dfe252" dependencies = [ "anyhow", "bitflags", @@ -2197,9 +2219,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -2208,9 +2230,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -2223,9 +2245,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2233,9 +2255,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -2246,61 +2268,43 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-convert" version = "0.1.0" -source = "git+https://github.com/dicej/wasm-convert?rev=afbec48b#afbec48bf992946d34ead239c9be19a9d61772f2" -dependencies = [ - "wasm-encoder 0.216.0", - "wasmparser 0.216.0", -] - -[[package]] -name = "wasm-encoder" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" +source = "git+https://github.com/dicej/wasm-convert?rev=a42b419#a42b419ecee68ed24b06b77cee95d55183846e37" dependencies = [ - "leb128", + "wasm-encoder 0.219.1", + "wasmparser 0.219.1", ] [[package]] name = "wasm-encoder" -version = "0.41.2" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" +checksum = "7b88b0814c9a2b323a9b46c687e726996c255ac8b64aa237dd11c81ed4854760" dependencies = [ "leb128", ] [[package]] name = "wasm-encoder" -version = "0.215.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb56df3e06b8e6b77e37d2969a50ba51281029a9aeb3855e76b7f49b6418847" +checksum = "29cbbd772edcb8e7d524a82ee8cef8dd046fc14033796a754c3ad246d019fa54" dependencies = [ "leb128", -] - -[[package]] -name = "wasm-encoder" -version = "0.216.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c23aebea22c8a75833ae08ed31ccc020835b12a41999e58c31464271b94a88" -dependencies = [ - "leb128", - "wasmparser 0.216.0", + "wasmparser 0.219.1", ] [[package]] name = "wasm-metadata" -version = "0.10.20" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ebaa7bd0f9e7a5e5dd29b9a998acf21c4abed74265524dd7e85934597bfb10" +checksum = "2af5a8e37a5e996861e1813f8de30911c47609c9ff51a7284f7dbd754dc3a9f3" dependencies = [ "anyhow", "indexmap", @@ -2308,52 +2312,15 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.41.2", - "wasmparser 0.121.2", -] - -[[package]] -name = "wasm-metadata" -version = "0.216.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c8154d703a6b0e45acf6bd172fa002fc3c7058a9f7615e517220aeca27c638" -dependencies = [ - "anyhow", - "indexmap", - "serde", - "serde_derive", - "serde_json", - "spdx", - "wasm-encoder 0.216.0", - "wasmparser 0.216.0", -] - -[[package]] -name = "wasmparser" -version = "0.118.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f1154f1ab868e2a01d9834a805faca7bf8b50d041b4ca714d005d0dab1c50c" -dependencies = [ - "indexmap", - "semver", -] - -[[package]] -name = "wasmparser" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" -dependencies = [ - "bitflags", - "indexmap", - "semver", + "wasm-encoder 0.219.1", + "wasmparser 0.219.1", ] [[package]] name = "wasmparser" -version = "0.215.0" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fbde0881f24199b81cf49b6ff8f9c145ac8eb1b7fc439adb5c099734f7d90e" +checksum = "ca917a21307d3adf2b9857b94dd05ebf8496bdcff4437a9b9fb3899d3e6c74e7" dependencies = [ "ahash", "bitflags", @@ -2365,9 +2332,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.216.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcdee6bea3619d311fb4b299721e89a986c3470f804b6d534340e412589028e3" +checksum = "5c771866898879073c53b565a6c7b49953795159836714ac56a5befb581227c5" dependencies = [ "ahash", "bitflags", @@ -2379,22 +2346,22 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.215.0" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e9a325d85053408209b3d2ce5eaddd0dd6864d1cff7a007147ba073157defc" +checksum = "50dc568b3e0d47e8f96ea547c90790cfa783f0205160c40de894a427114185ce" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.215.0", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5883d64dfc8423c56e3d8df27cffc44db25336aa468e8e0724fddf30a333d7" +checksum = "ef01f9cb9636ed42a7ec5a09d785c0643590199dc7372dc22c7e2ba7a31a97d4" dependencies = [ - "addr2line", + "addr2line 0.22.0", "anyhow", "async-trait", "bitflags", @@ -2403,7 +2370,7 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli", + "gimli 0.29.0", "hashbrown 0.14.5", "indexmap", "ittapi", @@ -2426,8 +2393,8 @@ dependencies = [ "smallvec", "sptr", "target-lexicon", - "wasm-encoder 0.215.0", - "wasmparser 0.215.0", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", "wasmtime-asm-macros", "wasmtime-cache", "wasmtime-component-macro", @@ -2446,18 +2413,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4dc7e2a379c0dd6be5b55857d14c4b277f43a9c429a9e14403eb61776ae3be" +checksum = "ba5b20797419d6baf2296db2354f864e8bb3447cacca9d151ce7700ae08b4460" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5b179f263a318e08c93281ea77cbb95e2a0c8c11e99a6188b53ead77233722" +checksum = "272d5939e989c5b54e3fa83ef420e4a6dba3995c3065626066428b2f73ad1e06" dependencies = [ "anyhow", "base64", @@ -2475,9 +2442,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b07773d1c3dab5f014ec61316ee317aa424033e17e70a63abdf7c3a47e58fcf" +checksum = "26593c4b18c76ca3c3fbdd813d6692256537b639b851d8a6fe827e3d6966fc01" dependencies = [ "anyhow", "proc-macro2", @@ -2485,20 +2452,20 @@ dependencies = [ "syn", "wasmtime-component-util", "wasmtime-wit-bindgen", - "wit-parser 0.215.0", + "wit-parser 0.217.0", ] [[package]] name = "wasmtime-component-util" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e38d735320f4e83478369ce649ad8fe87c6b893220902e798547a225fc0c5874" +checksum = "a2ed562fbb0cbed20a56c369c8de146c1de06a48c19e26ed9aa45f073514ee60" [[package]] name = "wasmtime-cranelift" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e570d831d0785d93d7d8c722b1eb9a34e0d0c1534317666f65892818358a2da9" +checksum = "f389b789cbcb53a8499131182135dea21d7d97ad77e7fb66830f69479ef0e68c" dependencies = [ "anyhow", "cfg-if", @@ -2508,27 +2475,28 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.29.0", "log", "object", + "smallvec", "target-lexicon", "thiserror", - "wasmparser 0.215.0", + "wasmparser 0.217.0", "wasmtime-environ", "wasmtime-versioned-export-macros", ] [[package]] name = "wasmtime-environ" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5fe80dfbd81687431a7d4f25929fae1ae96894786d5c96b14ae41164ee97377" +checksum = "84b72debe8899f19bedf66f7071310f06ef62de943a1369ba9b373613e77dd3d" dependencies = [ "anyhow", "cpp_demangle", "cranelift-bitset", "cranelift-entity", - "gimli", + "gimli 0.29.0", "indexmap", "log", "object", @@ -2538,8 +2506,8 @@ dependencies = [ "serde", "serde_derive", "target-lexicon", - "wasm-encoder 0.215.0", - "wasmparser 0.215.0", + "wasm-encoder 0.217.0", + "wasmparser 0.217.0", "wasmprinter", "wasmtime-component-util", "wasmtime-types", @@ -2547,9 +2515,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f39043d13c7b58db69dc9a0feb191a961e75a9ec2402aebf42de183c022bb8a" +checksum = "92b8d4d504266ee598204f9e69cea8714499cc7c5aeddaa9b3f76aaace8b0680" dependencies = [ "anyhow", "cc", @@ -2562,9 +2530,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec346412363eb26067cb6473281a45bd273cbbcafa3dc862793c946eff6ba7f" +checksum = "48ed7f0bbb9da3252c252b05fcd5fd42672db161e6276aa96e92059500247d8c" dependencies = [ "object", "once_cell", @@ -2574,9 +2542,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15de8429db996f0d17a4163a35eccc3f874cbfb50f29c379951ea1bbb39452e" +checksum = "1d930bc1325bc0448be6a11754156d770f56f6c3a61f440e9567f36cd2ea3065" dependencies = [ "anyhow", "cfg-if", @@ -2586,29 +2554,29 @@ dependencies = [ [[package]] name = "wasmtime-slab" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f68d38fa6b30c5e1fc7d608263062997306f79e577ebd197ddcd6b0f55d87d1" +checksum = "055a181b8d03998511294faea14798df436503f14d7fd20edcf7370ec583e80a" [[package]] name = "wasmtime-types" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6634e7079d9c5cfc81af8610ed59b488cc5b7f9777a2f4c1667a2565c2e45249" +checksum = "c8340d976673ac3fdacac781f2afdc4933920c1adc738c3409e825dab3955399" dependencies = [ "anyhow", "cranelift-entity", "serde", "serde_derive", "smallvec", - "wasmparser 0.215.0", + "wasmparser 0.217.0", ] [[package]] name = "wasmtime-versioned-export-macros" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3850e3511d6c7f11a72d571890b0ed5f6204681f7f050b9de2690e7f13123fed" +checksum = "a4b0c1f76891f778db9602ee3fbb4eb7e9a3f511847d1fb1b69eddbcea28303c" dependencies = [ "proc-macro2", "quote", @@ -2617,9 +2585,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545ae8298ffce025604f7480f9c7d6948c985bef7ce9aee249ef79307813e83c" +checksum = "ba1497b38341acc97308d6ce784598419fe0131bf6ddc5cda16a91033ef7c66e" dependencies = [ "anyhow", "async-trait", @@ -2648,16 +2616,16 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a25199625effa4c13dd790d64bd56884b014c69829431bfe43991c740bd5bc1" +checksum = "a702ff5eff3b37c11453ec8b54ec444bb9f2c689c7a7af382766c52df86b1e9b" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "object", "target-lexicon", - "wasmparser 0.215.0", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", "winch-codegen", @@ -2665,14 +2633,14 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb331ac7ed1d5ba49cddcdb6b11973752a857148858bb308777d2fc5584121f" +checksum = "b2fca2cbb5bb390f65d4434c19bf8d9873dfc60f10802918ebcd6f819a38d703" dependencies = [ "anyhow", "heck 0.4.1", "indexmap", - "wit-parser 0.215.0", + "wit-parser 0.217.0", ] [[package]] @@ -2686,31 +2654,31 @@ dependencies = [ [[package]] name = "wast" -version = "216.0.0" +version = "219.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7eb1f2eecd913fdde0dc6c3439d0f24530a98ac6db6cb3d14d92a5328554a08" +checksum = "4f79a9d9df79986a68689a6b40bcc8d5d40d807487b235bebc2ac69a242b54a1" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.216.0", + "wasm-encoder 0.219.1", ] [[package]] name = "wat" -version = "1.216.0" +version = "1.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0409090fb5154f95fb5ba3235675fd9e579e731524d63b6a2f653e1280c82a" +checksum = "8bc3cf014fb336883a411cd662f987abf6a1d2a27f2f0008616a0070bbf6bd0d" dependencies = [ - "wast 216.0.0", + "wast 219.0.1", ] [[package]] name = "wiggle" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc850ca3c02c5835934d23f28cec4c5a3fb66fe0b4ecd968bbb35609dda5ddc0" +checksum = "e4ebee2be6b561d1fe91b37e960c02baa94cdee29af863f5f26a0637f344f27a" dependencies = [ "anyhow", "async-trait", @@ -2723,9 +2691,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634b8804a67200bcb43ea8af5f7c53e862439a086b68b16fd333454bc74d5aab" +checksum = "97c4a32959189041ccb260e6dfa7fcf907e665166e755a6a681c32423c90e45f" dependencies = [ "anyhow", "heck 0.4.1", @@ -2738,9 +2706,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "24.0.0" +version = "25.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474b7cbdb942c74031e619d66c600bba7f73867c5800fc2c2306cf307649be2f" +checksum = "6e1c266e16c4b24a29e055ec651e27fce1389c886bb00fbe78b8924a253a439b" dependencies = [ "proc-macro2", "quote", @@ -2781,17 +2749,17 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.22.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "073efe897d9ead7fc609874f94580afc831114af5149b6a90ee0a3a39b497fe0" +checksum = "d716f7c87db8ea79f1dc69f7344354b6256451bccca422ac4c3e0d607d144532" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", + "gimli 0.29.0", "regalloc2", "smallvec", "target-lexicon", - "wasmparser 0.215.0", + "wasmparser 0.217.0", "wasmtime-cranelift", "wasmtime-environ", ] @@ -2889,9 +2857,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -2908,77 +2876,70 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76f1d099678b4f69402a421e888bbe71bf20320c2f3f3565d0e7484dbe5bc20" +checksum = "7e11ad55616555605a60a8b2d1d89e006c2076f46c465c892cc2c153b20d4b30" dependencies = [ - "bitflags", + "wit-bindgen-rt", "wit-bindgen-rust-macro", ] [[package]] name = "wit-bindgen-core" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75d55e1a488af2981fb0edac80d8d20a51ac36897a1bdef4abde33c29c1b6d0d" +checksum = "163cee59d3d5ceec0b256735f3ab0dccac434afb0ec38c406276de9c5a11e906" dependencies = [ "anyhow", - "wit-component 0.18.2", - "wit-parser 0.13.2", + "heck 0.5.0", + "wit-parser 0.219.1", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744845cde309b8fa32408d6fb67456449278c66ea4dcd96de29797b302721f02" +dependencies = [ + "bitflags", ] [[package]] name = "wit-bindgen-rust" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01ff9cae7bf5736750d94d91eb8a49f5e3a04aff1d1a3218287d9b2964510f8" +checksum = "f6919521fc7807f927a739181db93100ca7ed03c29509b84d5f96b27b2e49a9a" dependencies = [ "anyhow", - "heck 0.4.1", - "wasm-metadata 0.10.20", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", "wit-bindgen-core", - "wit-component 0.18.2", + "wit-component", ] [[package]] name = "wit-bindgen-rust-macro" -version = "0.16.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804a98e2538393d47aa7da65a7348116d6ff403b426665152b70a168c0146d49" +checksum = "c967731fc5d50244d7241ecfc9302a8929db508eea3c601fbc5371b196ba38a5" dependencies = [ "anyhow", + "prettyplease", "proc-macro2", "quote", "syn", "wit-bindgen-core", "wit-bindgen-rust", - "wit-component 0.18.2", -] - -[[package]] -name = "wit-component" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a35a2a9992898c9d27f1664001860595a4bc99d32dd3599d547412e17d7e2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder 0.38.1", - "wasm-metadata 0.10.20", - "wasmparser 0.118.2", - "wit-parser 0.13.2", ] [[package]] name = "wit-component" -version = "0.216.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2ca3ece38ea2447a9069b43074ba73d96dde1944cba276c54e41371745f9dc" +checksum = "ad1673163c0cb14a6a19ddbf44dd4efe6f015ec1ebb8156710ac32501f19fba2" dependencies = [ "anyhow", "bitflags", @@ -2987,34 +2948,17 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.216.0", - "wasm-metadata 0.216.0", - "wasmparser 0.216.0", - "wit-parser 0.216.0", -] - -[[package]] -name = "wit-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "316b36a9f0005f5aa4b03c39bc3728d045df136f8c13a73b7db4510dec725e08" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", + "wasm-encoder 0.219.1", + "wasm-metadata", + "wasmparser 0.219.1", + "wit-parser 0.219.1", ] [[package]] name = "wit-parser" -version = "0.215.0" +version = "0.217.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935a97eaffd57c3b413aa510f8f0b550a4a9fe7d59e79cd8b89a83dcb860321f" +checksum = "fb893dcd6d370cfdf19a0d9adfcd403efb8e544e1a0ea3a8b81a21fe392eaa78" dependencies = [ "anyhow", "id-arena", @@ -3025,14 +2969,14 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.215.0", + "wasmparser 0.217.0", ] [[package]] name = "wit-parser" -version = "0.216.0" +version = "0.219.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d108165c1167a4ccc8a803dcf5c28e0a51d6739fd228cc7adce768632c764c" +checksum = "4a86f669283257e8e424b9a4fc3518e3ade0b95deb9fbc0f93a1876be3eda598" dependencies = [ "anyhow", "id-arena", @@ -3043,7 +2987,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.216.0", + "wasmparser 0.219.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0d27fc5..3ae12f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,52 +9,51 @@ name = "componentize_py" crate-type = ["cdylib", "rlib"] [dependencies] -anyhow = { version = "1.0.86", features = ["backtrace"] } -clap = { version = "4.5.17", features = ["derive"] } -tar = "0.4.41" -tempfile = "3.12.0" +anyhow = { version = "1.0.89", features = ["backtrace"] } +clap = { version = "4.5.20", features = ["derive"] } +tar = "0.4.42" +tempfile = "3.13.0" zstd = "0.13.2" componentize-py-shared = { path = "shared" } -wasm-encoder = "0.216.0" -wit-parser = "0.216.0" -wit-component = "0.216.0" -wasmparser = "0.216.0" -indexmap = "2.5.0" +wasm-encoder = "0.219.0" +wit-parser = "0.219.0" +wit-component = "0.219.0" +wasmparser = "0.219.0" +indexmap = "2.6.0" bincode = "1.3.3" heck = "0.5.0" pyo3 = { version = "0.20.0", features = [ "abi3-py37", "extension-module", ], optional = true } -wasmtime = "24.0.0" -wasmtime-wasi = "24.0.0" -wasi-common = "24.0.0" -once_cell = "1.19.0" -component-init = { git = "https://github.com/dicej/component-init", rev = "bc276826" } -wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "afbec48b" } -async-trait = "0.1.82" -futures = "0.3.30" +wasmtime = "25.0.2" +wasmtime-wasi = "25.0.2" +wasi-common = "25.0.2" +once_cell = "1.20.2" +component-init = { git = "https://github.com/dicej/component-init", rev = "6964d14" } +wasm-convert = { git = "https://github.com/dicej/wasm-convert", rev = "a42b419" } +async-trait = "0.1.83" +futures = "0.3.31" tokio = { version = "1.40.0", features = [ "macros", "rt", "rt-multi-thread", "fs", ] } -bytes = "1.7.1" +bytes = "1.7.2" pretty_env_logger = "0.5.0" -cap-std = "3.2.0" +cap-std = "3.3.0" im-rc = "15.1.0" -serde = { version = "1.0.209", features = ["derive"] } +serde = { version = "1.0.210", features = ["derive"] } toml = "0.8.19" semver = "1.0.23" [dev-dependencies] -async-trait = "0.1.82" proptest = "1.5.0" hex = "0.4.3" [build-dependencies] -anyhow = "1.0.86" +anyhow = "1.0.89" tar = "0.4.41" zstd = "0.13.2" test-generator = { path = "test-generator" } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 91edd8f..57cc423 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" crate-type = ["staticlib"] [dependencies] -anyhow = "1.0.86" -once_cell = "1.19.0" +anyhow = "1.0.89" +once_cell = "1.20.2" pyo3 = { version = "0.20.0", features = ["abi3-py311", "num-bigint"] } componentize-py-shared = { path = "../shared" } num-bigint = "0.4.6" -wit-bindgen = "0.16.0" +wit-bindgen = "0.34.0" diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index fb32a5b..e166bce 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -28,11 +28,11 @@ use { wit_bindgen::generate!({ world: "init", path: "../wit", - exports: { - "exports": MyExports - } + generate_all, }); +export!(MyExports); + static STUB_WASI: OnceCell = OnceCell::new(); static EXPORTS: OnceCell> = OnceCell::new(); static TYPES: OnceCell> = OnceCell::new(); @@ -1281,3 +1281,21 @@ pub mod dl { static _CLOCK_PROCESS_CPUTIME_ID: u8 = 2; #[no_mangle] static _CLOCK_THREAD_CPUTIME_ID: u8 = 3; + +// Traditionally, `wit-bindgen` would provide a `cabi_realloc` implementation, but recent versions use a weak +// symbol trick to avoid conflicts when more than one `wit-bindgen` version is used, and that trick does not +// currently play nice with how we build this library. So for now, we just define it ourselves here: +/// # Safety +/// TODO +#[export_name = "cabi_realloc"] +pub unsafe extern "C" fn cabi_realloc( + old_ptr: *mut u8, + old_len: usize, + align: usize, + new_size: usize, +) -> *mut u8 { + assert!(old_ptr.is_null()); + assert!(old_len == 0); + + alloc::alloc(Layout::from_size_align(new_size, align).unwrap()) +} diff --git a/src/bindings.rs b/src/bindings.rs index 185e463..368e3d4 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -44,7 +44,9 @@ pub fn make_bindings( for (name, params, results) in IMPORT_SIGNATURES { let offset = types.len(); - types.function(params.iter().copied(), results.iter().copied()); + types + .ty() + .function(params.iter().copied(), results.iter().copied()); imports.import("env", name, EntityType::Function(offset)); function_names.push((offset, (*name).to_owned())); } @@ -95,7 +97,7 @@ pub fn make_bindings( let (params, results) = function.core_import_type(resolve); let offset = types.len(); - types.function(params, results); + types.ty().function(params, results); imports.import(module, name, EntityType::Function(offset)); function_names.push(( offset, @@ -176,7 +178,7 @@ pub fn make_bindings( for (index, function) in summary.functions.iter().enumerate() { let offset = types.len(); let (params, results) = function.core_export_type(resolve); - types.function(params, results); + types.ty().function(params, results); functions.function(offset); function_names.push((offset, function.internal_name(resolve))); let mut gen = FunctionBindgen::new(summary, function, stack_pointer); @@ -259,9 +261,13 @@ pub fn make_bindings( { let dispatch_offset = types.len(); - types.function([ValType::I32; DISPATCH_CORE_PARAM_COUNT], []); + types + .ty() + .function([ValType::I32; DISPATCH_CORE_PARAM_COUNT], []); let dispatchable_offset = types.len(); - types.function([ValType::I32; DISPATCHABLE_CORE_PARAM_COUNT], []); + types + .ty() + .function([ValType::I32; DISPATCHABLE_CORE_PARAM_COUNT], []); functions.function(dispatch_offset); let name = "componentize-py#CallIndirect"; function_names.push((dispatch_offset, name.to_owned())); @@ -300,7 +306,7 @@ pub fn make_bindings( Some(0), &ConstExpr::global_get(table_base), Elements::Functions( - &summary + summary .functions .iter() .enumerate() @@ -309,7 +315,8 @@ pub fn make_bindings( .is_dispatchable() .then_some(import_function_count + u32::try_from(index).unwrap()) }) - .collect::>(), + .collect::>() + .into(), ), ); diff --git a/src/lib.rs b/src/lib.rs index 82769b7..e561d64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -139,7 +139,7 @@ impl Invoker for MyInvoker { Ok(result) } - async fn call_float32(&mut self, function: &str) -> Result { + async fn call_f32(&mut self, function: &str) -> Result { let func = self .instance .get_typed_func::<(), (f32,)>(&mut self.store, function)?; @@ -148,7 +148,7 @@ impl Invoker for MyInvoker { Ok(result) } - async fn call_float64(&mut self, function: &str) -> Result { + async fn call_f64(&mut self, function: &str) -> Result { let func = self .instance .get_typed_func::<(), (f64,)>(&mut self.store, function)?; @@ -532,7 +532,7 @@ pub async fn componentize( let pre = InitPre::new(linker.instantiate_pre(component)?)?; let instance = pre.instance_pre.instantiate_async(&mut store).await?; - let guest = pre.interface0.load(&mut store, &instance)?; + let guest = pre.indices.interface0.load(&mut store, &instance)?; guest .call_init(&mut store, &app_name, &symbols, stub_wasi) @@ -721,7 +721,7 @@ fn make_stub_adapter(_module: &str, stubs: &HashMap<&str, FuncType>) -> Vec for (index, (name, ty)) in stubs.iter().enumerate() { let index = u32::try_from(index).unwrap(); - types.function( + types.ty().function( ty.params().iter().map(|&v| IntoValType(v).into()), ty.results().iter().map(|&v| IntoValType(v).into()), ); diff --git a/src/test.rs b/src/test.rs index 8d1c34e..9405209 100644 --- a/src/test.rs +++ b/src/test.rs @@ -82,18 +82,18 @@ async fn make_component( } #[derive(Debug, Copy, Clone)] -struct MyFloat32(f32); +struct MyF32(f32); -impl PartialEq for MyFloat32 { +impl PartialEq for MyF32 { fn eq(&self, other: &Self) -> bool { (self.0.is_nan() && other.0.is_nan()) || (self.0 == other.0) } } #[derive(Debug, Copy, Clone)] -struct MyFloat64(f64); +struct MyF64(f64); -impl PartialEq for MyFloat64 { +impl PartialEq for MyF64 { fn eq(&self, other: &Self) -> bool { (self.0.is_nan() && other.0.is_nan()) || (self.0 == other.0) } diff --git a/src/test/echoes.rs b/src/test/echoes.rs index 0d5b915..2a780ba 100644 --- a/src/test/echoes.rs +++ b/src/test/echoes.rs @@ -1,5 +1,5 @@ use { - super::{Ctx, MyFloat32, MyFloat64, Tester, SEED}, + super::{Ctx, MyF32, MyF64, Tester, SEED}, anyhow::Result, async_trait::async_trait, once_cell::sync::Lazy, @@ -63,11 +63,11 @@ impl componentize_py::test::echoes::Host for Ctx { Ok(v) } - async fn echo_float32(&mut self, v: f32) -> Result { + async fn echo_f32(&mut self, v: f32) -> Result { Ok(v) } - async fn echo_float64(&mut self, v: f64) -> Result { + async fn echo_f64(&mut self, v: f64) -> Result { Ok(v) } @@ -115,11 +115,11 @@ impl componentize_py::test::echoes::Host for Ctx { Ok(v) } - async fn echo_list_float32(&mut self, v: Vec) -> Result> { + async fn echo_list_f32(&mut self, v: Vec) -> Result> { Ok(v) } - async fn echo_list_float64(&mut self, v: Vec) -> Result> { + async fn echo_list_f64(&mut self, v: Vec) -> Result> { Ok(v) } @@ -242,11 +242,11 @@ class Echoes(exports.Echoes): def echo_s64(self, v): return echoes.echo_s64(v) - def echo_float32(self, v): - return echoes.echo_float32(v) + def echo_f32(self, v): + return echoes.echo_f32(v) - def echo_float64(self, v): - return echoes.echo_float64(v) + def echo_f64(self, v): + return echoes.echo_f64(v) def echo_string(self, v): return echoes.echo_string(v) @@ -281,11 +281,11 @@ class Echoes(exports.Echoes): def echo_list_s64(self, v): return echoes.echo_list_s64(v) - def echo_list_float32(self, v): - return echoes.echo_list_float32(v) + def echo_list_f32(self, v): + return echoes.echo_list_f32(v) - def echo_list_float64(self, v): - return echoes.echo_list_float64(v) + def echo_list_f64(self, v): + return echoes.echo_list_f64(v) def echo_list_string(self, v): return echoes.echo_list_string(v) @@ -433,15 +433,15 @@ fn chars() -> Result<()> { } #[test] -fn float32s() -> Result<()> { +fn f32s() -> Result<()> { TESTER.all_eq( - &proptest::num::f32::ANY.prop_map(MyFloat32), + &proptest::num::f32::ANY.prop_map(MyF32), |v, instance, store, runtime| { - Ok(MyFloat32( + Ok(MyF32( runtime.block_on( instance .componentize_py_test_echoes() - .call_echo_float32(store, v.0), + .call_echo_f32(store, v.0), )?, )) }, @@ -449,15 +449,15 @@ fn float32s() -> Result<()> { } #[test] -fn float64s() -> Result<()> { +fn f64s() -> Result<()> { TESTER.all_eq( - &proptest::num::f64::ANY.prop_map(MyFloat64), + &proptest::num::f64::ANY.prop_map(MyF64), |v, instance, store, runtime| { - Ok(MyFloat64( + Ok(MyF64( runtime.block_on( instance .componentize_py_test_echoes() - .call_echo_float64(store, v.0), + .call_echo_f64(store, v.0), )?, )) }, @@ -686,42 +686,36 @@ fn list_chars() -> Result<()> { } #[test] -fn list_float32s() -> Result<()> { +fn list_f32s() -> Result<()> { TESTER.all_eq( - &proptest::collection::vec(proptest::num::f32::ANY.prop_map(MyFloat32), 0..MAX_SIZE), + &proptest::collection::vec(proptest::num::f32::ANY.prop_map(MyF32), 0..MAX_SIZE), |v, instance, store, runtime| { Ok(runtime .block_on( instance .componentize_py_test_echoes() - .call_echo_list_float32( - store, - &v.into_iter().map(|v| v.0).collect::>(), - ), + .call_echo_list_f32(store, &v.into_iter().map(|v| v.0).collect::>()), )? .into_iter() - .map(MyFloat32) + .map(MyF32) .collect()) }, ) } #[test] -fn list_float64s() -> Result<()> { +fn list_f64s() -> Result<()> { TESTER.all_eq( - &proptest::collection::vec(proptest::num::f64::ANY.prop_map(MyFloat64), 0..MAX_SIZE), + &proptest::collection::vec(proptest::num::f64::ANY.prop_map(MyF64), 0..MAX_SIZE), |v, instance, store, runtime| { Ok(runtime .block_on( instance .componentize_py_test_echoes() - .call_echo_list_float64( - store, - &v.into_iter().map(|v| v.0).collect::>(), - ), + .call_echo_list_f64(store, &v.into_iter().map(|v| v.0).collect::>()), )? .into_iter() - .map(MyFloat64) + .map(MyF64) .collect()) }, ) @@ -743,8 +737,8 @@ fn many() -> Result<()> { ), ( proptest::num::i64::ANY, - proptest::num::f32::ANY.prop_map(MyFloat32), - proptest::num::f64::ANY.prop_map(MyFloat64), + proptest::num::f32::ANY.prop_map(MyF32), + proptest::num::f64::ANY.prop_map(MyF64), proptest::char::any(), proptest::string::string_regex(".*")?, proptest::collection::vec(proptest::bool::ANY, 0..MAX_SIZE), @@ -764,7 +758,7 @@ fn many() -> Result<()> { Ok(( (v1, v2, v3, v4, v5, v6, v7, v8), - (v9, MyFloat32(v10), MyFloat64(v11), v12, v13, v14, v15, v16), + (v9, MyF32(v10), MyF64(v11), v12, v13, v14, v15, v16), )) }, ) diff --git a/src/test/tests.rs b/src/test/tests.rs index aa47590..d647ccc 100644 --- a/src/test/tests.rs +++ b/src/test/tests.rs @@ -208,7 +208,7 @@ fn resource_import_and_export() -> Result<()> { Ok(self.table().push(ThingU32(a + b + 6))?) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -257,7 +257,7 @@ fn resource_borrow_import() -> Result<()> { Ok(self.table().push(ThingU32(v + 2))?) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -322,7 +322,7 @@ fn resource_with_lists() -> Result<()> { Ok(v) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -370,7 +370,7 @@ fn resource_aggregates() -> Result<()> { Ok(self.table().push(ThingU32(v + 2))?) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -480,7 +480,7 @@ fn resource_alias() -> Result<()> { Ok(format!("{} HostThing.get", self.table().get(&this)?.0)) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -605,7 +605,7 @@ fn resource_floats() -> Result<()> { Ok(self.table().push(MyFloat(a + b + 6_f64))?) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -626,7 +626,7 @@ fn resource_floats() -> Result<()> { Ok(self.table().get(&this)?.0 + 3_f64) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } @@ -691,7 +691,7 @@ fn resource_borrow_in_record() -> Result<()> { Ok(format!("{} HostThing.get", self.table().get(&this)?.0)) } - fn drop(&mut self, this: Resource) -> Result<()> { + async fn drop(&mut self, this: Resource) -> Result<()> { Ok(self.table().delete(this).map(|_| ())?) } } diff --git a/src/test/wit/echoes.wit b/src/test/wit/echoes.wit index 5cb5c3d..5ce0aa5 100644 --- a/src/test/wit/echoes.wit +++ b/src/test/wit/echoes.wit @@ -12,8 +12,8 @@ interface echoes { echo-char: func(v: char) -> char; echo-u64: func(v: u64) -> u64; echo-s64: func(v: s64) -> s64; - echo-float32: func(v: float32) -> float32; - echo-float64: func(v: float64) -> float64; + echo-f32: func(v: f32) -> f32; + echo-f64: func(v: f64) -> f64; echo-string: func(v: string) -> string; echo-list-bool: func(v: list) -> list; echo-list-u8: func(v: list) -> list; @@ -25,14 +25,14 @@ interface echoes { echo-list-char: func(v: list) -> list; echo-list-u64: func(v: list) -> list; echo-list-s64: func(v: list) -> list; - echo-list-float32: func(v: list) -> list; - echo-list-float64: func(v: list) -> list; + echo-list-f32: func(v: list) -> list; + echo-list-f64: func(v: list) -> list; echo-list-string: func(v: list) -> list; echo-list-list-u8: func(v: list>) -> list>; echo-list-list-list-u8: func(v: list>>) -> list>>; echo-option-u8: func(v: option) -> option; echo-option-option-u8: func(v: option>) -> option>; - echo-many: func(v1: bool, v2: u8, v3: u16, v4: u32, v5: u64, v6: s8, v7: s16, v8: s32, v9: s64, v10: float32, v11: float64, v12: char, v13: string, v14: list, v15: list, v16: list) -> tuple, list, list>; + echo-many: func(v1: bool, v2: u8, v3: u16, v4: u32, v5: u64, v6: s8, v7: s16, v8: s32, v9: s64, v10: f32, v11: f64, v12: char, v13: string, v14: list, v15: list, v16: list) -> tuple, list, list>; } world echoes-test { diff --git a/src/test/wit/tests.wit b/src/test/wit/tests.wit index ff864c4..75fef09 100644 --- a/src/test/wit/tests.wit +++ b/src/test/wit/tests.wit @@ -116,8 +116,8 @@ interface resource-alias2 { interface resource-floats { resource float { - constructor(v: float64); - get: func() -> float64; + constructor(v: f64); + get: func() -> f64; } } @@ -158,17 +158,17 @@ world tests { export resource-floats-exports: interface { resource float { - constructor(v: float64); - get: func() -> float64; - add: static func(a: float, b: float64) -> float; + constructor(v: f64); + get: func() -> f64; + add: static func(a: float, b: f64) -> float; } } import resource-floats-imports: interface { resource float { - constructor(v: float64); - get: func() -> float64; - add: static func(a: float, b: float64) -> float; + constructor(v: f64); + get: func() -> f64; + add: static func(a: float, b: f64) -> float; } } diff --git a/test-generator/Cargo.toml b/test-generator/Cargo.toml index 391351b..9ecb9cc 100644 --- a/test-generator/Cargo.toml +++ b/test-generator/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "1.0.86" +anyhow = "1.0.89" getrandom = "0.2.15" hex = "0.4.3" proptest = "1.5.0" diff --git a/test-generator/src/lib.rs b/test-generator/src/lib.rs index 8888683..d1a4dfc 100644 --- a/test-generator/src/lib.rs +++ b/test-generator/src/lib.rs @@ -32,8 +32,8 @@ enum Type { S32, U64, S64, - Float32, - Float64, + F32, + F64, Char, String, Record { @@ -72,8 +72,8 @@ fn any_type(max_size: usize, next_id: Rc>) -> impl Strategy Just(Type::S32).boxed(), 7 => Just(Type::U64).boxed(), 8 => Just(Type::S64).boxed(), - 9 => Just(Type::Float32).boxed(), - 10 => Just(Type::Float64).boxed(), + 9 => Just(Type::F32).boxed(), + 10 => Just(Type::F64).boxed(), 11 => Just(Type::Char).boxed(), 12 => Just(Type::String).boxed(), 13 => { @@ -156,8 +156,8 @@ fn wit_type_name(wit: &mut String, ty: &Type) -> String { Type::S32 => "s32".into(), Type::U64 => "u64".into(), Type::S64 => "s64".into(), - Type::Float32 => "float32".into(), - Type::Float64 => "float64".into(), + Type::F32 => "f32".into(), + Type::F64 => "f64".into(), Type::Char => "char".into(), Type::String => "string".into(), Type::Record { id, fields } => { @@ -284,8 +284,8 @@ fn rust_type_name(ty: &Type) -> String { Type::S32 => "i32".into(), Type::U64 => "u64".into(), Type::S64 => "i64".into(), - Type::Float32 => "f32".into(), - Type::Float64 => "f64".into(), + Type::F32 => "f32".into(), + Type::F64 => "f64".into(), Type::Char => "char".into(), Type::String => "String".into(), Type::Record { id, .. } => { @@ -343,7 +343,7 @@ fn equality(a: &str, b: &str, ty: &Type) -> String { | Type::String | Type::Flags { .. } | Type::Enum { .. } => format!("({a} == {b})"), - Type::Float32 | Type::Float64 => format!("(({a}.is_nan() && {b}.is_nan()) || {a} == {b})"), + Type::F32 | Type::F64 => format!("(({a}.is_nan() && {b}.is_nan()) || {a} == {b})"), Type::Record { fields, .. } => { if fields.is_empty() { "true".into() @@ -427,8 +427,8 @@ fn strategy(ty: &Type, max_list_size: usize) -> String { Type::S32 => "proptest::num::i32::ANY".into(), Type::U64 => "proptest::num::u64::ANY".into(), Type::S64 => "proptest::num::i64::ANY".into(), - Type::Float32 => "proptest::num::f32::ANY".into(), - Type::Float64 => "proptest::num::f64::ANY".into(), + Type::F32 => "proptest::num::f32::ANY".into(), + Type::F64 => "proptest::num::f64::ANY".into(), Type::Char => "proptest::char::any()".into(), Type::String => r#"proptest::string::string_regex(".*").unwrap()"#.into(), Type::Record { id, fields } => { diff --git a/wit/matrix-math.wit b/wit/matrix-math.wit index 7ed68e0..0c634e0 100644 --- a/wit/matrix-math.wit +++ b/wit/matrix-math.wit @@ -1,5 +1,5 @@ world matrix-math { include wasi:cli/command@0.2.0; - - export multiply: func(a: list>, b: list>) -> result>, string>; + + export multiply: func(a: list>, b: list>) -> result>, string>; }