From 163bcae6de2900be37e5f8bf4baebc0f902e05e5 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Wed, 20 Mar 2024 11:57:03 -0700 Subject: [PATCH] new: Support proto v0.32. (#24) --- CHANGELOG.md | 6 + Cargo.lock | 273 +++++++++++++++++++++-------------------- Cargo.toml | 10 +- tests/download_test.rs | 44 ++----- tests/globals_test.rs | 4 - tests/metadata_test.rs | 5 +- tests/shims_test.rs | 7 +- tests/versions_test.rs | 25 ++-- 8 files changed, 182 insertions(+), 192 deletions(-) delete mode 100644 tests/globals_test.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index d769b52..dcc8e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.9.1 + +#### 🚀 Updates + +- Updated to support proto v0.32 release. + ## 0.9.0 #### 💥 Breaking diff --git a/Cargo.lock b/Cargo.lock index 04fce5f..c6c9892 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,9 @@ checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" [[package]] name = "assert_cmd" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00ad3f3a942eee60335ab4342358c161ee296829e0d16ff42fc1d6cb07815467" +checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" dependencies = [ "anstyle", "bstr", @@ -124,7 +124,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -154,6 +154,12 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bincode" version = "1.3.3" @@ -163,6 +169,17 @@ dependencies = [ "serde", ] +[[package]] +name = "binstall-tar" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01db907e07c37309ea816c183ffe548daaa66ef640a291408f232d6ca4089dbb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -691,7 +708,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -713,7 +730,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -865,9 +882,9 @@ dependencies = [ [[package]] name = "extism" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360c0823a0e303eb0b5bdb1125a5dae0867a77bfc533bd7e306b5989a53aab6" +checksum = "2687bfd28990a4725ddaf8a4374bff6d2debfd239d0fd6e55e2a7f476c5aec99" dependencies = [ "anyhow", "cbindgen", @@ -878,7 +895,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "toml 0.8.10", + "toml 0.8.12", "tracing", "tracing-subscriber", "ureq", @@ -890,12 +907,12 @@ dependencies = [ [[package]] name = "extism-convert" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e78a2317936c20806cb60fa98c15dcc5ccf43458e4cbddad3c6cce17a05b31c" +checksum = "a63bfc6d371d3b51d6094fd96c4c32a084ceefece3b4f4b328f30067d29da064" dependencies = [ "anyhow", - "base64", + "base64 0.22.0", "bytemuck", "extism-convert-macros", "prost", @@ -906,24 +923,24 @@ dependencies = [ [[package]] name = "extism-convert-macros" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d190cc0c058346b7750868de96dab17e047e7588ec91691a29b6db4eafd51a7e" +checksum = "519ccf960500c87244bef99caf8e58222ac95bf1abb06a32f5217b4788857aa6" dependencies = [ "manyhow", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "extism-manifest" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08af46dc0633e0874e6c1a66ac1226bf2fad6fa67568538238af8b316569d06" +checksum = "05c7d16695dc6b72418e23b58c943411a08264332af403ae9870997b4d495c3d" dependencies = [ - "base64", + "base64 0.22.0", "serde", "serde_json", ] @@ -935,7 +952,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f9a87d636d30b75e697642dd4f6cff2054db5a7a5d69d6601041a76265bb681" dependencies = [ "anyhow", - "base64", + "base64 0.21.2", "extism-convert", "extism-manifest", "extism-pdk-derive", @@ -951,7 +968,7 @@ checksum = "d83995c2023720a0fd5ef2a349c89c1670efb37a979228b0218705f5ddb50d4b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1036,12 +1053,12 @@ dependencies = [ [[package]] name = "fs4" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" +checksum = "57b1e34e369d7f0151309821497440bd0266b86c77ccd69717c3b67e5eaeffe4" dependencies = [ "rustix 0.38.8", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1088,7 +1105,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1162,7 +1179,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1199,7 +1216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 2.2.3", + "indexmap 2.2.5", "stable_deref_trait", ] @@ -1441,9 +1458,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown 0.14.2", @@ -1452,9 +1469,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.34.0" +version = "1.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" +checksum = "0a7c22c4d34ef4788c351e971c52bfdfe7ea2766f8c5466bc175dd46e52ac22e" dependencies = [ "console", "lazy_static", @@ -1660,7 +1677,7 @@ dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1715,10 +1732,11 @@ dependencies = [ [[package]] name = "miette" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baed61d13cc3723ee6dbed730a82bfacedc60a85d81da2d77e9c3e8ebc0b504a" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ + "cfg-if", "miette-derive", "thiserror", "unicode-width", @@ -1726,13 +1744,13 @@ dependencies = [ [[package]] name = "miette-derive" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301c3f54f98abc6c212ee722f5e5c62e472a334415840669e356f04850051ec" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1846,7 +1864,7 @@ checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "crc32fast", "hashbrown 0.14.2", - "indexmap 2.2.3", + "indexmap 2.2.5", "memchr", ] @@ -2049,18 +2067,18 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "proto_core" -version = "0.31.2" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9901b14a4c9681199ae9a22e04374d14c03fc3c30608d64f844a14a2f44506ff" +checksum = "db090ec8043a89e8bd797cbe2abf562af31d03d684d81d44baf759036be9309e" dependencies = [ "cached", "human-sort", - "indexmap 2.2.3", + "indexmap 2.2.5", "miette", "minisign-verify", "once_cell", @@ -2083,15 +2101,16 @@ dependencies = [ "thiserror", "tracing", "url", + "uuid", "version_spec", "warpgate", ] [[package]] name = "proto_pdk" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d296af01babbdc7f81b493f99ba36aabb75407f6025a76ea3ed25b7fda77ca07" +checksum = "744304f2cd3dbf1928eeffaad5538f98d2ca84a8a8e3ab107418bb7b0b277ce0" dependencies = [ "extism-pdk", "proto_pdk_api", @@ -2102,9 +2121,9 @@ dependencies = [ [[package]] name = "proto_pdk_api" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de1e28d245d8af9d8dae9a77647beea080e6800224f8d2734495bf8176065b5a" +checksum = "e73499b8448495fa0021a7c2ebdcdc6b680d1faec2be35cfb6d3de9176a2ea41" dependencies = [ "rustc-hash", "semver", @@ -2118,15 +2137,16 @@ dependencies = [ [[package]] name = "proto_pdk_test_utils" -version = "0.19.6" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a0f6b649e24d7eae82e8584771e7aa0838b0dacb217a910f954c0a794efda5" +checksum = "1f61bbb94802afc75e36e8836e45b28d5c848dfd3a00fe012e60032534f6f590" dependencies = [ "extism", "proto_core", "proto_pdk_api", "serde", "serde_json", + "starbase_sandbox", "warpgate", ] @@ -2310,11 +2330,11 @@ checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64", + "base64 0.21.2", "bytes", "encoding_rs", "futures-core", @@ -2388,7 +2408,7 @@ dependencies = [ [[package]] name = "rust_plugin" -version = "0.9.0" +version = "0.9.1" dependencies = [ "extism-pdk", "proto_pdk", @@ -2396,7 +2416,7 @@ dependencies = [ "serde", "starbase_sandbox", "tokio", - "toml 0.8.10", + "toml 0.8.12", ] [[package]] @@ -2470,7 +2490,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64", + "base64 0.21.2", ] [[package]] @@ -2525,12 +2545,12 @@ dependencies = [ [[package]] name = "schematic" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709e1f0b0a3db267a98da09c89a7818e307cc8daea841e1079eb5f5a02591d54" +checksum = "ac09b4b9c9fe5068fb44ac5cdc6b282acb175ab39e8b0d1eef737df2aeec3a91" dependencies = [ "garde", - "indexmap 2.2.3", + "indexmap 2.2.5", "miette", "schematic_macros", "schematic_types", @@ -2538,21 +2558,21 @@ dependencies = [ "serde_path_to_error", "starbase_styles", "thiserror", - "toml 0.8.10", + "toml 0.8.12", "tracing", ] [[package]] name = "schematic_macros" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31af7347544d97d00870a5865d2077dac07c069a5290c26215ddd1138b302590" +checksum = "910c561ff783c09af4e4a7a4f7d6d733aed0a0374333de7f0b39f474568ba937" dependencies = [ "convert_case", "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -2561,9 +2581,9 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3adfbe1c90a6a9643433e490ef1605c6a99f93be37e4c83fe5149fca9698c6" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "serde_json", - "toml 0.8.10", + "toml 0.8.12", ] [[package]] @@ -2631,7 +2651,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -2787,16 +2807,16 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "starbase_archive" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a99a24e91bf823d46d04d520fb87c02ab0c3cac75bfdcf3c7671505681fd9f29" +checksum = "56bf4ff22495fe4c8384f124f4955373ed9d5c50c0e9bca53d202975c820687f" dependencies = [ + "binstall-tar", "flate2", "miette", "rustc-hash", "starbase_styles", "starbase_utils", - "tar", "thiserror", "tracing", "xz2", @@ -2806,9 +2826,9 @@ dependencies = [ [[package]] name = "starbase_events" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98298edb3a2630bf96c6d422f91c617abda687e8a564f36fb4bc38cecbb7155" +checksum = "2473c84f57e1ac245f28fbdcc833ec4ab658330e70f06f5eae39fda251741441" dependencies = [ "async-trait", "miette", @@ -2818,21 +2838,21 @@ dependencies = [ [[package]] name = "starbase_macros" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb40eb09c82a8ddffa48a13d53bec72300b5626cb17f216d1fb4cf1b8a14f118" +checksum = "0af7b389564c25fe60e6883343c0413899e252797bab5c8d4664c9dfa8e453c6" dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "starbase_sandbox" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c13185a91009f058c1649eb9692957e3e78398d98a89ed5fc9c3e24844e9c7" +checksum = "46eb2113d05c21fea19742d5df590641a44373eaa75c9178e6c8888d9ab31286" dependencies = [ "assert_cmd", "assert_fs", @@ -2846,9 +2866,9 @@ dependencies = [ [[package]] name = "starbase_styles" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e06fa37c027e48ef341787d8c3d26cfbe8507aa4e2e8c61fcba82fe931bb598" +checksum = "a9e21769f0b11c591f655f8563217d92f55176f53c6e9224854b1f14801c6cee" dependencies = [ "dirs 5.0.1", "owo-colors", @@ -2857,9 +2877,9 @@ dependencies = [ [[package]] name = "starbase_utils" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23570a8fa500ad7ccb3bbfed7d9dc759b657ed536fb9b10eec729ad9de1b60e" +checksum = "602b821bd1b020210432bdc5152056defca02dab1f601e86093cb12e842d0fa5" dependencies = [ "dirs 5.0.1", "fs4", @@ -2867,13 +2887,15 @@ dependencies = [ "miette", "once_cell", "relative-path", + "reqwest", "serde", "serde_json", "starbase_styles", "thiserror", "tokio", - "toml 0.8.10", + "toml 0.8.12", "tracing", + "url", "wax", ] @@ -2911,9 +2933,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -2965,9 +2987,9 @@ dependencies = [ [[package]] name = "system_env" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc6e061f286e270fa78c10406c3146455906149b684ae2dc15a3a758da16fda" +checksum = "967511d0f22b9de600ec03e25d9dacc5627f36d69e780d5d0b306903de88b714" dependencies = [ "schematic", "serde", @@ -2976,17 +2998,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "target-lexicon" version = "0.12.10" @@ -3014,22 +3025,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3084,7 +3095,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3122,14 +3133,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.8", ] [[package]] @@ -3147,18 +3158,18 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "toml_datetime", "winnow 0.5.1", ] [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -3191,7 +3202,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3296,7 +3307,7 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ - "base64", + "base64 0.21.2", "flate2", "log", "once_cell", @@ -3319,9 +3330,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", ] @@ -3381,9 +3392,9 @@ dependencies = [ [[package]] name = "warpgate" -version = "0.11.3" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbe4df5f206fe3d93a15297673412dbba41ced8579e7167f0cfcb04289b966e1" +checksum = "f9f3a291841f84d077c092db81a0bdeb144f39865c6bff65ef3c6734959d7260" dependencies = [ "extism", "miette", @@ -3407,9 +3418,9 @@ dependencies = [ [[package]] name = "warpgate_api" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df14416cdd0aa47c75b5cb6b9138781e05cc99cb99954322412ac003011e4b1" +checksum = "fb71be920bfea7dce93965ece5f79ed15222a2900a97b4b1039427d2641bf11e" dependencies = [ "anyhow", "rustc-hash", @@ -3422,9 +3433,9 @@ dependencies = [ [[package]] name = "warpgate_pdk" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816f8e749c69c800012a61db8a3b29bc08804695f9b6b558737fe1e870df5c83" +checksum = "1286c9c43a051463251deb81404b639a5bae5b6918fde781d75609d65a67520b" dependencies = [ "extism-pdk", "serde", @@ -3501,7 +3512,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -3535,7 +3546,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3570,7 +3581,7 @@ version = "0.115.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "semver", ] @@ -3580,7 +3591,7 @@ version = "0.118.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.2.5", "semver", ] @@ -3607,7 +3618,7 @@ dependencies = [ "cfg-if", "encoding_rs", "fxprof-processed-profile", - "indexmap 2.2.3", + "indexmap 2.2.5", "libc", "log", "object 0.32.2", @@ -3650,7 +3661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a4df7655bb73b592189033ab046aa47c1da486d70bc9c1ebf45e55ac030bdf4" dependencies = [ "anyhow", - "base64", + "base64 0.21.2", "bincode", "directories-next", "log", @@ -3672,7 +3683,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -3734,7 +3745,7 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli 0.28.1", - "indexmap 2.2.3", + "indexmap 2.2.5", "log", "object 0.32.2", "serde", @@ -3822,7 +3833,7 @@ dependencies = [ "cc", "cfg-if", "encoding_rs", - "indexmap 2.2.3", + "indexmap 2.2.5", "libc", "log", "mach", @@ -3863,7 +3874,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3926,7 +3937,7 @@ checksum = "9d214ca7513d76af2872ad5bba4b0dcc0225821931745fdcb4fc30dd34bc3bf7" dependencies = [ "anyhow", "heck", - "indexmap 2.2.3", + "indexmap 2.2.5", "wit-parser", ] @@ -4026,7 +4037,7 @@ dependencies = [ "proc-macro2", "quote", "shellexpand", - "syn 2.0.48", + "syn 2.0.53", "witx", ] @@ -4038,7 +4049,7 @@ checksum = "c6f321dbce722989d65c3082dba479fa392c7b7a1a4c3adc2a39545dd5aa452f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wiggle-generate", ] @@ -4342,7 +4353,7 @@ checksum = "43771ee863a16ec4ecf9da0fc65c3bbd4a1235c8e3da5f094b562894843dfa76" dependencies = [ "anyhow", "id-arena", - "indexmap 2.2.3", + "indexmap 2.2.5", "log", "semver", "serde", @@ -4365,9 +4376,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index f270095..2195f14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_plugin" -version = "0.9.0" +version = "0.9.1" edition = "2021" license = "MIT" publish = false @@ -10,13 +10,13 @@ crate-type = ['cdylib'] [dependencies] extism-pdk = { version = "1.1.0" } -proto_pdk = { version = "0.17.3" } #, path = "../../proto/crates/pdk" } +proto_pdk = { version = "0.17.5" } #, path = "../../proto/crates/pdk" } serde = "1.0.197" -toml = { version = "0.8.10", default-features = false, features = ["parse"] } +toml = { version = "0.8.12", default-features = false, features = ["parse"] } [dev-dependencies] -proto_pdk_test_utils = { version = "0.19.6" } #, path = "../../proto/crates/pdk-test-utils" } -starbase_sandbox = "0.4.0" +proto_pdk_test_utils = { version = "0.20.1" } #, path = "../../proto/crates/pdk-test-utils" } +starbase_sandbox = "0.5.0" tokio = { version = "1.36.0", features = ["full"] } [features] diff --git a/tests/download_test.rs b/tests/download_test.rs index ddfddee..ffb601b 100644 --- a/tests/download_test.rs +++ b/tests/download_test.rs @@ -1,22 +1,14 @@ use proto_pdk_test_utils::*; -use starbase_sandbox::create_empty_sandbox; -use std::collections::HashMap; // We use a fake home directory but rustup requires a real one! // generate_download_install_tests!("rust-test", "1.70.0"); #[test] fn locates_linux_bin() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin_with_config( - "rust-test", - sandbox.path(), - HashMap::from_iter([map_config_environment_with_home( - HostOS::Linux, - HostArch::Arm64, - sandbox.path().join(".home"), - )]), - ); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin_with_config("rust-test", |config| { + config.host(HostOS::Linux, HostArch::Arm64); + }); assert_eq!( plugin @@ -35,16 +27,10 @@ fn locates_linux_bin() { #[test] fn locates_macos_bin() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin_with_config( - "rust-test", - sandbox.path(), - HashMap::from_iter([map_config_environment_with_home( - HostOS::MacOS, - HostArch::X64, - sandbox.path().join(".home"), - )]), - ); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin_with_config("rust-test", |config| { + config.host(HostOS::MacOS, HostArch::X64); + }); assert_eq!( plugin @@ -63,16 +49,10 @@ fn locates_macos_bin() { #[test] fn locates_windows_bin() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin_with_config( - "rust-test", - sandbox.path(), - HashMap::from_iter([map_config_environment_with_home( - HostOS::Windows, - HostArch::X86, - sandbox.path().join(".home"), - )]), - ); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin_with_config("rust-test", |config| { + config.host(HostOS::Windows, HostArch::X86); + }); assert_eq!( plugin diff --git a/tests/globals_test.rs b/tests/globals_test.rs deleted file mode 100644 index 908f5c7..0000000 --- a/tests/globals_test.rs +++ /dev/null @@ -1,4 +0,0 @@ -// use proto_pdk_test_utils::*; -// use starbase_sandbox::create_empty_sandbox; - -// generate_globals_test!("rust-test", "cargo-insta", "CARGO_INSTALL_ROOT"); diff --git a/tests/metadata_test.rs b/tests/metadata_test.rs index 628e3dc..62cc372 100644 --- a/tests/metadata_test.rs +++ b/tests/metadata_test.rs @@ -1,10 +1,9 @@ use proto_pdk_test_utils::*; -use starbase_sandbox::create_empty_sandbox; #[test] fn registers_metadata() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); let metadata = plugin.register_tool(ToolMetadataInput { id: "rust-test".into(), diff --git a/tests/shims_test.rs b/tests/shims_test.rs index 41e1ff5..df5b52c 100644 --- a/tests/shims_test.rs +++ b/tests/shims_test.rs @@ -1,10 +1,9 @@ -use proto_pdk_test_utils::create_plugin; -use starbase_sandbox::create_empty_sandbox; +use proto_pdk_test_utils::*; #[tokio::test] async fn doesnt_create_global_shims() { - let sandbox = create_empty_sandbox(); - let mut plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let mut plugin = sandbox.create_plugin("rust-test"); plugin.tool.generate_shims(false).await.unwrap(); diff --git a/tests/versions_test.rs b/tests/versions_test.rs index 2dbdf65..83b59de 100644 --- a/tests/versions_test.rs +++ b/tests/versions_test.rs @@ -1,5 +1,4 @@ use proto_pdk_test_utils::*; -use starbase_sandbox::create_empty_sandbox; generate_resolve_versions_tests!("rust-test", { "stable" => "stable", @@ -11,8 +10,8 @@ generate_resolve_versions_tests!("rust-test", { #[test] fn loads_versions_from_git_tags() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); let output = plugin.load_versions(LoadVersionsInput::default()); @@ -21,8 +20,8 @@ fn loads_versions_from_git_tags() { #[test] fn sets_latest_alias() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); let output = plugin.load_versions(LoadVersionsInput::default()); @@ -33,8 +32,8 @@ fn sets_latest_alias() { #[test] fn parses_rust_toolchain() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); assert_eq!( plugin.parse_version_file(ParseVersionFileInput { @@ -49,8 +48,8 @@ fn parses_rust_toolchain() { #[test] fn ignores_empty_rust_toolchain() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); assert_eq!( plugin.parse_version_file(ParseVersionFileInput { @@ -63,8 +62,8 @@ fn ignores_empty_rust_toolchain() { #[test] fn parses_rust_toolchain_toml() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); assert_eq!( plugin.parse_version_file(ParseVersionFileInput { @@ -79,8 +78,8 @@ fn parses_rust_toolchain_toml() { #[test] fn ignores_empty_rust_toolchain_toml() { - let sandbox = create_empty_sandbox(); - let plugin = create_plugin("rust-test", sandbox.path()); + let sandbox = create_empty_proto_sandbox(); + let plugin = sandbox.create_plugin("rust-test"); assert_eq!( plugin.parse_version_file(ParseVersionFileInput {