From a6a1949914fb2074fb5fec9c75b075eac369541f Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 6 Feb 2021 22:54:28 +0100 Subject: rstnode: create small graphics example --- games/rstnode/Cargo.lock | 1696 ++++++++++++++------ games/rstnode/rst-client/Cargo.toml | 5 +- games/rstnode/rst-client/src/cli.rs | 1 + games/rstnode/rst-client/src/constants.rs | 5 + games/rstnode/rst-client/src/ctx.rs | 30 + .../rst-client/src/graphics/entities/mod.rs | 43 + games/rstnode/rst-client/src/graphics/mod.rs | 16 + games/rstnode/rst-client/src/graphics/ui/mod.rs | 1 + games/rstnode/rst-client/src/main.rs | 21 +- games/rstnode/rst-client/src/settings.rs | 73 + games/rstnode/rst-client/src/state.rs | 48 + games/rstnode/rst-client/src/window.rs | 10 + games/rstnode/rst-core/src/data.rs | 7 +- games/rstnode/rst-core/src/lib.rs | 2 +- games/rstnode/shell.nix | 6 +- 15 files changed, 1474 insertions(+), 490 deletions(-) create mode 100644 games/rstnode/rst-client/src/cli.rs create mode 100644 games/rstnode/rst-client/src/constants.rs create mode 100644 games/rstnode/rst-client/src/ctx.rs create mode 100644 games/rstnode/rst-client/src/graphics/entities/mod.rs create mode 100644 games/rstnode/rst-client/src/graphics/mod.rs create mode 100644 games/rstnode/rst-client/src/graphics/ui/mod.rs create mode 100644 games/rstnode/rst-client/src/settings.rs create mode 100644 games/rstnode/rst-client/src/state.rs create mode 100644 games/rstnode/rst-client/src/window.rs diff --git a/games/rstnode/Cargo.lock b/games/rstnode/Cargo.lock index d41147a5e623..ca181bba0666 100644 --- a/games/rstnode/Cargo.lock +++ b/games/rstnode/Cargo.lock @@ -1,5 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "ab_glyph" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b1f87418ab9d7e1ee2a783aa167767ebeb316d0a9fb10c347aec28a5008acb" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser 0.11.0", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" + [[package]] name = "addr2line" version = "0.14.1" @@ -22,21 +38,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] -name = "alga" -version = "0.9.3" +name = "alsa" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" +checksum = "eb213f6b3e4b1480a60931ca2035794aa67b73103d254715b1db7b70dcb3c934" dependencies = [ - "approx", - "num-complex", - "num-traits 0.2.14", + "alsa-sys", + "bitflags", + "libc", + "nix 0.15.0", ] [[package]] name = "alsa-sys" -version = "0.1.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0edcbbf9ef68f15ae1b620f722180b82a98b6f0628d30baa6b8d2a5abc87d58" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" dependencies = [ "libc", "pkg-config", @@ -44,13 +61,12 @@ dependencies = [ [[package]] name = "andrew" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" +checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" dependencies = [ "bitflags", - "line_drawing", - "rusttype 0.7.9", + "rusttype", "walkdir", "xdg", "xml-rs", @@ -62,13 +78,22 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "approx" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" dependencies = [ - "num-traits 0.2.14", + "num-traits", ] [[package]] @@ -77,15 +102,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] - [[package]] name = "arrayvec" version = "0.5.2" @@ -104,6 +120,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + [[package]] name = "async-attributes" version = "1.1.2" @@ -123,8 +145,8 @@ dependencies = [ "async-attributes", "async-task", "broadcaster", - "crossbeam-channel", - "crossbeam-deque", + "crossbeam-channel 0.4.4", + "crossbeam-deque 0.7.3", "crossbeam-utils 0.7.2", "futures-core", "futures-io", @@ -163,10 +185,15 @@ dependencies = [ ] [[package]] -name = "autocfg" -version = "0.1.7" +name = "atty" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.9", +] [[package]] name = "autocfg" @@ -183,7 +210,7 @@ dependencies = [ "addr2line", "cfg-if 1.0.0", "libc", - "miniz_oxide", + "miniz_oxide 0.4.3", "object", "rustc-demangle", ] @@ -254,7 +281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "constant_time_eq", ] @@ -296,12 +323,24 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" +[[package]] +name = "bytemuck" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a4bad0c5981acc24bc09e532f35160f952e35422603f0563cd7a73c2c2e65a0" + [[package]] name = "byteorder" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" + [[package]] name = "bzip2" version = "0.3.3" @@ -323,6 +362,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "calloop" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +dependencies = [ + "log", + "nix 0.18.0", +] + [[package]] name = "cargo_metadata" version = "0.10.0" @@ -341,13 +390,19 @@ version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cexpr" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" dependencies = [ - "nom", + "nom 5.1.2", ] [[package]] @@ -364,11 +419,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cgl" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" dependencies = [ - "gleam", "libc", ] @@ -380,12 +434,18 @@ checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ "libc", "num-integer", - "num-traits 0.2.14", + "num-traits", "serde", - "time", + "time 0.1.43", "winapi 0.3.9", ] +[[package]] +name = "chunked_transfer" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" + [[package]] name = "clang-sys" version = "1.0.3" @@ -394,7 +454,22 @@ checksum = "0659001ab56b791be01d4b729c44376edc6718cf389a502e579b77b758f3296c" dependencies = [ "glob", "libc", - "libloading 0.6.7", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] @@ -423,14 +498,46 @@ dependencies = [ [[package]] name = "cocoa" -version = "0.18.5" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54201c07dcf3a5ca33fececb8042aed767ee4bfd5a0235a8ceabcda956044b2" +dependencies = [ + "bitflags", + "block", + "cocoa-foundation", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" +dependencies = [ + "bitflags", + "block", + "cocoa-foundation", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1706996401131526e36b3b49f0c4d912639ce110996f3ca144d78946727bce54" +checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ "bitflags", "block", - "core-foundation", - "core-graphics", + "core-foundation 0.9.1", + "core-graphics-types", "foreign-types", "libc", "objc", @@ -442,6 +549,29 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "combine" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4369b5e4c0cddf64ad8981c0111e7df4f7078f4d6ba98fb31f2e17c4c57b7e" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "conjoiner-engine" version = "1.2.3" @@ -472,12 +602,45 @@ dependencies = [ "syn 1.0.60", ] +[[package]] +name = "const_fn" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" + [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "cookie" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784ad0fbab4f3e9cef09f20e0aea6000ae08d2cb98ac4c0abc53df18803d702f" +dependencies = [ + "percent-encoding", + "time 0.2.25", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3818dfca4b0cb5211a659bbcbb94225b7127407b2b135e650d717bfb78ab10d3" +dependencies = [ + "cookie", + "idna", + "log", + "publicsuffix", + "serde", + "serde_json", + "time 0.2.25", + "url", +] + [[package]] name = "core-foundation" version = "0.6.4" @@ -489,11 +652,22 @@ dependencies = [ ] [[package]] -name = "core-foundation-sys" -version = "0.5.1" +name = "core-foundation" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys 0.8.2", "libc", ] @@ -503,18 +677,68 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + +[[package]] +name = "core-graphics" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +dependencies = [ + "bitflags", + "core-foundation 0.7.0", + "foreign-types", + "libc", +] + [[package]] name = "core-graphics" -version = "0.17.3" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" +checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.9.1", + "core-graphics-types", "foreign-types", "libc", ] +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags", + "core-foundation 0.9.1", + "foreign-types", + "libc", +] + +[[package]] +name = "core-video-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +dependencies = [ + "cfg-if 0.1.10", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", + "libc", + "objc", +] + [[package]] name = "coreaudio-rs" version = "0.9.1" @@ -536,16 +760,26 @@ dependencies = [ [[package]] name = "cpal" -version = "0.8.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58ae1ed6536b1b233f5e3aeb6997a046ddb4d05e3f61701b58a92eb254a829e" +checksum = "05631e2089dfa5d3b6ea1cfbbfd092e2ee5deeb69698911bc976b28b746d3657" dependencies = [ - "alsa-sys", - "core-foundation-sys 0.5.1", + "alsa", + "core-foundation-sys 0.6.2", "coreaudio-rs", + "jni 0.17.0", + "js-sys", "lazy_static", "libc", + "mach 0.3.2", + "ndk", + "ndk-glue", + "nix 0.15.0", + "oboe", + "parking_lot 0.11.1", "stdweb 0.1.3", + "thiserror", + "web-sys", "winapi 0.3.9", ] @@ -568,29 +802,64 @@ dependencies = [ "maybe-uninit", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.1", +] + [[package]] name = "crossbeam-deque" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ - "crossbeam-epoch", + "crossbeam-epoch 0.8.2", "crossbeam-utils 0.7.2", "maybe-uninit", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.1", + "crossbeam-utils 0.8.1", +] + [[package]] name = "crossbeam-epoch" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", + "scopeguard", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" +dependencies = [ + "cfg-if 1.0.0", + "const_fn", + "crossbeam-utils 0.8.1", + "lazy_static", + "memoffset 0.6.1", "scopeguard", ] @@ -600,7 +869,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "lazy_static", ] @@ -611,7 +880,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 1.0.0", "lazy_static", ] @@ -642,8 +911,18 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.9.0", + "darling_macro 0.9.0", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core 0.10.2", + "darling_macro 0.10.2", ] [[package]] @@ -656,38 +935,74 @@ dependencies = [ "ident_case", "proc-macro2 0.4.30", "quote 0.6.13", - "strsim", + "strsim 0.7.0", "syn 0.15.44", ] +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.24", + "quote 1.0.8", + "strsim 0.9.3", + "syn 1.0.60", +] + [[package]] name = "darling_macro" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1" dependencies = [ - "darling_core", + "darling_core 0.9.0", "quote 0.6.13", "syn 0.15.44", ] +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core 0.10.2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "deflate" -version = "0.7.20" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" +checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" dependencies = [ "adler32", "byteorder", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "derive_builder" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4" dependencies = [ - "darling", + "darling 0.9.0", "derive_builder_core", "proc-macro2 0.4.30", "quote 0.6.13", @@ -700,7 +1015,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37" dependencies = [ - "darling", + "darling 0.9.0", "proc-macro2 0.4.30", "quote 0.6.13", "syn 0.15.44", @@ -717,11 +1032,10 @@ dependencies = [ [[package]] name = "directories" -version = "2.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" +checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f" dependencies = [ - "cfg-if 0.1.10", "dirs-sys", ] @@ -742,13 +1056,19 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + [[package]] name = "dlib" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" dependencies = [ - "libloading 0.6.7", + "libloading", ] [[package]] @@ -772,34 +1092,52 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + [[package]] name = "error-chain" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ + "backtrace", "version_check", ] [[package]] name = "euclid" -version = "0.19.9" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "596b99621b9477e7a5f94d2d8dd13a9c5c302ac358b822c67a42b6f1054450e1" +checksum = "5337024b8293bdce5265dc9570ef6e608a34bfacbbc87fe1a5dcb5f1dac2f4e2" dependencies = [ - "euclid_macros", - "num-traits 0.2.14", + "num-traits", ] [[package]] -name = "euclid_macros" -version = "0.1.0" +name = "fetch_unroll" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdcb84c18ea5037a1c5a23039b4ff29403abce2e0d6b1daa11cf0bde2b30be15" +checksum = "c8d44807d562d137f063cbfe209da1c3f9f2fa8375e11166ef495daab7b847f9" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "libflate", + "tar", + "ureq", +] + +[[package]] +name = "filetime" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.4", + "winapi 0.3.9", ] [[package]] @@ -824,10 +1162,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "form_urlencoded" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +dependencies = [ + "matches", + "percent-encoding", +] [[package]] name = "fuchsia-zircon" @@ -1035,25 +1377,14 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d38164670920cfb7491bc0cf6f49f0554bd1c44cdbedc6c78d2bf91691ff5e" dependencies = [ - "gl_generator 0.14.0", -] - -[[package]] -name = "gfx_window_glutin" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f415d3534e6ea92f3ded1683e9e00592a76e2e67050e33244bb507719a211eb2" -dependencies = [ - "gfx_core", - "gfx_device_gl", - "glutin", + "gl_generator", ] [[package]] name = "ggez" -version = "0.5.1" +version = "0.6.0-rc0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a76347431050a0b4e1a925124cdcde614b628260093bb52560d9c6b48435336" +checksum = "abbd382ca53791d06ccdf41aa339716e7617862b354e64f9033b47d65b964908" dependencies = [ "approx", "bitflags", @@ -1061,15 +1392,15 @@ dependencies = [ "gfx", "gfx_core", "gfx_device_gl", - "gfx_window_glutin", "gilrs", + "glam", "glutin", - "glyph_brush 0.5.4", + "glyph_brush", "image", "log", "lyon", "mint", - "nalgebra", + "old_school_gfx_glutin_ext", "rodio", "serde", "serde_derive", @@ -1082,19 +1413,19 @@ dependencies = [ [[package]] name = "gif" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" +checksum = "02efba560f227847cb41463a7395c514d127d4f74fff12ef0137fff1b84b96c4" dependencies = [ "color_quant", - "lzw", + "weezl", ] [[package]] name = "gilrs" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122bb249f904e5f4ac73fc514b9b2ce6cce3af511f5df00ffc8000e47de6b290" +checksum = "3b64ac678e1174eb012be1cfd409ff2483f23cb79bc880ce4737147245b0fbff" dependencies = [ "fnv", "gilrs-core", @@ -1106,16 +1437,16 @@ dependencies = [ [[package]] name = "gilrs-core" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c758daf46af26d6872fe55507e3b2339779a160a06ad7a9b2a082f221209cd" +checksum = "1024d4046c5c67d2adb8c90f6ed235163b58e05d35a63bf699b53f0cceeba2c6" dependencies = [ - "core-foundation", + "core-foundation 0.6.4", "io-kit-sys", "libc", "libudev-sys", "log", - "nix 0.15.0", + "nix 0.18.0", "rusty-xinput", "stdweb 0.4.20", "uuid", @@ -1129,17 +1460,6 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" -[[package]] -name = "gl_generator" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - [[package]] name = "gl_generator" version = "0.14.0" @@ -1152,12 +1472,13 @@ dependencies = [ ] [[package]] -name = "gleam" -version = "0.6.19" +name = "glam" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5" +checksum = "2ad8819b352632f676098176a51e11e324e8cee4c2518dd67e58c36b848438e6" dependencies = [ - "gl_generator 0.13.1", + "mint", + "version_check", ] [[package]] @@ -1168,26 +1489,27 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "glutin" -version = "0.20.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5cc17ac6cb35704f434faaa5bb5e4254a66f50853976c7e6f00aee09ff1bf2" +checksum = "1ae1cbb9176b9151c4ce03f012e3cd1c6c18c4be79edeaeb3d99f5d8085c5fa3" dependencies = [ "android_glue", "cgl", - "cocoa", - "core-foundation", - "core-graphics", + "cocoa 0.23.0", + "core-foundation 0.9.1", "glutin_egl_sys", + "glutin_emscripten_sys", "glutin_gles2_sys", "glutin_glx_sys", "glutin_wgl_sys", "lazy_static", - "libc", - "libloading 0.5.2", + "libloading", + "log", "objc", "osmesa-sys", - "shared_library", + "parking_lot 0.11.1", "wayland-client", + "wayland-egl", "winapi 0.3.9", "winit", ] @@ -1198,17 +1520,23 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2abb6aa55523480c4adc5a56bbaa249992e2dddb2fc63dc96e04a3355364c211" dependencies = [ - "gl_generator 0.14.0", + "gl_generator", "winapi 0.3.9", ] +[[package]] +name = "glutin_emscripten_sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80de4146df76e8a6c32b03007bc764ff3249dcaeb4f675d68a06caf1bac363f1" + [[package]] name = "glutin_gles2_sys" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" dependencies = [ - "gl_generator 0.14.0", + "gl_generator", "objc", ] @@ -1218,7 +1546,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e393c8fc02b807459410429150e9c4faffdb312d59b8c038566173c81991351" dependencies = [ - "gl_generator 0.14.0", + "gl_generator", "x11-dl", ] @@ -1228,40 +1556,45 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" dependencies = [ - "gl_generator 0.14.0", + "gl_generator", ] [[package]] name = "glyph_brush" -version = "0.5.4" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131d7d6f3e7ea0988a707da50ae876f8a9c4c7eb397ccfac9fe9309d4ebe8726" +checksum = "3e3f00b8574a76fb6c50890c48da03946ca50e4372a2778737922666a2238221" dependencies = [ - "glyph_brush 0.6.3", + "glyph_brush_draw_cache", + "glyph_brush_layout", + "log", + "ordered-float", + "rustc-hash", + "twox-hash", ] [[package]] -name = "glyph_brush" -version = "0.6.3" +name = "glyph_brush_draw_cache" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fca6f9d679bff1322c76c9a1ad4b8553b30a94f3f75bea6936e19032c2f2ec3" +checksum = "ac2c82074cafb68b9e459c50c655f7eedcb92d6ee7166813802934bc6fc29fa3" dependencies = [ - "glyph_brush_layout", - "log", - "ordered-float", + "ab_glyph", + "crossbeam-channel 0.5.0", + "crossbeam-deque 0.8.0", + "linked-hash-map", + "rayon", "rustc-hash", - "rusttype 0.8.3", - "twox-hash", ] [[package]] name = "glyph_brush_layout" -version = "0.1.9" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70adc570f1dc71b6b32e241cbcc2b42175f5aea71951fbf41e68b04aec24c7" +checksum = "10bc06d530bf20c1902f1b02799ab7372ff43f6119770c49b0bc3f21bd148820" dependencies = [ + "ab_glyph", "approx", - "rusttype 0.8.3", "xi-unicode", ] @@ -1314,29 +1647,41 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "image" -version = "0.22.5" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ed2ada878397b045454ac7cfb011d73132c59f31a955d230bd1f1c2e68eb4a" +checksum = "293f07a1875fa7e9c5897b51aa68b2d8ed8271b87e1a44cb64b9c3d98aabbc0d" dependencies = [ + "bytemuck", "byteorder", + "color_quant", "gif", - "jpeg-decoder", "num-iter", - "num-rational", - "num-traits 0.2.14", + "num-rational 0.3.2", + "num-traits", "png", "tiff", ] [[package]] -name = "inflate" -version = "0.4.5" +name = "instant" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "adler32", + "cfg-if 1.0.0", ] [[package]] @@ -1364,12 +1709,55 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "jni" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" +dependencies = [ + "cesu8", + "combine 3.8.1", + "error-chain", + "jni-sys", + "log", + "walkdir", +] + +[[package]] +name = "jni" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36bcc950632e48b86da402c5c077590583da5ac0d480103611d5374e7c967a3c" +dependencies = [ + "cesu8", + "combine 4.5.2", + "error-chain", + "jni-sys", + "log", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "jpeg-decoder" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" +[[package]] +name = "js-sys" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1409,13 +1797,13 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lewton" -version = "0.9.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d542c1a317036c45c2aa1cf10cc9d403ca91eb2d333ef1a4917e5cb10628bd0" +checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" dependencies = [ "byteorder", "ogg", - "smallvec 0.6.14", + "tinyvec", ] [[package]] @@ -1425,15 +1813,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3" [[package]] -name = "libloading" -version = "0.5.2" +name = "libflate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" +checksum = "389de7875e06476365974da3e7ff85d55f1972188ccd9f6020dd7c8156e17914" dependencies = [ - "cc", - "winapi 0.3.9", + "adler32", + "crc32fast", + "libflate_lz77", + "rle-decode-fast", ] +[[package]] +name = "libflate_lz77" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b" + [[package]] name = "libloading" version = "0.6.7" @@ -1444,12 +1840,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "libm" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" - [[package]] name = "libudev-sys" version = "0.1.4" @@ -1460,15 +1850,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "line_drawing" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9" -dependencies = [ - "num-traits 0.2.14", -] - [[package]] name = "linked-hash-map" version = "0.5.4" @@ -1484,6 +1865,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -1496,9 +1886,9 @@ dependencies = [ [[package]] name = "lyon" -version = "0.13.5" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbe51099b21e92413cd1f692ba6f0140007d1b01ca07e703172d88d45096c9a" +checksum = "28d083e12e9e22298eec27751ec4a0975abac5873a3b0dcdbbecc608d333f0e9" dependencies = [ "lyon_algorithms", "lyon_tessellation", @@ -1506,9 +1896,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "0.13.4" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acff42f708e6d2d4126c7aee8c4711c08e9be6143f0d6050498fafb7f4a0287" +checksum = "11033936a5e9d7bf35b7ba71a19f8b6bc838f3206304175dc5b3524ca16672a8" dependencies = [ "lyon_path", "sid", @@ -1516,40 +1906,35 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "0.12.7" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb9bf1f1d43be9a9cc2343a7a096dc113cc25337a13e8f99721b01d1d548b60" +checksum = "6ce4e12203c428a58200b8cf1c0a3aad1cda907008ea11310bb3729593e5f933" dependencies = [ - "arrayvec 0.4.12", + "arrayvec", "euclid", - "num-traits 0.2.14", + "num-traits", ] [[package]] name = "lyon_path" -version = "0.13.2" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd492548d32f7e8de10509953ed56d11dbc7103c36d56f32f3b74bf72b04cf29" +checksum = "243c71fff16677ecde2d38794a0253a8f0417cebaacc6390677c30733831d8cb" dependencies = [ "lyon_geom", ] [[package]] name = "lyon_tessellation" -version = "0.13.5" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228f5eedeb6795b57d22fa91f6c215643f2c2aae758f9432585c8d99b7be9143" +checksum = "6ecf3d769bec66396957d7c5cb91f998c4182e53fdc96cc435b6ebcd46a63cd9" dependencies = [ + "arrayvec", "lyon_path", "sid", ] -[[package]] -name = "lzw" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" - [[package]] name = "mach" version = "0.2.3" @@ -1578,13 +1963,10 @@ dependencies = [ ] [[package]] -name = "matrixmultiply" -version = "0.2.4" +name = "matches" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" -dependencies = [ - "rawpointer", -] +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "maybe-uninit" @@ -1599,13 +1981,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] -name = "memmap" -version = "0.7.0" +name = "memmap2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" dependencies = [ "libc", - "winapi 0.3.9", ] [[package]] @@ -1614,17 +1995,27 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +dependencies = [ + "autocfg", ] [[package]] name = "minimp3" -version = "0.3.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce0cff6a0bfd3f8b6b2350819bbddd63bc65cc45e53888bdd0ff49dde16d2d5" +checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" dependencies = [ "minimp3-sys", "slice-deque", + "thiserror", ] [[package]] @@ -1636,6 +2027,15 @@ dependencies = [ "cc", ] +[[package]] +name = "miniz_oxide" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +dependencies = [ + "adler32", +] + [[package]] name = "miniz_oxide" version = "0.4.3" @@ -1643,7 +2043,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -1671,6 +2071,18 @@ dependencies = [ "winapi 0.2.8", ] +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + [[package]] name = "mio-uds" version = "0.6.8" @@ -1695,23 +2107,50 @@ dependencies = [ ] [[package]] -name = "nalgebra" -version = "0.18.1" +name = "ndk" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" +checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" dependencies = [ - "alga", - "approx", - "generic-array 0.12.3", - "matrixmultiply", - "mint", - "num-complex", - "num-rational", - "num-traits 0.2.14", - "rand 0.6.5", - "typenum", + "jni-sys", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk-glue" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk", + "ndk-macro", + "ndk-sys", +] + +[[package]] +name = "ndk-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling 0.10.2", + "proc-macro-crate", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.60", ] +[[package]] +name = "ndk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" + [[package]] name = "net2" version = "0.2.37" @@ -1731,16 +2170,16 @@ checksum = "f69ebb700154b418c574cccdfc3b9b94badee8f8e0a456106af13d3b41ffb867" dependencies = [ "async-std", "async-trait", - "crossbeam-channel", + "crossbeam-channel 0.4.4", "ratman-identity 0.4.0", "ratman-netmod 0.3.0", ] [[package]] name = "nix" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" dependencies = [ "bitflags", "cc", @@ -1751,28 +2190,31 @@ dependencies = [ [[package]] name = "nix" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" +checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" dependencies = [ "bitflags", "cc", "cfg-if 0.1.10", "libc", - "void", ] [[package]] -name = "nodrop" -version = "0.1.14" +name = "nom" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] [[package]] name = "nom" -version = "5.1.2" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "ab6f70b46d6325aa300f1c7bb3d470127dfc27806d8ea6bf294ee0ce643ce2b1" dependencies = [ "memchr", "version_check", @@ -1788,8 +2230,8 @@ dependencies = [ "num-complex", "num-integer", "num-iter", - "num-rational", - "num-traits 0.2.14", + "num-rational 0.2.4", + "num-traits", ] [[package]] @@ -1798,9 +2240,9 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits", ] [[package]] @@ -1809,19 +2251,19 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "autocfg 1.0.1", - "num-traits 0.2.14", + "autocfg", + "num-traits", ] [[package]] name = "num-derive" -version = "0.2.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.60", ] [[package]] @@ -1830,8 +2272,8 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1", - "num-traits 0.2.14", + "autocfg", + "num-traits", ] [[package]] @@ -1840,9 +2282,9 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits", ] [[package]] @@ -1851,19 +2293,21 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.14", + "num-traits", ] [[package]] -name = "num-traits" -version = "0.1.43" +name = "num-rational" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ - "num-traits 0.2.14", + "autocfg", + "num-integer", + "num-traits", ] [[package]] @@ -1872,8 +2316,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1", - "libm", + "autocfg", ] [[package]] @@ -1886,6 +2329,28 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "objc" version = "0.2.7" @@ -1901,15 +2366,49 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" +[[package]] +name = "oboe" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aadc2b0867bdbb9a81c4d99b9b682958f49dbea1295a81d2f646cca2afdd9fc" +dependencies = [ + "jni 0.14.0", + "ndk", + "ndk-glue", + "num-derive", + "num-traits", + "oboe-sys", +] + +[[package]] +name = "oboe-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ff7a51600eabe34e189eec5c995a62f151d8d97e5fbca39e87ca738bb99b82" +dependencies = [ + "fetch_unroll", +] + [[package]] name = "ogg" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e571c3517af9e1729d4c63571a27edd660ade0667973bfc74a67c660c2b651" +checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" dependencies = [ "byteorder", ] +[[package]] +name = "old_school_gfx_glutin_ext" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "450a2a0e6805771787b965af9a552581c9dfc588dc33761c1be690117cd792e1" +dependencies = [ + "gfx_core", + "gfx_device_gl", + "glutin", +] + [[package]] name = "once_cell" version = "1.5.2" @@ -1924,11 +2423,11 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "ordered-float" -version = "1.1.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" +checksum = "766f840da25490628d8e63e529cd21c014f6600c6b8517add12a6fa6167a6218" dependencies = [ - "num-traits 0.2.14", + "num-traits", ] [[package]] @@ -1941,14 +2440,21 @@ dependencies = [ ] [[package]] -name = "parking_lot" -version = "0.9.0" +name = "owned_ttf_parser" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" dependencies = [ - "lock_api", - "parking_lot_core 0.6.2", - "rustc_version", + "ttf-parser 0.6.2", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "948b27637ba56144c62d3415929ef18986b3a383137ebcbe97d9362a968bf997" +dependencies = [ + "ttf-parser 0.11.0", ] [[package]] @@ -1957,36 +2463,46 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api", + "lock_api 0.3.4", "parking_lot_core 0.7.2", ] +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.2", + "parking_lot_core 0.8.2", +] + [[package]] name = "parking_lot_core" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ "cfg-if 0.1.10", "cloudabi", "libc", "redox_syscall 0.1.57", - "rustc_version", - "smallvec 0.6.14", + "smallvec", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", + "instant", "libc", "redox_syscall 0.1.57", - "smallvec 1.6.1", + "smallvec", "winapi 0.3.9", ] @@ -2048,14 +2564,14 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "png" -version = "0.15.3" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" +checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" dependencies = [ "bitflags", "crc32fast", "deflate", - "inflate", + "miniz_oxide 0.3.7", ] [[package]] @@ -2082,6 +2598,15 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -2112,6 +2637,19 @@ dependencies = [ "unicode-xid 0.2.1", ] +[[package]] +name = "publicsuffix" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" +dependencies = [ + "error-chain", + "idna", + "lazy_static", + "regex", + "url", +] + [[package]] name = "pulldown-cmark" version = "0.2.0" @@ -2121,6 +2659,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + [[package]] name = "quadtree_rs" version = "0.1.2" @@ -2149,25 +2696,6 @@ dependencies = [ "proc-macro2 1.0.24", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -2193,16 +2721,6 @@ dependencies = [ "rand_hc 0.3.0", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -2223,21 +2741,6 @@ dependencies = [ "rand_core 0.6.1", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -2256,15 +2759,6 @@ dependencies = [ "getrandom 0.2.2", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -2275,65 +2769,12 @@ dependencies = [ ] [[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "rand_core 0.3.1", + "rand_core 0.6.1", ] [[package]] @@ -2417,18 +2858,28 @@ dependencies = [ ] [[package]] -name = "rawpointer" -version = "0.2.1" +name = "rayon" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +dependencies = [ + "autocfg", + "crossbeam-deque 0.8.0", + "either", + "rayon-core", +] [[package]] -name = "rdrand" -version = "0.4.0" +name = "rayon-core" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ - "rand_core 0.3.1", + "crossbeam-channel 0.5.0", + "crossbeam-deque 0.8.0", + "crossbeam-utils 0.8.1", + "lazy_static", + "num_cpus", ] [[package]] @@ -2481,19 +2932,38 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "rle-decode-fast" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" + [[package]] name = "rodio" -version = "0.9.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0f961b254e66d147a7b550c78b01308934c97d807a34b417fd0f5a0a0f3a2d" +checksum = "c9683532495146e98878d4948fa1a1953f584cd923f2a5f5c26b7a8701b56943" dependencies = [ "claxon", "cpal", "hound", - "lazy_static", "lewton", "minimp3", - "nalgebra", ] [[package]] @@ -2522,7 +2992,9 @@ version = "0.1.0" name = "rst-node-client" version = "0.0.0" dependencies = [ + "clap", "ggez", + "mint", "rst-core", ] @@ -2567,28 +3039,26 @@ dependencies = [ ] [[package]] -name = "rusttype" -version = "0.7.9" +name = "rustls" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ - "rusttype 0.8.3", + "base64", + "log", + "ring", + "sct", + "webpki", ] [[package]] name = "rusttype" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" +checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" dependencies = [ - "approx", - "crossbeam-deque", - "crossbeam-utils 0.7.2", - "linked-hash-map", - "num_cpus", - "ordered-float", - "rustc-hash", - "stb_truetype", + "ab_glyph_rasterizer", + "owned_ttf_parser 0.6.0", ] [[package]] @@ -2617,12 +3087,28 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scoped-tls" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "semver" version = "0.9.0" @@ -2706,11 +3192,11 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "sid" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e0a6006cf04d568a49363baca3dabddbbe46538f7c76692d405f5f5d140ecd" +checksum = "bd5ac56c121948b4879bba9e519852c211bcdd8f014efff766441deff0b91bdb" dependencies = [ - "num-traits 0.1.43", + "num-traits", ] [[package]] @@ -2745,15 +3231,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smallvec" version = "1.6.1" @@ -2762,32 +3239,40 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "smart-default" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9dbd5f03d04e80355cbbe3ce5cf1f65c421eac575402e3d4d6e95d5a44edaa" +checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.60", ] [[package]] name = "smithay-client-toolkit" -version = "0.4.6" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa" +checksum = "316e13a3eb853ce7bf72ad3530dc186cb2005c57c521ef5f4ada5ee4eed74de6" dependencies = [ "andrew", "bitflags", + "calloop", "dlib", "lazy_static", - "memmap", - "nix 0.14.1", + "log", + "memmap2", + "nix 0.18.0", "wayland-client", - "wayland-commons", + "wayland-cursor", "wayland-protocols", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -2795,19 +3280,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "static_assertions" -version = "1.1.0" +name = "standback" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "a2beb4d1860a61f571530b3f855a1b538d0200f7871c63331ecd6f17b1f014f8" +dependencies = [ + "version_check", +] [[package]] -name = "stb_truetype" -version = "0.3.1" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" -dependencies = [ - "byteorder", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stdweb" @@ -2872,6 +3357,18 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + [[package]] name = "subtle" version = "1.0.0" @@ -2900,6 +3397,17 @@ dependencies = [ "unicode-xid 0.2.1", ] +[[package]] +name = "tar" +version = "0.4.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0313546c01d59e29be4f09687bcb4fb6690cec931cc3607b6aec7a0e417f4cc6" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "task-notify" version = "0.1.0" @@ -2920,6 +3428,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.23" @@ -2942,14 +3459,13 @@ dependencies = [ [[package]] name = "tiff" -version = "0.3.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b7c2cfc4742bd8a32f2e614339dd8ce30dbcf676bb262bd63a2327bc5df57d" +checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" dependencies = [ - "byteorder", - "lzw", - "num-derive", - "num-traits 0.2.14", + "jpeg-decoder", + "miniz_oxide 0.4.3", + "weezl", ] [[package]] @@ -2962,6 +3478,59 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1195b046942c221454c2539395f85413b33383a067449d78aab2b7b052a142f7" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb 0.4.20", + "time-macros", + "version_check", + "winapi 0.3.9", +] + +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", +] + +[[package]] +name = "time-macros-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" +dependencies = [ + "proc-macro-hack", + "proc-macro2 1.0.24", + "quote 1.0.8", + "standback", + "syn 1.0.60", +] + +[[package]] +name = "tinyvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + [[package]] name = "toml" version = "0.5.8" @@ -3013,6 +3582,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "ttf-parser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" + +[[package]] +name = "ttf-parser" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3e7994fc4aed0ee366a4b0d01562c8a7cd5a5017088bceb6921b0c8c538f34e" + [[package]] name = "twox-hash" version = "1.6.0" @@ -3030,6 +3611,30 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + [[package]] name = "unicode-xid" version = "0.1.0" @@ -3042,6 +3647,52 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "ureq" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "294b85ef5dbc3670a72e82a89971608a1fcc4ed5c7c5a2895230d31a95f0569b" +dependencies = [ + "base64", + "chunked_transfer", + "cookie", + "cookie_store", + "log", + "once_cell", + "qstring", + "rustls", + "url", + "webpki", + "webpki-roots", +] + +[[package]] +name = "url" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + [[package]] name = "uuid" version = "0.8.2" @@ -3154,14 +3805,15 @@ checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" [[package]] name = "wayland-client" -version = "0.21.13" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713" +checksum = "bdbdbe01d03b2267809f3ed99495b37395387fde789e0f2ebb78e8b43f75b6d7" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.14.1", + "nix 0.18.0", + "scoped-tls", "wayland-commons", "wayland-scanner", "wayland-sys", @@ -3169,48 +3821,106 @@ dependencies = [ [[package]] name = "wayland-commons" -version = "0.21.13" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "480450f76717edd64ad04a4426280d737fc3d10a236b982df7b1aee19f0e2d56" +dependencies = [ + "nix 0.18.0", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6eb122c160223a7660feeaf949d0100281d1279acaaed3720eb3c9894496e5f" +dependencies = [ + "nix 0.18.0", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-egl" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec" +checksum = "c653507447113c967a1aeee413699acb42d96d6302ec967c6d51930eae8aa7f5" dependencies = [ - "nix 0.14.1", + "wayland-client", "wayland-sys", ] [[package]] name = "wayland-protocols" -version = "0.21.13" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afde2ea2a428eee6d7d2c8584fdbe8b82eee8b6c353e129a434cd6e07f42145" +checksum = "319a82b4d3054dd25acc32d9aee0f84fa95b63bc983fffe4703b6b8d47e01a30" dependencies = [ "bitflags", "wayland-client", "wayland-commons", "wayland-scanner", - "wayland-sys", ] [[package]] name = "wayland-scanner" -version = "0.21.13" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3828c568714507315ee425a9529edc4a4aa9901409e373e9e0027e7622b79e" +checksum = "7010ba5767b3fcd350decc59055390b4ebe6bd1b9279a9feb1f1888987f1133d" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", + "proc-macro2 1.0.24", + "quote 1.0.8", "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.21.13" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628" +checksum = "6793834e0c35d11fd96a97297abe03d37be627e1847da52e17d7e0e3b51cc099" dependencies = [ "dlib", "lazy_static", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +dependencies = [ + "js-sys", + "wasm-bindgen", ] +[[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-roots" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" +dependencies = [ + "webpki", +] + +[[package]] +name = "weezl" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a32b378380f4e9869b22f0b5177c68a5519f03b3454fde0b291455ddbae266c" + [[package]] name = "winapi" version = "0.2.8" @@ -3256,21 +3966,27 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winit" -version = "0.19.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e96eb4bb472fa43e718e8fa4aef82f86cd9deac9483a1e1529230babdb394a8" +checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" dependencies = [ - "android_glue", - "backtrace", "bitflags", - "cocoa", - "core-foundation", - "core-graphics", + "cocoa 0.24.0", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "core-video-sys", + "dispatch", + "instant", "lazy_static", "libc", "log", + "mio", + "mio-extras", + "ndk", + "ndk-glue", + "ndk-sys", "objc", - "parking_lot 0.9.0", + "parking_lot 0.11.1", "percent-encoding", "raw-window-handle", "smithay-client-toolkit", @@ -3301,6 +4017,24 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + +[[package]] +name = "xcursor" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9a231574ae78801646617cefd13bfe94be907c0e4fa979cfd8b770aa3c5d08" +dependencies = [ + "nom 6.1.0", +] + [[package]] name = "xdg" version = "2.2.0" @@ -3309,9 +4043,9 @@ checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" [[package]] name = "xi-unicode" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e71b85d8b1b8bfaf4b5c834187554d201a8cd621c2bbfa33efd41a3ecabd48b2" +checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" [[package]] name = "xml-rs" diff --git a/games/rstnode/rst-client/Cargo.toml b/games/rstnode/rst-client/Cargo.toml index 7ebf7092d0a0..eae6672cd51d 100644 --- a/games/rstnode/rst-client/Cargo.toml +++ b/games/rstnode/rst-client/Cargo.toml @@ -8,4 +8,7 @@ authors = ["Bread Machine", "Katharina Fey "] [dependencies] rst-core = { path = "../rst-core" } -ggez = "0.5" \ No newline at end of file + +clap = "2.0" +ggez = "0.6.0-rc0" +mint = "0.5" # Required because ggez is trash \ No newline at end of file diff --git a/games/rstnode/rst-client/src/cli.rs b/games/rstnode/rst-client/src/cli.rs new file mode 100644 index 000000000000..b8a93b237a7b --- /dev/null +++ b/games/rstnode/rst-client/src/cli.rs @@ -0,0 +1 @@ +//! Handle user CLI inputs diff --git a/games/rstnode/rst-client/src/constants.rs b/games/rstnode/rst-client/src/constants.rs new file mode 100644 index 000000000000..e40a5c35c5db --- /dev/null +++ b/games/rstnode/rst-client/src/constants.rs @@ -0,0 +1,5 @@ + + +pub const NAME: &'static str = "RST Node"; +pub const VERSION: &'static str = env!("CARGO_PKG_VERSION"); +pub const AUTHORS: &'static str = env!("CARGO_PKG_AUTHORS"); diff --git a/games/rstnode/rst-client/src/ctx.rs b/games/rstnode/rst-client/src/ctx.rs new file mode 100644 index 000000000000..7590867f18e2 --- /dev/null +++ b/games/rstnode/rst-client/src/ctx.rs @@ -0,0 +1,30 @@ +//! Small context builder + +use crate::{ + constants::{AUTHORS, NAME, VERSION}, + GameSettings, +}; + +use ggez::{ + conf::{WindowMode, WindowSetup}, + ContextBuilder, +}; + +/// Construct a context builder with default & user window settings +pub fn build(settings: &GameSettings) -> ContextBuilder { + ContextBuilder::new(NAME, AUTHORS) + .window_setup(WindowSetup { + title: format!("{} (v{})", NAME, VERSION), + samples: (&settings.graphics.samples).into(), + vsync: settings.graphics.vsync, + icon: "".into(), + srgb: true, + }) + .window_mode(WindowMode { + width: settings.window.width as f32, + height: settings.window.height as f32, + maximized: settings.window.window_mode.maximized(), + fullscreen_type: settings.window.window_mode._type(), + ..Default::default() + }) +} diff --git a/games/rstnode/rst-client/src/graphics/entities/mod.rs b/games/rstnode/rst-client/src/graphics/entities/mod.rs new file mode 100644 index 000000000000..168f40d2aeee --- /dev/null +++ b/games/rstnode/rst-client/src/graphics/entities/mod.rs @@ -0,0 +1,43 @@ +//! Game entity rendering +//! +//! Generally the naming convention should be: `{type}Rndr` +//! (`Renderer`, but shorter). + +use super::prelude::*; + +use rst_core::data::Node; +use std::sync::Arc; + +/// A set of universal X/Y coordinates +pub struct Coordinates(pub f32, pub f32); + +impl<'a> From<&'a Coordinates> for Point2 { + fn from(c: &'a Coordinates) -> Self { + Point2 { x: c.0, y: c.1 } + } +} + +pub struct NodeRndr { + pub loc: Coordinates, + pub inner: Arc, +} + +impl EventHandler for NodeRndr { + fn update(&mut self, _: &mut Context) -> GameResult<()> { + Ok(()) + } + + fn draw(&mut self, ctx: &mut Context) -> GameResult<()> { + let circ = Mesh::new_circle( + ctx, + DrawMode::fill(), + Point2::from(&self.loc), + 35.0, + 0.1, + graphics::WHITE, + ).unwrap(); + + circ.draw(ctx, DrawParam::new()).unwrap(); + Ok(()) + } +} diff --git a/games/rstnode/rst-client/src/graphics/mod.rs b/games/rstnode/rst-client/src/graphics/mod.rs new file mode 100644 index 000000000000..8118207d70af --- /dev/null +++ b/games/rstnode/rst-client/src/graphics/mod.rs @@ -0,0 +1,16 @@ +//! Graphics module +//! +//! Each entity in the game has a graphics companion object in +//! [`entities`](self::entities), which knows how to render a given +//! object. Different game screens and UI elements can be found in +//! [`ui`](self::ui). + +pub mod entities; +pub mod ui; + +/// A utility module to include everything required to implement a +/// graphics entity +pub(self) mod prelude { + pub use ggez::{event::EventHandler, graphics::{self, Drawable, DrawParam, Mesh, DrawMode}, Context, GameResult}; + pub use mint::Point2; +} diff --git a/games/rstnode/rst-client/src/graphics/ui/mod.rs b/games/rstnode/rst-client/src/graphics/ui/mod.rs new file mode 100644 index 000000000000..3b63b5b9b0aa --- /dev/null +++ b/games/rstnode/rst-client/src/graphics/ui/mod.rs @@ -0,0 +1 @@ +//! Different UI states diff --git a/games/rstnode/rst-client/src/main.rs b/games/rstnode/rst-client/src/main.rs index e7a11a969c03..9de33fce81c6 100644 --- a/games/rstnode/rst-client/src/main.rs +++ b/games/rstnode/rst-client/src/main.rs @@ -1,3 +1,22 @@ +mod cli; +mod constants; +mod ctx; +mod graphics; +mod settings; +mod state; +mod window; + +pub(crate) use settings::*; +pub(crate) use state::*; + fn main() { - println!("Hello, world!"); + let settings = default(); + + let state = ClientState::new(&settings); + window::run(&settings, state) + + // let my_game = GameState::new(&mut ctx); + + // // Run! + // event::run(ctx, eloop, my_game); } diff --git a/games/rstnode/rst-client/src/settings.rs b/games/rstnode/rst-client/src/settings.rs new file mode 100644 index 000000000000..971e8e6f50b7 --- /dev/null +++ b/games/rstnode/rst-client/src/settings.rs @@ -0,0 +1,73 @@ +//! Configuration structures for the game client + +use ggez::conf::{FullscreenType, NumSamples}; + +pub fn default() -> GameSettings { + GameSettings { + window: WindowSettings { + width: 1280, + height: 720, + window_mode: WindowMode::Windowed, + }, + graphics: GraphicsSettings { + samples: Samples(0), + vsync: true, + }, + } +} + +/// Complete tree of basic game client settings +pub struct GameSettings { + pub window: WindowSettings, + pub graphics: GraphicsSettings, +} + +/// Window setup specific settings +pub struct WindowSettings { + pub width: u16, + pub height: u16, + pub window_mode: WindowMode, +} + +/// Graphic settings +pub struct GraphicsSettings { + pub samples: Samples, + pub vsync: bool, +} + +pub struct Samples(pub u8); + +impl<'s> From<&'s Samples> for NumSamples { + fn from(s: &'s Samples) -> Self { + match s.0 { + 0 => Self::Zero, + 1 => Self::One, + 2 => Self::Two, + 4 => Self::Four, + 8 => Self::Eight, + 16 => Self::Sixteen, + _ => panic!("Invalid multisampling value: {}", s.0), + } + } +} + +pub enum WindowMode { + Windowed, + Fullscreen, +} + +impl WindowMode { + pub fn maximized(&self) -> bool { + match self { + Self::Fullscreen => true, + _ => false, + } + } + + pub fn _type(&self) -> FullscreenType { + match self { + Self::Fullscreen => FullscreenType::Desktop, + Self::Windowed => FullscreenType::Windowed, + } + } +} diff --git a/games/rstnode/rst-client/src/state.rs b/games/rstnode/rst-client/src/state.rs new file mode 100644 index 000000000000..c55dc2faa6d6 --- /dev/null +++ b/games/rstnode/rst-client/src/state.rs @@ -0,0 +1,48 @@ +//! Game client state handling + +use crate::{ + graphics::entities::{Coordinates, NodeRndr}, + GameSettings, +}; +use ggez::{event::EventHandler, graphics, Context, GameResult}; +use rst_core::data::{Node, Owner, Upgrade}; +use std::sync::Arc; + +pub struct ClientState { + node: NodeRndr, +} + +impl ClientState { + pub fn new(_settings: &GameSettings) -> Self { + Self { + node: NodeRndr { + loc: Coordinates(250.0, 250.0), + inner: Arc::new(Node { + id: 0, + health: 100.into(), + max_health: 100.into(), + owner: Owner::Neutral, + type_: Upgrade::Base, + links: 0, + link_states: vec![], + buffer: vec![], + }), + }, + } + } +} + +impl EventHandler for ClientState { + fn update(&mut self, _ctx: &mut Context) -> GameResult<()> { + Ok(()) + } + + fn draw(&mut self, ctx: &mut Context) -> GameResult<()> { + graphics::clear(ctx, graphics::Color::from_rgb(15, 15, 15)); + + // Render the node + self.node.draw(ctx).unwrap(); + + graphics::present(ctx) + } +} diff --git a/games/rstnode/rst-client/src/window.rs b/games/rstnode/rst-client/src/window.rs new file mode 100644 index 000000000000..ad58c38e0ffb --- /dev/null +++ b/games/rstnode/rst-client/src/window.rs @@ -0,0 +1,10 @@ +//! Basic window setup code + +use crate::{ctx, state::ClientState, GameSettings}; +use ggez::event; + +/// Start the main event loop with game settings and state +pub fn run(settings: &GameSettings, state: ClientState) -> ! { + let (ctx, eloop) = ctx::build(settings).build().unwrap(); + event::run(ctx, eloop, state) +} diff --git a/games/rstnode/rst-core/src/data.rs b/games/rstnode/rst-core/src/data.rs index 5ce5517c2b07..c41ec6d77e32 100644 --- a/games/rstnode/rst-core/src/data.rs +++ b/games/rstnode/rst-core/src/data.rs @@ -1,14 +1,13 @@ //! Data structures for the game +#![allow(unused)] + use crate::io::Io; use async_std::sync::Arc; use rand::seq::SliceRandom; use rand::thread_rng; use serde::{Deserialize, Serialize}; -use std::{ - collections::BTreeMap, - sync::atomic::{AtomicBool, AtomicU16, AtomicU32}, -}; +use std::sync::atomic::{AtomicBool, AtomicU16, AtomicU32}; pub type NodeId = usize; diff --git a/games/rstnode/rst-core/src/lib.rs b/games/rstnode/rst-core/src/lib.rs index 36e232f4639c..5ee4e49750c9 100644 --- a/games/rstnode/rst-core/src/lib.rs +++ b/games/rstnode/rst-core/src/lib.rs @@ -1,4 +1,4 @@ -//! # RST Node +//! # RST Node Core //! //! RST Node is a real-time strategy game about computers on a //! network, fighting for dominance against a set of other network diff --git a/games/rstnode/shell.nix b/games/rstnode/shell.nix index 98465394e67e..207d5ef3cd33 100644 --- a/games/rstnode/shell.nix +++ b/games/rstnode/shell.nix @@ -1,7 +1,7 @@ with import {}; -stdenv.mkDerivation { - name = "rstnode"; +mkShell rec { + name = "rstnode-shell"; buildInputs = with pkgs; [ rustc cargo clangStdenv rust-analyzer rustfmt alsaLib pkg-config libudev @@ -18,4 +18,6 @@ stdenv.mkDerivation { libxcb libxkbcommon ]); + + LD_LIBRARY_PATH = (lib.makeLibraryPath buildInputs); } -- cgit v1.2.3