From cf16e4a75bc52fd3490fa19e27591f3b471275b1 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Tue, 4 Apr 2023 10:21:16 +0300 Subject: [PATCH] WIP: something something changing to quinnet, cant be bothered rn --- Cargo.lock | 1888 +++-------------- api/Cargo.toml | 2 + client/Cargo.toml | 5 +- client/src/main.rs | 27 +- client/src/plugins/networking/mod.rs | 1 - .../plugins/networking/systems/events/mod.rs | 4 +- .../networking/systems/events/send/user.rs | 5 - server/Cargo.toml | 10 +- server/src/main.rs | 41 +- server/src/systems/event/message/mod.rs | 24 +- server/src/systems/event/mod.rs | 63 +- server/src/systems/init.rs | 26 +- server/src/systems/mod.rs | 4 +- shared/Cargo.toml | 2 +- shared/src/server/mod.rs | 4 +- shared/src/server/protocol.rs | 32 +- shared/src/types/game.rs | 3 +- shared/src/types/user.rs | 3 +- 18 files changed, 432 insertions(+), 1712 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3d8c82d..6897cec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -53,7 +53,7 @@ checksum = "aaf5b3c3828397ee832ba4a72fb1a4ace10f781e31885f774cbd531014059115" dependencies = [ "accesskit", "accesskit_consumer", - "arrayvec 0.7.2", + "arrayvec", "once_cell", "paste", "windows 0.44.0", @@ -87,7 +87,7 @@ dependencies = [ "futures-util", "log", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "smallvec", "tokio", @@ -155,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -328,7 +328,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -346,15 +346,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - [[package]] name = "aead" version = "0.5.1" @@ -365,17 +356,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - [[package]] name = "aes" version = "0.8.2" @@ -383,65 +363,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", - "cipher 0.4.3", + "cipher", "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead 0.3.2", - "aes 0.6.0", - "cipher 0.2.5", - "ctr 0.6.0", - "ghash 0.3.1", - "subtle", -] - [[package]] name = "aes-gcm" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ - "aead 0.5.1", - "aes 0.8.2", - "cipher 0.4.3", - "ctr 0.9.2", - "ghash 0.5.0", + "aead", + "aes", + "cipher", + "ctr", + "ghash", "subtle", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom", "once_cell", "version_check", ] @@ -542,6 +488,7 @@ dependencies = [ "argon2", "chrono", "diesel", + "diesel_derives", "diesel_migrations", "email_address", "log", @@ -550,7 +497,7 @@ dependencies = [ "serde", "serde_json", "shared", - "uuid 1.3.0", + "uuid", ] [[package]] @@ -576,7 +523,7 @@ dependencies = [ "objc-foundation", "objc_id", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "thiserror", "winapi", "x11rb", @@ -593,12 +540,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -625,16 +566,6 @@ dependencies = [ "futures-core", ] -[[package]] -name = "async-dup" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7427a12b8dc09291528cfb1da2447059adb4a257388c2acd6497a79d55cf6f7c" -dependencies = [ - "futures-io", - "simple-mutex", -] - [[package]] name = "async-executor" version = "1.5.0" @@ -649,38 +580,6 @@ dependencies = [ "slab", ] -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock", - "autocfg", - "blocking", - "futures-lite", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite", - "log", - "parking", - "polling", - "rustix", - "slab", - "socket2", - "waker-fn", -] - [[package]] name = "async-lock" version = "2.6.0" @@ -691,36 +590,6 @@ dependencies = [ "futures-lite", ] -[[package]] -name = "async-net" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f" -dependencies = [ - "async-io", - "autocfg", - "blocking", - "futures-lite", -] - -[[package]] -name = "async-process" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" -dependencies = [ - "async-io", - "async-lock", - "autocfg", - "blocking", - "cfg-if", - "event-listener", - "futures-lite", - "libc", - "signal-hook", - "windows-sys 0.42.0", -] - [[package]] name = "async-task" version = "4.3.0" @@ -735,15 +604,9 @@ checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] -[[package]] -name = "atomic-waker" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" - [[package]] name = "atomic_refcell" version = "0.1.8" @@ -756,7 +619,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] @@ -773,7 +636,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.8", + "getrandom", "instant", "rand", ] @@ -793,12 +656,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base64" version = "0.13.1" @@ -868,7 +725,7 @@ checksum = "fc47dfcdcb52182af97741c1582cc9b3bb4e82f0adacf4c3e78909d438cbfc8b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -936,7 +793,7 @@ dependencies = [ "fastrand", "js-sys", "notify", - "parking_lot 0.12.1", + "parking_lot", "serde", "thiserror", "wasm-bindgen", @@ -959,7 +816,7 @@ dependencies = [ "bevy_transform", "bevy_utils", "oboe", - "parking_lot 0.12.1", + "parking_lot", "rodio", ] @@ -1006,7 +863,7 @@ checksum = "cdf11701c01bf4dc7a3fac9f4547f3643d3db4cc1682af40c8c86e2f8734b617" dependencies = [ "bevy_macro_utils", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1053,7 +910,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1250,7 +1107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f24ca3363292f1435641fbafd5c24ce362137dd7d69bee56dcaaa2bc1d512ffe" dependencies = [ "quote", - "syn", + "syn 1.0.107", "toml_edit", ] @@ -1316,6 +1173,30 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a96c24da064370917b92c2a84527e6a73b620c50ac5ef8b1af8c04ccf5256a7c" +[[package]] +name = "bevy_quinnet" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "407f06403642f0a767b23d3c5d944957d03d799ca858ccab4bd850ac2cf5b318" +dependencies = [ + "base64 0.13.1", + "bevy", + "bincode", + "bytes", + "futures", + "futures-util", + "quinn", + "quinn-proto", + "rcgen", + "ring", + "rustls", + "rustls-pemfile", + "serde", + "thiserror", + "tokio", + "tokio-util", +] + [[package]] name = "bevy_reflect" version = "0.10.0" @@ -1330,7 +1211,7 @@ dependencies = [ "erased-serde", "glam", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "serde", "smallvec", "thiserror", @@ -1346,8 +1227,8 @@ dependencies = [ "bit-set", "proc-macro2", "quote", - "syn", - "uuid 1.3.0", + "syn 1.0.107", + "uuid", ] [[package]] @@ -1385,7 +1266,7 @@ dependencies = [ "ktx2", "naga", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "regex", "ruzstd", "serde", @@ -1405,7 +1286,7 @@ dependencies = [ "bevy_macro_utils", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1427,7 +1308,7 @@ dependencies = [ "ron", "serde", "thiserror", - "uuid 1.3.0", + "uuid", ] [[package]] @@ -1558,13 +1439,13 @@ checksum = "04d90ce493910ad9af3b4220ea6864c7d1472761086a98230ecac59c8d547e95" dependencies = [ "ahash 0.7.6", "bevy_utils_proc_macros", - "getrandom 0.2.8", + "getrandom", "hashbrown", "instant", "petgraph", "thiserror", "tracing", - "uuid 1.3.0", + "uuid", ] [[package]] @@ -1575,7 +1456,7 @@ checksum = "62a42e465c446800c57a5bf65b64f4fa1c1f3a74efc2a64a2a001e4a4f548a2e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1618,6 +1499,15 @@ dependencies = [ "winit", ] +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.61.0" @@ -1635,7 +1525,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn", + "syn 1.0.107", ] [[package]] @@ -1659,25 +1549,13 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "blake2" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest", ] [[package]] @@ -1686,15 +1564,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.3" @@ -1704,22 +1573,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding", - "cipher 0.2.5", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "block-sys" version = "0.1.0-beta.1" @@ -1739,20 +1592,6 @@ dependencies = [ "objc2-encode", ] -[[package]] -name = "blocking" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" -dependencies = [ - "async-channel", - "async-lock", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", -] - [[package]] name = "bstr" version = "1.3.0" @@ -1788,7 +1627,7 @@ checksum = "5fe233b960f12f8007e3db2d136e3cb1c291bfd7396e384ee76025fc1a3932b4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1812,19 +1651,6 @@ dependencies = [ "bytes", ] -[[package]] -name = "calloop" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" -dependencies = [ - "log", - "nix 0.25.0", - "slotmap", - "thiserror", - "vec_map", -] - [[package]] name = "cc" version = "1.0.77" @@ -1834,17 +1660,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", -] - [[package]] name = "cesu8" version = "1.1.0" @@ -1857,7 +1672,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.1", + "nom", ] [[package]] @@ -1885,15 +1700,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.3" @@ -1922,9 +1728,9 @@ dependencies = [ "bevy", "bevy_editor_pls", "bevy_egui", + "bevy_quinnet", "directories", "futures-lite", - "naia-bevy-client", "proc-macro2", "serde", "serde_json", @@ -1994,12 +1800,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "const-oid" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" - [[package]] name = "const_panic" version = "0.2.7" @@ -2018,13 +1818,13 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ - "aes-gcm 0.10.1", + "aes-gcm", "base64 0.20.0", "hkdf", - "hmac 0.12.1", + "hmac", "percent-encoding", "rand", - "sha2 0.10.6", + "sha2", "subtle", "time", "version_check", @@ -2131,7 +1931,7 @@ dependencies = [ "ndk-context", "oboe", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -2148,42 +1948,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog 1.1.1", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog 2.2.0", -] - -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -2212,18 +1976,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -2231,36 +1983,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher 0.2.5", -] - [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.3", + "cipher", ] [[package]] @@ -2269,19 +2002,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "cxx" version = "1.0.88" @@ -2306,7 +2026,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.107", ] [[package]] @@ -2323,7 +2043,7 @@ checksum = "357f40d1f06a24b60ae1fe122542c1fb05d28d32acb2aed064e84bc2ad1e252e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2338,158 +2058,27 @@ dependencies = [ ] [[package]] -name = "darling" -version = "0.12.4" +name = "dasp_sample" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" -dependencies = [ - "darling_core", - "darling_macro", -] +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" [[package]] -name = "darling_core" -version = "0.12.4" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "fnv", - "ident_case", + "convert_case", "proc-macro2", "quote", - "strsim", - "syn", + "rustc_version", + "syn 1.0.107", ] [[package]] -name = "darling_macro" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "dasp_sample" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" - -[[package]] -name = "data-encoding" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" - -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "der-oid-macro" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4cccf60bb98c0fca115a581f894aed0e43fa55bf289fdac5599bec440bb4fd6" -dependencies = [ - "nom 6.1.2", - "num-bigint", - "num-traits", - "syn", -] - -[[package]] -name = "der-oid-macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73af209b6a5dc8ca7cbaba720732304792cddc933cfea3d74509c2b1ef2f436" -dependencies = [ - "num-bigint", - "num-traits", - "syn", -] - -[[package]] -name = "der-parser" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7ededb7525bb4114bc209685ce7894edc2965f4914312a1ea578a645a237f0" -dependencies = [ - "der-oid-macro 0.4.0", - "nom 6.1.2", - "num-bigint", - "num-traits", - "rusticata-macros 3.2.0", -] - -[[package]] -name = "der-parser" -version = "6.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cddf120f700b411b2b02ebeb7f04dc0b7c8835909a6c2f52bf72ed0dd3433b2" -dependencies = [ - "der-oid-macro 0.5.0", - "nom 7.1.1", - "num-bigint", - "num-traits", - "rusticata-macros 4.1.0", -] - -[[package]] -name = "derive_builder" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73" -dependencies = [ - "derive_builder_core", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn", -] - -[[package]] -name = "diesel" -version = "2.0.3" +name = "diesel" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4391a22b19c916e50bec4d6140f29bdda3e3bb187223fe6e3ea0b6e4d1021c04" dependencies = [ @@ -2501,19 +2090,19 @@ dependencies = [ "pq-sys", "r2d2", "serde_json", - "uuid 1.3.0", + "uuid", ] [[package]] name = "diesel_derives" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b758c91dbc3fe1fdcb0dba5bd13276c6a66422f2ef5795b58488248a310aa" +checksum = "0ad74fdcf086be3d4fdd142f67937678fe60ed431c3b2f08599e7687269410c4" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2527,22 +2116,13 @@ dependencies = [ "migrations_macros", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer", "crypto-common", "subtle", ] @@ -2573,33 +2153,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dlib" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" -dependencies = [ - "libloading", -] - [[package]] name = "downcast-rs" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - [[package]] name = "ecolor" version = "0.21.0" @@ -2629,27 +2188,6 @@ dependencies = [ "egui", ] -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "digest 0.10.6", - "ff", - "generic-array", - "group", - "hkdf", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - [[package]] name = "email_address" version = "0.2.4" @@ -2697,7 +2235,7 @@ checksum = "ae489d58959f3c4cdd1250866a05acfb341469affe4fced71aff3ba228be1693" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2735,7 +2273,7 @@ dependencies = [ "ecolor", "emath", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -2747,27 +2285,6 @@ dependencies = [ "serde", ] -[[package]] -name = "errno" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.45.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "error-code" version = "2.3.1" @@ -2802,16 +2319,6 @@ dependencies = [ "instant", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "filetime" version = "0.2.18" @@ -2880,16 +2387,25 @@ dependencies = [ ] [[package]] -name = "funty" -version = "1.1.0" +name = "futures" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -2897,15 +2413,26 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -2924,33 +2451,34 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -2991,17 +2519,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.8" @@ -3011,20 +2528,10 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval 0.4.5", -] - [[package]] name = "ghash" version = "0.5.0" @@ -3032,7 +2539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug", - "polyval 0.6.0", + "polyval", ] [[package]] @@ -3044,7 +2551,7 @@ dependencies = [ "fnv", "gilrs-core", "log", - "uuid 1.3.0", + "uuid", "vec_map", ] @@ -3061,7 +2568,7 @@ dependencies = [ "libudev-sys", "log", "nix 0.25.0", - "uuid 1.3.0", + "uuid", "vec_map", "wasm-bindgen", "web-sys", @@ -3122,7 +2629,7 @@ dependencies = [ "inflections", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -3200,17 +2707,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "guillotiere" version = "0.6.2" @@ -3274,12 +2770,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - [[package]] name = "hexasphere" version = "8.1.0" @@ -3302,17 +2792,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" dependencies = [ - "hmac 0.12.1", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest 0.9.0", + "hmac", ] [[package]] @@ -3321,7 +2801,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest", ] [[package]] @@ -3391,19 +2871,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "rustls 0.20.8", - "tokio", - "tokio-rustls", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -3441,12 +2908,6 @@ dependencies = [ "cxx-build", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -3551,17 +3012,6 @@ dependencies = [ "mach", ] -[[package]] -name = "io-lifetimes" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.45.0", -] - [[package]] name = "ipnet" version = "2.7.0" @@ -3701,19 +3151,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.137" @@ -3749,12 +3186,6 @@ dependencies = [ "cc", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" - [[package]] name = "local-channel" version = "0.1.3" @@ -3831,15 +3262,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - [[package]] name = "memoffset" version = "0.6.5" @@ -3913,7 +3335,7 @@ checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.42.0", ] @@ -3940,205 +3362,40 @@ dependencies = [ ] [[package]] -name = "naia-bevy-client" -version = "0.20.1" +name = "native-tls" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418968b6b53a544efd811b9b12acd014b17e8a1395f3a67836cb23ffa4c5a4d1" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ - "bevy_app", - "bevy_ecs", - "naia-bevy-shared", - "naia-client", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] -name = "naia-bevy-server" -version = "0.20.0" +name = "ndk" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a8e4ceddb7bc7e56007f2dcbd6a1628b9510e2950eedf21100b06625f49f0e" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bevy_app", - "bevy_ecs", - "naia-bevy-shared", - "naia-server", + "bitflags", + "jni-sys", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror", ] [[package]] -name = "naia-bevy-shared" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfda44d39dd0b63d1d10917387705e300a0a5409c6b82bd8e805c48f33a34cfb" -dependencies = [ - "bevy_app", - "bevy_ecs", - "naia-shared", -] - -[[package]] -name = "naia-client" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ba288827aec565275378c78746a9c7609077a0c2f36955ba21a3f54444a61e" -dependencies = [ - "bevy_ecs", - "cfg-if", - "log", - "naia-client-socket", - "naia-shared", -] - -[[package]] -name = "naia-client-socket" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e582cd071b36854bc6eb7be347259390eae09d1d4e62f1d3b59c307edc0de8" -dependencies = [ - "cfg-if", - "js-sys", - "log", - "naia-socket-shared", - "once_cell", - "regex", - "tinyjson", - "tokio", - "wasm-bindgen", - "web-sys", - "webrtc-unreliable-client", -] - -[[package]] -name = "naia-derive" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc35e1f96281b1df87626789cbe80fb848ff8a511d8ead5fe32b222551a76eb4" -dependencies = [ - "naia-serde-derive", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "naia-serde" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6422cbb88a0a983d620c3cf64248a6dfba94c513be74096d936015b79cd136f7" -dependencies = [ - "cfg-if", - "log", - "naia-serde-derive", -] - -[[package]] -name = "naia-serde-derive" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c02c29b86deb78790c6bc29ebc87aa2eb62639df442131bee852f398e91039" -dependencies = [ - "cfg-if", - "log", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "naia-server" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3861c85efafdea75af119ce8f927a9218c579f2142596ec9b202b5f832dd0bb" -dependencies = [ - "bevy_ecs", - "cfg-if", - "fastrand", - "log", - "naia-server-socket", - "naia-shared", - "ring", -] - -[[package]] -name = "naia-server-socket" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f169830be8915c1baac5ca2579a27d654809ba195811a07c528338f2b2e1b5a" -dependencies = [ - "async-dup", - "futures-channel", - "futures-core", - "futures-util", - "http", - "log", - "naia-socket-shared", - "once_cell", - "smol", - "webrtc-unreliable", -] - -[[package]] -name = "naia-shared" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12c83f13ed07552b3f9b4fa1f2e30235611f8c1cc5bafbf5b0e02ff95da2dea4" -dependencies = [ - "bevy_ecs", - "cfg-if", - "js-sys", - "log", - "naia-derive", - "naia-serde", - "naia-socket-shared", -] - -[[package]] -name = "naia-socket-shared" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba45e4f2b3d5aa7811e906811f298d234e02f9a2918edee4885b4b9b4030f3c" -dependencies = [ - "cfg-if", - "js-sys", - "log", - "rand", - "url", - "wasm-bindgen", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "ndk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" @@ -4151,19 +3408,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "nix" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset", -] - [[package]] name = "nix" version = "0.24.3" @@ -4186,7 +3430,6 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset", ] [[package]] @@ -4195,19 +3438,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -4264,17 +3494,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-derive" version = "0.3.3" @@ -4283,7 +3502,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4322,7 +3541,7 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", ] @@ -4344,7 +3563,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4453,24 +3672,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "oid-registry" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6aae73e474f83beacd8ae2179e328e03d63d9223949d97e1b7c108059a34715" -dependencies = [ - "der-parser 5.1.2", -] - -[[package]] -name = "oid-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe554cb2393bc784fd678c82c84cc0599c31ceadc7f03a594911f822cb8d1815" -dependencies = [ - "der-parser 6.0.1", -] - [[package]] name = "once_cell" version = "1.17.1" @@ -4516,7 +3717,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4565,34 +3766,12 @@ dependencies = [ "ttf-parser", ] -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", -] - [[package]] name = "parking" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -4600,21 +3779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.5", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -4637,7 +3802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -4690,16 +3855,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.26" @@ -4718,31 +3873,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" -dependencies = [ - "autocfg", - "cfg-if", - "libc", - "log", - "wepoll-ffi", - "windows-sys 0.42.0", -] - -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash 0.4.1", -] - [[package]] name = "polyval" version = "0.6.0" @@ -4752,7 +3882,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug", - "universal-hash 0.5.0", + "universal-hash", ] [[package]] @@ -4815,7 +3945,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "version_check", ] @@ -4832,9 +3962,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -4867,11 +3997,61 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quinn" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445cbfe2382fa023c4f2f3c7e1c95c03dcc1df2bf23cebcb2b13e1402c4394d1" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2", + "tracing", + "windows-sys 0.42.0", +] + [[package]] name = "quote" -version = "1.0.21" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -4883,16 +4063,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.12.1", + "parking_lot", "scheduled-thread-pool", ] -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "radsort" version = "0.1.0" @@ -4907,7 +4081,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -4917,16 +4091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -4935,7 +4100,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom", ] [[package]] @@ -4955,14 +4120,13 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.8.14" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5911d1403f4143c9d56a702069d593e8d0f3fab880a85e103604d0893ea31ba7" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "chrono", "pem", "ring", - "x509-parser 0.12.0", + "time", "yasna", ] @@ -5011,7 +4175,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", + "getrandom", "redox_syscall 0.2.16", "thiserror", ] @@ -5074,7 +4238,6 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -5084,34 +4247,19 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.20.8", - "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", "winreg", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "ring" version = "0.16.20" @@ -5169,61 +4317,27 @@ dependencies = [ "semver", ] -[[package]] -name = "rusticata-macros" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbee512c633ecabd4481c40111b6ded03ddd9ab10ba6caa5a74e14c889921ad" -dependencies = [ - "nom 6.1.2", -] - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom 7.1.1", -] - -[[package]] -name = "rustix" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b24138615de35e32031d041a09032ef3487a616d901ca4db224e7d557efae2" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.45.0", -] - [[package]] name = "rustls" -version = "0.19.1" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "base64 0.13.1", - "log", "ring", - "sct 0.6.1", - "webpki 0.21.4", + "sct", + "webpki", ] [[package]] -name = "rustls" -version = "0.20.8" +name = "rustls-native-certs" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ - "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", ] [[package]] @@ -5235,12 +4349,6 @@ dependencies = [ "base64 0.21.0", ] -[[package]] -name = "rustversion" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" - [[package]] name = "ruzstd" version = "0.2.4" @@ -5282,7 +4390,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "977a7519bff143a44f842fd07e80ad1329295bd71686457f18e496736f4bf9bf" dependencies = [ - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -5292,12 +4400,6 @@ dependencies = [ "diesel", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -5316,16 +4418,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -5336,20 +4428,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - [[package]] name = "security-framework" version = "2.7.0" @@ -5396,7 +4474,7 @@ checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -5439,24 +4517,11 @@ dependencies = [ "bevy_core", "bevy_ecs", "bevy_log", - "naia-bevy-server", + "bevy_quinnet", "serde_json", "shared", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha1" version = "0.10.5" @@ -5465,20 +4530,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -5489,7 +4541,7 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] @@ -5505,15 +4557,15 @@ dependencies = [ name = "shared" version = "0.1.0" dependencies = [ + "bevy_quinnet", "chrono", "diesel", - "naia-bevy-shared", "reqwest", "schema", "serde", "serde_json", "thiserror", - "uuid 1.3.0", + "uuid", ] [[package]] @@ -5522,16 +4574,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5541,25 +4583,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.6", - "rand_core 0.6.4", -] - -[[package]] -name = "simple-mutex" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38aabbeafa6f6dead8cebf246fe9fae1f9215c8d29b3a69f93bd62a9e4a3dcd6" -dependencies = [ - "event-listener", -] - [[package]] name = "slab" version = "0.4.7" @@ -5587,42 +4610,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smithay-client-toolkit" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" -dependencies = [ - "bitflags", - "calloop", - "dlib", - "lazy_static", - "log", - "memmap2", - "nix 0.24.3", - "pkg-config", - "wayland-client", - "wayland-cursor", - "wayland-protocols", -] - -[[package]] -name = "smol" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" -dependencies = [ - "async-channel", - "async-executor", - "async-fs", - "async-io", - "async-lock", - "async-net", - "async-process", - "blocking", - "futures-lite", -] - [[package]] name = "socket2" version = "0.4.7" @@ -5649,16 +4636,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -5671,12 +4648,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "subtle" version = "2.4.1" @@ -5701,15 +4672,14 @@ dependencies = [ ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn" +version = "2.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" dependencies = [ "proc-macro2", "quote", - "syn", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -5732,17 +4702,11 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ee314c07429e51c4770287734f62d23bb27cb9e941823f969b57f50171079ee" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "num-traits", "slotmap", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.3.0" @@ -5783,7 +4747,7 @@ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -5833,12 +4797,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tinyjson" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab95735ea2c8fd51154d01e39cf13912a78071c2d89abc49a7ef102a7dd725a" - [[package]] name = "tinyvec" version = "1.6.0" @@ -5866,7 +4824,7 @@ dependencies = [ "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -5882,7 +4840,7 @@ checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -5895,17 +4853,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.0", -] - [[package]] name = "tokio-util" version = "0.7.4" @@ -5990,7 +4937,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -6104,16 +5051,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.0" @@ -6141,22 +5078,13 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.8", -] - [[package]] name = "uuid" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" dependencies = [ - "getrandom 0.2.8", + "getrandom", "serde", ] @@ -6184,15 +5112,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "waker-fn" version = "1.1.0" @@ -6220,12 +5139,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -6253,7 +5166,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -6287,7 +5200,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6298,57 +5211,6 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" -[[package]] -name = "wayland-client" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" -dependencies = [ - "bitflags", - "downcast-rs", - "libc", - "nix 0.24.3", - "scoped-tls", - "wayland-commons", - "wayland-scanner", - "wayland-sys", -] - -[[package]] -name = "wayland-commons" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" -dependencies = [ - "nix 0.24.3", - "once_cell", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-cursor" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" -dependencies = [ - "nix 0.24.3", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" -dependencies = [ - "bitflags", - "wayland-client", - "wayland-commons", - "wayland-scanner", -] - [[package]] name = "wayland-scanner" version = "0.29.5" @@ -6360,16 +5222,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "wayland-sys" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" -dependencies = [ - "dlib", - "pkg-config", -] - [[package]] name = "web-sys" version = "0.3.61" @@ -6396,16 +5248,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -6416,111 +5258,24 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "webrtc-unreliable" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb099cbcb47caf79f8f59e0c6cbc8a187954cd467f2b30953827d4df56aff73" -dependencies = [ - "async-io", - "byteorder", - "crc 3.0.1", - "futures-channel", - "futures-core", - "futures-util", - "http", - "log", - "openssl", - "rand", -] - -[[package]] -name = "webrtc-unreliable-client" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1b88ad6bf734716c49458e2f2a01d807ed0831db335ce5b9a07fadccfab461" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.8.0", - "anyhow", - "async-trait", - "base64 0.13.1", - "block-modes", - "byteorder", - "bytes", - "ccm", - "crc 2.1.0", - "der-parser 5.1.2", - "derive_builder", - "elliptic-curve", - "hmac 0.10.1", - "ipnet", - "lazy_static", - "log", - "nix 0.23.1", - "p256", - "parking_lot 0.11.2", - "rand", - "rand_core 0.6.4", - "rcgen", - "regex", - "reqwest", - "ring", - "rustls 0.19.1", - "serde", - "serde_derive", - "sha-1", - "sha2 0.9.9", - "socket2", - "subtle", - "thiserror", - "tinyjson", - "tokio", - "url", - "uuid 0.8.2", - "waitgroup", - "webpki 0.21.4", - "winapi", - "x25519-dalek", - "x509-parser 0.9.2", -] - [[package]] name = "weezl" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "wgpu" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d745a1b6d91d85c33defbb29f0eee0450e1d2614d987e14bf6baf26009d132d7" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "cfg-if", "js-sys", "log", "naga", - "parking_lot 0.12.1", + "parking_lot", "profiling", "raw-window-handle", "smallvec", @@ -6539,14 +5294,14 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7131408d940e335792645a98f03639573b0480e9e2e7cddbbab74f7c6d9f3fff" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "bit-vec", "bitflags", "codespan-reporting", "fxhash", "log", "naga", - "parking_lot 0.12.1", + "parking_lot", "profiling", "raw-window-handle", "smallvec", @@ -6563,7 +5318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7762ae7fcc06943c1b5d4987ab0194e82aaba7767fbfb75d3458844c5b82cc45" dependencies = [ "android_system_properties", - "arrayvec 0.7.2", + "arrayvec", "ash", "bit-set", "bitflags", @@ -6585,7 +5340,7 @@ dependencies = [ "metal", "naga", "objc", - "parking_lot 0.12.1", + "parking_lot", "profiling", "range-alloc", "raw-window-handle", @@ -6695,7 +5450,7 @@ checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -6706,7 +5461,7 @@ checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -6856,11 +5611,7 @@ dependencies = [ "percent-encoding", "raw-window-handle", "redox_syscall 0.3.4", - "smithay-client-toolkit", "wasm-bindgen", - "wayland-client", - "wayland-commons", - "wayland-protocols", "wayland-scanner", "web-sys", "windows-sys 0.45.0", @@ -6876,12 +5627,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "x11-dl" version = "2.20.1" @@ -6915,62 +5660,6 @@ dependencies = [ "nix 0.24.3", ] -[[package]] -name = "x25519-dalek" -version = "2.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" -dependencies = [ - "curve25519-dalek", - "rand_core 0.6.4", - "zeroize", -] - -[[package]] -name = "x509-parser" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64abca276c58f8341ddc13fd4bd6ae75993cc669043f5b34813c90f7dff04771" -dependencies = [ - "base64 0.13.1", - "chrono", - "data-encoding", - "der-parser 5.1.2", - "lazy_static", - "nom 6.1.2", - "oid-registry 0.1.5", - "rusticata-macros 3.2.0", - "rustversion", - "thiserror", -] - -[[package]] -name = "x509-parser" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc90836a84cb72e6934137b1504d0cae304ef5d83904beb0c8d773bbfe256ed" -dependencies = [ - "base64 0.13.1", - "chrono", - "data-encoding", - "der-parser 6.0.1", - "lazy_static", - "nom 7.1.1", - "oid-registry 0.2.0", - "ring", - "rusticata-macros 4.1.0", - "thiserror", -] - -[[package]] -name = "xcursor" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" -dependencies = [ - "nom 7.1.1", -] - [[package]] name = "xi-unicode" version = "0.3.0" @@ -6985,30 +5674,9 @@ checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" [[package]] name = "yasna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e262a29d0e61ccf2b6190d7050d4b237535fc76ce4c1210d9caa316f71dffa75" -dependencies = [ - "chrono", -] - -[[package]] -name = "zeroize" -version = "1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "time", ] diff --git a/api/Cargo.toml b/api/Cargo.toml index 8b8058a..3628afc 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -21,6 +21,8 @@ diesel_migrations = "2.0.0" email_address = "0.2.4" argon2 = "0.4.1" +diesel_derives = "2.0.2" + [dependencies.serde] version = "1.0.152" default-features = false diff --git a/client/Cargo.toml b/client/Cargo.toml index f3735d1..feedcb2 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -23,7 +23,7 @@ dev = [ [dependencies] laurelin_shared = { package = "shared", path = "../shared" } -naia-bevy-client = { version = "0.20.1", features = [ "transport_webrtc" ] } +bevy_quinnet = "0.4.0" # one dep needs ^0.5.9, and another one needs ^0.5.10 # and for some reason cargo can't figure this out, so we're forcing it for now. @@ -32,7 +32,8 @@ toml = "0.7.1" # more dep shit proc-macro2 = "1.0.50" -bevy = { version = "0.10.0", features = [ "wayland" ] } +#bevy = { version = "0.10.0", features = [ "wayland" ] } +bevy = { version = "0.10.0", features = [ ] } bevy_editor_pls = { version = "0.3.0", optional = true } bevy_egui = "0.20.1" diff --git a/client/src/main.rs b/client/src/main.rs index b0f24fd..f271b49 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -18,14 +18,9 @@ use bevy::{ }, }; use bevy_egui::EguiPlugin; -use naia_bevy_client::{ - Client, ClientConfig as NaiaClientConfig, Plugin as NaiaClientPlugin, ReceiveEvents, -}; +use bevy_quinnet::client::{Client, QuinnetClientPlugin}; -use laurelin_shared::{ - server::protocol::protocol, - types::{game::GamePub, user::UserPub}, -}; +use laurelin_shared::types::{game::GamePub, user::UserPub}; mod cfg; mod constants; @@ -99,8 +94,7 @@ fn main() { ..Default::default() })); - app.configure_set(MainLoop.after(ReceiveEvents)) - .configure_set(AfterMainLoop.after(MainLoop)); + app.configure_set(AfterMainLoop.after(MainLoop)); #[cfg(feature = "dev")] app.add_plugin(dev::DevPlugin); @@ -142,11 +136,8 @@ fn main() { // .insert_resource(runtime::game::RTDGame::default()); // Networking - app.add_plugin(NaiaClientPlugin::new( - NaiaClientConfig::default(), - protocol(), - )) - .add_plugin(plugins::networking::NetworkingPlugin); + app.add_plugin(QuinnetClientPlugin::default()) + .add_plugin(plugins::networking::NetworkingPlugin); // Graceful exit app.add_event::() @@ -173,11 +164,13 @@ pub struct GracefulExit; pub fn handle_graceful_exit( mut ev: EventReader, mut app_exit_events: EventWriter, - mut client: Client, + mut client: ResMut, ) { for _ in ev.iter() { - if client.is_connected() { - client.disconnect(); + if let Some(connection) = client.get_connection() { + if connection.is_connected() { + client.close_all_connections(); + } } app_exit_events.send(AppExit); diff --git a/client/src/plugins/networking/mod.rs b/client/src/plugins/networking/mod.rs index 92d6790..411ee5d 100644 --- a/client/src/plugins/networking/mod.rs +++ b/client/src/plugins/networking/mod.rs @@ -7,7 +7,6 @@ */ use bevy::prelude::*; -use naia_bevy_client::ReceiveEvents; mod systems; pub use systems::events::{receive, send}; diff --git a/client/src/plugins/networking/systems/events/mod.rs b/client/src/plugins/networking/systems/events/mod.rs index e8b30cb..14b9043 100644 --- a/client/src/plugins/networking/systems/events/mod.rs +++ b/client/src/plugins/networking/systems/events/mod.rs @@ -6,5 +6,5 @@ * See LICENSE for licensing information. */ -pub mod receive; -pub mod send; +//pub mod receive; +//pub mod send; diff --git a/client/src/plugins/networking/systems/events/send/user.rs b/client/src/plugins/networking/systems/events/send/user.rs index b892544..5536c20 100644 --- a/client/src/plugins/networking/systems/events/send/user.rs +++ b/client/src/plugins/networking/systems/events/send/user.rs @@ -7,11 +7,6 @@ */ use bevy::prelude::{EventReader, ResMut}; -use laurelin_shared::server::{ - channels::DataRequestChannel, - messages::{DataRequest, DataRequestType}, -}; -use naia_bevy_client::Client; use crate::Global; diff --git a/server/Cargo.toml b/server/Cargo.toml index 972464a..b6c1fc9 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -12,12 +12,12 @@ publish = false [dependencies] laurelin_shared = { package = "shared", path = "../shared" } -naia-bevy-server = { version = "0.20.0", features = [ "transport_webrtc" ] } +bevy_quinnet = "0.4.0" -bevy_app = { version = "0.10.0", default-features=false } -bevy_core = { version = "0.10.0", default-features=false } -bevy_ecs = { version = "0.10.0", default-features=false } -bevy_log = { version = "0.10.0", default-features=false } +bevy_app = { version = "0.10.0", default-features = false } +bevy_core = { version = "0.10.0", default-features = false } +bevy_ecs = { version = "0.10.0", default-features = false } +bevy_log = { version = "0.10.0", default-features = false } [dependencies.serde_json] version = "1.0.94" diff --git a/server/src/main.rs b/server/src/main.rs index 32f5ce2..3f5b82d 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -6,16 +6,13 @@ * See LICENSE for licensing information. */ -use std::{collections::HashMap, time::Duration}; +use std::collections::HashMap; -use bevy_app::{App, ScheduleRunnerPlugin, ScheduleRunnerSettings}; -use bevy_core::{FrameCountPlugin, TaskPoolPlugin, TypeRegistrationPlugin}; -use bevy_ecs::{schedule::IntoSystemConfigs, system::Resource}; +use bevy_app::{App, ScheduleRunnerPlugin}; +use bevy_ecs::system::Resource; use bevy_log::{info, LogPlugin}; -use naia_bevy_server::{Plugin as ServerPlugin, ReceiveEvents, ServerConfig, UserKey}; - -use laurelin_shared::{server::protocol::protocol, types::user::UserPub}; +use bevy_quinnet::{server::QuinnetServerPlugin, shared::ClientId}; mod systems; @@ -24,15 +21,17 @@ pub struct Config { pub api_address: String, } +/* /// Temporary runtime data #[derive(Resource)] pub struct RuntimeTemp { pub afterauth_details: HashMap, } +*/ #[derive(Resource)] pub struct Global { - pub user_to_session_map: HashMap, + pub client_to_user_map: HashMap, } fn main() { @@ -42,42 +41,32 @@ fn main() { server // plugins - .add_plugin(TaskPoolPlugin::default()) - .add_plugin(TypeRegistrationPlugin::default()) - .add_plugin(FrameCountPlugin::default()) - .insert_resource(ScheduleRunnerSettings::run_loop(Duration::from_millis(3))) .add_plugin(ScheduleRunnerPlugin::default()) .add_plugin(LogPlugin { // NOTE: overridden by RUST_LOG environment variable level: bevy_log::Level::INFO, ..Default::default() }) - .add_plugin(ServerPlugin::new(ServerConfig::default(), protocol())) + .add_plugin(QuinnetServerPlugin::default()) // config .insert_resource(Config { api_address }) + /* // temp runtime data .insert_resource(RuntimeTemp { afterauth_details: HashMap::new(), }) + */ // global data .insert_resource(Global { - user_to_session_map: HashMap::new(), + client_to_user_map: HashMap::new(), }) // init system .add_startup_system(systems::init::init) // events - .add_systems( - ( - systems::event::auth_events, - systems::event::connect_events, - systems::event::disconnect_events, - systems::event::error_events, - systems::event::tick_events, - systems::event::message_events, - ) - .chain() - .in_set(ReceiveEvents), - ); + .add_systems(( + systems::event::handle_client_messages, + systems::event::handle_server_events, + )); info!("Laurelin server starting"); server.run(); diff --git a/server/src/systems/event/message/mod.rs b/server/src/systems/event/message/mod.rs index 05329b1..afa92b7 100644 --- a/server/src/systems/event/message/mod.rs +++ b/server/src/systems/event/message/mod.rs @@ -6,6 +6,27 @@ * See LICENSE for licensing information. */ +use bevy_ecs::prelude::*; +use bevy_quinnet::server::Server; +use laurelin_shared::server::protocol::ClientMessage; + +use crate::Global; + +pub fn handle_client_messages(mut global: ResMut, mut server: ResMut) { + let endpoint = server.endpoint_mut(); + for client_id in endpoint.clients() { + while let Some(message) = endpoint.try_receive_message_from::(client_id) { + match message { + ClientMessage::Disconnect {} => { + // TODO: handle + endpoint.disconnect_client(client_id).unwrap(); + } + } + } + } +} + +/* use bevy_ecs::{ event::EventReader, system::{Res, ResMut}, @@ -29,7 +50,7 @@ use naia_bevy_server::{events::MessageEvents, Server}; use crate::{Config, Global}; -pub(crate) fn message_events( +pub fn message_events( mut ev: EventReader, mut server: Server, config: Res, @@ -176,3 +197,4 @@ pub(crate) fn message_events( } } } +*/ diff --git a/server/src/systems/event/mod.rs b/server/src/systems/event/mod.rs index c4c6cf1..4cd199e 100644 --- a/server/src/systems/event/mod.rs +++ b/server/src/systems/event/mod.rs @@ -6,6 +6,56 @@ * See LICENSE for licensing information. */ +use bevy_ecs::prelude::*; +use bevy_log::{info, warn}; +use bevy_quinnet::{ + server::{ConnectionEvent, ConnectionLostEvent, Server}, + shared::ClientId, +}; + +use crate::Global; + +mod message; +pub use message::handle_client_messages; + +pub fn handle_server_events( + mut global: ResMut, + mut server: ResMut, + mut connection_events: EventReader, + mut connection_lost_events: EventReader, +) { + for client in connection_events.iter() { + handle_connect(&client.id, &mut global); + } + + for client in connection_lost_events.iter() { + handle_disconnect(&client.id, &mut global); + } +} + +fn handle_connect(client_id: &ClientId, global: &mut Global) { + if let Some(user_id) = global.client_to_user_map.get(&client_id) { + warn!( + "Recieved a connection event from an already connected user: {}", + client_id + ); + } else { + info!("{} connected", client_id); + } +} + +fn handle_disconnect(client_id: &ClientId, global: &mut Global) { + if let Some(user_id) = global.client_to_user_map.remove(&client_id) { + info!("{} disconnected", client_id); + } else { + warn!( + "Received a disconnect event from an unknown source, possibly a client sending the disconnect event twice: {}", + client_id + ); + } +} + +/* use bevy_ecs::{ event::EventReader, system::{Res, ResMut}, @@ -26,9 +76,9 @@ use naia_bevy_server::{ use crate::{Config, Global, RuntimeTemp}; mod message; -pub(crate) use message::message_events; +pub use message::message_events; -pub(crate) fn auth_events( +pub fn auth_events( mut ev: EventReader, mut server: Server, config: Res, @@ -71,7 +121,7 @@ pub(crate) fn auth_events( } } -pub(crate) fn connect_events( +pub fn connect_events( mut ev: EventReader, mut server: Server, mut temp: ResMut, @@ -100,7 +150,7 @@ pub(crate) fn connect_events( } } -pub(crate) fn disconnect_events(mut ev: EventReader, mut global: ResMut) { +pub fn disconnect_events(mut ev: EventReader, mut global: ResMut) { for DisconnectEvent(user_key, user) in ev.iter() { info!("Naia Server disconnected from: {:?}", user.address); @@ -108,13 +158,13 @@ pub(crate) fn disconnect_events(mut ev: EventReader, mut global } } -pub(crate) fn error_events(mut ev: EventReader) { +pub fn error_events(mut ev: EventReader) { for ErrorEvent(error) in ev.iter() { info!("Naia Server Error: {:?}", error); } } -pub(crate) fn tick_events(mut ev: EventReader, mut server: Server) { +pub fn tick_events(mut ev: EventReader, mut server: Server) { let mut has_ticked = false; for TickEvent(server_tick) in ev.iter() { @@ -133,3 +183,4 @@ pub(crate) fn tick_events(mut ev: EventReader, mut server: Server) { //} } } +*/ diff --git a/server/src/systems/init.rs b/server/src/systems/init.rs index 3013ad6..63073ff 100644 --- a/server/src/systems/init.rs +++ b/server/src/systems/init.rs @@ -6,22 +6,20 @@ * See LICENSE for licensing information. */ +use bevy_ecs::system::ResMut; use bevy_log::info; -use naia_bevy_server::{transport::webrtc, Server}; +use bevy_quinnet::server::{certificate::CertificateRetrievalMode, Server, ServerConfiguration}; -pub(crate) fn init(mut server: Server) { +pub fn init(mut server: ResMut) { info!("Laurelin server listening"); - let server_addrs = webrtc::ServerAddrs::new( - "0.0.0.0:14191" - .parse() - .expect("could not parse Signaling address/port"), - "0.0.0.0:14192" - .parse() - .expect("could not parse WebRTC data address/port"), - "http://127.0.0.1:14192", - ); - - let socket = webrtc::Socket::new(&server_addrs, server.socket_config()); - server.listen(socket); + // TODO: handle unwraps + server + .start_endpoint( + ServerConfiguration::from_string("0.0.0.0:6000").unwrap(), + CertificateRetrievalMode::GenerateSelfSigned { + server_hostname: "127.0.0.1".to_string(), + }, + ) + .unwrap(); } diff --git a/server/src/systems/mod.rs b/server/src/systems/mod.rs index 65f2393..e7627d8 100644 --- a/server/src/systems/mod.rs +++ b/server/src/systems/mod.rs @@ -6,6 +6,6 @@ * See LICENSE for licensing information. */ -pub(crate) mod init; +pub mod init; -pub(crate) mod event; +pub mod event; diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 9947d51..f540fe9 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -12,7 +12,7 @@ publish = false [dependencies] laurelin_schema = { package = "schema", path = "../schema" } -naia-bevy-shared = "0.20.0" +bevy_quinnet = "0.4.0" thiserror = "1.0.38" diff --git a/shared/src/server/mod.rs b/shared/src/server/mod.rs index 1b20941..073fdff 100644 --- a/shared/src/server/mod.rs +++ b/shared/src/server/mod.rs @@ -6,7 +6,7 @@ * See LICENSE for licensing information. */ -pub mod channels; -pub mod messages; +//pub mod channels; +//pub mod messages; pub mod protocol; diff --git a/shared/src/server/protocol.rs b/shared/src/server/protocol.rs index 3a95f92..5f1346b 100644 --- a/shared/src/server/protocol.rs +++ b/shared/src/server/protocol.rs @@ -6,20 +6,24 @@ * See LICENSE for licensing information. */ -use std::time::Duration; +use bevy_quinnet::shared::ClientId; +use serde::Deserialize; -use naia_bevy_shared::{LinkConditionerConfig, Protocol}; - -use super::{channels::ChannelsPlugin, messages::MessagesPlugin}; +/// Messages from clients +#[derive(Deserialize)] +pub enum ClientMessage { + Disconnect {}, + //RequestGameDetails {id: String} +} -pub fn protocol() -> Protocol { - Protocol::builder() - // configuration - .tick_interval(Duration::from_millis(16)) - .link_condition(LinkConditionerConfig::new(100, 0, 0.)) - // channels - .add_plugin(ChannelsPlugin) - // messages - .add_plugin(MessagesPlugin) - .build() +/// Messages from the server +#[derive(Deserialize)] +pub enum ServerMessage { + ClientConnected { + client_id: ClientId, + username: String, + }, + ClientDisconnected { + client_id: ClientId, + }, //GameDetails(GamePub), or json as a string. } diff --git a/shared/src/types/game.rs b/shared/src/types/game.rs index c7f7b63..440ce4c 100644 --- a/shared/src/types/game.rs +++ b/shared/src/types/game.rs @@ -8,7 +8,6 @@ use chrono::NaiveDateTime; use diesel::{AsChangeset, Insertable, Queryable}; -use naia_bevy_shared::Serde; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -34,7 +33,7 @@ pub struct Game { pub game_data_id: Uuid, } -#[derive(Serialize, Deserialize, Clone, Serde, PartialEq)] +#[derive(Serialize, Deserialize, Clone, PartialEq)] pub struct GamePub { pub id: String, pub created_at: String, diff --git a/shared/src/types/user.rs b/shared/src/types/user.rs index 258a880..876d422 100644 --- a/shared/src/types/user.rs +++ b/shared/src/types/user.rs @@ -8,7 +8,6 @@ use chrono::NaiveDateTime; use diesel::{Insertable, Queryable}; -use naia_bevy_shared::Serde; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -25,7 +24,7 @@ pub struct User { pub password: String, } -#[derive(Serialize, Deserialize, Clone, Serde, PartialEq)] +#[derive(Serialize, Deserialize, Clone, PartialEq)] pub struct UserPub { pub id: String, pub created_at: String, -- 2.44.1