From 8190e9103b5b08e30ba84b42e6578e09b3e224d4 Mon Sep 17 00:00:00 2001 From: Kyle Machulis Date: Sun, 24 Jan 2021 21:23:37 -0800 Subject: [PATCH] chore: Update rust examples for v2 API --- examples/rust/Cargo.lock | 666 +++++++------------- examples/rust/Cargo.toml | 3 +- examples/rust/src/bin/async.rs | 4 +- examples/rust/src/bin/connection.rs | 47 +- examples/rust/src/bin/device_control.rs | 11 +- examples/rust/src/bin/device_enumeration.rs | 5 +- examples/rust/src/bin/embedded_connector.rs | 8 +- examples/rust/src/bin/errors.rs | 1 + examples/rust/src/bin/external_connector.rs | 3 +- examples/rust/src/bin/logging.rs | 7 +- 10 files changed, 286 insertions(+), 469 deletions(-) diff --git a/examples/rust/Cargo.lock b/examples/rust/Cargo.lock index fdd9cd2..d4300fa 100644 --- a/examples/rust/Cargo.lock +++ b/examples/rust/Cargo.lock @@ -23,9 +23,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ "gimli", ] @@ -36,31 +36,13 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -[[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" -dependencies = [ - "const-random", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -dependencies = [ - "memchr 0.1.11", -] - [[package]] name = "aho-corasick" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" dependencies = [ - "memchr 2.3.3", + "memchr", ] [[package]] @@ -69,7 +51,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -115,12 +97,15 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "1.4.3" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73079b49cd26b8fd5a15f68fc7707fc78698dc2a3d61430f2a7a9430230dfa04" +checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" dependencies = [ + "async-channel", "async-executor", "async-io", + "async-mutex", + "blocking", "futures-lite", "num_cpus", "once_cell", @@ -143,7 +128,7 @@ dependencies = [ "polling", "vec-arena", "waker-fn", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -157,42 +142,24 @@ dependencies = [ [[package]] name = "async-mutex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66941c2577c4fa351e4ce5fdde8f86c69b88d623f3b955be1bc7362a23434632" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-process" -version = "1.0.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" dependencies = [ - "async-io", - "blocking", - "cfg-if 0.1.10", "event-listener", - "futures-lite", - "once_cell", - "signal-hook", - "winapi 0.3.9", ] [[package]] name = "async-std" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f84f1280a2b436a2c77c2582602732b6c2f4321d5494d6e799e6c367859a8" +checksum = "d9f06685bad74e0570f5213741bea82158279a4103d988e57bfada11ad230341" dependencies = [ "async-attributes", "async-channel", "async-global-executor", "async-io", - "async-mutex", - "async-process", - "blocking", + "async-lock", "crossbeam-utils", "futures-channel", "futures-core", @@ -201,15 +168,36 @@ dependencies = [ "gloo-timers", "kv-log-macro", "log", - "memchr 2.3.3", + "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "pin-utils", "slab", "wasm-bindgen-futures", ] +[[package]] +name = "async-stream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3670df70cbc01729f901f94c887814b3c68db038aad1329a418bae178bc5295c" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3548b8efc9f8e8a5a0a2808c5bd8451a9031b9e5b879a79590304ae928b0a70" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "async-task" version = "4.0.3" @@ -218,9 +206,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-tls" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85a97c4a0ecce878efd3f945f119c78a646d8975340bca0398f9bb05c30cc52" +checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400" dependencies = [ "futures-core", "futures-io", @@ -242,16 +230,16 @@ dependencies = [ [[package]] name = "async-tungstenite" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39eca8dd578b18e557361e50ca767df55c5e62f690a5e53868c3c7a8123145b7" +checksum = "e00550829ef8e2c4115250d0ee43305649b0fa95f78a32ce5b07da0b73d95c5c" dependencies = [ "async-std", "async-tls", "futures-io", "futures-util", "log", - "pin-project 1.0.1", + "pin-project-lite 0.2.4", "tungstenite", ] @@ -269,9 +257,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.54" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2baad346b2d4e94a24347adeee9c7a93f412ee94b9cc26e5b59dea23848e9f28" +checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" dependencies = [ "addr2line", "cfg-if 1.0.0", @@ -283,9 +271,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" @@ -322,38 +310,25 @@ dependencies = [ "once_cell", ] -[[package]] -name = "broadcaster" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "futures-util", - "parking_lot", - "slab", -] - [[package]] name = "btleplug" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f71b5a9045a55cd9b97a2f6186ff8d490e8d8adfbd287fb7a96fd8c189c0b63" +checksum = "f0cd70c78e1e7ca7d8859fb293bffcfacc0635af40f2224e343ae87e0175b1e9" dependencies = [ "async-std", "backtrace", "bitflags", - "bytes", + "bytes 1.0.1", "cocoa", - "dashmap 3.11.10", + "dashmap", "enum_primitive", "failure", "failure_derive", + "futures", "libc", "log", - "nix 0.18.0", + "nix 0.19.1", "nom", "num", "objc", @@ -369,25 +344,22 @@ checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "buttplug" -version = "0.11.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d44bac41622ae8b0f0495d89ca332d00372707920b88d157b3213cde313abb" +checksum = "17bd07f7ba9f7fecdfc9eb5c3dd0eaaf335f6811f3e52b51c52e9bd75f91113a" dependencies = [ - "async-channel", - "async-lock", "async-std", + "async-stream", "async-tls", "async-trait", "async-tungstenite", - "broadcaster", "btleplug", "buttplug_derive", "byteorder", "cfg-if 1.0.0", - "dashmap 4.0.0-rc6", + "dashmap", "displaydoc", "futures", - "futures-channel", "futures-timer", "futures-util", "hidapi", @@ -425,9 +397,9 @@ dependencies = [ [[package]] name = "buttplug_derive" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e585f964dff70355727bde4bb0a9f753f65a203bcde05be0d3ad87529294c90a" +checksum = "1ffe40ee10aba7b38cc3026c175db5626ce72bd7ee8380adf596b3c14475848d" dependencies = [ "quote", "syn", @@ -435,9 +407,9 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" @@ -445,6 +417,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" + [[package]] name = "cache-padded" version = "1.1.1" @@ -476,19 +454,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" dependencies = [ "num-integer", - "num-traits 0.2.12", + "num-traits 0.2.14", "time", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "cocoa" version = "0.24.0" @@ -529,26 +498,6 @@ dependencies = [ "cache-padded", ] -[[package]] -name = "const-random" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" -dependencies = [ - "getrandom", - "proc-macro-hack", -] - [[package]] name = "const_fn" version = "0.4.3" @@ -616,24 +565,14 @@ dependencies = [ [[package]] name = "dashmap" -version = "3.11.10" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" dependencies = [ - "ahash", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "num_cpus", ] -[[package]] -name = "dashmap" -version = "4.0.0-rc6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308a6703be2d759cb5fb7b80a23547fe73a8d5ebf70d3a4ca7f0ef4c0bfc2265" -dependencies = [ - "once_cell", -] - [[package]] name = "digest" version = "0.9.0" @@ -739,9 +678,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" dependencies = [ "futures-channel", "futures-core", @@ -754,9 +693,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" dependencies = [ "futures-core", "futures-sink", @@ -764,15 +703,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" dependencies = [ "futures-core", "futures-task", @@ -782,9 +721,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" [[package]] name = "futures-lite" @@ -795,7 +734,7 @@ dependencies = [ "fastrand", "futures-core", "futures-io", - "memchr 2.3.3", + "memchr", "parking", "pin-project-lite 0.1.7", "waker-fn", @@ -803,9 +742,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -815,15 +754,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" dependencies = [ "once_cell", ] @@ -836,9 +775,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" dependencies = [ "futures-channel", "futures-core", @@ -846,8 +785,8 @@ dependencies = [ "futures-macro", "futures-sink", "futures-task", - "memchr 2.3.3", - "pin-project 1.0.1", + "memchr", + "pin-project-lite 0.2.4", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -864,7 +803,7 @@ dependencies = [ "libc", "log", "rustc_version", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -888,6 +827,17 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", +] + [[package]] name = "gimli" version = "0.23.0" @@ -942,7 +892,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes", + "bytes 0.5.6", "fnv", "itoa", ] @@ -966,11 +916,11 @@ dependencies = [ [[package]] name = "input_buffer" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" dependencies = [ - "bytes", + "bytes 1.0.1", ] [[package]] @@ -988,15 +938,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json-pointer" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe841b94e719a482213cee19dd04927cf412f26d8dc84c5a446c081e49c2997" -dependencies = [ - "serde_json", -] - [[package]] name = "jsonway" version = "2.0.0" @@ -1007,16 +948,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "kv-log-macro" version = "1.0.7" @@ -1034,9 +965,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.80" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" [[package]] name = "libudev" @@ -1058,20 +989,11 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "log" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" dependencies = [ "cfg-if 0.1.10", ] @@ -1131,15 +1053,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -dependencies = [ - "libc", -] - [[package]] name = "memchr" version = "2.3.3" @@ -1163,7 +1076,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8123a81538e457d44b933a02faf885d3fe8408806b23fa700e8f01c6c3a98998" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1181,13 +1094,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" dependencies = [ "bitflags", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", ] @@ -1197,75 +1110,75 @@ version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr 2.3.3", + "memchr", "version_check 0.1.5", ] [[package]] name = "num" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3e176191bc4faad357e3122c4747aa098ac880e88b168f106386128736cf4a" +checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" dependencies = [ "num-bigint", "num-complex", "num-integer", "num-iter", "num-rational", - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-bigint" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" +checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-complex" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05ad05bd8977050b171b3f6b48175fea6e0565b7981059b486075e1026a9fb5" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" dependencies = [ - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-integer" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ "autocfg", - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-iter" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e6b7c748f995c4c29c5f5ae0248536e04a5739927c74ec0fa564805094b9f" +checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-rational" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b4d7360f362cfb50dde8143501e6940b22f644be75a4cc90b2d81968908138" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] @@ -1274,14 +1187,14 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.12", + "num-traits 0.2.14", ] [[package]] name = "num-traits" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", ] @@ -1307,9 +1220,9 @@ dependencies = [ [[package]] name = "object" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" +checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" [[package]] name = "once_cell" @@ -1329,30 +1242,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.9", -] - [[package]] name = "paste" version = "1.0.4" @@ -1391,7 +1280,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" dependencies = [ "phf_shared", - "rand", + "rand 0.7.3", ] [[package]] @@ -1409,16 +1298,7 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" dependencies = [ - "pin-project-internal 0.4.23", -] - -[[package]] -name = "pin-project" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" -dependencies = [ - "pin-project-internal 1.0.1", + "pin-project-internal", ] [[package]] @@ -1432,17 +1312,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pin-project-internal" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" version = "0.1.7" @@ -1451,9 +1320,9 @@ checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" [[package]] name = "pin-utils" @@ -1477,7 +1346,7 @@ dependencies = [ "libc", "log", "wepoll-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1516,15 +1385,15 @@ dependencies = [ "error-chain", "idna", "lazy_static", - "regex 1.3.9", + "regex", "url", ] [[package]] name = "quote" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" dependencies = [ "proc-macro2", ] @@ -1535,14 +1404,26 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.15", "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", "rand_pcg", ] +[[package]] +name = "rand" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" +dependencies = [ + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.1", + "rand_hc 0.3.0", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -1550,7 +1431,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.1", ] [[package]] @@ -1559,44 +1450,43 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.15", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rand_core" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" dependencies = [ - "rand_core", + "getrandom 0.2.2", ] [[package]] -name = "rand_pcg" -version = "0.2.1" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] -name = "redox_syscall" -version = "0.1.57" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.1", +] [[package]] -name = "regex" -version = "0.1.80" +name = "rand_pcg" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "aho-corasick 0.5.3", - "memchr 0.1.11", - "regex-syntax 0.3.9", - "thread_local 0.2.7", - "utf8-ranges", + "rand_core 0.5.1", ] [[package]] @@ -1605,10 +1495,10 @@ version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ - "aho-corasick 0.7.13", - "memchr 2.3.3", - "regex-syntax 0.6.18", - "thread_local 1.0.1", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] @@ -1618,15 +1508,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" dependencies = [ "byteorder", - "regex-syntax 0.6.18", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" - [[package]] name = "regex-syntax" version = "0.6.18" @@ -1645,7 +1529,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1665,9 +1549,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ "base64", "log", @@ -1684,7 +1568,7 @@ checksum = "d2aa654bc32eb9ca14cce1a084abc9dfe43949a4547c35269a094c39272db3bb" dependencies = [ "lazy_static", "log", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1699,12 +1583,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - [[package]] name = "sct" version = "0.6.0" @@ -1732,18 +1610,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.118" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +checksum = "974ef1bd2ad8a507599b336595454081ff68a9599b4890af7643c0c0ed73a62c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.118" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +checksum = "8dee1f300f838c8ac340ecb0112b3ac472464fa67e87292bdb3dfc9c49128e17" dependencies = [ "proc-macro2", "quote", @@ -1752,9 +1630,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" dependencies = [ "itoa", "ryu", @@ -1785,8 +1663,8 @@ dependencies = [ "libudev", "mach 0.2.3", "nix 0.14.1", - "regex 1.3.9", - "winapi 0.3.9", + "regex", + "winapi", ] [[package]] @@ -1812,25 +1690,6 @@ dependencies = [ "loom", ] -[[package]] -name = "signal-hook" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-registry" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" -dependencies = [ - "libc", -] - [[package]] name = "siphasher" version = "0.3.3" @@ -1875,9 +1734,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.48" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac" +checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" dependencies = [ "proc-macro2", "quote", @@ -1898,43 +1757,24 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -dependencies = [ - "kernel32-sys", - "libc", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -dependencies = [ - "thread-id", -] - [[package]] name = "thread_local" version = "1.0.1" @@ -1952,7 +1792,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1963,12 +1803,12 @@ checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" -version = "0.3.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720ba21c25078711bf456d607987d95bce90f7c3bea5abe1db587862e7a1e87c" +checksum = "0ca04cec6ff2474c638057b65798f60ac183e5e79d3448bb7163d36a39cff6ec" dependencies = [ "autocfg", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", ] [[package]] @@ -1978,7 +1818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "tracing-attributes", "tracing-core", ] @@ -2009,7 +1849,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" dependencies = [ - "pin-project 0.4.23", + "pin-project", "tracing", ] @@ -2044,12 +1884,12 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "regex 1.3.9", + "regex", "serde", "serde_json", "sharded-slab", "smallvec", - "thread_local 1.0.1", + "thread_local", "tracing", "tracing-core", "tracing-log", @@ -2058,18 +1898,18 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" +checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" dependencies = [ "base64", "byteorder", - "bytes", + "bytes 1.0.1", "http", "httparse", "input_buffer", "log", - "rand", + "rand 0.8.2", "sha-1", "url", "utf-8", @@ -2117,15 +1957,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "uritemplate" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01eaa32c7380d40c2fd400fb0a95e394b6c40632ca4bcb4bc1683f0fbbf22749" -dependencies = [ - "regex 0.1.80", -] - [[package]] name = "url" version = "2.2.0" @@ -2144,40 +1975,31 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" - [[package]] name = "uuid" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "rand", + "getrandom 0.2.2", "serde", ] [[package]] name = "valico" -version = "3.5.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12423f724bb834032eb7357fb9b8699f3c563876f7609422f8ec7a29f2749218" +checksum = "2e06847fab030aa7355f219287e04fe6e090343aa6de55724704b38ba956abb6" dependencies = [ - "base64", "chrono", - "json-pointer", "jsonway", "percent-encoding", "phf", "phf_codegen", "publicsuffix", - "regex 1.3.9", + "regex", "serde", "serde_json", - "uritemplate", "url", "uuid", ] @@ -2312,9 +2134,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" dependencies = [ "webpki", ] @@ -2328,12 +2150,6 @@ dependencies = [ "cc", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -2344,12 +2160,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2368,5 +2178,5 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c248f437add7df81d305a345e9d143c8c0a9de00a51e46b42453c337181d16c9" dependencies = [ - "winapi 0.3.9", + "winapi", ] diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml index 3c397c7..bd6e8c9 100644 --- a/examples/rust/Cargo.toml +++ b/examples/rust/Cargo.toml @@ -7,7 +7,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -buttplug = "0.11.1" +buttplug = { version = "2.0.4", features = ["async-std-runtime", "client", "server", "serialize-json", "btleplug-manager", "websockets", "xinput-manager", "serial-manager", "lovense-dongle-manager"] } +# buttplug = { path = "../../../buttplug-rs/buttplug", features = ["async-std-runtime", "client", "server", "serialize-json", "btleplug-manager", "websockets", "xinput-manager", "serial-manager", "lovense-dongle-manager"] } async-std = { version = "1.7.0", features = ["attributes"] } anyhow = "1.0.34" tracing-subscriber = "0.2.15" diff --git a/examples/rust/src/bin/async.rs b/examples/rust/src/bin/async.rs index 302cd1e..9d4fa8a 100644 --- a/examples/rust/src/bin/async.rs +++ b/examples/rust/src/bin/async.rs @@ -25,10 +25,12 @@ async fn main() -> anyhow::Result<()> { // server requires the client and server to send information back and forth, // so we'll await that while those (possibly somewhat slow, depending on if // network is being used and other factors) transfers happen. - let (_client, mut event_stream) = ButtplugClient::connect("Example Client", connector) + let client = ButtplugClient::new("Example Client"); + client.connect(connector) .await .expect("Can't connect to Buttplug Server, exiting!"); + let mut event_stream = client.event_stream(); // As an example of event messages, we'll assume the server might // send the client notifications about new devices that it has found. // The client will let us know about this via events. diff --git a/examples/rust/src/bin/connection.rs b/examples/rust/src/bin/connection.rs index d8aa353..4233dc1 100644 --- a/examples/rust/src/bin/connection.rs +++ b/examples/rust/src/bin/connection.rs @@ -3,7 +3,7 @@ use async_std::{ stream::StreamExt, }; use buttplug::{ - client::{ButtplugClient, ButtplugClientError, ButtplugClientEvent}, + client::{ButtplugClient, ButtplugClientError}, connector::ButtplugInProcessClientConnector, core::errors::ButtplugError, }; @@ -33,35 +33,34 @@ async fn main() -> anyhow::Result<()> { // being up, etc. // - A ButtplugHandshakeError if there is a client/server version // mismatch. - let client = ButtplugClient::connect("Example Client", connector).await; - let client = match client { - Ok(client) => client, - Err(ButtplugClientError::ButtplugConnectorError(error)) => { - // If our connection failed, because the server wasn't turned on, - // SSL/TLS wasn't turned off, etc, we'll just print and exit - // here. - println!("Can't connect, exiting! Message: {}", error); - wait_for_input().await; - return Ok(()); - } - Err(ButtplugClientError::ButtplugError(error)) => match error { - ButtplugError::ButtplugHandshakeError(error) => { - // This means our client is newer than our server, and we need to - // upgrade the server we're connecting to. - println!("Handshake issue, exiting! Message: {}", error); + let client = ButtplugClient::new("Example Client"); + if let Err(e) = client.connect(connector).await { + match e { + ButtplugClientError::ButtplugConnectorError(error) => { + // If our connection failed, because the server wasn't turned on, + // SSL/TLS wasn't turned off, etc, we'll just print and exit + // here. + println!("Can't connect, exiting! Message: {}", error); wait_for_input().await; return Ok(()); } - error => { - println!("Unexpected error type! {}", error); - wait_for_input().await; - return Ok(()); + ButtplugClientError::ButtplugError(error) => match error { + ButtplugError::ButtplugHandshakeError(error) => { + // This means our client is newer than our server, and we need to + // upgrade the server we're connecting to. + println!("Handshake issue, exiting! Message: {}", error); + wait_for_input().await; + return Ok(()); + } + error => { + println!("Unexpected error type! {}", error); + wait_for_input().await; + return Ok(()); + } } - }, + } }; - let (client, events) = client; - // We're connected, yay! println!("Connected! Check Server for Client Name."); diff --git a/examples/rust/src/bin/device_control.rs b/examples/rust/src/bin/device_control.rs index 29922aa..21b2f98 100644 --- a/examples/rust/src/bin/device_control.rs +++ b/examples/rust/src/bin/device_control.rs @@ -3,9 +3,8 @@ use async_std::{ stream::StreamExt, }; use buttplug::{ - client::{device::VibrateCommand, ButtplugClient, ButtplugClientError, ButtplugClientEvent}, + client::{device::VibrateCommand, ButtplugClient, ButtplugClientError, ButtplugClientDeviceMessageType}, connector::ButtplugInProcessClientConnector, - core::messages::ButtplugDeviceMessageType, test::new_bluetoothle_test_device, }; @@ -18,7 +17,8 @@ async fn main() -> anyhow::Result<()> { let connector = ButtplugInProcessClientConnector::default(); let server = connector.server_ref(); server.add_test_comm_manager()?; - let (client, _) = ButtplugClient::connect("Example Client", connector).await?; + let client = ButtplugClient::new("Example Client"); + client.connect(connector).await?; // For this example, we'll use the Test device. This is included in Buttplug // Rust >= v0.1.0. It emulates how a regular device manager would work, @@ -42,7 +42,7 @@ async fn main() -> anyhow::Result<()> { for device in client.devices() { println!("{} supports these messages:", device.name); - for (r#type, attributes) in device.allowed_messages { + for (r#type, attributes) in &device.allowed_messages { println!("- {}", r#type); if let Some(count) = attributes.feature_count { println!(" - Features: {}", count); @@ -75,8 +75,9 @@ async fn main() -> anyhow::Result<()> { // know it's 2 so we don't really have to use it. let vibrator_count = test_client_device .allowed_messages - .get(&ButtplugDeviceMessageType::VibrateCmd) + .get(&ButtplugClientDeviceMessageType::VibrateCmd) .and_then(|attributes| attributes.feature_count); + test_client_device .vibrate(VibrateCommand::SpeedVec(vec![1.0, 0.0])) .await?; diff --git a/examples/rust/src/bin/device_enumeration.rs b/examples/rust/src/bin/device_enumeration.rs index 5d00db0..03c2708 100644 --- a/examples/rust/src/bin/device_enumeration.rs +++ b/examples/rust/src/bin/device_enumeration.rs @@ -15,8 +15,9 @@ async fn wait_for_input() { async fn main() -> anyhow::Result<()> { // Usual embedded connector setup. We'll assume the server found all // of the subtype managers for us (the default features include all of them). - let (client, events) = - ButtplugClient::connect_in_process("Example Client", &ButtplugServerOptions::default()).await?; + let client = ButtplugClient::new("Example Client"); + let events = client.event_stream(); + client.connect_in_process(&ButtplugServerOptions::default()).await?; // Set up our DeviceAdded/DeviceRemoved event handlers before connecting. let events = events.inspect(|event| match event { diff --git a/examples/rust/src/bin/embedded_connector.rs b/examples/rust/src/bin/embedded_connector.rs index 96aff5f..c0b77de 100644 --- a/examples/rust/src/bin/embedded_connector.rs +++ b/examples/rust/src/bin/embedded_connector.rs @@ -4,6 +4,7 @@ use buttplug::{ server::{comm_managers::btleplug::BtlePlugCommunicationManager, ButtplugServerOptions}, }; +#[allow(dead_code)] async fn main_the_hard_way() -> anyhow::Result<()> { // First off, we'll set up our Embedded Connector. let connector = ButtplugInProcessClientConnector::default(); @@ -12,7 +13,8 @@ async fn main_the_hard_way() -> anyhow::Result<()> { .server_ref() .add_comm_manager::()?; - let _client = ButtplugClient::connect("Example Client", connector).await?; + let client = ButtplugClient::new("Example Client"); + client.connect(connector).await?; Ok(()) } @@ -20,8 +22,8 @@ async fn main_the_hard_way() -> anyhow::Result<()> { #[async_std::main] async fn main() -> anyhow::Result<()> { // This is the easy way, it sets up an embedded server with everything set up automatically - let _client = - ButtplugClient::connect_in_process("Example Client", &ButtplugServerOptions::default()).await?; + let client = ButtplugClient::new("Example Client"); + client.connect_in_process(&ButtplugServerOptions::default()).await?; Ok(()) } diff --git a/examples/rust/src/bin/errors.rs b/examples/rust/src/bin/errors.rs index 4b5ac0a..ea84928 100644 --- a/examples/rust/src/bin/errors.rs +++ b/examples/rust/src/bin/errors.rs @@ -1,5 +1,6 @@ use buttplug::{client::ButtplugClientError, core::errors::ButtplugError}; +#[allow(dead_code)] fn handle_error(error: ButtplugClientError) { match error { ButtplugClientError::ButtplugConnectorError(_details) => {} diff --git a/examples/rust/src/bin/external_connector.rs b/examples/rust/src/bin/external_connector.rs index c3c26c7..e0a5e6b 100644 --- a/examples/rust/src/bin/external_connector.rs +++ b/examples/rust/src/bin/external_connector.rs @@ -12,7 +12,8 @@ async fn main() -> anyhow::Result<()> { "ws://localhost:12345/buttplug", )); - let (_client, _event_stream) = ButtplugClient::connect("Example Client", connector).await?; + let client = ButtplugClient::new("Example Client"); + client.connect(connector).await?; Ok(()) } diff --git a/examples/rust/src/bin/logging.rs b/examples/rust/src/bin/logging.rs index 7786e10..3de7a47 100644 --- a/examples/rust/src/bin/logging.rs +++ b/examples/rust/src/bin/logging.rs @@ -1,7 +1,6 @@ use buttplug::{ client::ButtplugClient, - connector::ButtplugInProcessClientConnector, - server::{comm_managers::btleplug::BtlePlugCommunicationManager, ButtplugServerOptions}, + server::ButtplugServerOptions, }; use tracing_subscriber; @@ -13,8 +12,8 @@ async fn main() -> anyhow::Result<()> { // Now when you connect here, if you've set the RUST_LOG environment variable // (set it to "Info" or "Debug"), you should see messages about connection // setup. - let _client = - ButtplugClient::connect_in_process("Example Client", &ButtplugServerOptions::default()).await?; + let client = ButtplugClient::new("Example Client"); + client.connect_in_process(&ButtplugServerOptions::default()).await?; Ok(()) }