diff --git a/Cargo.lock b/Cargo.lock index 2c98e403..5a15be14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,15 +18,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" -[[package]] -name = "addr2line" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" -dependencies = [ - "gimli", -] - [[package]] name = "adler" version = "1.0.2" @@ -44,6 +35,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "0.7.19" @@ -58,43 +62,42 @@ name = "alignment" version = "0.1.0" [[package]] -name = "alsa" -version = "0.6.0" +name = "android-activity" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" +checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" dependencies = [ - "alsa-sys", + "android-properties", "bitflags 1.3.2", + "cc", + "jni-sys", "libc", - "nix 0.23.2", -] - -[[package]] -name = "alsa-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" -dependencies = [ - "libc", - "pkg-config", + "log", + "ndk 0.7.0", + "ndk-context", + "ndk-sys 0.4.0", + "num_enum 0.5.7", ] [[package]] name = "android-activity" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" +checksum = "39b801912a977c3fd52d80511fe1c0c8480c6f957f21ae2ce1b92ffe970cf4b9" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.4.2", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", - "ndk 0.7.0", + "ndk 0.8.0", "ndk-context", - "ndk-sys 0.4.0", - "num_enum", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.2", + "thiserror", ] [[package]] @@ -136,15 +139,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - [[package]] name = "arrayref" version = "0.3.6" @@ -157,6 +151,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ash" version = "0.37.3+1.3.251" @@ -172,7 +172,7 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28" dependencies = [ - "concurrent-queue", + "concurrent-queue 1.2.4", "event-listener", "futures-core", ] @@ -184,7 +184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" dependencies = [ "async-task", - "concurrent-queue", + "concurrent-queue 1.2.4", "fastrand", "futures-lite", "once_cell", @@ -213,13 +213,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" dependencies = [ "autocfg", - "concurrent-queue", + "concurrent-queue 1.2.4", "futures-lite", "libc", "log", "once_cell", "parking", - "polling", + "polling 2.3.0", "slab", "socket2", "waker-fn", @@ -279,27 +279,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide 0.6.2", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.9.3" @@ -316,26 +295,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" -[[package]] -name = "bindgen" -version = "0.69.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2" -dependencies = [ - "bitflags 2.3.1", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.18", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -365,9 +324,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block" @@ -381,7 +340,16 @@ version = "0.1.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +dependencies = [ + "objc-sys 0.3.2", ] [[package]] @@ -390,8 +358,18 @@ version = "0.2.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" dependencies = [ - "block-sys", - "objc2-encode", + "block-sys 0.1.0-beta.1", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys 0.2.1", + "objc2 0.4.1", ] [[package]] @@ -431,7 +409,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.48", ] [[package]] @@ -465,6 +443,32 @@ dependencies = [ "vec_map", ] +[[package]] +name = "calloop" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +dependencies = [ + "bitflags 2.4.2", + "log", + "polling 3.3.2", + "rustix 0.38.30", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop 0.12.4", + "rustix 0.38.30", + "wayland-backend", + "wayland-client 0.31.1", +] + [[package]] name = "cargo-run-wasm" version = "0.1.1" @@ -491,15 +495,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -518,7 +513,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a98d30140e3296250832bbaaff83b27dcd6fa3cc70fb6f1f3e5c9c0023b5317" dependencies = [ - "approx 0.4.0", + "approx", "num-traits", ] @@ -534,17 +529,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading 0.7.3", -] - [[package]] name = "cmake" version = "0.1.48" @@ -571,10 +555,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] -name = "com-rs" -version = "0.2.1" +name = "com" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.102", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.102", +] [[package]] name = "combine" @@ -603,7 +612,7 @@ dependencies = [ "rayon", "tobj 2.0.4", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -615,6 +624,15 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -665,59 +683,28 @@ dependencies = [ ] [[package]] -name = "core-graphics-types" -version = "0.1.1" +name = "core-graphics" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", "core-foundation", - "foreign-types 0.3.2", + "core-graphics-types", + "foreign-types 0.5.0", "libc", ] [[package]] -name = "coreaudio-rs" -version = "0.10.0" +name = "core-graphics-types" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags 1.3.2", - "coreaudio-sys", -] - -[[package]] -name = "coreaudio-sys" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3120ebb80a9de008e638ad833d4127d50ea3d3a960ea23ea69bc66d9358a028" -dependencies = [ - "bindgen", -] - -[[package]] -name = "cpal" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f342c1b63e185e9953584ff2199726bf53850d96610a310e3aca09e9405a2d0b" -dependencies = [ - "alsa", - "core-foundation-sys", - "coreaudio-rs", - "jni", - "js-sys", + "core-foundation", + "foreign-types 0.3.2", "libc", - "mach", - "ndk 0.7.0", - "ndk-context", - "oboe", - "once_cell", - "parking_lot 0.12.1", - "stdweb", - "thiserror", - "wasm-bindgen", - "web-sys", - "windows 0.37.0", ] [[package]] @@ -759,7 +746,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.6.5", "scopeguard", ] @@ -789,10 +776,10 @@ dependencies = [ ] [[package]] -name = "cty" -version = "0.2.2" +name = "cursor-icon" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "cxx" @@ -840,11 +827,11 @@ dependencies = [ [[package]] name = "d3d12" -version = "0.7.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", "libloading 0.8.0", "winapi", ] @@ -855,12 +842,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb4b71acc1405be2431a93892a79a0d82ed5ba6885649ddbdfc62caa4d67b1c" -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "dispatch" version = "0.2.0" @@ -869,11 +850,11 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dlib" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.3", + "libloading 0.8.0", ] [[package]] @@ -918,12 +899,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -939,7 +920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded" dependencies = [ "bit_field", - "flume 0.10.14", + "flume", "half", "lebe", "miniz_oxide 0.6.2", @@ -947,6 +928,12 @@ dependencies = [ "threadpool", ] +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + [[package]] name = "fastrand" version = "1.8.0" @@ -985,18 +972,6 @@ dependencies = [ "spin", ] -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "spin", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1030,7 +1005,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.48", ] [[package]] @@ -1073,7 +1048,7 @@ dependencies = [ "tobj 2.0.4", "wgpu", "wgpu-subscriber", - "winit", + "winit 0.29.10", ] [[package]] @@ -1153,6 +1128,16 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.2.7" @@ -1192,14 +1177,19 @@ dependencies = [ "pollster", "tobj 3.2.3", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] name = "gimli" -version = "0.27.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator", + "indexmap 1.9.3", + "stable_deref_trait", +] [[package]] name = "gl_generator" @@ -1241,9 +1231,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1260,51 +1250,13 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "glyph_brush" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3676f482c536a985fca36ce320a5e5b8fafd7b260806742af1963b71c5dc38c" -dependencies = [ - "glyph_brush_draw_cache", - "glyph_brush_layout", - "ordered-float", - "rustc-hash", - "twox-hash", -] - -[[package]] -name = "glyph_brush_draw_cache" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" -dependencies = [ - "ab_glyph", - "crossbeam-channel", - "crossbeam-deque", - "linked-hash-map", - "rayon", - "rustc-hash", -] - -[[package]] -name = "glyph_brush_layout" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" -dependencies = [ - "ab_glyph", - "approx 0.5.1", - "xi-unicode", -] - [[package]] name = "gpu-alloc" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", "gpu-alloc-types", ] @@ -1314,21 +1266,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", ] [[package]] name = "gpu-allocator" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ - "backtrace", "log", "presser", "thiserror", "winapi", - "windows 0.51.1", + "windows", ] [[package]] @@ -1385,7 +1336,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1396,14 +1347,14 @@ checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] name = "hassle-rs" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.4.2", + "com", "libc", - "libloading 0.7.3", + "libloading 0.8.0", "thiserror", "widestring", "winapi", @@ -1442,12 +1393,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "hound" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" - [[package]] name = "http" version = "0.2.8" @@ -1549,6 +1494,17 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2 0.3.0", + "dispatch", + "objc2 0.4.1", +] + [[package]] name = "id-arena" version = "2.2.1" @@ -1640,7 +1596,7 @@ checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ "hermit-abi 0.2.6", "io-lifetimes", - "rustix", + "rustix 0.36.16", "windows-sys 0.42.0", ] @@ -1652,16 +1608,18 @@ checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "jni" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -1690,9 +1648,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1729,12 +1687,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "leb128" version = "0.2.5" @@ -1749,9 +1701,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.135" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" @@ -1783,16 +1735,16 @@ dependencies = [ ] [[package]] -name = "linked-hash-map" -version = "0.5.6" +name = "linux-raw-sys" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1821,16 +1773,7 @@ dependencies = [ "anyhow", "pollster", "wgpu", - "winit", -] - -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", + "winit 0.29.10", ] [[package]] @@ -1866,6 +1809,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -1875,13 +1827,22 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "metal" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -1955,7 +1916,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -1971,36 +1932,19 @@ dependencies = [ "num-traits", "pp-rs", "rustc-hash", - "spirv", + "spirv 0.2.0+1.5.4", "termcolor", "thiserror", ] [[package]] name = "naga" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" -dependencies = [ - "bit-set", - "bitflags 1.3.2", - "indexmap 1.9.3", - "log", - "num-traits", - "pp-rs", - "rustc-hash", - "spirv", - "thiserror", -] - -[[package]] -name = "naga" -version = "0.14.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071" +checksum = "8878eb410fc90853da3908aebfe61d73d26d4437ef850b70050461f939509899" dependencies = [ "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.2", "codespan-reporting", "hexf-parse", "indexmap 2.1.0", @@ -2008,7 +1952,7 @@ dependencies = [ "num-traits", "petgraph", "rustc-hash", - "spirv", + "spirv 0.3.0+sdk-1.3.268.0", "termcolor", "thiserror", "unicode-xid", @@ -2043,28 +1987,31 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", - "ndk-sys 0.3.0", - "num_enum", + "ndk-sys 0.4.0", + "num_enum 0.5.7", + "raw-window-handle 0.5.2", "thiserror", ] [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "jni-sys", - "ndk-sys 0.4.0", - "num_enum", - "raw-window-handle", + "log", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.2", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "thiserror", ] @@ -2076,45 +2023,44 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" dependencies = [ "jni-sys", ] [[package]] name = "ndk-sys" -version = "0.4.0" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] [[package]] name = "nix" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" +checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" dependencies = [ "bitflags 1.3.2", - "cc", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] name = "nix" -version = "0.24.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.7.1", ] [[package]] @@ -2127,17 +2073,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.102", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -2184,7 +2119,16 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.7", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", ] [[package]] @@ -2199,6 +2143,18 @@ dependencies = [ "syn 1.0.102", ] +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "objc" version = "0.2.7" @@ -2216,71 +2172,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" [[package]] -name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +name = "objc-sys" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" -dependencies = [ - "block2", - "objc-sys", - "objc2-encode", -] +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" [[package]] -name = "objc2-encode" -version = "2.0.0-pre.2" +name = "objc2" +version = "0.3.0-beta.3.patch-leaks.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" dependencies = [ - "objc-sys", + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", ] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "cc", + "objc-sys 0.3.2", + "objc2-encode 3.0.0", ] [[package]] -name = "object" -version = "0.30.3" +name = "objc2-encode" +version = "2.0.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" dependencies = [ - "memchr", + "objc-sys 0.2.0-beta.2", ] [[package]] -name = "oboe" -version = "0.4.6" +name = "objc2-encode" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" -dependencies = [ - "jni", - "ndk 0.6.0", - "ndk-context", - "num-derive", - "num-traits", - "oboe-sys", -] +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" [[package]] -name = "oboe-sys" -version = "0.4.5" +name = "objc_exception" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" dependencies = [ "cc", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" @@ -2288,7 +2234,7 @@ version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", "cfg-if", "foreign-types 0.3.2", "libc", @@ -2335,15 +2281,6 @@ dependencies = [ "redox_syscall 0.3.5", ] -[[package]] -name = "ordered-float" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8" -dependencies = [ - "num-traits", -] - [[package]] name = "owned_ttf_parser" version = "0.19.0" @@ -2413,12 +2350,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -2506,40 +2437,25 @@ dependencies = [ ] [[package]] -name = "pollster" -version = "0.3.0" +name = "polling" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" - -[[package]] -name = "pong" -version = "0.1.0" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ - "anyhow", - "bytemuck", "cfg-if", - "cgmath", - "console_error_panic_hook", - "console_log", - "env_logger", - "fs_extra", - "getrandom", - "glob", - "instant", - "log", - "naga 0.11.1", - "pollster", - "rand", - "rayon", - "rodio", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu", - "wgpu_glyph", - "winit", + "concurrent-queue 2.4.0", + "pin-project-lite", + "rustix 0.38.30", + "tracing", + "windows-sys 0.52.0", ] +[[package]] +name = "pollster" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + [[package]] name = "pp-rs" version = "0.2.1" @@ -2549,12 +2465,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - [[package]] name = "presser" version = "0.3.1" @@ -2574,9 +2484,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -2588,42 +2498,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" [[package]] -name = "quote" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" +name = "quick-xml" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" dependencies = [ - "ppv-lite86", - "rand_core", + "memchr", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "quote" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "getrandom", + "proc-macro2", ] [[package]] @@ -2634,12 +2523,15 @@ checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" [[package]] name = "rayon" @@ -2767,16 +2659,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rodio" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" -dependencies = [ - "cpal", - "hound", -] - [[package]] name = "roxmltree" version = "0.14.1" @@ -2805,15 +2687,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "0.36.16" @@ -2824,10 +2697,23 @@ dependencies = [ "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.38.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", +] + [[package]] name = "ryu" version = "1.0.11" @@ -2891,9 +2777,22 @@ checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" dependencies = [ "ab_glyph", "log", - "memmap2", - "smithay-client-toolkit", - "tiny-skia", + "memmap2 0.5.10", + "smithay-client-toolkit 0.16.0", + "tiny-skia 0.8.4", +] + +[[package]] +name = "sctk-adwaita" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.9.3", + "smithay-client-toolkit 0.18.0", + "tiny-skia 0.11.3", ] [[package]] @@ -2919,21 +2818,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.145" @@ -2977,21 +2861,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "shaderc" version = "0.8.0" @@ -3022,17 +2891,11 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3059,16 +2922,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags 1.3.2", - "calloop", + "calloop 0.10.1", "dlib", "lazy_static", "log", - "memmap2", + "memmap2 0.5.10", "nix 0.24.2", "pkg-config", - "wayland-client", - "wayland-cursor", - "wayland-protocols", + "wayland-client 0.29.5", + "wayland-cursor 0.29.5", + "wayland-protocols 0.29.5", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f" +dependencies = [ + "bitflags 2.4.2", + "calloop 0.12.4", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.3", + "rustix 0.38.30", + "thiserror", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-csd-frame", + "wayland-cursor 0.31.0", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr", + "wayland-scanner 0.31.0", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", ] [[package]] @@ -3081,7 +2978,7 @@ dependencies = [ "glam", "pollster", "wgpu", - "winit", + "winit 0.28.6", ] [[package]] @@ -3114,59 +3011,25 @@ dependencies = [ ] [[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.102", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn 1.0.102", +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.4.2", ] [[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strict-num" @@ -3187,9 +3050,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3212,31 +3075,31 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 1.0.102", + "syn 2.0.48", ] [[package]] @@ -3284,7 +3147,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3318,7 +3181,21 @@ dependencies = [ "bytemuck", "cfg-if", "png", - "tiny-skia-path", + "tiny-skia-path 0.8.4", +] + +[[package]] +name = "tiny-skia" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a067b809476893fce6a254cf285850ff69c847e6cfbade6a20b655b6c7e80d" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path 0.11.3", ] [[package]] @@ -3332,6 +3209,17 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tiny-skia-path" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de35e8a90052baaaf61f171680ac2f8e925a1e43ea9d2e3a00514772250e541" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -3359,7 +3247,7 @@ version = "3.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deacee3abcc4fd8ff3f0f7c08d4583ab51753ed1d5a3acacd6d5773f640c27d6" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -3507,7 +3395,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3532,7 +3420,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3557,7 +3445,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3583,7 +3471,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3609,7 +3497,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3635,7 +3523,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3652,7 +3540,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3669,7 +3557,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3690,7 +3578,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3712,7 +3600,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3735,7 +3623,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3758,7 +3646,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3781,7 +3669,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", + "winit 0.29.10", ] [[package]] @@ -3806,18 +3694,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "wgpu", - "winit", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "rand", - "static_assertions", + "winit 0.29.10", ] [[package]] @@ -3922,15 +3799,17 @@ dependencies = [ [[package]] name = "walrus" -version = "0.19.0" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb08e48cde54c05f363d984bb54ce374f49e242def9468d2e1b6c2372d291f8" +checksum = "2c03529cd0c4400a2449f640d2f27cd1b48c3065226d15e26d98e4429ab0adb7" dependencies = [ "anyhow", + "gimli", "id-arena", "leb128", "log", "walrus-macro", + "wasm-encoder", "wasmparser", ] @@ -3964,9 +3843,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3974,24 +3853,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d21c60239a09bf9bab8dfa752be4e6c637db22296b9ded493800090448692da9" +checksum = "a875870b7b39024cbca8f61a0e1fc8edfe7ac02b484e5a9bcea64374050a850e" dependencies = [ "anyhow", "base64 0.9.3", @@ -4011,9 +3890,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-externref-xform" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafbe1984f67cc12645f12ab65e6145e8ddce1ab265d0be58435f25bb0ce2608" +checksum = "04c5d468dc79cfd824d181c386f34c2e7ea521ea5855ddd95af8f4cf3fa676f4" dependencies = [ "anyhow", "walrus", @@ -4021,9 +3900,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -4033,9 +3912,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4043,22 +3922,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-multi-value-xform" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581419e3995571a1d2d066e360ca1c0c09da097f5a53c98e6f00d96eddaf0ffe" +checksum = "65f10c037dad45759d53b598d4737acdced90a0945023c8c6cd8d67b4b3e4eaf" dependencies = [ "anyhow", "walrus", @@ -4066,15 +3945,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-bindgen-threads-xform" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05d272073981137e8426cf2a6830d43d1f84f988a050b2f8b210f0e266b8983" +checksum = "16ddf1a4beb1bceb2b73c2325581901ca2cd92af628f24389a678854dcd65b24" dependencies = [ "anyhow", "walrus", @@ -4083,9 +3962,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-conventions" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9c65b1ff5041ea824ca24c519948aec16fb6611c617d601623c0657dfcd47b" +checksum = "93f13ed8ccdac31eadcfd4c9b2ec7bd43e77454b14acb1f43189f2875a9b0391" dependencies = [ "anyhow", "walrus", @@ -4093,9 +3972,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-interpreter" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5c796220738ab5d44666f37205728a74141c0039d1166bcf8110b26bafaa1e" +checksum = "c4282a271772a3063d4057c1144e118254f207fbbc1381b8d50b23c25585d893" dependencies = [ "anyhow", "log", @@ -4116,11 +3995,34 @@ dependencies = [ "wasm-bindgen-cli-support", ] +[[package]] +name = "wasm-encoder" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c41dbd92eaebf3612a39be316540b8377c871cb9bde6b064af962984912881" +dependencies = [ + "leb128", +] + [[package]] name = "wasmparser" -version = "0.77.0" +version = "0.80.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449167e2832691a1bff24cde28d2804e90e09586a448c8e76984792c44334a6b" + +[[package]] +name = "wayland-backend" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35c86d22e720a07d954ebbed772d01180501afe7d03d464f413bb5f8914a8d6" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +dependencies = [ + "cc", + "downcast-rs", + "nix 0.26.4", + "scoped-tls", + "smallvec", + "wayland-sys 0.31.1", +] [[package]] name = "wayland-client" @@ -4134,8 +4036,20 @@ dependencies = [ "nix 0.24.2", "scoped-tls", "wayland-commons", - "wayland-scanner", - "wayland-sys", + "wayland-scanner 0.29.5", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-client" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +dependencies = [ + "bitflags 2.4.2", + "nix 0.26.4", + "wayland-backend", + "wayland-scanner 0.31.0", ] [[package]] @@ -4147,7 +4061,18 @@ dependencies = [ "nix 0.24.2", "once_cell", "smallvec", - "wayland-sys", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.2", + "cursor-icon", + "wayland-backend", ] [[package]] @@ -4157,7 +4082,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ "nix 0.24.2", - "wayland-client", + "wayland-client 0.29.5", + "xcursor", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" +dependencies = [ + "nix 0.26.4", + "wayland-client 0.31.1", "xcursor", ] @@ -4168,9 +4104,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags 1.3.2", - "wayland-client", + "wayland-client 0.29.5", "wayland-commons", - "wayland-scanner", + "wayland-scanner 0.29.5", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-scanner 0.31.0", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", ] [[package]] @@ -4184,6 +4158,17 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "wayland-scanner" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + [[package]] name = "wayland-sys" version = "0.29.5" @@ -4195,11 +4180,33 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4222,19 +4229,19 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24" +checksum = "d0b71d2ded29e2161db50ab731d6cb42c037bd7ab94864a98fa66ff36b4721a8" dependencies = [ "arrayvec", "cfg-if", - "flume 0.11.0", + "cfg_aliases", "js-sys", "log", - "naga 0.14.0", + "naga 0.19.0", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.0", "smallvec", "static_assertions", "wasm-bindgen", @@ -4247,19 +4254,22 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "837e02ddcdc6d4a9b56ba4598f7fd4202a7699ab03f6ef4dcdebfad2c966aea6" +checksum = "6b15e451d4060ada0d99a64df44e4d590213496da7c4f245572d51071e8e30ed" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.3.1", + "bitflags 2.4.2", + "cfg_aliases", "codespan-reporting", + "indexmap 2.1.0", "log", - "naga 0.14.0", + "naga 0.19.0", + "once_cell", "parking_lot 0.12.1", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.0", "rustc-hash", "smallvec", "thiserror", @@ -4270,16 +4280,17 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e30b9a8155c83868e82a8c5d3ce899de6c3961d2ef595de8fc168a1677fc2d8" +checksum = "11f259ceb56727fb097da108d92f8a5cbdb5b74a77f9e396bd43626f67299d61" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.2", "block", + "cfg_aliases", "core-graphics-types", "d3d12", "glow", @@ -4294,13 +4305,13 @@ dependencies = [ "libloading 0.8.0", "log", "metal", - "naga 0.14.0", + "naga 0.19.0", "objc", "once_cell", "parking_lot 0.12.1", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.6.0", "renderdoc-sys", "rustc-hash", "smallvec", @@ -4326,26 +4337,15 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" +checksum = "895fcbeb772bfb049eb80b2d6e47f6c9af235284e9703c96fc0218a42ffd5af2" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.2", "js-sys", "web-sys", ] -[[package]] -name = "wgpu_glyph" -version = "0.21.0" -source = "git+https://github.com/hecrj/wgpu_glyph.git#17de6874f4f11bd07f4cee91d68ff5193925a9a9" -dependencies = [ - "bytemuck", - "glyph_brush", - "log", - "wgpu", -] - [[package]] name = "widestring" version = "1.0.2" @@ -4394,19 +4394,6 @@ dependencies = [ "wgpu", ] -[[package]] -name = "windows" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" -dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", -] - [[package]] name = "windows" version = "0.51.1" @@ -4472,6 +4459,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -4502,6 +4498,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4515,16 +4526,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.37.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" @@ -4539,16 +4550,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.37.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" @@ -4563,16 +4574,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "windows_i686_msvc" -version = "0.36.1" +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.37.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" @@ -4587,16 +4598,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.37.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" @@ -4610,6 +4621,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4623,16 +4640,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.37.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" @@ -4646,41 +4663,96 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winit" version = "0.28.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" dependencies = [ - "android-activity", + "android-activity 0.4.1", "bitflags 1.3.2", "cfg_aliases", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "dispatch", "instant", "libc", "log", "mio", "ndk 0.7.0", - "objc2", + "objc2 0.3.0-beta.3.patch-leaks.3", "once_cell", "orbclient", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", "redox_syscall 0.3.5", - "sctk-adwaita", - "smithay-client-toolkit", + "sctk-adwaita 0.5.4", + "smithay-client-toolkit 0.16.0", "wasm-bindgen", - "wayland-client", + "wayland-client 0.29.5", "wayland-commons", - "wayland-protocols", - "wayland-scanner", + "wayland-protocols 0.29.5", + "wayland-scanner 0.29.5", "web-sys", "windows-sys 0.45.0", "x11-dl", ] +[[package]] +name = "winit" +version = "0.29.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" +dependencies = [ + "ahash 0.8.7", + "android-activity 0.5.1", + "atomic-waker", + "bitflags 2.4.2", + "bytemuck", + "calloop 0.12.4", + "cfg_aliases", + "core-foundation", + "core-graphics 0.23.1", + "cursor-icon", + "icrate", + "js-sys", + "libc", + "log", + "memmap2 0.9.3", + "ndk 0.8.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc2 0.4.1", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", + "redox_syscall 0.3.5", + "rustix 0.38.30", + "sctk-adwaita 0.8.1", + "smithay-client-toolkit 0.18.0", + "smol_str", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.48.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + [[package]] name = "winreg" version = "0.10.1" @@ -4701,6 +4773,27 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.0", + "once_cell", + "rustix 0.38.30", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" + [[package]] name = "xcursor" version = "0.3.4" @@ -4711,10 +4804,23 @@ dependencies = [ ] [[package]] -name = "xi-unicode" -version = "0.3.0" +name = "xkbcommon-dl" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699" +dependencies = [ + "bitflags 2.4.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" [[package]] name = "xml-rs" @@ -4727,3 +4833,23 @@ name = "xmlparser" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] diff --git a/Cargo.toml b/Cargo.toml index afbc30ab..23f226cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,5 +16,5 @@ members = [ ] exclude = [ "code/showcase/imgui-demo", - #"code/showcase/pong", + "code/showcase/pong", ] \ No newline at end of file diff --git a/code/beginner/tutorial1-window/Cargo.toml b/code/beginner/tutorial1-window/Cargo.toml index ee518208..8bcb6baf 100644 --- a/code/beginner/tutorial1-window/Cargo.toml +++ b/code/beginner/tutorial1-window/Cargo.toml @@ -13,17 +13,17 @@ path = "src/main.rs" [dependencies] cfg-if = "1" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" -wgpu = "0.18" +wgpu = "0.19" pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} -wasm-bindgen = "=0.2.87" +wgpu = { version = "0.19", features = ["webgl"]} +wasm-bindgen = "=0.2.90" wasm-bindgen-futures = "0.4.30" web-sys = { version = "0.3.53", features = [ "Document", diff --git a/code/beginner/tutorial1-window/src/lib.rs b/code/beginner/tutorial1-window/src/lib.rs index 7d9595d2..e346eed2 100644 --- a/code/beginner/tutorial1-window/src/lib.rs +++ b/code/beginner/tutorial1-window/src/lib.rs @@ -1,7 +1,7 @@ use winit::{ event::*, - event_loop::{ControlFlow, EventLoop}, - window::WindowBuilder, + event_loop::EventLoop, + window::WindowBuilder, keyboard::{KeyCode, PhysicalKey}, }; #[cfg(target_arch = "wasm32")] @@ -18,7 +18,7 @@ pub fn run() { } } - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window = WindowBuilder::new().build(&event_loop).unwrap(); #[cfg(target_arch = "wasm32")] @@ -40,23 +40,23 @@ pub fn run() { .expect("Couldn't append canvas to document body."); } - event_loop.run(move |event, _, control_flow| match event { + event_loop.run(move |event, control_flow| match event { Event::WindowEvent { ref event, window_id, } if window_id == window.id() => match event { WindowEvent::CloseRequested | WindowEvent::KeyboardInput { - input: - KeyboardInput { + event: + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(VirtualKeyCode::Escape), + physical_key: PhysicalKey::Code(KeyCode::Escape), .. }, .. - } => *control_flow = ControlFlow::Exit, + } => control_flow.exit(), _ => {} }, _ => {} - }); + }).unwrap(); } diff --git a/code/beginner/tutorial2-surface/Cargo.toml b/code/beginner/tutorial2-surface/Cargo.toml index baec9265..4aff7c23 100644 --- a/code/beginner/tutorial2-surface/Cargo.toml +++ b/code/beginner/tutorial2-surface/Cargo.toml @@ -9,16 +9,16 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" -wgpu = "0.18" +wgpu = "0.19" pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial2-surface/src/challenge.rs b/code/beginner/tutorial2-surface/src/challenge.rs index 789d64db..29d26262 100644 --- a/code/beginner/tutorial2-surface/src/challenge.rs +++ b/code/beginner/tutorial2-surface/src/challenge.rs @@ -2,26 +2,27 @@ use std::iter; use winit::{ event::*, - event_loop::{ControlFlow, EventLoop}, + event_loop::EventLoop, + keyboard::{KeyCode, PhysicalKey}, window::{Window, WindowBuilder}, }; -struct State { +struct State<'a> { #[allow(dead_code)] instance: wgpu::Instance, #[allow(dead_code)] adapter: wgpu::Adapter, - surface: wgpu::Surface, + surface: wgpu::Surface<'a>, device: wgpu::Device, queue: wgpu::Queue, config: wgpu::SurfaceConfiguration, size: winit::dpi::PhysicalSize, clear_color: wgpu::Color, - window: Window, + window: &'a Window, } -impl State { - async fn new(window: Window) -> Self { +impl<'a> State<'a> { + async fn new(window: &'a Window) -> State<'a> { let size = window.inner_size(); // The instance is a handle to our GPU @@ -35,7 +36,7 @@ impl State { // // The surface needs to live as long as the window that created it. // State owns the window so this should be safe. - let surface = unsafe { instance.create_surface(&window) }.unwrap(); + let surface = instance.create_surface(window).unwrap(); let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { @@ -50,10 +51,10 @@ impl State { .request_device( &wgpu::DeviceDescriptor { label: None, - features: wgpu::Features::empty(), + required_features: wgpu::Features::empty(), // WebGL doesn't support all of wgpu's features, so if // we're building for the web we'll have to disable some. - limits: if cfg!(target_arch = "wasm32") { + required_limits: if cfg!(target_arch = "wasm32") { wgpu::Limits::downlevel_webgl2_defaults() } else { wgpu::Limits::default() @@ -81,6 +82,7 @@ impl State { height: size.height, present_mode: surface_caps.present_modes[0], alpha_mode: surface_caps.alpha_modes[0], + desired_maximum_frame_latency: 2, view_formats: vec![], }; surface.configure(&device, &config); @@ -172,13 +174,13 @@ fn main() { async fn run() { env_logger::init(); - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window = WindowBuilder::new().build(&event_loop).unwrap(); // State::new uses async code, so we're going to wait for it to finish - let mut state = State::new(window).await; + let mut state = State::new(&window).await; - event_loop.run(move |event, _, control_flow| { + event_loop.run(move |event, control_flow| { match event { Event::WindowEvent { ref event, @@ -188,43 +190,40 @@ async fn run() { match event { WindowEvent::CloseRequested | WindowEvent::KeyboardInput { - input: - KeyboardInput { + event: + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(VirtualKeyCode::Escape), + physical_key: PhysicalKey::Code(KeyCode::Escape), .. }, .. - } => *control_flow = ControlFlow::Exit, + } => control_flow.exit(), WindowEvent::Resized(physical_size) => { state.resize(*physical_size); } - WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { - // new_inner_size is &mut so w have to dereference it twice - state.resize(**new_inner_size); + WindowEvent::RedrawRequested => { + state.window().request_redraw(); + state.update(); + match state.render() { + Ok(_) => {} + // Reconfigure the surface if it's lost or outdated + Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => { + state.resize(state.size) + } + // The system is out of memory, we should probably quit + Err(wgpu::SurfaceError::OutOfMemory) => { + log::error!("OutOfMemory"); + control_flow.exit(); + } + // We're ignoring timeouts + Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), + } } _ => {} } } } - Event::RedrawRequested(window_id) if window_id == state.window().id() => { - state.update(); - match state.render() { - Ok(_) => {} - // Reconfigure the surface if it's lost or outdated - Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => { - state.resize(state.size) - } - // The system is out of memory, we should probably quit - Err(wgpu::SurfaceError::OutOfMemory) => *control_flow = ControlFlow::Exit, - // We're ignoring timeouts - Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), - } - } - Event::MainEventsCleared => { - state.window().request_redraw(); - } _ => {} } - }); + }).unwrap(); } diff --git a/code/beginner/tutorial2-surface/src/lib.rs b/code/beginner/tutorial2-surface/src/lib.rs index 16baaf0c..469605fe 100644 --- a/code/beginner/tutorial2-surface/src/lib.rs +++ b/code/beginner/tutorial2-surface/src/lib.rs @@ -2,15 +2,15 @@ use std::iter; use winit::{ event::*, - event_loop::{ControlFlow, EventLoop}, - window::{Window, WindowBuilder}, + event_loop::EventLoop, + window::{Window, WindowBuilder}, keyboard::{PhysicalKey, KeyCode}, }; #[cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; -struct State { - surface: wgpu::Surface, +struct State<'a> { + surface: wgpu::Surface<'a>, device: wgpu::Device, queue: wgpu::Queue, config: wgpu::SurfaceConfiguration, @@ -18,11 +18,11 @@ struct State { // The window must be declared after the surface so // it gets dropped after it as the surface contains // unsafe references to the window's resources. - window: Window, + window: &'a Window, } -impl State { - async fn new(window: Window) -> Self { +impl<'a> State<'a> { + async fn new(window: &'a Window) -> State<'a> { let size = window.inner_size(); // The instance is a handle to our GPU @@ -32,11 +32,7 @@ impl State { ..Default::default() }); - // # Safety - // - // The surface needs to live as long as the window that created it. - // State owns the window so this should be safe. - let surface = unsafe { instance.create_surface(&window) }.unwrap(); + let surface = instance.create_surface(window).unwrap(); let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { @@ -51,10 +47,10 @@ impl State { .request_device( &wgpu::DeviceDescriptor { label: None, - features: wgpu::Features::empty(), + required_features: wgpu::Features::empty(), // WebGL doesn't support all of wgpu's features, so if // we're building for the web we'll have to disable some. - limits: if cfg!(target_arch = "wasm32") { + required_limits: if cfg!(target_arch = "wasm32") { wgpu::Limits::downlevel_webgl2_defaults() } else { wgpu::Limits::default() @@ -83,6 +79,7 @@ impl State { height: size.height, present_mode: surface_caps.present_modes[0], alpha_mode: surface_caps.alpha_modes[0], + desired_maximum_frame_latency: 2, view_formats: vec![], }; surface.configure(&device, &config); @@ -169,7 +166,7 @@ pub async fn run() { } } - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window = WindowBuilder::new().build(&event_loop).unwrap(); #[cfg(target_arch = "wasm32")] @@ -192,9 +189,9 @@ pub async fn run() { } // State::new uses async code, so we're going to wait for it to finish - let mut state = State::new(window).await; + let mut state = State::new(&window).await; - event_loop.run(move |event, _, control_flow| { + event_loop.run(move |event, control_flow| { match event { Event::WindowEvent { ref event, @@ -205,45 +202,42 @@ pub async fn run() { match event { WindowEvent::CloseRequested | WindowEvent::KeyboardInput { - input: - KeyboardInput { + event: + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(VirtualKeyCode::Escape), + physical_key: PhysicalKey::Code(KeyCode::Escape), .. }, .. - } => *control_flow = ControlFlow::Exit, + } => control_flow.exit(), WindowEvent::Resized(physical_size) => { state.resize(*physical_size); } - WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { - // new_inner_size is &&mut so w have to dereference it twice - state.resize(**new_inner_size); + WindowEvent::RedrawRequested => { + // This tells winit that we want another frame after this one + state.window().request_redraw(); + state.update(); + match state.render() { + Ok(_) => {} + // Reconfigure the surface if it's lost or outdated + Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => { + state.resize(state.size) + } + // The system is out of memory, we should probably quit + Err(wgpu::SurfaceError::OutOfMemory) => { + log::error!("OutOfMemory"); + control_flow.exit(); + } + + // This happens when the a frame takes too long to present + Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), + } } _ => {} } } } - Event::RedrawRequested(window_id) if window_id == state.window().id() => { - state.update(); - match state.render() { - Ok(_) => {} - // Reconfigure the surface if it's lost or outdated - Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => { - state.resize(state.size) - } - // The system is out of memory, we should probably quit - Err(wgpu::SurfaceError::OutOfMemory) => *control_flow = ControlFlow::Exit, - - Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), - } - } - Event::RedrawEventsCleared => { - // RedrawRequested will only trigger once, unless we manually - // request it. - state.window().request_redraw(); - } _ => {} } - }); + }).unwrap(); } diff --git a/code/beginner/tutorial3-pipeline/Cargo.toml b/code/beginner/tutorial3-pipeline/Cargo.toml index 1dec3c98..dcbccb02 100644 --- a/code/beginner/tutorial3-pipeline/Cargo.toml +++ b/code/beginner/tutorial3-pipeline/Cargo.toml @@ -9,16 +9,16 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" -wgpu = "0.18" +wgpu = "0.19" pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial4-buffer/Cargo.toml b/code/beginner/tutorial4-buffer/Cargo.toml index a6058563..c326bac2 100644 --- a/code/beginner/tutorial4-buffer/Cargo.toml +++ b/code/beginner/tutorial4-buffer/Cargo.toml @@ -10,8 +10,8 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" -winit = "0.28" -wgpu = "0.18" +winit = { version = "0.29", features = ["rwh_05"] } +wgpu = "0.19" env_logger = "0.10" log = "0.4" pollster = "0.3" @@ -21,7 +21,7 @@ bytemuck = { version = "1.12", features = [ "derive" ] } [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial5-textures/Cargo.toml b/code/beginner/tutorial5-textures/Cargo.toml index 8c99f203..0e214c73 100644 --- a/code/beginner/tutorial5-textures/Cargo.toml +++ b/code/beginner/tutorial5-textures/Cargo.toml @@ -14,8 +14,8 @@ bytemuck = { version = "1.12", features = [ "derive" ] } env_logger = "0.10" log = "0.4" pollster = "0.3" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -25,7 +25,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial6-uniforms/Cargo.toml b/code/beginner/tutorial6-uniforms/Cargo.toml index 7331f606..fcc9f95a 100644 --- a/code/beginner/tutorial6-uniforms/Cargo.toml +++ b/code/beginner/tutorial6-uniforms/Cargo.toml @@ -15,8 +15,8 @@ cgmath = "0.18" env_logger = "0.10" log = "0.4" pollster = "0.3" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -26,7 +26,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial7-instancing/Cargo.toml b/code/beginner/tutorial7-instancing/Cargo.toml index c06e87f3..353ee75c 100644 --- a/code/beginner/tutorial7-instancing/Cargo.toml +++ b/code/beginner/tutorial7-instancing/Cargo.toml @@ -15,8 +15,8 @@ cgmath = "0.18" env_logger = "0.10" log = "0.4" pollster = "0.3" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -26,7 +26,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial8-depth/Cargo.toml b/code/beginner/tutorial8-depth/Cargo.toml index 80eadc2a..300425de 100644 --- a/code/beginner/tutorial8-depth/Cargo.toml +++ b/code/beginner/tutorial8-depth/Cargo.toml @@ -15,8 +15,8 @@ cgmath = "0.18" env_logger = "0.10" pollster = "0.3" log = "0.4" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -26,7 +26,7 @@ features = ["png", "jpeg"] [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/beginner/tutorial9-models/Cargo.toml b/code/beginner/tutorial9-models/Cargo.toml index f4dc95a0..9449a1f6 100644 --- a/code/beginner/tutorial9-models/Cargo.toml +++ b/code/beginner/tutorial9-models/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -28,7 +28,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/intermediate/tutorial10-lighting/Cargo.toml b/code/intermediate/tutorial10-lighting/Cargo.toml index 0ddf957a..0bb894fc 100644 --- a/code/intermediate/tutorial10-lighting/Cargo.toml +++ b/code/intermediate/tutorial10-lighting/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -28,7 +28,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/intermediate/tutorial11-normals/Cargo.toml b/code/intermediate/tutorial11-normals/Cargo.toml index 3dc611fd..842df50d 100644 --- a/code/intermediate/tutorial11-normals/Cargo.toml +++ b/code/intermediate/tutorial11-normals/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } [dependencies.image] version = "0.24" @@ -28,7 +28,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/intermediate/tutorial12-camera/Cargo.toml b/code/intermediate/tutorial12-camera/Cargo.toml index 53fd183b..f6fdde30 100644 --- a/code/intermediate/tutorial12-camera/Cargo.toml +++ b/code/intermediate/tutorial12-camera/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } instant = "0.1" [dependencies.image] @@ -29,7 +29,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/intermediate/tutorial13-hdr/Cargo.toml b/code/intermediate/tutorial13-hdr/Cargo.toml index 5499eeaf..281ec40a 100644 --- a/code/intermediate/tutorial13-hdr/Cargo.toml +++ b/code/intermediate/tutorial13-hdr/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } instant = "0.1" [dependencies.image] diff --git a/code/intermediate/wip-terrain/Cargo.toml b/code/intermediate/wip-terrain/Cargo.toml index c9df1883..4c8f0811 100644 --- a/code/intermediate/wip-terrain/Cargo.toml +++ b/code/intermediate/wip-terrain/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } instant = "0.1" [dependencies.image] @@ -29,7 +29,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/showcase/compute/Cargo.toml b/code/showcase/compute/Cargo.toml index ab283948..aade0012 100644 --- a/code/showcase/compute/Cargo.toml +++ b/code/showcase/compute/Cargo.toml @@ -14,8 +14,8 @@ image = "0.24" log = "0.4" rayon = "1.4" tobj = "2.0" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } [build-dependencies] anyhow = "1.0" diff --git a/code/showcase/framework/Cargo.toml b/code/showcase/framework/Cargo.toml index 33446639..c27902f1 100644 --- a/code/showcase/framework/Cargo.toml +++ b/code/showcase/framework/Cargo.toml @@ -14,9 +14,9 @@ pollster = "0.3" image = "0.24.2" log = "0.4" tobj = "2.0" -wgpu = "0.18" +wgpu = "0.19" wgpu-subscriber = "0.1" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } [build-dependencies] anyhow = "1.0" diff --git a/code/showcase/gifs/Cargo.toml b/code/showcase/gifs/Cargo.toml index 3611e061..431947cd 100644 --- a/code/showcase/gifs/Cargo.toml +++ b/code/showcase/gifs/Cargo.toml @@ -14,8 +14,8 @@ pollster = "0.3" image = "0.24.2" log = "0.4" tobj = "3.1" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } gif = "0.11.4" futures-intrusive = "0.4" diff --git a/code/showcase/imgui-demo/Cargo.toml b/code/showcase/imgui-demo/Cargo.toml index 97901deb..21406182 100644 --- a/code/showcase/imgui-demo/Cargo.toml +++ b/code/showcase/imgui-demo/Cargo.toml @@ -8,9 +8,9 @@ edition = "2018" [dependencies] anyhow = "1.0" -wgpu = "0.18" +wgpu = "0.19" pollster = "0.3" imgui = "0.7" -imgui-wgpu = "0.18" +imgui-wgpu = "0.19" imgui-winit-support = "0.7" framework = { path = "../framework" } \ No newline at end of file diff --git a/code/showcase/lost-window/Cargo.toml b/code/showcase/lost-window/Cargo.toml index fe553fd8..8984e18b 100644 --- a/code/showcase/lost-window/Cargo.toml +++ b/code/showcase/lost-window/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] anyhow = "1" -wgpu = "0.18" -winit = "0.28" +wgpu = "0.19" +winit = { version = "0.29", features = ["rwh_05"] } pollster = "0.3" \ No newline at end of file diff --git a/code/showcase/mouse-picking/Cargo.toml b/code/showcase/mouse-picking/Cargo.toml index 7a045b79..8a22f68f 100644 --- a/code/showcase/mouse-picking/Cargo.toml +++ b/code/showcase/mouse-picking/Cargo.toml @@ -16,8 +16,8 @@ env_logger = "0.10" pollster = "0.3" log = "0.4" tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } instant = "0.1" [dependencies.image] @@ -29,7 +29,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/showcase/pong/Cargo.toml b/code/showcase/pong/Cargo.toml index 7129c4e8..a76cec8b 100644 --- a/code/showcase/pong/Cargo.toml +++ b/code/showcase/pong/Cargo.toml @@ -10,12 +10,12 @@ crate-type = ["cdylib", "rlib"] [dependencies] cfg-if = "1" env_logger = "0.10" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" pollster = "0.3" -wgpu = { version = "0.18", features = ["spirv"]} +wgpu = { version = "0.19", features = ["spirv"]} wgpu_glyph = { version = "0.21", git = "https://github.com/hecrj/wgpu_glyph.git" } rand = "0.8" rodio = { version = "0.16", default-features = false, features = ["wav"] } @@ -28,13 +28,13 @@ console_log = "1.0" getrandom = { version = "0.2", features = ["js"] } rodio = { version = "0.16", default-features = false, features = ["wasm-bindgen", "wav"] } wasm-bindgen-futures = "0.4.20" -wasm-bindgen = "=0.2.87" +wasm-bindgen = "=0.2.90" web-sys = { version = "0.3.53", features = [ "Document", "Window", "Element", ]} -wgpu = { version = "0.18", features = ["spirv", "webgl"]} +wgpu = { version = "0.19", features = ["spirv", "webgl"]} [build-dependencies] anyhow = "1.0" diff --git a/code/showcase/snow/Cargo.toml b/code/showcase/snow/Cargo.toml index 2d29d267..d4a8150f 100644 --- a/code/showcase/snow/Cargo.toml +++ b/code/showcase/snow/Cargo.toml @@ -11,5 +11,5 @@ bytemuck = { version = "1.13.1", features = ["derive"] } framework = { version = "0.1", path = "../framework"} glam = { version = "0.24.1", features = ["bytemuck"] } pollster = "0.3.0" -wgpu = "0.18" +wgpu = "0.19" winit = "0.28.6" diff --git a/code/showcase/threading/Cargo.toml b/code/showcase/threading/Cargo.toml index 614bdb10..4c7b47cb 100644 --- a/code/showcase/threading/Cargo.toml +++ b/code/showcase/threading/Cargo.toml @@ -17,8 +17,8 @@ pollster = "0.3" log = "0.4" rayon = "1.4" # NEW! tobj = { version = "3.2", features = ["async"]} -wgpu = { version = "0.18"} -winit = "0.28" +wgpu = { version = "0.19"} +winit = { version = "0.29", features = ["rwh_05"] } instant = "0.1" async-std = "1" @@ -31,7 +31,7 @@ features = ["png", "jpeg"] reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/code/showcase/threading/src/camera.rs b/code/showcase/threading/src/camera.rs index 0dc592b7..29092be4 100644 --- a/code/showcase/threading/src/camera.rs +++ b/code/showcase/threading/src/camera.rs @@ -1,4 +1,5 @@ use cgmath::*; +use winit::keyboard::KeyCode; use std::f32::consts::FRAC_PI_2; use std::time::Duration; use winit::dpi::PhysicalPosition; @@ -104,34 +105,34 @@ impl CameraController { } } - pub fn process_keyboard(&mut self, key: VirtualKeyCode, state: ElementState) -> bool { + pub fn process_keyboard(&mut self, key: KeyCode, state: ElementState) -> bool { let amount = if state == ElementState::Pressed { 1.0 } else { 0.0 }; match key { - VirtualKeyCode::W | VirtualKeyCode::Up => { + KeyCode::KeyW | KeyCode::ArrowUp => { self.amount_forward = amount; true } - VirtualKeyCode::S | VirtualKeyCode::Down => { + KeyCode::KeyS | KeyCode::ArrowDown => { self.amount_backward = amount; true } - VirtualKeyCode::A | VirtualKeyCode::Left => { + KeyCode::KeyA | KeyCode::ArrowLeft => { self.amount_left = amount; true } - VirtualKeyCode::D | VirtualKeyCode::Right => { + KeyCode::KeyD | KeyCode::ArrowRight => { self.amount_right = amount; true } - VirtualKeyCode::Space => { + KeyCode::Space => { self.amount_up = amount; true } - VirtualKeyCode::LShift => { + KeyCode::ShiftLeft => { self.amount_down = amount; true } diff --git a/code/showcase/threading/src/lib.rs b/code/showcase/threading/src/lib.rs index 2cc5ba23..c6a183d3 100644 --- a/code/showcase/threading/src/lib.rs +++ b/code/showcase/threading/src/lib.rs @@ -4,7 +4,8 @@ use std::iter; use wgpu::util::DeviceExt; use winit::{ event::*, - event_loop::{ControlFlow, EventLoop}, + event_loop::EventLoop, + keyboard::{KeyCode, PhysicalKey}, window::Window, }; @@ -130,9 +131,9 @@ struct LightUniform { _padding2: u32, } -struct State { - window: Window, - surface: wgpu::Surface, +struct State<'a> { + window: &'a Window, + surface: wgpu::Surface<'a>, device: wgpu::Device, queue: wgpu::Queue, config: wgpu::SurfaceConfiguration, @@ -218,8 +219,8 @@ fn create_render_pipeline( }) } -impl State { - async fn new(window: Window) -> Self { +impl<'a> State<'a> { + async fn new(window: &'a Window) -> State<'a> { let size = window.inner_size(); // The instance is a handle to our GPU @@ -229,15 +230,11 @@ impl State { ..Default::default() }); - // # Safety - // - // The surface needs to live as long as the window that created it. - // State owns the window so this should be safe. - let surface = unsafe { instance.create_surface(&window) }.unwrap(); + let surface = instance.create_surface(window).unwrap(); let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::default(), + power_preference: wgpu::PowerPreference::HighPerformance, compatible_surface: Some(&surface), force_fallback_adapter: false, }) @@ -247,10 +244,10 @@ impl State { .request_device( &wgpu::DeviceDescriptor { label: None, - features: wgpu::Features::empty(), + required_features: wgpu::Features::empty(), // WebGL doesn't support all of wgpu's features, so if // we're building for the web we'll have to disable some. - limits: if cfg!(target_arch = "wasm32") { + required_limits: if cfg!(target_arch = "wasm32") { wgpu::Limits::downlevel_webgl2_defaults() } else { wgpu::Limits::default() @@ -278,6 +275,7 @@ impl State { height: size.height, present_mode: surface_caps.present_modes[0], alpha_mode: surface_caps.alpha_modes[0], + desired_maximum_frame_latency: 2, // The max number of frames that can be in the queue view_formats: vec![], }; @@ -573,9 +571,9 @@ impl State { fn input(&mut self, event: &WindowEvent) -> bool { match event { WindowEvent::KeyboardInput { - input: - KeyboardInput { - virtual_keycode: Some(key), + event: + KeyEvent { + physical_key: PhysicalKey::Code(key), state, .. }, @@ -694,7 +692,7 @@ pub async fn run() { } } - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let title = env!("CARGO_PKG_NAME"); let window = winit::window::WindowBuilder::new() .with_title(title) @@ -720,20 +718,19 @@ pub async fn run() { .expect("Couldn't append canvas to document body."); } - let mut state = State::new(window).await; // NEW! + let mut state = State::new(&window).await; // NEW! let mut last_render_time = instant::Instant::now(); - event_loop.run(move |event, _, control_flow| { - *control_flow = ControlFlow::Poll; + + // let window = &window; + event_loop.run(move |event, control_flow| { + // let _ = window; match event { - Event::MainEventsCleared => state.window().request_redraw(), - // NEW! Event::DeviceEvent { event: DeviceEvent::MouseMotion{ delta, }, .. // We're not using device_id currently } => if state.mouse_pressed { state.camera_controller.process_mouse(delta.0, delta.1) } - // UPDATED! Event::WindowEvent { ref event, window_id, @@ -742,39 +739,37 @@ pub async fn run() { #[cfg(not(target_arch="wasm32"))] WindowEvent::CloseRequested | WindowEvent::KeyboardInput { - input: - KeyboardInput { + event: + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(VirtualKeyCode::Escape), + physical_key: PhysicalKey::Code(KeyCode::Escape), .. }, .. - } => *control_flow = ControlFlow::Exit, + } => control_flow.exit(), WindowEvent::Resized(physical_size) => { state.resize(*physical_size); } - WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { - state.resize(**new_inner_size); + WindowEvent::RedrawRequested => { + state.window().request_redraw(); + let now = instant::Instant::now(); + let dt = now - last_render_time; + last_render_time = now; + state.update(dt); + match state.render() { + Ok(_) => {} + // Reconfigure the surface if it's lost or outdated + Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => state.resize(state.size), + // The system is out of memory, we should probably quit + Err(wgpu::SurfaceError::OutOfMemory) => control_flow.exit(), + // We're ignoring timeouts + Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), + } } _ => {} } } - Event::RedrawRequested(window_id) if window_id == state.window().id() => { - let now = instant::Instant::now(); - let dt = now - last_render_time; - last_render_time = now; - state.update(dt); - match state.render() { - Ok(_) => {} - // Reconfigure the surface if it's lost or outdated - Err(wgpu::SurfaceError::Lost | wgpu::SurfaceError::Outdated) => state.resize(state.size), - // The system is out of memory, we should probably quit - Err(wgpu::SurfaceError::OutOfMemory) => *control_flow = ControlFlow::Exit, - // We're ignoring timeouts - Err(wgpu::SurfaceError::Timeout) => log::warn!("Surface timeout"), - } - } _ => {} } - }); + }).unwrap(); } diff --git a/code/showcase/threading/src/resources.rs b/code/showcase/threading/src/resources.rs index 54693245..1183ebcd 100644 --- a/code/showcase/threading/src/resources.rs +++ b/code/showcase/threading/src/resources.rs @@ -189,7 +189,7 @@ pub async fn load_model( // Average the tangents/bitangents for (i, n) in triangles_included.into_iter().enumerate() { let denom = 1.0 / n as f32; - let mut v = &mut vertices[i]; + let v = &mut vertices[i]; v.tangent = (cgmath::Vector3::from(v.tangent) * denom).into(); v.bitangent = (cgmath::Vector3::from(v.bitangent) * denom).into(); } diff --git a/code/showcase/threading/src/texture.rs b/code/showcase/threading/src/texture.rs index 24f0ffc3..46e187d8 100644 --- a/code/showcase/threading/src/texture.rs +++ b/code/showcase/threading/src/texture.rs @@ -1,6 +1,5 @@ use anyhow::*; use image::GenericImageView; -use std::num::NonZeroU32; pub struct Texture { pub texture: wgpu::Texture, diff --git a/code/showcase/windowless/Cargo.toml b/code/showcase/windowless/Cargo.toml index e826b254..4492cfb2 100644 --- a/code/showcase/windowless/Cargo.toml +++ b/code/showcase/windowless/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] image = "0.24" shaderc = "0.8" -wgpu = { version = "0.18", features = ["spirv"] } +wgpu = { version = "0.19", features = ["spirv"] } pollster = "0.3" futures-intrusive = "0.4" diff --git a/docs/beginner/tutorial1-window/README.md b/docs/beginner/tutorial1-window/README.md index 98ae267a..6d58c1ad 100644 --- a/docs/beginner/tutorial1-window/README.md +++ b/docs/beginner/tutorial1-window/README.md @@ -8,10 +8,10 @@ For the beginner stuff, we're going to keep things very simple. We'll add things ```toml [dependencies] -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" -wgpu = "0.18" +wgpu = "0.19" ``` ## Using Rust's new resolver @@ -110,7 +110,7 @@ cfg-if = "1" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4.30" web-sys = { version = "0.3", features = [ diff --git a/docs/beginner/tutorial2-surface/README.md b/docs/beginner/tutorial2-surface/README.md index 4b197471..7b2d7f81 100644 --- a/docs/beginner/tutorial2-surface/README.md +++ b/docs/beginner/tutorial2-surface/README.md @@ -286,16 +286,16 @@ If we try to build WASM now, it will fail because `wasm-bindgen` doesn't support ```toml [dependencies] cfg-if = "1" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" -wgpu = "0.18" +wgpu = "0.19" pollster = "0.3" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" console_log = "1.0" -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/docs/beginner/tutorial5-textures/README.md b/docs/beginner/tutorial5-textures/README.md index 1f2ccf2e..13f59c27 100644 --- a/docs/beginner/tutorial5-textures/README.md +++ b/docs/beginner/tutorial5-textures/README.md @@ -446,11 +446,11 @@ For convenience, let's pull our texture code into its own module. We'll first ne [dependencies] image = "0.23" cgmath = "0.18" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } env_logger = "0.10" log = "0.4" pollster = "0.3" -wgpu = "0.18" +wgpu = "0.19" bytemuck = { version = "1.12", features = [ "derive" ] } anyhow = "1.0" # NEW! ``` diff --git a/docs/intermediate/tutorial13-hdr/readme.md b/docs/intermediate/tutorial13-hdr/readme.md index 5a30d315..2cc81025 100644 --- a/docs/intermediate/tutorial13-hdr/readme.md +++ b/docs/intermediate/tutorial13-hdr/readme.md @@ -492,7 +492,7 @@ You may have noted that we have switched from `downlevel_webgl2_defaults()` to ` Consequently, we are going to remove the WebGL feature from `Cargo.toml`. This line in particular: ```toml -wgpu = { version = "0.18", features = ["webgl"]} +wgpu = { version = "0.19", features = ["webgl"]} ``` diff --git a/docs/news/0.16/readme.md b/docs/news/0.16/readme.md index af88fd4b..abba4d84 100644 --- a/docs/news/0.16/readme.md +++ b/docs/news/0.16/readme.md @@ -29,7 +29,7 @@ In other news WebGPU has been added to Chrome 113 and up! Currently the Linux ve reqwest = { version = "0.11" } console_error_panic_hook = "0.1" console_log = "1.0" -# wgpu = { version = "0.18", features = ["webgl"]} +# wgpu = { version = "0.19", features = ["webgl"]} wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ diff --git a/docs/showcase/imgui-demo/README.md b/docs/showcase/imgui-demo/README.md index f823b66b..12b67c73 100644 --- a/docs/showcase/imgui-demo/README.md +++ b/docs/showcase/imgui-demo/README.md @@ -14,7 +14,7 @@ This is not an in-depth guide on how to use Imgui. But here are some of the basi ```toml imgui = "0.7" -imgui-wgpu = "0.18" +imgui-wgpu = "0.19" imgui-winit-support = "0.7" ``` diff --git a/docs/showcase/pong/README.md b/docs/showcase/pong/README.md index e2e831d6..78d6317f 100644 --- a/docs/showcase/pong/README.md +++ b/docs/showcase/pong/README.md @@ -263,13 +263,13 @@ In order for wasm-pack to work properly I first needed to add some dependencies: ```toml[dependencies] cfg-if = "1" env_logger = "0.10" -winit = "0.28" +winit = { version = "0.29", features = ["rwh_05"] } anyhow = "1.0" bytemuck = { version = "1.12", features = [ "derive" ] } cgmath = "0.18" pollster = "0.3" -wgpu = { version = "0.18", features = ["spirv"]} -wgpu_glyph = "0.18" +wgpu = { version = "0.19", features = ["spirv"]} +wgpu_glyph = "0.19" rand = "0.8" rodio = { version = "0.15", default-features = false, features = ["wav"] } log = "0.4" @@ -281,13 +281,13 @@ console_log = "1.0" getrandom = { version = "0.2", features = ["js"] } rodio = { version = "0.15", default-features = false, features = ["wasm-bindgen", "wav"] } wasm-bindgen-futures = "0.4.20" -wasm-bindgen = "=0.2.87" +wasm-bindgen = "=0.2.90" web-sys = { version = "0.3.53", features = [ "Document", "Window", "Element", ]} -wgpu = { version = "0.18", features = ["spirv", "webgl"]} +wgpu = { version = "0.19", features = ["spirv", "webgl"]} [build-dependencies] anyhow = "1.0" diff --git a/docs/showcase/windowless/README.md b/docs/showcase/windowless/README.md index 02fc4fa6..8f937d75 100644 --- a/docs/showcase/windowless/README.md +++ b/docs/showcase/windowless/README.md @@ -100,7 +100,7 @@ Update dependencies to support SPIR-V module. [dependencies] image = "0.23" shaderc = "0.7" -wgpu = { version = "0.18", features = ["spirv"] } +wgpu = { version = "0.19", features = ["spirv"] } pollster = "0.3" ```