diff --git a/Cargo.lock b/Cargo.lock index a5d45968..4f92eaa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,16 +8,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.1", -] - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli 0.29.0", + "gimli", ] [[package]] @@ -28,13 +19,14 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.8.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if", "cipher", "cpufeatures", + "opaque-debug", ] [[package]] @@ -51,13 +43,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -84,48 +82,47 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -164,26 +161,28 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.3.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener-strategy", + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.12.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ + "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.1.0", - "futures-lite 2.3.0", + "fastrand 2.0.1", + "futures-lite 2.2.0", "slab", ] @@ -221,17 +220,17 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock 3.4.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.2.0", "parking", - "polling 3.7.2", + "polling 3.5.0", "rustix 0.38.34", "slab", "tracing", @@ -249,12 +248,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", "pin-project-lite", ] @@ -277,23 +276,23 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "async-signal" -version = "0.2.8" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.3", - "async-lock 3.4.0", + "async-io 2.3.1", + "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", @@ -301,14 +300,14 @@ dependencies = [ "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "async-task" -version = "4.7.1" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" @@ -318,7 +317,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -340,22 +339,22 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.22.0", + "addr2line", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.36.0", + "object 0.32.2", "rustc-demangle", ] @@ -399,7 +398,7 @@ dependencies = [ "libm", "num-bigint", "num-integer", - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] @@ -444,9 +443,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitmaps" @@ -467,32 +466,42 @@ dependencies = [ ] [[package]] -name = "block-padding" -version = "0.3.3" +name = "block-modes" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" dependencies = [ - "generic-array", + "block-padding", + "cipher", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "blocking" -version = "1.6.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", + "async-lock 3.3.0", "async-task", + "fastrand 2.0.1", "futures-io", - "futures-lite 2.3.0", + "futures-lite 2.2.0", "piper", + "tracing", ] [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" @@ -508,13 +517,90 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "camino" -version = "1.1.7" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde 1.0.203", ] +[[package]] +name = "cap-fs-ext" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc2d2954524be4866aaa720f008fba9995de54784957a1b0e0119992d6d5e52" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes 2.0.3", + "windows-sys 0.52.0", +] + +[[package]] +name = "cap-net-ext" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799c81d79ea9c71a1438efd417c788214bc9e7986046d3710b6bbe60da4d8275" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix 0.38.34", + "smallvec", +] + +[[package]] +name = "cap-primitives" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00172660727e2d7f808e7cc2bfffd093fdb3ea2ff2ef819289418a3c3ffab5ac" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes 2.0.3", + "ipnet", + "maybe-owned", + "rustix 0.38.34", + "windows-sys 0.52.0", + "winx", +] + +[[package]] +name = "cap-rand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "270f1d341a2afc62604f8f688bee4e444d052b7a74c1458dd3aa7efb47d4077f" +dependencies = [ + "ambient-authority", + "rand 0.8.5", +] + +[[package]] +name = "cap-std" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd9187bb3f7478a4c135ea10473a41a5f029d2ac800c1adf64f35ec7d4c8603" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes 2.0.3", + "rustix 0.38.34", +] + +[[package]] +name = "cap-time-ext" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91666f31e30c85b1d2ee8432c90987f752c45f5821f5638027b41e73e16a395b" +dependencies = [ + "ambient-authority", + "cap-primitives", + "iana-time-zone", + "once_cell", + "rustix 0.38.34", + "winx", +] + [[package]] name = "cargo-component" version = "0.13.2" @@ -599,9 +685,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde 1.0.203", ] @@ -622,32 +708,22 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cb1d556b8b8f36e5ca74938008be3ac102f5dcb5b68a0477e4249ae2291cd3" +checksum = "4895c018bb228aa6b3ba1a0285543fcb4b704734c3fb1f72afaa75aa769500c1" dependencies = [ "serde 1.0.203", "toml 0.8.14", ] -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - [[package]] name = "cc" -version = "1.0.99" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -658,25 +734,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits 0.2.19", + "num-traits 0.2.18", "serde 1.0.203", - "windows-targets 0.52.5", + "windows-targets 0.52.0", ] [[package]] name = "cipher" -version = "0.4.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "crypto-common", - "inout", + "generic-array", ] [[package]] @@ -698,7 +773,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", ] [[package]] @@ -710,14 +785,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "cobs" @@ -727,15 +802,15 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "concurrent-queue" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -831,8 +906,8 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.28.1", - "hashbrown 0.14.5", + "gimli", + "hashbrown 0.14.3", "log", "regalloc2", "rustc-hash", @@ -921,9 +996,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -949,9 +1024,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-bigint" @@ -977,9 +1052,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ "darling_core", "darling_macro", @@ -987,27 +1062,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.66", + "strsim 0.10.0", + "syn 2.0.67", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1021,9 +1096,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "pem-rfc7468", @@ -1059,7 +1134,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1115,6 +1190,15 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys 0.3.7", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1158,17 +1242,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "displaydoc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "ecdsa" version = "0.16.9" @@ -1185,9 +1258,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -1223,18 +1296,18 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] name = "enumflags2" -version = "0.7.10" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", "serde 1.0.203", @@ -1242,13 +1315,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.10" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1272,9 +1345,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1299,9 +1372,20 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" dependencies = [ "concurrent-queue", "parking", @@ -1310,11 +1394,21 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.1.0", "pin-project-lite", ] @@ -1335,9 +1429,20 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fd-lock" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" +dependencies = [ + "cfg-if", + "rustix 0.38.34", + "windows-sys 0.52.0", +] [[package]] name = "ff" @@ -1385,6 +1490,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" +dependencies = [ + "io-lifetimes 2.0.3", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -1462,11 +1578,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.0.1", "futures-core", "futures-io", "parking", @@ -1481,7 +1597,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -1529,7 +1645,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "debugid", "fxhash", "serde 1.0.203", @@ -1549,9 +1665,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -1569,12 +1685,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - [[package]] name = "golem-wasm-ast" version = "0.3.0" @@ -1594,6 +1704,7 @@ name = "golem-wasm-rpc" version = "0.0.0" dependencies = [ "arbitrary", + "async-trait", "bigdecimal", "bincode", "golem-wasm-ast", @@ -1605,6 +1716,7 @@ dependencies = [ "serde_json", "wasm-wave", "wasmtime", + "wasmtime-wasi", "wit-bindgen-rt", ] @@ -1630,7 +1742,7 @@ dependencies = [ "quote", "regex", "serde 1.0.203", - "syn 2.0.66", + "syn 2.0.67", "tempdir", "tokio", "toml 0.8.14", @@ -1686,9 +1798,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "serde 1.0.203", @@ -1717,15 +1829,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.4.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" [[package]] name = "hex" @@ -1796,9 +1902,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "humantime" @@ -1872,7 +1978,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2 0.5.7", + "socket2 0.5.6", "tokio", "tower", "tower-service", @@ -1902,124 +2008,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "id-arena" version = "2.2.1" @@ -2034,14 +2022,12 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "icu_normalizer", - "icu_properties", - "smallvec", - "utf8_iter", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -2076,27 +2062,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "serde 1.0.203", ] [[package]] -name = "inout" -version = "0.1.3" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "block-padding", - "generic-array", + "cfg-if", ] [[package]] -name = "instant" -version = "0.1.13" +name = "io-extras" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" dependencies = [ - "cfg-if", + "io-lifetimes 2.0.3", + "windows-sys 0.52.0", ] [[package]] @@ -2105,11 +2091,17 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.3.8", "libc", "windows-sys 0.48.0", ] +[[package]] +name = "io-lifetimes" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" + [[package]] name = "ipnet" version = "2.9.0" @@ -2122,17 +2114,11 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.3.8", "libc", "windows-sys 0.52.0", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - [[package]] name = "itertools" version = "0.11.0" @@ -2153,9 +2139,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "ittapi" @@ -2179,18 +2165,18 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -2242,9 +2228,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -2254,12 +2240,13 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.1.3" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "libc", + "redox_syscall", ] [[package]] @@ -2274,7 +2261,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761e49ec5fd8a5a463f9b84e877c373d888935b71c6be78f3767fe2ae6bed18e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "libc", ] @@ -2286,21 +2273,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "litemap" -version = "0.7.3" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2333,7 +2314,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2360,11 +2341,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "204651f31b0a6a7b2128d2b92c372cd94607b210c3a6b6e542c57a8cfd4db996" +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -2386,9 +2373,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -2413,7 +2400,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2424,18 +2411,18 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", @@ -2444,16 +2431,17 @@ dependencies = [ [[package]] name = "multimap" -version = "0.10.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ + "lazy_static 1.4.0", "libc", "log", "openssl", @@ -2499,35 +2487,36 @@ dependencies = [ [[package]] name = "num" -version = "0.4.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", "num-rational", - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ + "autocfg", "num-integer", - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] name = "num-complex" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] @@ -2542,29 +2531,30 @@ version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] name = "num-rational" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ + "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] @@ -2573,14 +2563,14 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] name = "num-traits" -version = "0.2.19" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -2592,28 +2582,28 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.3.8", "libc", ] [[package]] name = "object" -version = "0.33.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "crc32fast", - "hashbrown 0.14.5", - "indexmap 2.2.6", "memchr", ] [[package]] name = "object" -version = "0.36.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d" dependencies = [ + "crc32fast", + "hashbrown 0.14.3", + "indexmap 2.2.6", "memchr", ] @@ -2623,13 +2613,19 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + [[package]] name = "openssl" version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -2646,7 +2642,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2657,9 +2653,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -2679,7 +2675,7 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" dependencies = [ - "num-traits 0.2.19", + "num-traits 0.2.18", ] [[package]] @@ -2718,9 +2714,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -2728,15 +2724,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] [[package]] @@ -2747,9 +2743,9 @@ checksum = "14248cc8eced350e20122a291613de29e4fa129ba2731818c4cdbb44fccd3e55" [[package]] name = "paste" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pathdiff" @@ -2811,9 +2807,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.5" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", "indexmap 2.2.6", @@ -2836,14 +2832,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2853,12 +2849,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.1.0", + "fastrand 2.0.1", "futures-io", ] @@ -2874,9 +2870,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "polling" @@ -2896,13 +2892,12 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", "pin-project-lite", "rustix 0.38.34", "tracing", @@ -2949,7 +2944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -2973,9 +2968,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2988,9 +2983,9 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.5.0", + "bitflags 2.4.2", "lazy_static 1.4.0", - "num-traits 0.2.19", + "num-traits 0.2.18", "rand 0.8.5", "rand_chacha", "rand_xorshift", @@ -3027,8 +3022,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", - "heck 0.5.0", - "itertools 0.12.1", + "heck 0.4.1", + "itertools 0.11.0", "log", "multimap", "once_cell", @@ -3037,7 +3032,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.66", + "syn 2.0.67", "tempfile", ] @@ -3048,10 +3043,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3221,9 +3216,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.10.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -3250,18 +3245,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags 2.5.0", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", "libredox", @@ -3283,9 +3278,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -3295,9 +3290,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -3306,9 +3301,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "remove_dir_all" @@ -3419,9 +3414,9 @@ checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -3437,7 +3432,7 @@ checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", - "io-lifetimes", + "io-lifetimes 1.0.11", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", @@ -3449,10 +3444,12 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "errno", + "itoa", "libc", - "linux-raw-sys 0.4.14", + "linux-raw-sys 0.4.13", + "once_cell", "windows-sys 0.52.0", ] @@ -3510,9 +3507,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -3563,12 +3560,12 @@ dependencies = [ [[package]] name = "secret-service" -version = "3.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5204d39df37f06d1944935232fd2dfe05008def7ca599bf28c0800366c8a8f9" +checksum = "5da1a5ad4d28c03536f82f77d9f36603f5e37d8869ac98f0a750d5b5686d8d95" dependencies = [ "aes", - "cbc", + "block-modes", "futures-util", "generic-array", "hkdf", @@ -3582,11 +3579,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags 2.5.0", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3595,9 +3592,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3657,7 +3654,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3673,13 +3670,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.19" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -3705,11 +3702,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", @@ -3723,21 +3720,21 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "serde_yaml" -version = "0.9.34+deprecated" +version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ "indexmap 2.2.6", "itoa", @@ -3793,11 +3790,20 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" +dependencies = [ + "dirs 4.0.0", +] + [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -3839,9 +3845,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" dependencies = [ "serde 1.0.203", ] @@ -3858,9 +3864,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3868,9 +3874,9 @@ dependencies = [ [[package]] name = "spdx" -version = "0.10.6" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc" +checksum = "62bde1398b09b9f93fc2fc9b9da86e362693e999d3a54a8ac47a99a5a73f638b" dependencies = [ "smallvec", ] @@ -3911,9 +3917,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" -version = "0.11.1" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "subtle" @@ -3934,9 +3946,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90" dependencies = [ "proc-macro2", "quote", @@ -3949,17 +3961,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "system-configuration" version = "0.5.1" @@ -3981,11 +3982,27 @@ dependencies = [ "libc", ] +[[package]] +name = "system-interface" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b858526d22750088a9b3cf2e3c2aacebd5377f13adeec02860c30d09113010a6" +dependencies = [ + "bitflags 2.4.2", + "cap-fs-ext", + "cap-std", + "fd-lock", + "io-lifetimes 2.0.3", + "rustix 0.38.34", + "windows-sys 0.52.0", + "winx", +] + [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempdir" @@ -4004,7 +4021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.1.0", + "fastrand 2.0.1", "rustix 0.38.34", "windows-sys 0.52.0", ] @@ -4035,14 +4052,14 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", @@ -4061,9 +4078,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ "num-conv", "time-core", @@ -4079,15 +4096,20 @@ dependencies = [ ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "displaydoc", - "zerovec", + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" version = "1.38.0" @@ -4102,7 +4124,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -4115,7 +4137,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4153,15 +4175,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -4215,7 +4238,7 @@ dependencies = [ "serde 1.0.203", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.0", ] [[package]] @@ -4264,7 +4287,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", ] [[package]] @@ -4294,7 +4317,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.1", + "memoffset 0.9.0", "tempfile", "winapi", ] @@ -4305,17 +4328,32 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -4325,9 +4363,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unsafe-libyaml" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -4337,9 +4375,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -4347,29 +4385,17 @@ dependencies = [ "serde 1.0.203", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.8.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" [[package]] name = "vcpkg" @@ -4400,15 +4426,15 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -4450,7 +4476,7 @@ dependencies = [ "bytes", "clap", "dialoguer", - "dirs", + "dirs 5.0.1", "futures-util", "indexmap 2.2.6", "itertools 0.12.1", @@ -4569,9 +4595,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4579,24 +4605,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -4606,9 +4632,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4616,22 +4642,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wasm-compose" @@ -4715,9 +4741,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.210.0" +version = "0.211.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e3764d9d6edabd8c9e16195e177be0d20f6ab942ad18af52860f12f82bc59a" +checksum = "5e7d931a1120ef357f32b74547646b6fa68ea25e377772b72874b131a9ed70d4" dependencies = [ "leb128", ] @@ -4802,7 +4828,7 @@ version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", "indexmap 2.2.6", "semver", ] @@ -4814,8 +4840,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e19bb9f8ab07616da582ef8adb24c54f1424c7ec876720b7da9db8ec0626c92c" dependencies = [ "ahash", - "bitflags 2.5.0", - "hashbrown 0.14.5", + "bitflags 2.4.2", + "hashbrown 0.14.3", "indexmap 2.2.6", "semver", ] @@ -4827,8 +4853,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd921789c9dcc495f589cb37d200155dee65b4a4beeb853323b5e24e0a5f9c58" dependencies = [ "ahash", - "bitflags 2.5.0", - "hashbrown 0.14.5", + "bitflags 2.4.2", + "hashbrown 0.14.3", "indexmap 2.2.6", "semver", "serde 1.0.203", @@ -4841,8 +4867,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07035cc9a9b41e62d3bb3a3815a66ab87c993c06fe1cf6b2a3f2a18499d937db" dependencies = [ "ahash", - "bitflags 2.5.0", - "hashbrown 0.14.5", + "bitflags 2.4.2", + "hashbrown 0.14.3", "indexmap 2.2.6", "semver", ] @@ -4873,7 +4899,7 @@ version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92a1370c66a0022e6d92dcc277e2c84f5dece19569670b8ce7db8162560d8b6" dependencies = [ - "addr2line 0.21.0", + "addr2line", "anyhow", "async-trait", "bumpalo", @@ -4881,8 +4907,8 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "gimli 0.28.1", - "hashbrown 0.14.5", + "gimli", + "hashbrown 0.14.3", "indexmap 2.2.6", "ittapi", "libc", @@ -4890,7 +4916,7 @@ dependencies = [ "log", "mach2", "memfd", - "memoffset 0.9.1", + "memoffset 0.9.0", "object 0.33.0", "once_cell", "paste", @@ -4961,7 +4987,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser 0.207.0", @@ -4987,7 +5013,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.28.1", + "gimli", "log", "object 0.33.0", "target-lexicon", @@ -5006,7 +5032,7 @@ dependencies = [ "anyhow", "cpp_demangle", "cranelift-entity", - "gimli 0.28.1", + "gimli", "indexmap 2.2.6", "log", "object 0.33.0", @@ -5088,7 +5114,38 @@ checksum = "d4cedc5bfef3db2a85522ee38564b47ef3b7fc7c92e94cacbce99808e63cdd47" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.67", +] + +[[package]] +name = "wasmtime-wasi" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbbe94245904d4c96c7c5f7b55bad896cc27908644efd9442063c0748b631fc" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.4.2", + "bytes", + "cap-fs-ext", + "cap-net-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "io-lifetimes 2.0.3", + "once_cell", + "rustix 0.38.34", + "system-interface", + "thiserror", + "tokio", + "tracing", + "url", + "wasmtime", + "wiggle", + "windows-sys 0.52.0", ] [[package]] @@ -5099,7 +5156,7 @@ checksum = "97b27054fed6be4f3800aba5766f7ef435d4220ce290788f021a08d4fa573108" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.28.1", + "gimli", "object 0.33.0", "target-lexicon", "wasmparser 0.207.0", @@ -5122,31 +5179,40 @@ dependencies = [ [[package]] name = "wast" -version = "210.0.0" +version = "35.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" +dependencies = [ + "leb128", +] + +[[package]] +name = "wast" +version = "211.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa835c59bd615e00f16be65705d85517d40b44b3c831d724e450244685176c3c" +checksum = "b25506dd82d00da6b14a87436b3d52b1d264083fa79cdb72a0d1b04a8595ccaa" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.210.0", + "wasm-encoder 0.211.1", ] [[package]] name = "wat" -version = "1.210.0" +version = "1.211.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67faece8487996430c6812be7f8776dc563ca0efcd3db77f8839070480c0d1a6" +checksum = "eb716ca6c86eecac2d82541ffc39860118fc0af9309c4f2670637bea2e1bdd7d" dependencies = [ - "wast", + "wast 211.0.1", ] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -5164,6 +5230,48 @@ dependencies = [ "winsafe", ] +[[package]] +name = "wiggle" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89ea6f74ece6d1cfbd089783006b8eb69a0219ca83cad22068f0d9fa9df3f91" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.4.2", + "thiserror", + "tracing", + "wasmtime", + "wiggle-macro", +] + +[[package]] +name = "wiggle-generate" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36beda94813296ecaf0d91b7ada9da073fd41865ba339bdd3b7764e2e785b8e9" +dependencies = [ + "anyhow", + "heck 0.4.1", + "proc-macro2", + "quote", + "shellexpand", + "syn 2.0.67", + "witx", +] + +[[package]] +name = "wiggle-macro" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47d2b4442ce93106dba5d1a9c59d5f85b5732878bb3d0598d3c93c0d01b16b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.67", + "wiggle-generate", +] + [[package]] name = "winapi" version = "0.3.9" @@ -5182,11 +5290,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -5203,7 +5311,7 @@ checksum = "1dc69899ccb2da7daa4df31426dcfd284b104d1a85e1dae35806df0c46187f87" dependencies = [ "anyhow", "cranelift-codegen", - "gimli 0.28.1", + "gimli", "regalloc2", "smallvec", "target-lexicon", @@ -5218,7 +5326,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.0", ] [[package]] @@ -5236,7 +5344,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.0", ] [[package]] @@ -5256,18 +5364,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -5278,9 +5385,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -5290,9 +5397,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -5302,15 +5409,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -5320,9 +5421,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -5332,9 +5433,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -5344,9 +5445,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -5356,9 +5457,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" @@ -5371,9 +5472,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "6b1dbce9e90e5404c5a52ed82b1d13fc8cfbdad85033b6f57546ffd1265f8451" dependencies = [ "memchr", ] @@ -5394,6 +5495,16 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "winx" +version = "0.36.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" +dependencies = [ + "bitflags 2.4.2", + "windows-sys 0.52.0", +] + [[package]] name = "wit-bindgen-core" version = "0.25.0" @@ -5422,7 +5533,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29c7526379ace8709ee9ab9f2bb50f112d95581063a59ef3097d9c10153886c9" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.4.2", ] [[package]] @@ -5460,7 +5571,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fef7dd0e47f5135dd8739ccc5b188ab8b7e27e1d64df668aa36680f0b8646db8" dependencies = [ "anyhow", - "bitflags 2.5.0", + "bitflags 2.4.2", "indexmap 2.2.6", "log", "serde 1.0.203", @@ -5479,7 +5590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25a2bb5b039f9cb03425e1d5a6e54b441ca4ca1b1d4fa6a0924db67a55168f99" dependencies = [ "anyhow", - "bitflags 2.5.0", + "bitflags 2.4.2", "indexmap 2.2.6", "log", "serde 1.0.203", @@ -5546,25 +5657,25 @@ dependencies = [ ] [[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" +name = "witx" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" +dependencies = [ + "anyhow", + "log", + "thiserror", + "wast 35.0.2", +] [[package]] name = "xdg-home" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca91dcf8f93db085f3a0a29358cd0b9d670915468f4290e8b85d118a34211ab8" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" dependencies = [ "libc", - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -5576,30 +5687,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yoke" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" -dependencies = [ - "serde 1.0.203", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "synstructure", -] - [[package]] name = "zbus" version = "3.15.2" @@ -5657,9 +5744,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde 1.0.203", "static_assertions", @@ -5668,72 +5755,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zerofrom" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.4" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", - "synstructure", + "syn 2.0.67", ] [[package]] name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zerovec" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zstd" diff --git a/wasm-rpc-stubgen/src/cargo.rs b/wasm-rpc-stubgen/src/cargo.rs index 0afe4f3c..f0f14347 100644 --- a/wasm-rpc-stubgen/src/cargo.rs +++ b/wasm-rpc-stubgen/src/cargo.rs @@ -88,6 +88,14 @@ pub fn generate_cargo_toml(def: &StubDefinition) -> anyhow::Result<()> { path: "wit/deps/wasm-rpc".to_string(), }, ); + + wit_dependencies.insert( + "wasi:io".to_string(), + WitDependency { + path: "wit/deps/io".to_string(), + }, + ); + for dep in &def.unresolved_deps { let dep_package = &dep.name; let stub_package_name = format!("{}-stub", def.root_package_name); diff --git a/wasm-rpc-stubgen/src/rust.rs b/wasm-rpc-stubgen/src/rust.rs index be3a5564..a49f9f75 100644 --- a/wasm-rpc-stubgen/src/rust.rs +++ b/wasm-rpc-stubgen/src/rust.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::stub::{FunctionResultStub, FunctionStub, StubDefinition, StubTypeOwner}; +use crate::stub::{FunctionResultStub, FunctionStub, InterfaceStub, StubDefinition, StubTypeOwner}; use anyhow::anyhow; use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}; use proc_macro2::{Ident, Span, TokenStream}; @@ -83,6 +83,35 @@ pub fn generate_stub_source(def: &StubDefinition) -> anyhow::Result<()> { resource_type_aliases.push(quote! { type #interface_name = crate::#interface_name; }); + + for function in &interface.functions { + if !function.results.is_empty() { + let result_wrapper = result_wrapper_ident(function, interface); + struct_defs.push(quote! { + pub struct #result_wrapper { + pub future_invoke_result: FutureInvokeResult + } + }); + + resource_type_aliases.push(quote! { + type #result_wrapper = crate::#result_wrapper; + }); + } + } + for function in &interface.static_functions { + if !function.results.is_empty() { + let result_wrapper = result_wrapper_ident(function, interface); + struct_defs.push(quote! { + pub struct #result_wrapper { + pub future_invoke_result: FutureInvokeResult + } + }); + + resource_type_aliases.push(quote! { + type #result_wrapper = crate::#result_wrapper; + }); + } + } } let mut interface_impls = Vec::new(); @@ -94,27 +123,82 @@ pub fn generate_stub_source(def: &StubDefinition) -> anyhow::Result<()> { let mut fn_impls = Vec::new(); for function in &interface.functions { + let mode = if interface.is_resource() { + FunctionMode::Method + } else { + FunctionMode::Global + }; fn_impls.push(generate_function_stub_source( - def, - function, - interface.interface_name(), - interface.resource_name(), - if interface.is_resource() { - FunctionMode::Method - } else { - FunctionMode::Global - }, + def, function, interface, mode, )?); + + if !function.results.is_empty() { + let result_wrapper = result_wrapper_ident(function, interface); + let result_wrapper_interface = result_wrapper_interface_ident(function, interface); + + let subscribe = quote! { + fn subscribe(&self) -> bindings::wasi::io::poll::Pollable { + let pollable = self.future_invoke_result.subscribe(); + let pollable = unsafe { + bindings::wasi::io::poll::Pollable::from_handle( + pollable.take_handle() + ) + }; + pollable + } + }; + + let get = generate_result_wrapper_get_source(def, interface, function, mode)?; + + let result_wrapper_impl = quote! { + impl crate::bindings::exports::#root_ns::#root_name::#stub_interface_name::#result_wrapper_interface for #result_wrapper { + #subscribe + #get + } + }; + interface_impls.push(result_wrapper_impl); + } } for function in &interface.static_functions { fn_impls.push(generate_function_stub_source( def, function, - interface.interface_name(), - interface.resource_name(), + interface, FunctionMode::Static, )?); + + if !function.results.is_empty() { + let result_wrapper = result_wrapper_ident(function, interface); + let result_wrapper_interface = result_wrapper_interface_ident(function, interface); + + let subscribe = quote! { + fn subscribe(&self) -> bindings::wasi::io::poll::Pollable { + let pollable = self.future_invoke_result.subscribe(); + let pollable = unsafe { + bindings::wasi::io::poll::Pollable::from_handle( + pollable.take_handle() + ) + }; + pollable + } + }; + + let get = generate_result_wrapper_get_source( + def, + interface, + function, + FunctionMode::Static, + )?; + + let result_wrapper_impl = quote! { + impl crate::bindings::exports::#root_ns::#root_name::#stub_interface_name::#result_wrapper_interface for #result_wrapper { + #subscribe + #get + } + }; + interface_impls.push(result_wrapper_impl); + } } let constructor = if interface.is_resource() { @@ -126,8 +210,7 @@ pub fn generate_stub_source(def: &StubDefinition) -> anyhow::Result<()> { generate_function_stub_source( def, &constructor_stub, - interface.interface_name(), - interface.resource_name(), + interface, FunctionMode::Constructor, )? } else { @@ -217,17 +300,56 @@ enum FunctionMode { Constructor, } +fn result_wrapper_ident(function: &FunctionStub, owner: &InterfaceStub) -> Ident { + Ident::new( + &to_rust_ident(&function.async_result_type(owner)).to_upper_camel_case(), + Span::call_site(), + ) +} + +fn result_wrapper_interface_ident(function: &FunctionStub, owner: &InterfaceStub) -> Ident { + Ident::new( + &to_rust_ident(&format!("guest-{}", function.async_result_type(owner))) + .to_upper_camel_case(), + Span::call_site(), + ) +} + +fn generate_result_wrapper_get_source( + def: &StubDefinition, + interface: &InterfaceStub, + function: &FunctionStub, + mode: FunctionMode, +) -> anyhow::Result { + let result_type = get_result_type_source(def, function)?; + let output_values = get_output_values_source(def, function, mode)?; + + let remote_function_name = get_remote_function_name( + def, + &function.name, + interface.interface_name().as_ref(), + interface.resource_name().as_ref(), + ); + + Ok(quote! { + fn get(&self) -> Option<#result_type> { + self.future_invoke_result.get().map(|result| { + let result = result.expect(&format!("Failed to invoke remote {}", #remote_function_name)); + (#(#output_values),*) + }) + } + }) +} + fn generate_function_stub_source( def: &StubDefinition, function: &FunctionStub, - interface_name: Option, - resource_name: Option, + owner: &InterfaceStub, mode: FunctionMode, ) -> anyhow::Result { let function_name = Ident::new(&to_rust_ident(&function.name), Span::call_site()); let mut params = Vec::new(); let mut input_values = Vec::new(); - let mut output_values = Vec::new(); if mode != FunctionMode::Static && mode != FunctionMode::Constructor { params.push(quote! {&self}); @@ -260,76 +382,14 @@ fn generate_function_stub_source( )?); } - let result_type = match &function.results { - FunctionResultStub::Single(typ) => { - let typ = type_to_rust_ident(typ, def)?; - quote! { - #typ - } - } - FunctionResultStub::Multi(params) => { - let mut results = Vec::new(); - for param in params { - let param_name = Ident::new(&to_rust_ident(¶m.name), Span::call_site()); - let param_typ = type_to_rust_ident(¶m.typ, def)?; - results.push(quote! { - #param_name: #param_typ - }); - } - if results.is_empty() { - quote! { - () - } - } else { - quote! { - (#(#results),*) - } - } - } - FunctionResultStub::SelfType => quote! { Self }, - }; - - match &function.results { - FunctionResultStub::Single(typ) => { - output_values.push(extract_from_wit_value( - typ, - def, - quote! { result.tuple_element(0).expect("tuple not found") }, - )?); - } - FunctionResultStub::Multi(params) => { - for (n, param) in params.iter().enumerate() { - output_values.push(extract_from_wit_value( - ¶m.typ, - def, - quote! { result.tuple_element(#n).expect("tuple not found") }, - )?); - } - } - FunctionResultStub::SelfType if mode == FunctionMode::Constructor => { - output_values.push(quote! { - { - let (uri, id) = result.tuple_element(0).expect("tuple not found").handle().expect("handle not found"); - Self { - rpc, - id, - uri - } - } - }); - } - FunctionResultStub::SelfType => { - return Err(anyhow!( - "SelfType result is only supported for constructors" - )); - } - } + let result_type = get_result_type_source(def, function)?; + let output_values = get_output_values_source(def, function, mode)?; let remote_function_name = get_remote_function_name( def, &function.name, - interface_name.as_ref(), - resource_name.as_ref(), + owner.interface_name().as_ref(), + owner.resource_name().as_ref(), ); let rpc = match mode { @@ -379,14 +439,12 @@ fn generate_function_stub_source( }; let blocking = { - let function_name = if function.results.is_empty() { - Ident::new( - &to_rust_ident(&format!("blocking-{}", function.name)), - Span::call_site(), - ) + let blocking_function_name = if mode == FunctionMode::Constructor { + function.name.clone() } else { - function_name.clone() + format!("blocking-{}", function.name) }; + let function_name = Ident::new(&to_rust_ident(&blocking_function_name), Span::call_site()); quote! { fn #function_name(#(#params),*) -> #result_type { #init @@ -401,17 +459,46 @@ fn generate_function_stub_source( } }; - let non_blocking = if function.results.is_empty() { - quote! { - fn #function_name(#(#params),*) -> #result_type { - #init - let result = #rpc.invoke( - #remote_function_name, - &[ - #(#input_values),* - ], - ).expect(&format!("Failed to invoke remote {}", #remote_function_name)); - (#(#output_values),*) + let non_blocking = if mode != FunctionMode::Constructor { + if function.results.is_empty() { + quote! { + fn #function_name(#(#params),*) -> #result_type { + #init + let result = #rpc.invoke( + #remote_function_name, + &[ + #(#input_values),* + ], + ).expect(&format!("Failed to invoke remote {}", #remote_function_name)); + (#(#output_values),*) + } + } + } else { + let root_ns = Ident::new( + &def.root_package_name.namespace.to_snake_case(), + Span::call_site(), + ); + let root_name = Ident::new( + &format!("{}_stub", def.root_package_name.name.to_snake_case()), + Span::call_site(), + ); + let stub_interface_name = format!("stub-{}", def.source_world_name()?); + let stub_interface_name = Ident::new( + &to_rust_ident(&stub_interface_name).to_snake_case(), + Span::call_site(), + ); + let result_wrapper = result_wrapper_ident(function, owner); + quote! { + fn #function_name(#(#params),*) -> crate::bindings::exports::#root_ns::#root_name::#stub_interface_name::#result_wrapper { + #init + let result = #rpc.async_invoke_and_await( + #remote_function_name, + &[ + #(#input_values),* + ], + ); + crate::bindings::exports::#root_ns::#root_name::#stub_interface_name::#result_wrapper::new(#result_wrapper { future_invoke_result: result}) + } } } } else { @@ -424,6 +511,85 @@ fn generate_function_stub_source( }) } +fn get_output_values_source( + def: &StubDefinition, + function: &FunctionStub, + mode: FunctionMode, +) -> anyhow::Result> { + let mut output_values = Vec::new(); + match &function.results { + FunctionResultStub::Single(typ) => { + output_values.push(extract_from_wit_value( + typ, + def, + quote! { result.tuple_element(0).expect("tuple not found") }, + )?); + } + FunctionResultStub::Multi(params) => { + for (n, param) in params.iter().enumerate() { + output_values.push(extract_from_wit_value( + ¶m.typ, + def, + quote! { result.tuple_element(#n).expect("tuple not found") }, + )?); + } + } + FunctionResultStub::SelfType if mode == FunctionMode::Constructor => { + output_values.push(quote! { + { + let (uri, id) = result.tuple_element(0).expect("tuple not found").handle().expect("handle not found"); + Self { + rpc, + id, + uri + } + } + }); + } + FunctionResultStub::SelfType => { + return Err(anyhow!( + "SelfType result is only supported for constructors" + )); + } + } + Ok(output_values) +} + +fn get_result_type_source( + def: &StubDefinition, + function: &FunctionStub, +) -> anyhow::Result { + let result_type = match &function.results { + FunctionResultStub::Single(typ) => { + let typ = type_to_rust_ident(typ, def)?; + quote! { + #typ + } + } + FunctionResultStub::Multi(params) => { + let mut results = Vec::new(); + for param in params { + let param_name = Ident::new(&to_rust_ident(¶m.name), Span::call_site()); + let param_typ = type_to_rust_ident(¶m.typ, def)?; + results.push(quote! { + #param_name: #param_typ + }); + } + if results.is_empty() { + quote! { + () + } + } else { + quote! { + (#(#results),*) + } + } + } + FunctionResultStub::SelfType => quote! { Self }, + }; + Ok(result_type) +} + fn get_remote_function_name( def: &StubDefinition, function_name: &str, diff --git a/wasm-rpc-stubgen/src/stub.rs b/wasm-rpc-stubgen/src/stub.rs index 1fa0d32a..19f7568d 100644 --- a/wasm-rpc-stubgen/src/stub.rs +++ b/wasm-rpc-stubgen/src/stub.rs @@ -264,6 +264,14 @@ impl FunctionStub { } }) } + + pub fn async_result_type(&self, owner: &InterfaceStub) -> String { + if owner.is_resource() { + format!("future-{}-{}-result", owner.name, self.name) + } else { + format!("future-{}-result", self.name) + } + } } #[derive(Debug, Clone)] diff --git a/wasm-rpc-stubgen/src/wit.rs b/wasm-rpc-stubgen/src/wit.rs index c22551ca..7160b05d 100644 --- a/wasm-rpc-stubgen/src/wit.rs +++ b/wasm-rpc-stubgen/src/wit.rs @@ -13,8 +13,8 @@ // limitations under the License. use crate::stub::{ - FunctionParamStub, FunctionResultStub, InterfaceStubImport, InterfaceStubTypeDef, - StubDefinition, + FunctionParamStub, FunctionResultStub, FunctionStub, InterfaceStub, InterfaceStubImport, + InterfaceStubTypeDef, StubDefinition, }; use anyhow::{anyhow, bail, Context}; use indexmap::IndexMap; @@ -66,6 +66,7 @@ pub fn get_stub_wit( .collect::>(); writeln!(out, " use golem:rpc/types@0.1.0.{{uri}};")?; + writeln!(out, " use wasi:io/poll@0.2.0.{{pollable}};")?; match type_gen_strategy { StubTypeGen::ImportRootTypes => { @@ -94,6 +95,21 @@ pub fn get_stub_wit( } } + // Generating async return types + for interface in &def.interfaces { + for function in &interface.functions { + if !function.results.is_empty() { + write_async_return_type(&mut out, function, interface, def)?; + } + } + for function in &interface.static_functions { + if !function.results.is_empty() { + write_async_return_type(&mut out, function, interface, def)?; + } + } + } + + // Generating function definitions for interface in &def.interfaces { writeln!(out, " resource {} {{", &interface.name)?; match &interface.constructor_params { @@ -110,59 +126,10 @@ pub fn get_stub_wit( } } for function in &interface.functions { - if !function.results.is_empty() { - write!(out, " {}: func(", function.name)?; - write_param_list(&mut out, def, &function.params)?; - write!(out, ")")?; - write!(out, " -> ")?; - match &function.results { - FunctionResultStub::Single(typ) => { - write!(out, "{}", typ.wit_type_string(&def.resolve)?)?; - } - FunctionResultStub::Multi(params) => { - write!(out, "(")?; - write_param_list(&mut out, def, params)?; - write!(out, ")")?; - } - FunctionResultStub::SelfType => { - return Err(anyhow!("Unexpected return type in wit generator")); - } - } - } else { - // Write the blocking function - write!(out, " blocking-{}: func(", function.name)?; - write_param_list(&mut out, def, &function.params)?; - write!(out, ")")?; - writeln!(out, ";")?; - - // Write the non blocking function - write!(out, " {}: func(", function.name)?; - write_param_list(&mut out, def, &function.params)?; - write!(out, ")")?; - } - writeln!(out, ";")?; + write_function_definition(&mut out, function, false, interface, def)?; } for function in &interface.static_functions { - write!(out, " {}: static func(", function.name)?; - write_param_list(&mut out, def, &function.params)?; - write!(out, ")")?; - if !function.results.is_empty() { - write!(out, " -> ")?; - match &function.results { - FunctionResultStub::Single(typ) => { - write!(out, "{}", typ.wit_type_string(&def.resolve)?)?; - } - FunctionResultStub::Multi(params) => { - write!(out, "(")?; - write_param_list(&mut out, def, params)?; - write!(out, ")")?; - } - FunctionResultStub::SelfType => { - return Err(anyhow!("Unexpected return type in wit generator")); - } - } - } - writeln!(out, ";")?; + write_function_definition(&mut out, function, true, interface, def)?; } writeln!(out, " }}")?; writeln!(out)?; @@ -182,6 +149,79 @@ pub fn get_stub_wit( Ok(out) } +fn write_function_definition( + out: &mut String, + function: &FunctionStub, + is_static: bool, + owner: &InterfaceStub, + def: &StubDefinition, +) -> anyhow::Result<()> { + let func = if is_static { "static_func" } else { "func" }; + if !function.results.is_empty() { + // Write the blocking function + write!(out, " blocking-{}: {func}(", function.name)?; + write_param_list(out, def, &function.params)?; + write!(out, ")")?; + write!(out, " -> ")?; + write_function_result_type(out, function, def)?; + writeln!(out, ";")?; + // Write the non-blocking function + write!(out, " {}: {func}(", function.name)?; + write_param_list(out, def, &function.params)?; + write!(out, ")")?; + write!(out, " -> {}", function.async_result_type(owner))?; + } else { + // Write the blocking function + write!(out, " blocking-{}: {func}(", function.name)?; + write_param_list(out, def, &function.params)?; + write!(out, ")")?; + writeln!(out, ";")?; + + // Write the non-blocking function + write!(out, " {}: {func}(", function.name)?; + write_param_list(out, def, &function.params)?; + write!(out, ")")?; + } + writeln!(out, ";")?; + Ok(()) +} + +fn write_async_return_type( + out: &mut String, + function: &FunctionStub, + owner: &InterfaceStub, + def: &StubDefinition, +) -> anyhow::Result<()> { + writeln!(out, " resource {} {{", function.async_result_type(owner))?; + writeln!(out, " subscribe: func() -> pollable;")?; + write!(out, " get: func() -> option<")?; + write_function_result_type(out, function, def)?; + writeln!(out, ">;")?; + writeln!(out, " }}")?; + Ok(()) +} + +fn write_function_result_type( + out: &mut String, + function: &FunctionStub, + def: &StubDefinition, +) -> anyhow::Result<()> { + match &function.results { + FunctionResultStub::Single(typ) => { + write!(out, "{}", typ.wit_type_string(&def.resolve)?)?; + } + FunctionResultStub::Multi(params) => { + write!(out, "(")?; + write_param_list(out, def, params)?; + write!(out, ")")?; + } + FunctionResultStub::SelfType => { + return Err(anyhow!("Unexpected return type in wit generator")); + } + } + Ok(()) +} + fn write_type_def( out: &mut String, typ: &TypeDef, @@ -529,6 +569,15 @@ pub fn copy_wit_files(def: &StubDefinition) -> anyhow::Result<()> { wasm_rpc_root.join(Path::new("wasm-rpc.wit")), golem_wasm_rpc::WASM_RPC_WIT, )?; + + let wasi_poll_root = dest_wit_root.join(Path::new("deps/io")); + fs::create_dir_all(&wasi_poll_root).unwrap(); + println!("Writing poll.wit to {}", wasi_poll_root.to_string_lossy()); + fs::write( + wasi_poll_root.join(Path::new("poll.wit")), + golem_wasm_rpc::WASI_POLL_WIT, + )?; + Ok(()) } diff --git a/wasm-rpc/Cargo.toml b/wasm-rpc/Cargo.toml index 01c7ae5b..923c712c 100644 --- a/wasm-rpc/Cargo.toml +++ b/wasm-rpc/Cargo.toml @@ -17,6 +17,7 @@ crate-type = ["cdylib", "rlib"] wit-bindgen-rt = { version = "0.26.0", features = ["bitflags"] } arbitrary = { version = "1.3.2", features = ["derive"], optional = true } +async-trait = { version = "0.1.77", optional = true } bigdecimal = { version = "0.4.5", optional = true } bincode = { version = "2.0.0-rc.3", optional = true } golem-wasm-ast = { version = "0.3.0", features = [ @@ -29,6 +30,7 @@ prost = { version = "0.12.6", optional = true } wasmtime = { version = "=21.0.1", features = [ "component-model", ], optional = true } +wasmtime-wasi = { version = "=21.0.1", optional = true } wasm-wave = { version = "=0.6.0", optional = true } [dev-dependencies] @@ -41,6 +43,7 @@ prost-build = "0.12.6" [features] default = ["host"] host = [ + "dep:async-trait", "arbitrary", "bincode", "json", @@ -58,7 +61,7 @@ serde = ["dep:serde"] stub = [] text = ["wasmtime", "dep:wasm-wave"] typeinfo = ["dep:golem-wasm-ast"] -wasmtime = ["dep:wasmtime", "typeinfo"] +wasmtime = ["dep:wasmtime", "dep:wasmtime-wasi", "typeinfo"] [package.metadata.component] @@ -66,3 +69,6 @@ package = "golem:rpc" [package.metadata.component.target] path = "wit" + +[package.metadata.component.target.dependencies] +"wasi:io" = { path = "wit/deps/io" } diff --git a/wasm-rpc/src/bindings.rs b/wasm-rpc/src/bindings.rs index 7b79ace3..eccfb785 100644 --- a/wasm-rpc/src/bindings.rs +++ b/wasm-rpc/src/bindings.rs @@ -12,6 +12,7 @@ pub mod golem { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Pollable = super::super::super::wasi::io::poll::Pollable; pub type NodeIndex = i32; #[derive(Clone)] pub struct Uri { @@ -188,6 +189,50 @@ pub mod golem { } } + #[derive(Debug)] + #[repr(transparent)] + pub struct FutureInvokeResult { + handle: _rt::Resource, + } + + impl FutureInvokeResult { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for FutureInvokeResult { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "golem:rpc/types@0.1.0")] + extern "C" { + #[link_name = "[resource-drop]future-invoke-result"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + impl WasmRpc { #[allow(unused_unsafe, clippy::all)] pub fn new(location: &Uri) -> Self { @@ -1320,223 +1365,1229 @@ pub mod golem { } } } - } - } -} -mod _rt { - pub use alloc_crate::string::String; - pub use alloc_crate::vec::Vec; - - use core::fmt; - use core::marker; - use core::sync::atomic::{AtomicU32, Ordering::Relaxed}; - - /// A type which represents a component model resource, either imported or - /// exported into this component. - /// - /// This is a low-level wrapper which handles the lifetime of the resource - /// (namely this has a destructor). The `T` provided defines the component model - /// intrinsics that this wrapper uses. - /// - /// One of the chief purposes of this type is to provide `Deref` implementations - /// to access the underlying data when it is owned. - /// - /// This type is primarily used in generated code for exported and imported - /// resources. - #[repr(transparent)] - pub struct Resource { - // NB: This would ideally be `u32` but it is not. The fact that this has - // interior mutability is not exposed in the API of this type except for the - // `take_handle` method which is supposed to in theory be private. - // - // This represents, almost all the time, a valid handle value. When it's - // invalid it's stored as `u32::MAX`. - handle: AtomicU32, - _marker: marker::PhantomData, - } - - /// A trait which all wasm resources implement, namely providing the ability to - /// drop a resource. - /// - /// This generally is implemented by generated code, not user-facing code. - #[allow(clippy::missing_safety_doc)] - pub unsafe trait WasmResource { - /// Invokes the `[resource-drop]...` intrinsic. - unsafe fn drop(handle: u32); - } - - impl Resource { - #[doc(hidden)] - pub unsafe fn from_handle(handle: u32) -> Self { - debug_assert!(handle != u32::MAX); - Self { - handle: AtomicU32::new(handle), - _marker: marker::PhantomData, - } - } - - /// Takes ownership of the handle owned by `resource`. - /// - /// Note that this ideally would be `into_handle` taking `Resource` by - /// ownership. The code generator does not enable that in all situations, - /// unfortunately, so this is provided instead. - /// - /// Also note that `take_handle` is in theory only ever called on values - /// owned by a generated function. For example a generated function might - /// take `Resource` as an argument but then call `take_handle` on a - /// reference to that argument. In that sense the dynamic nature of - /// `take_handle` should only be exposed internally to generated code, not - /// to user code. - #[doc(hidden)] - pub fn take_handle(resource: &Resource) -> u32 { - resource.handle.swap(u32::MAX, Relaxed) - } - - #[doc(hidden)] - pub fn handle(resource: &Resource) -> u32 { - resource.handle.load(Relaxed) - } - } - - impl fmt::Debug for Resource { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Resource") - .field("handle", &self.handle) - .finish() - } - } - - impl Drop for Resource { - fn drop(&mut self) { - unsafe { - match self.handle.load(Relaxed) { - // If this handle was "taken" then don't do anything in the - // destructor. - u32::MAX => {} - - // ... but otherwise do actually destroy it with the imported - // component model intrinsic as defined through `T`. - other => T::drop(other), - } - } - } - } - - pub fn as_i32(t: T) -> i32 { - t.as_i32() - } - - pub trait AsI32 { - fn as_i32(self) -> i32; - } - - impl<'a, T: Copy + AsI32> AsI32 for &'a T { - fn as_i32(self) -> i32 { - (*self).as_i32() - } - } - - impl AsI32 for i32 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for u32 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for i16 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for u16 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for i8 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for u8 { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for char { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - - impl AsI32 for usize { - #[inline] - fn as_i32(self) -> i32 { - self as i32 - } - } - pub use alloc_crate::alloc; - - pub fn as_i64(t: T) -> i64 { - t.as_i64() - } - - pub trait AsI64 { - fn as_i64(self) -> i64; - } - - impl<'a, T: Copy + AsI64> AsI64 for &'a T { - fn as_i64(self) -> i64 { - (*self).as_i64() - } - } - - impl AsI64 for i64 { - #[inline] - fn as_i64(self) -> i64 { - self as i64 - } - } - - impl AsI64 for u64 { - #[inline] - fn as_i64(self) -> i64 { - self as i64 - } - } - - pub fn as_f32(t: T) -> f32 { - t.as_f32() - } - - pub trait AsF32 { - fn as_f32(self) -> f32; - } - - impl<'a, T: Copy + AsF32> AsF32 for &'a T { - fn as_f32(self) -> f32 { - (*self).as_f32() - } - } - - impl AsF32 for f32 { - #[inline] + impl WasmRpc { + #[allow(unused_unsafe, clippy::all)] + pub fn async_invoke_and_await( + &self, + function_name: &str, + function_params: &[WitValue], + ) -> FutureInvokeResult { + unsafe { + let mut cleanup_list = _rt::Vec::new(); + let vec0 = function_name; + let ptr0 = vec0.as_ptr().cast::(); + let len0 = vec0.len(); + let vec12 = function_params; + let len12 = vec12.len(); + let layout12 = + _rt::alloc::Layout::from_size_align_unchecked(vec12.len() * 8, 4); + let result12 = if layout12.size() != 0 { + let ptr = _rt::alloc::alloc(layout12).cast::(); + if ptr.is_null() { + _rt::alloc::handle_alloc_error(layout12); + } + ptr + } else { + { + ::core::ptr::null_mut() + } + }; + for (i, e) in vec12.into_iter().enumerate() { + let base = result12.add(i * 8); + { + let WitValue { nodes: nodes1 } = e; + let vec11 = nodes1; + let len11 = vec11.len(); + let layout11 = _rt::alloc::Layout::from_size_align_unchecked( + vec11.len() * 24, + 8, + ); + let result11 = if layout11.size() != 0 { + let ptr = _rt::alloc::alloc(layout11).cast::(); + if ptr.is_null() { + _rt::alloc::handle_alloc_error(layout11); + } + ptr + } else { + { + ::core::ptr::null_mut() + } + }; + for (i, e) in vec11.into_iter().enumerate() { + let base = result11.add(i * 24); + { + match e { + WitNode::RecordValue(e) => { + *base.add(0).cast::() = (0i32) as u8; + let vec2 = e; + let ptr2 = vec2.as_ptr().cast::(); + let len2 = vec2.len(); + *base.add(12).cast::() = len2; + *base.add(8).cast::<*mut u8>() = ptr2.cast_mut(); + } + WitNode::VariantValue(e) => { + *base.add(0).cast::() = (1i32) as u8; + let (t3_0, t3_1) = e; + *base.add(8).cast::() = _rt::as_i32(t3_0); + match t3_1 { + Some(e) => { + *base.add(12).cast::() = (1i32) as u8; + *base.add(16).cast::() = + _rt::as_i32(e); + } + None => { + *base.add(12).cast::() = (0i32) as u8; + } + }; + } + WitNode::EnumValue(e) => { + *base.add(0).cast::() = (2i32) as u8; + *base.add(8).cast::() = _rt::as_i32(e); + } + WitNode::FlagsValue(e) => { + *base.add(0).cast::() = (3i32) as u8; + let vec4 = e; + let len4 = vec4.len(); + let layout4 = + _rt::alloc::Layout::from_size_align_unchecked( + vec4.len() * 1, + 1, + ); + let result4 = if layout4.size() != 0 { + let ptr = + _rt::alloc::alloc(layout4).cast::(); + if ptr.is_null() { + _rt::alloc::handle_alloc_error(layout4); + } + ptr + } else { + { + ::core::ptr::null_mut() + } + }; + for (i, e) in vec4.into_iter().enumerate() { + let base = result4.add(i * 1); + { + *base.add(0).cast::() = (match e { + true => 1, + false => 0, + }) + as u8; + } + } + *base.add(12).cast::() = len4; + *base.add(8).cast::<*mut u8>() = result4; + cleanup_list + .extend_from_slice(&[(result4, layout4)]); + } + WitNode::TupleValue(e) => { + *base.add(0).cast::() = (4i32) as u8; + let vec5 = e; + let ptr5 = vec5.as_ptr().cast::(); + let len5 = vec5.len(); + *base.add(12).cast::() = len5; + *base.add(8).cast::<*mut u8>() = ptr5.cast_mut(); + } + WitNode::ListValue(e) => { + *base.add(0).cast::() = (5i32) as u8; + let vec6 = e; + let ptr6 = vec6.as_ptr().cast::(); + let len6 = vec6.len(); + *base.add(12).cast::() = len6; + *base.add(8).cast::<*mut u8>() = ptr6.cast_mut(); + } + WitNode::OptionValue(e) => { + *base.add(0).cast::() = (6i32) as u8; + match e { + Some(e) => { + *base.add(8).cast::() = (1i32) as u8; + *base.add(12).cast::() = + _rt::as_i32(e); + } + None => { + *base.add(8).cast::() = (0i32) as u8; + } + }; + } + WitNode::ResultValue(e) => { + *base.add(0).cast::() = (7i32) as u8; + match e { + Ok(e) => { + *base.add(8).cast::() = (0i32) as u8; + match e { + Some(e) => { + *base.add(12).cast::() = + (1i32) as u8; + *base.add(16).cast::() = + _rt::as_i32(e); + } + None => { + *base.add(12).cast::() = + (0i32) as u8; + } + }; + } + Err(e) => { + *base.add(8).cast::() = (1i32) as u8; + match e { + Some(e) => { + *base.add(12).cast::() = + (1i32) as u8; + *base.add(16).cast::() = + _rt::as_i32(e); + } + None => { + *base.add(12).cast::() = + (0i32) as u8; + } + }; + } + }; + } + WitNode::PrimU8(e) => { + *base.add(0).cast::() = (8i32) as u8; + *base.add(8).cast::() = (_rt::as_i32(e)) as u8; + } + WitNode::PrimU16(e) => { + *base.add(0).cast::() = (9i32) as u8; + *base.add(8).cast::() = + (_rt::as_i32(e)) as u16; + } + WitNode::PrimU32(e) => { + *base.add(0).cast::() = (10i32) as u8; + *base.add(8).cast::() = _rt::as_i32(e); + } + WitNode::PrimU64(e) => { + *base.add(0).cast::() = (11i32) as u8; + *base.add(8).cast::() = _rt::as_i64(e); + } + WitNode::PrimS8(e) => { + *base.add(0).cast::() = (12i32) as u8; + *base.add(8).cast::() = (_rt::as_i32(e)) as u8; + } + WitNode::PrimS16(e) => { + *base.add(0).cast::() = (13i32) as u8; + *base.add(8).cast::() = + (_rt::as_i32(e)) as u16; + } + WitNode::PrimS32(e) => { + *base.add(0).cast::() = (14i32) as u8; + *base.add(8).cast::() = _rt::as_i32(e); + } + WitNode::PrimS64(e) => { + *base.add(0).cast::() = (15i32) as u8; + *base.add(8).cast::() = _rt::as_i64(e); + } + WitNode::PrimFloat32(e) => { + *base.add(0).cast::() = (16i32) as u8; + *base.add(8).cast::() = _rt::as_f32(e); + } + WitNode::PrimFloat64(e) => { + *base.add(0).cast::() = (17i32) as u8; + *base.add(8).cast::() = _rt::as_f64(e); + } + WitNode::PrimChar(e) => { + *base.add(0).cast::() = (18i32) as u8; + *base.add(8).cast::() = _rt::as_i32(e); + } + WitNode::PrimBool(e) => { + *base.add(0).cast::() = (19i32) as u8; + *base.add(8).cast::() = (match e { + true => 1, + false => 0, + }) + as u8; + } + WitNode::PrimString(e) => { + *base.add(0).cast::() = (20i32) as u8; + let vec7 = e; + let ptr7 = vec7.as_ptr().cast::(); + let len7 = vec7.len(); + *base.add(12).cast::() = len7; + *base.add(8).cast::<*mut u8>() = ptr7.cast_mut(); + } + WitNode::Handle(e) => { + *base.add(0).cast::() = (21i32) as u8; + let (t8_0, t8_1) = e; + let Uri { value: value9 } = t8_0; + let vec10 = value9; + let ptr10 = vec10.as_ptr().cast::(); + let len10 = vec10.len(); + *base.add(12).cast::() = len10; + *base.add(8).cast::<*mut u8>() = ptr10.cast_mut(); + *base.add(16).cast::() = _rt::as_i64(t8_1); + } + } + } + } + *base.add(4).cast::() = len11; + *base.add(0).cast::<*mut u8>() = result11; + cleanup_list.extend_from_slice(&[(result11, layout11)]); + } + } + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "golem:rpc/types@0.1.0")] + extern "C" { + #[link_name = "[method]wasm-rpc.async-invoke-and-await"] + fn wit_import( + _: i32, + _: *mut u8, + _: usize, + _: *mut u8, + _: usize, + ) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8, _: usize, _: *mut u8, _: usize) -> i32 { + unreachable!() + } + let ret = wit_import( + (self).handle() as i32, + ptr0.cast_mut(), + len0, + result12, + len12, + ); + if layout12.size() != 0 { + _rt::alloc::dealloc(result12.cast(), layout12); + } + for (ptr, layout) in cleanup_list { + if layout.size() != 0 { + _rt::alloc::dealloc(ptr.cast(), layout); + } + } + FutureInvokeResult::from_handle(ret as u32) + } + } + } + impl FutureInvokeResult { + #[allow(unused_unsafe, clippy::all)] + pub fn subscribe(&self) -> Pollable { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "golem:rpc/types@0.1.0")] + extern "C" { + #[link_name = "[method]future-invoke-result.subscribe"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wasi::io::poll::Pollable::from_handle(ret as u32) + } + } + } + impl FutureInvokeResult { + #[allow(unused_unsafe, clippy::all)] + pub fn get(&self) -> Option> { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 20]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 20]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "golem:rpc/types@0.1.0")] + extern "C" { + #[link_name = "[method]future-invoke-result.get"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = i32::from(*ptr0.add(0).cast::()); + match l1 { + 0 => None, + 1 => { + let e = { + let l2 = i32::from(*ptr0.add(4).cast::()); + + match l2 { + 0 => { + let e = { + let l3 = *ptr0.add(8).cast::<*mut u8>(); + let l4 = *ptr0.add(12).cast::(); + let base50 = l3; + let len50 = l4; + let mut result50 = _rt::Vec::with_capacity(len50); + for i in 0..len50 { + let base = base50.add(i * 24); + let e50 = { + let l5 = + i32::from(*base.add(0).cast::()); + let v49 = match l5 { + 0 => { + let e49 = { + let l6 = *base + .add(8) + .cast::<*mut u8>(); + let l7 = *base + .add(12) + .cast::(); + let len8 = l7; + + _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ) + }; + WitNode::RecordValue(e49) + } + 1 => { + let e49 = { + let l9 = + *base.add(8).cast::(); + let l10 = i32::from( + *base.add(12).cast::(), + ); + + (l9 as u32, match l10 { + 0 => None, + 1 => { + let e = { + let l11 = *base.add(16).cast::(); + + l11 + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + }) + }; + WitNode::VariantValue(e49) + } + 2 => { + let e49 = { + let l12 = + *base.add(8).cast::(); + + l12 as u32 + }; + WitNode::EnumValue(e49) + } + 3 => { + let e49 = { + let l13 = *base + .add(8) + .cast::<*mut u8>(); + let l14 = *base + .add(12) + .cast::(); + let base16 = l13; + let len16 = l14; + let mut result16 = + _rt::Vec::with_capacity( + len16, + ); + for i in 0..len16 { + let base = + base16.add(i * 1); + let e16 = { + let l15 = i32::from( + *base + .add(0) + .cast::(), + ); + + _rt::bool_lift( + l15 as u8, + ) + }; + result16.push(e16); + } + _rt::cabi_dealloc( + base16, + len16 * 1, + 1, + ); + + result16 + }; + WitNode::FlagsValue(e49) + } + 4 => { + let e49 = { + let l17 = *base + .add(8) + .cast::<*mut u8>(); + let l18 = *base + .add(12) + .cast::(); + let len19 = l18; + + _rt::Vec::from_raw_parts( + l17.cast(), + len19, + len19, + ) + }; + WitNode::TupleValue(e49) + } + 5 => { + let e49 = { + let l20 = *base + .add(8) + .cast::<*mut u8>(); + let l21 = *base + .add(12) + .cast::(); + let len22 = l21; + + _rt::Vec::from_raw_parts( + l20.cast(), + len22, + len22, + ) + }; + WitNode::ListValue(e49) + } + 6 => { + let e49 = { + let l23 = i32::from( + *base.add(8).cast::(), + ); + + match l23 { + 0 => None, + 1 => { + let e = { + let l24 = *base.add(12).cast::(); + + l24 + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + WitNode::OptionValue(e49) + } + 7 => { + let e49 = { + let l25 = i32::from( + *base.add(8).cast::(), + ); + + match l25 { + 0 => { + let e = { + let l26 = i32::from(*base.add(12).cast::()); + + match l26 { + 0 => None, + 1 => { + let e = { + let l27 = *base.add(16).cast::(); + + l27 + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + Ok(e) + } + 1 => { + let e = { + let l28 = i32::from(*base.add(12).cast::()); + + match l28 { + 0 => None, + 1 => { + let e = { + let l29 = *base.add(16).cast::(); + + l29 + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + Err(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + WitNode::ResultValue(e49) + } + 8 => { + let e49 = { + let l30 = i32::from( + *base.add(8).cast::(), + ); + + l30 as u8 + }; + WitNode::PrimU8(e49) + } + 9 => { + let e49 = { + let l31 = i32::from( + *base.add(8).cast::(), + ); + + l31 as u16 + }; + WitNode::PrimU16(e49) + } + 10 => { + let e49 = { + let l32 = + *base.add(8).cast::(); + + l32 as u32 + }; + WitNode::PrimU32(e49) + } + 11 => { + let e49 = { + let l33 = + *base.add(8).cast::(); + + l33 as u64 + }; + WitNode::PrimU64(e49) + } + 12 => { + let e49 = { + let l34 = i32::from( + *base.add(8).cast::(), + ); + + l34 as i8 + }; + WitNode::PrimS8(e49) + } + 13 => { + let e49 = { + let l35 = i32::from( + *base.add(8).cast::(), + ); + + l35 as i16 + }; + WitNode::PrimS16(e49) + } + 14 => { + let e49 = { + let l36 = + *base.add(8).cast::(); + + l36 + }; + WitNode::PrimS32(e49) + } + 15 => { + let e49 = { + let l37 = + *base.add(8).cast::(); + + l37 + }; + WitNode::PrimS64(e49) + } + 16 => { + let e49 = { + let l38 = + *base.add(8).cast::(); + + l38 + }; + WitNode::PrimFloat32(e49) + } + 17 => { + let e49 = { + let l39 = + *base.add(8).cast::(); + + l39 + }; + WitNode::PrimFloat64(e49) + } + 18 => { + let e49 = { + let l40 = + *base.add(8).cast::(); + + _rt::char_lift(l40 as u32) + }; + WitNode::PrimChar(e49) + } + 19 => { + let e49 = { + let l41 = i32::from( + *base.add(8).cast::(), + ); + + _rt::bool_lift(l41 as u8) + }; + WitNode::PrimBool(e49) + } + 20 => { + let e49 = { + let l42 = *base + .add(8) + .cast::<*mut u8>(); + let l43 = *base + .add(12) + .cast::(); + let len44 = l43; + let bytes44 = + _rt::Vec::from_raw_parts( + l42.cast(), + len44, + len44, + ); + + _rt::string_lift(bytes44) + }; + WitNode::PrimString(e49) + } + n => { + debug_assert_eq!( + n, 21, + "invalid enum discriminant" + ); + let e49 = { + let l45 = *base + .add(8) + .cast::<*mut u8>(); + let l46 = *base + .add(12) + .cast::(); + let len47 = l46; + let bytes47 = + _rt::Vec::from_raw_parts( + l45.cast(), + len47, + len47, + ); + let l48 = + *base.add(16).cast::(); + + ( + Uri { + value: _rt::string_lift( + bytes47, + ), + }, + l48 as u64, + ) + }; + WitNode::Handle(e49) + } + }; + + v49 + }; + result50.push(e50); + } + _rt::cabi_dealloc(base50, len50 * 24, 8); + + WitValue { nodes: result50 } + }; + Ok(e) + } + 1 => { + let e = { + let l51 = i32::from(*ptr0.add(8).cast::()); + let v64 = match l51 { + 0 => { + let e64 = { + let l52 = + *ptr0.add(12).cast::<*mut u8>(); + let l53 = *ptr0.add(16).cast::(); + let len54 = l53; + let bytes54 = _rt::Vec::from_raw_parts( + l52.cast(), + len54, + len54, + ); + + _rt::string_lift(bytes54) + }; + RpcError::ProtocolError(e64) + } + 1 => { + let e64 = { + let l55 = + *ptr0.add(12).cast::<*mut u8>(); + let l56 = *ptr0.add(16).cast::(); + let len57 = l56; + let bytes57 = _rt::Vec::from_raw_parts( + l55.cast(), + len57, + len57, + ); + + _rt::string_lift(bytes57) + }; + RpcError::Denied(e64) + } + 2 => { + let e64 = { + let l58 = + *ptr0.add(12).cast::<*mut u8>(); + let l59 = *ptr0.add(16).cast::(); + let len60 = l59; + let bytes60 = _rt::Vec::from_raw_parts( + l58.cast(), + len60, + len60, + ); + + _rt::string_lift(bytes60) + }; + RpcError::NotFound(e64) + } + n => { + debug_assert_eq!( + n, 3, + "invalid enum discriminant" + ); + let e64 = { + let l61 = + *ptr0.add(12).cast::<*mut u8>(); + let l62 = *ptr0.add(16).cast::(); + let len63 = l62; + let bytes63 = _rt::Vec::from_raw_parts( + l61.cast(), + len63, + len63, + ); + + _rt::string_lift(bytes63) + }; + RpcError::RemoteInternalError(e64) + } + }; + + v64 + }; + Err(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + } + } + } + } + } +} +#[allow(dead_code)] +pub mod wasi { + #[allow(dead_code)] + pub mod io { + #[allow(dead_code, clippy::all)] + pub mod poll { + #[used] + #[doc(hidden)] + #[cfg(target_arch = "wasm32")] + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; + use super::super::super::_rt; + /// `pollable` epresents a single I/O event which may be ready, or not. + + #[derive(Debug)] + #[repr(transparent)] + pub struct Pollable { + handle: _rt::Resource, + } + + impl Pollable { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Pollable { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "wasi:io/poll@0.2.0")] + extern "C" { + #[link_name = "[resource-drop]pollable"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + impl Pollable { + #[allow(unused_unsafe, clippy::all)] + /// Return the readiness of a pollable. This function never blocks. + /// + /// Returns `true` when the pollable is ready, and `false` otherwise. + pub fn ready(&self) -> bool { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "wasi:io/poll@0.2.0")] + extern "C" { + #[link_name = "[method]pollable.ready"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + _rt::bool_lift(ret as u8) + } + } + } + impl Pollable { + #[allow(unused_unsafe, clippy::all)] + /// `block` returns immediately if the pollable is ready, and otherwise + /// blocks until ready. + /// + /// This function is equivalent to calling `poll.poll` on a list + /// containing only this pollable. + pub fn block(&self) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "wasi:io/poll@0.2.0")] + extern "C" { + #[link_name = "[method]pollable.block"] + fn wit_import(_: i32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) { + unreachable!() + } + wit_import((self).handle() as i32); + } + } + } + #[allow(unused_unsafe, clippy::all)] + /// Poll for completion on a set of pollables. + /// + /// This function takes a list of pollables, which identify I/O sources of + /// interest, and waits until one or more of the events is ready for I/O. + /// + /// The result `list` contains one or more indices of handles in the + /// argument list that is ready for I/O. + /// + /// If the list contains more elements than can be indexed with a `u32` + /// value, this function traps. + /// + /// A timeout can be implemented by adding a pollable from the + /// wasi-clocks API to the list. + /// + /// This function does not return a `result`; polling in itself does not + /// do any I/O so it doesn't fail. If any of the I/O sources identified by + /// the pollables has an error, it is indicated by marking the source as + /// being reaedy for I/O. + pub fn poll(in_: &[&Pollable]) -> _rt::Vec { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let vec0 = in_; + let len0 = vec0.len(); + let layout0 = _rt::alloc::Layout::from_size_align_unchecked(vec0.len() * 4, 4); + let result0 = if layout0.size() != 0 { + let ptr = _rt::alloc::alloc(layout0).cast::(); + if ptr.is_null() { + _rt::alloc::handle_alloc_error(layout0); + } + ptr + } else { + { + ::core::ptr::null_mut() + } + }; + for (i, e) in vec0.into_iter().enumerate() { + let base = result0.add(i * 4); + { + *base.add(0).cast::() = (e).handle() as i32; + } + } + let ptr1 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "wasi:io/poll@0.2.0")] + extern "C" { + #[link_name = "poll"] + fn wit_import(_: *mut u8, _: usize, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: *mut u8, _: usize, _: *mut u8) { + unreachable!() + } + wit_import(result0, len0, ptr1); + let l2 = *ptr1.add(0).cast::<*mut u8>(); + let l3 = *ptr1.add(4).cast::(); + let len4 = l3; + if layout0.size() != 0 { + _rt::alloc::dealloc(result0.cast(), layout0); + } + _rt::Vec::from_raw_parts(l2.cast(), len4, len4) + } + } + } + } +} +mod _rt { + + use core::fmt; + use core::marker; + use core::sync::atomic::{AtomicU32, Ordering::Relaxed}; + + /// A type which represents a component model resource, either imported or + /// exported into this component. + /// + /// This is a low-level wrapper which handles the lifetime of the resource + /// (namely this has a destructor). The `T` provided defines the component model + /// intrinsics that this wrapper uses. + /// + /// One of the chief purposes of this type is to provide `Deref` implementations + /// to access the underlying data when it is owned. + /// + /// This type is primarily used in generated code for exported and imported + /// resources. + #[repr(transparent)] + pub struct Resource { + // NB: This would ideally be `u32` but it is not. The fact that this has + // interior mutability is not exposed in the API of this type except for the + // `take_handle` method which is supposed to in theory be private. + // + // This represents, almost all the time, a valid handle value. When it's + // invalid it's stored as `u32::MAX`. + handle: AtomicU32, + _marker: marker::PhantomData, + } + + /// A trait which all wasm resources implement, namely providing the ability to + /// drop a resource. + /// + /// This generally is implemented by generated code, not user-facing code. + #[allow(clippy::missing_safety_doc)] + pub unsafe trait WasmResource { + /// Invokes the `[resource-drop]...` intrinsic. + unsafe fn drop(handle: u32); + } + + impl Resource { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + debug_assert!(handle != u32::MAX); + Self { + handle: AtomicU32::new(handle), + _marker: marker::PhantomData, + } + } + + /// Takes ownership of the handle owned by `resource`. + /// + /// Note that this ideally would be `into_handle` taking `Resource` by + /// ownership. The code generator does not enable that in all situations, + /// unfortunately, so this is provided instead. + /// + /// Also note that `take_handle` is in theory only ever called on values + /// owned by a generated function. For example a generated function might + /// take `Resource` as an argument but then call `take_handle` on a + /// reference to that argument. In that sense the dynamic nature of + /// `take_handle` should only be exposed internally to generated code, not + /// to user code. + #[doc(hidden)] + pub fn take_handle(resource: &Resource) -> u32 { + resource.handle.swap(u32::MAX, Relaxed) + } + + #[doc(hidden)] + pub fn handle(resource: &Resource) -> u32 { + resource.handle.load(Relaxed) + } + } + + impl fmt::Debug for Resource { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Resource") + .field("handle", &self.handle) + .finish() + } + } + + impl Drop for Resource { + fn drop(&mut self) { + unsafe { + match self.handle.load(Relaxed) { + // If this handle was "taken" then don't do anything in the + // destructor. + u32::MAX => {} + + // ... but otherwise do actually destroy it with the imported + // component model intrinsic as defined through `T`. + other => T::drop(other), + } + } + } + } + pub unsafe fn bool_lift(val: u8) -> bool { + if cfg!(debug_assertions) { + match val { + 0 => false, + 1 => true, + _ => panic!("invalid bool discriminant"), + } + } else { + val != 0 + } + } + pub use alloc_crate::alloc; + pub use alloc_crate::string::String; + pub use alloc_crate::vec::Vec; + + pub fn as_i32(t: T) -> i32 { + t.as_i32() + } + + pub trait AsI32 { + fn as_i32(self) -> i32; + } + + impl<'a, T: Copy + AsI32> AsI32 for &'a T { + fn as_i32(self) -> i32 { + (*self).as_i32() + } + } + + impl AsI32 for i32 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for u32 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for i16 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for u16 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for i8 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for u8 { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for char { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + impl AsI32 for usize { + #[inline] + fn as_i32(self) -> i32 { + self as i32 + } + } + + pub fn as_i64(t: T) -> i64 { + t.as_i64() + } + + pub trait AsI64 { + fn as_i64(self) -> i64; + } + + impl<'a, T: Copy + AsI64> AsI64 for &'a T { + fn as_i64(self) -> i64 { + (*self).as_i64() + } + } + + impl AsI64 for i64 { + #[inline] + fn as_i64(self) -> i64 { + self as i64 + } + } + + impl AsI64 for u64 { + #[inline] + fn as_i64(self) -> i64 { + self as i64 + } + } + + pub fn as_f32(t: T) -> f32 { + t.as_f32() + } + + pub trait AsF32 { + fn as_f32(self) -> f32; + } + + impl<'a, T: Copy + AsF32> AsF32 for &'a T { + fn as_f32(self) -> f32 { + (*self).as_f32() + } + } + + impl AsF32 for f32 { + #[inline] fn as_f32(self) -> f32 { self as f32 } @@ -1569,17 +2620,6 @@ mod _rt { core::hint::unreachable_unchecked() } } - pub unsafe fn bool_lift(val: u8) -> bool { - if cfg!(debug_assertions) { - match val { - 0 => false, - 1 => true, - _ => panic!("invalid bool discriminant"), - } - } else { - val != 0 - } - } pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) { if size == 0 { return; @@ -1607,27 +2647,35 @@ mod _rt { #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:wit-value:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 910] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x8e\x06\x01A\x02\x01\ -A\x02\x01B\x1d\x01z\x04\0\x0anode-index\x03\0\0\x01r\x01\x05values\x04\0\x03uri\x03\ -\0\x02\x01p\x01\x01k\x01\x01o\x02y\x05\x01p\x7f\x01j\x01\x05\x01\x05\x01o\x02\x03\ -w\x01q\x16\x0crecord-value\x01\x04\0\x0dvariant-value\x01\x06\0\x0aenum-value\x01\ -y\0\x0bflags-value\x01\x07\0\x0btuple-value\x01\x04\0\x0alist-value\x01\x04\0\x0c\ -option-value\x01\x05\0\x0cresult-value\x01\x08\0\x07prim-u8\x01}\0\x08prim-u16\x01\ -{\0\x08prim-u32\x01y\0\x08prim-u64\x01w\0\x07prim-s8\x01~\0\x08prim-s16\x01|\0\x08\ -prim-s32\x01z\0\x08prim-s64\x01x\0\x0cprim-float32\x01v\0\x0cprim-float64\x01u\0\ -\x09prim-char\x01t\0\x09prim-bool\x01\x7f\0\x0bprim-string\x01s\0\x06handle\x01\x09\ -\0\x04\0\x08wit-node\x03\0\x0a\x01p\x0b\x01r\x01\x05nodes\x0c\x04\0\x09wit-value\ -\x03\0\x0d\x01q\x04\x0eprotocol-error\x01s\0\x06denied\x01s\0\x09not-found\x01s\0\ -\x15remote-internal-error\x01s\0\x04\0\x09rpc-error\x03\0\x0f\x04\0\x08wasm-rpc\x03\ -\x01\x01i\x11\x01@\x01\x08location\x03\0\x12\x04\0\x15[constructor]wasm-rpc\x01\x13\ -\x01h\x11\x01p\x0e\x01j\x01\x0e\x01\x10\x01@\x03\x04self\x14\x0dfunction-names\x0f\ -function-params\x15\0\x16\x04\0![method]wasm-rpc.invoke-and-await\x01\x17\x01j\0\ -\x01\x10\x01@\x03\x04self\x14\x0dfunction-names\x0ffunction-params\x15\0\x18\x04\ -\0\x17[method]wasm-rpc.invoke\x01\x19\x03\x01\x15golem:rpc/types@0.1.0\x05\0\x04\ -\x01\x19golem:rpc/wit-value@0.1.0\x04\0\x0b\x0f\x01\0\x09wit-value\x03\0\0\0G\x09\ -producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rus\ -t\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 1310] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x9e\x09\x01A\x02\x01\ +A\x05\x01B\x0a\x04\0\x08pollable\x03\x01\x01h\0\x01@\x01\x04self\x01\0\x7f\x04\0\ +\x16[method]pollable.ready\x01\x02\x01@\x01\x04self\x01\x01\0\x04\0\x16[method]p\ +ollable.block\x01\x03\x01p\x01\x01py\x01@\x01\x02in\x04\0\x05\x04\0\x04poll\x01\x06\ +\x03\x01\x12wasi:io/poll@0.2.0\x05\0\x02\x03\0\0\x08pollable\x01B*\x02\x03\x02\x01\ +\x01\x04\0\x08pollable\x03\0\0\x01z\x04\0\x0anode-index\x03\0\x02\x01r\x01\x05va\ +lues\x04\0\x03uri\x03\0\x04\x01p\x03\x01k\x03\x01o\x02y\x07\x01p\x7f\x01j\x01\x07\ +\x01\x07\x01o\x02\x05w\x01q\x16\x0crecord-value\x01\x06\0\x0dvariant-value\x01\x08\ +\0\x0aenum-value\x01y\0\x0bflags-value\x01\x09\0\x0btuple-value\x01\x06\0\x0alis\ +t-value\x01\x06\0\x0coption-value\x01\x07\0\x0cresult-value\x01\x0a\0\x07prim-u8\ +\x01}\0\x08prim-u16\x01{\0\x08prim-u32\x01y\0\x08prim-u64\x01w\0\x07prim-s8\x01~\ +\0\x08prim-s16\x01|\0\x08prim-s32\x01z\0\x08prim-s64\x01x\0\x0cprim-float32\x01v\ +\0\x0cprim-float64\x01u\0\x09prim-char\x01t\0\x09prim-bool\x01\x7f\0\x0bprim-str\ +ing\x01s\0\x06handle\x01\x0b\0\x04\0\x08wit-node\x03\0\x0c\x01p\x0d\x01r\x01\x05\ +nodes\x0e\x04\0\x09wit-value\x03\0\x0f\x01q\x04\x0eprotocol-error\x01s\0\x06deni\ +ed\x01s\0\x09not-found\x01s\0\x15remote-internal-error\x01s\0\x04\0\x09rpc-error\ +\x03\0\x11\x04\0\x08wasm-rpc\x03\x01\x04\0\x14future-invoke-result\x03\x01\x01i\x13\ +\x01@\x01\x08location\x05\0\x15\x04\0\x15[constructor]wasm-rpc\x01\x16\x01h\x13\x01\ +p\x10\x01j\x01\x10\x01\x12\x01@\x03\x04self\x17\x0dfunction-names\x0ffunction-pa\ +rams\x18\0\x19\x04\0![method]wasm-rpc.invoke-and-await\x01\x1a\x01j\0\x01\x12\x01\ +@\x03\x04self\x17\x0dfunction-names\x0ffunction-params\x18\0\x1b\x04\0\x17[metho\ +d]wasm-rpc.invoke\x01\x1c\x01i\x14\x01@\x03\x04self\x17\x0dfunction-names\x0ffun\ +ction-params\x18\0\x1d\x04\0'[method]wasm-rpc.async-invoke-and-await\x01\x1e\x01\ +h\x14\x01i\x01\x01@\x01\x04self\x1f\0\x20\x04\0&[method]future-invoke-result.sub\ +scribe\x01!\x01k\x19\x01@\x01\x04self\x1f\0\"\x04\0\x20[method]future-invoke-res\ +ult.get\x01#\x03\x01\x15golem:rpc/types@0.1.0\x05\x02\x04\x01\x19golem:rpc/wit-v\ +alue@0.1.0\x04\0\x0b\x0f\x01\0\x09wit-value\x03\0\0\0G\x09producers\x01\x0cproce\ +ssed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm-rpc/src/lib.rs b/wasm-rpc/src/lib.rs index 5c9b5a82..3df591c7 100644 --- a/wasm-rpc/src/lib.rs +++ b/wasm-rpc/src/lib.rs @@ -54,11 +54,19 @@ pub use extractor::{WitNodePointer, WitValueExtractor}; #[cfg(not(feature = "host"))] #[cfg(feature = "stub")] -pub use bindings::golem::rpc::types::{NodeIndex, RpcError, Uri, WasmRpc, WitNode, WitValue}; +pub use bindings::golem::rpc::types::{ + FutureInvokeResult, NodeIndex, RpcError, Uri, WasmRpc, WitNode, WitValue, +}; +#[cfg(not(feature = "host"))] +#[cfg(feature = "stub")] +pub use bindings::wasi::io::poll::Pollable; #[cfg(feature = "host")] use ::wasmtime::component::bindgen; +#[cfg(feature = "host")] +pub use wasmtime_wasi::Pollable; + #[cfg(feature = "host")] bindgen!({ path: "wit", @@ -69,7 +77,9 @@ bindgen!({ async: true, trappable_imports: true, with: { - "golem:rpc/types/wasm-rpc": WasmRpcEntry + "golem:rpc/types/wasm-rpc": WasmRpcEntry, + "golem:rpc/types/future-invoke-result": FutureInvokeResultEntry, + "wasi:io/poll/pollable": Pollable, } }); @@ -81,6 +91,27 @@ pub struct WasmRpcEntry { pub payload: Box, } +#[cfg(feature = "host")] +#[async_trait::async_trait] +pub trait SubscribeAny: std::any::Any { + async fn ready(&mut self); + fn as_any(&self) -> &dyn std::any::Any; + fn as_any_mut(&mut self) -> &mut dyn std::any::Any; +} + +#[cfg(feature = "host")] +pub struct FutureInvokeResultEntry { + pub payload: Box, +} + +#[cfg(feature = "host")] +#[async_trait::async_trait] +impl wasmtime_wasi::Subscribe for FutureInvokeResultEntry { + async fn ready(&mut self) { + self.payload.ready().await + } +} + #[cfg(feature = "typeinfo")] pub use type_annotated_value::*; @@ -322,6 +353,8 @@ impl<'a> arbitrary::Arbitrary<'a> for WitValue { #[cfg(feature = "host")] pub const WASM_RPC_WIT: &str = include_str!("../wit/wasm-rpc.wit"); +#[cfg(feature = "host")] +pub const WASI_POLL_WIT: &str = include_str!("../wit/deps/io/poll.wit"); pub const WASM_RPC_VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/wasm-rpc/wit/deps/io/poll.wit b/wasm-rpc/wit/deps/io/poll.wit new file mode 100644 index 00000000..82fa0f31 --- /dev/null +++ b/wasm-rpc/wit/deps/io/poll.wit @@ -0,0 +1,41 @@ +package wasi:io@0.2.0; + +/// A poll API intended to let users wait for I/O events on multiple handles +/// at once. +interface poll { + /// `pollable` epresents a single I/O event which may be ready, or not. + resource pollable { + + /// Return the readiness of a pollable. This function never blocks. + /// + /// Returns `true` when the pollable is ready, and `false` otherwise. + ready: func() -> bool; + + /// `block` returns immediately if the pollable is ready, and otherwise + /// blocks until ready. + /// + /// This function is equivalent to calling `poll.poll` on a list + /// containing only this pollable. + block: func(); + } + + /// Poll for completion on a set of pollables. + /// + /// This function takes a list of pollables, which identify I/O sources of + /// interest, and waits until one or more of the events is ready for I/O. + /// + /// The result `list` contains one or more indices of handles in the + /// argument list that is ready for I/O. + /// + /// If the list contains more elements than can be indexed with a `u32` + /// value, this function traps. + /// + /// A timeout can be implemented by adding a pollable from the + /// wasi-clocks API to the list. + /// + /// This function does not return a `result`; polling in itself does not + /// do any I/O so it doesn't fail. If any of the I/O sources identified by + /// the pollables has an error, it is indicated by marking the source as + /// being reaedy for I/O. + poll: func(in: list>) -> list; +} diff --git a/wasm-rpc/wit/wasm-rpc.wit b/wasm-rpc/wit/wasm-rpc.wit index 8e31847b..69e1c8d4 100644 --- a/wasm-rpc/wit/wasm-rpc.wit +++ b/wasm-rpc/wit/wasm-rpc.wit @@ -1,6 +1,8 @@ package golem:rpc@0.1.0; interface types { + use wasi:io/poll@0.2.0.{pollable}; + type node-index = s32; record wit-value { @@ -48,6 +50,13 @@ interface types { invoke-and-await: func(function-name: string, function-params: list) -> result; invoke: func(function-name: string, function-params: list) -> result<_, rpc-error>; + + async-invoke-and-await: func(function-name: string, function-params: list) -> future-invoke-result; + } + + resource future-invoke-result { + subscribe: func() -> pollable; + get: func() -> option>; } }