diff --git a/.gitignore b/.gitignore index af3a693b..a8cb0050 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ .vscode bin/ **/target/ +.DS_Store diff --git a/Cargo.lock b/Cargo.lock index a247afc6..a1ad9939 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f90148830dac590fac7ccfe78ec4a8ea404c60f75a24e16407a71f0f40de775" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "adler" version = "1.0.2" @@ -10,24 +26,64 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.4.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.5.0", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk 0.9.0", + "ndk-context", + "ndk-sys 0.6.0+11769913", + "num_enum 0.7.2", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android_system_properties" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20ae67ce26261f218e2b3f2f0d01887a9818283ca6fb260fa7c67e253d61c92" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] @@ -91,9 +147,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -103,41 +159,56 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.1" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "ash" -version = "0.37.0+1.3.209" +version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ - "libloading", + "libloading 0.7.4", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] [[package]] name = "autocfg" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.2.0", +] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "base64" @@ -153,9 +224,9 @@ checksum = "7dfdb4953a096c551ce9ace855a604d702e6e62d77fac690575ae347571717f5" [[package]] name = "bit-set" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ "bit-vec", ] @@ -168,15 +239,15 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "block" @@ -184,42 +255,109 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e" +dependencies = [ + "objc2", +] + [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.7.0" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435" +checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "calloop" -version = "0.10.2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eb0438b3c6d262395fe30e6de9a61beb57ea56290b00a07f227fe6e20cbf2" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" dependencies = [ + "bitflags 1.3.2", "log", - "nix 0.24.2", + "nix 0.25.1", "slotmap", "thiserror", "vec_map", ] +[[package]] +name = "calloop" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +dependencies = [ + "bitflags 2.5.0", + "log", + "polling", + "rustix", + "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", + "wayland-backend", + "wayland-client 0.31.2", +] + [[package]] name = "cc" -version = "1.0.77" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cesu8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -233,6 +371,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "clap" version = "2.34.0" @@ -241,7 +385,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags 1.2.1", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -250,17 +394,17 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.22" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags 1.2.1", + "bitflags 1.3.2", "clap_lex", - "indexmap", + "indexmap 1.9.3", "strsim 0.10.0", "termcolor", - "textwrap 0.15.1", + "textwrap 0.16.1", ] [[package]] @@ -278,45 +422,60 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", ] [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] [[package]] name = "cocoa" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "foreign-types 0.3.2", "libc", "objc", ] +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.23.2", + "foreign-types 0.5.0", + "libc", + "objc", +] + [[package]] name = "cocoa-foundation" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", "libc", "objc", ] @@ -337,6 +496,56 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.109", +] + +[[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.109", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "copyless" version = "0.1.5" @@ -345,9 +554,9 @@ checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -355,66 +564,84 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types 0.3.2", "libc", ] +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "core-foundation", - "foreign-types 0.3.2", "libc", ] [[package]] name = "core-text" -version = "19.2.0" +version = "20.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" dependencies = [ "core-foundation", - "core-graphics", - "foreign-types 0.3.2", + "core-graphics 0.23.2", + "foreign-types 0.5.0", "libc", ] [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + [[package]] name = "crossfont" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" +checksum = "3eb5a3822b594afc99b503cc1859b94686d3c3efdd60507a28587dab80ee1071" dependencies = [ - "cocoa", + "cocoa 0.25.0", "core-foundation", "core-foundation-sys", - "core-graphics", + "core-graphics 0.23.2", "core-text", "dwrote", "foreign-types 0.5.0", @@ -434,22 +661,39 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + [[package]] name = "d3d12" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" dependencies = [ - "bitflags 1.2.1", - "libloading", + "bitflags 1.3.2", + "libloading 0.7.4", + "winapi", +] + +[[package]] +name = "d3d12" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28bfe653d79bd16c77f659305b195b82bb5ce0c0eb2a4846b82ddbd77586813" +dependencies = [ + "bitflags 2.5.0", + "libloading 0.8.3", "winapi", ] [[package]] name = "darling" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ "darling_core", "darling_macro", @@ -457,27 +701,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.10.0", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -486,17 +730,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -505,18 +738,33 @@ 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", + "libloading 0.8.3", +] + +[[package]] +name = "document-features" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" +dependencies = [ + "litrs", ] [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" [[package]] name = "dwrote" @@ -534,9 +782,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "env_filter" @@ -561,19 +809,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "env_logger" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" -dependencies = [ - "atty", - "humantime 2.1.0", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.11.3" @@ -587,11 +822,27 @@ dependencies = [ "log", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "euclid" -version = "0.22.6" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da96828553a086d7b18dcebfc579bd9628b016f86590d7453c115e490fa74b80" +checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" dependencies = [ "num-traits", "serde", @@ -607,16 +858,23 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "fdeflate" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +dependencies = [ + "simd-adler32", +] + [[package]] name = "flate2" -version = "1.0.20" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" dependencies = [ - "cfg-if", "crc32fast", - "libc", - "miniz_oxide 0.4.4", + "miniz_oxide", ] [[package]] @@ -681,13 +939,13 @@ dependencies = [ [[package]] name = "foreign-types-macros" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.60", ] [[package]] @@ -708,7 +966,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "freetype-sys", "libc", ] @@ -732,9 +990,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -747,9 +1005,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -757,15 +1015,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -774,42 +1032,39 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 2.0.60", ] [[package]] name = "futures-sink" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.15" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -819,8 +1074,6 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -848,25 +1101,88 @@ dependencies = [ ] [[package]] -name = "glow" -version = "0.11.2" +name = "gethostname" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", + "libc", + "windows-targets 0.48.5", ] [[package]] -name = "gpu-alloc" -version = "0.5.2" +name = "getrandom" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e64cbb8d36508d3e19da95e56e196a84f674fc190881f2cc010000798838aa6" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ - "bitflags 1.2.1", - "gpu-alloc-types", + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glow" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" +dependencies = [ + "bitflags 1.3.2", + "gpu-alloc-types 0.2.0", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.5.0", + "gpu-alloc-types 0.3.0", ] [[package]] @@ -875,53 +1191,117 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "gpu-allocator" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows", +] + +[[package]] +name = "gpu-descriptor" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +dependencies = [ + "bitflags 2.5.0", + "gpu-descriptor-types 0.1.2", + "hashbrown 0.14.5", ] [[package]] name = "gpu-descriptor" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a237f0419ab10d17006d55c62ac4f689a6bf52c75d3f38b8361d249e8d4b0b" +checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ - "bitflags 1.2.1", - "gpu-descriptor-types", - "hashbrown 0.9.1", + "bitflags 2.5.0", + "gpu-descriptor-types 0.2.0", + "hashbrown 0.14.5", ] [[package]] name = "gpu-descriptor-types" -version = "0.1.1" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 1.2.1", + "bitflags 2.5.0", ] [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "allocator-api2", ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "hassle-rs" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.5.0", + "com", + "libc", + "libloading 0.8.3", + "thiserror", + "widestring", + "winapi", +] [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + [[package]] name = "hexf-parse" version = "0.2.1" @@ -957,25 +1337,35 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "1.7.0" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg 1.2.0", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "autocfg 1.0.1", - "hashbrown 0.11.2", + "equivalent", + "hashbrown 0.14.5", ] [[package]] name = "inplace_it" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90953f308a79fe6d62a4643e51f848fbfddcd05975a38e69fdf4ab86a7baf7ca" +checksum = "e567468c50f3d4bc7397702e09b380139f9b9288b4e909b070571007f8b5bf78" [[package]] name = "instant" -version = "0.1.9" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", "js-sys", @@ -992,17 +1382,42 @@ dependencies = [ "either", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.58" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1014,17 +1429,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", - "libloading", + "libloading 0.7.4", + "pkg-config", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading 0.8.3", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "kurbo" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.4", ] [[package]] @@ -1033,7 +1465,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.4", "smallvec", ] @@ -1051,26 +1483,60 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", "winapi", ] +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + [[package]] name = "libm" -version = "0.2.5" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.5.0", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" [[package]] name = "lock_api" -version = "0.4.6" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ + "autocfg 1.2.0", "scopeguard", ] @@ -1103,15 +1569,15 @@ name = "lyon_cli" version = "0.1.0" dependencies = [ "bytemuck", - "clap 3.2.22", + "clap 3.2.25", "env_logger 0.7.1", "futures", "itertools", "lyon", "rand", "regex", - "wgpu", - "winit", + "wgpu 0.13.1", + "winit 0.27.5", ] [[package]] @@ -1126,7 +1592,7 @@ dependencies = [ name = "lyon_geom" version = "1.0.5" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.4", "euclid", "num-traits", "serde", @@ -1168,23 +1634,17 @@ dependencies = [ "libc", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" -version = "2.4.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -1200,11 +1660,11 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.2.0", ] [[package]] @@ -1213,7 +1673,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "block", "core-graphics-types", "foreign-types 0.3.2", @@ -1222,61 +1682,78 @@ dependencies = [ ] [[package]] -name = "miniz_oxide" -version = "0.4.4" +name = "metal" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" dependencies = [ - "adler", - "autocfg 1.0.1", + "bitflags 2.5.0", + "block", + "core-graphics-types", + "foreign-types 0.5.0", + "log", + "objc", + "paste", ] [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.0" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "miow", - "ntapi", - "winapi", + "wasi", + "windows-sys 0.48.0", ] [[package]] -name = "miow" -version = "0.3.7" +name = "naga" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" dependencies = [ - "winapi", + "bit-set", + "bitflags 1.3.2", + "codespan-reporting", + "hexf-parse", + "indexmap 1.9.3", + "log", + "num-traits", + "rustc-hash", + "spirv 0.2.0+1.5.4", + "termcolor", + "thiserror", + "unicode-xid", ] [[package]] name = "naga" -version = "0.9.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" +checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" dependencies = [ + "arrayvec 0.7.4", "bit-set", - "bitflags 1.2.1", + "bitflags 2.5.0", "codespan-reporting", "hexf-parse", - "indexmap", + "indexmap 2.2.6", "log", "num-traits", "rustc-hash", - "spirv", + "spirv 0.3.0+sdk-1.3.268.0", "termcolor", "thiserror", "unicode-xid", @@ -1288,11 +1765,26 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", + "jni-sys", + "ndk-sys 0.4.1+23.1.7779620", + "num_enum 0.5.11", + "raw-window-handle 0.5.2", + "thiserror", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.5.0", "jni-sys", - "ndk-sys", - "num_enum", - "raw-window-handle 0.5.0", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum 0.7.2", + "raw-window-handle 0.6.1", "thiserror", ] @@ -1310,10 +1802,10 @@ checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ "libc", "log", - "ndk", + "ndk 0.7.0", "ndk-context", "ndk-macro", - "ndk-sys", + "ndk-sys 0.4.1+23.1.7779620", "once_cell", "parking_lot", ] @@ -1325,10 +1817,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ "darling", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1340,14 +1832,31 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" -version = "0.22.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3bb9a13fa32bc5aeb64150cd3f32d6cf4c748f8f8a417cce5d2eb976a8370ba" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags 1.2.1", - "cc", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset", @@ -1355,65 +1864,67 @@ dependencies = [ [[package]] name = "nix" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ - "bitflags 1.2.1", + "autocfg 1.2.0", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset", ] [[package]] -name = "nom" -version = "6.1.2" +name = "num-traits" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ - "memchr", - "version_check", + "autocfg 1.2.0", + "libm", ] [[package]] -name = "ntapi" -version = "0.3.6" +name = "num_enum" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "winapi", + "num_enum_derive 0.5.11", ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "num_enum" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "autocfg 1.0.1", - "libm", + "num_enum_derive 0.7.2", ] [[package]] -name = "num_enum" -version = "0.5.2" +name = "num_enum_derive" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5adf0198d427ee515335639f275e806ca01acf9f07d7cf14bb36a10532a6169" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "derivative", - "num_enum_derive", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "num_enum_derive" -version = "0.5.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1def5a3f69d4707d8a040b12785b98029a39e8c610ae685c7f6265669767482" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn", + "syn 2.0.60", ] [[package]] @@ -1427,52 +1938,132 @@ dependencies = [ ] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc-sys" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] +checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" [[package]] -name = "once_cell" -version = "1.16.0" +name = "objc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659" +dependencies = [ + "objc-sys", + "objc2-encode", +] [[package]] -name = "os_str_bytes" -version = "6.3.0" +name = "objc2-app-kit" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047" +dependencies = [ + "block2", + "objc2", + "objc2-core-data", + "objc2-foundation", +] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "objc2-core-data" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c" dependencies = [ - "lock_api", - "parking_lot_core", + "block2", + "objc2", + "objc2-foundation", ] [[package]] -name = "parking_lot_core" -version = "0.9.4" +name = "objc2-encode" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.42.0", -] +checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a" [[package]] -name = "path_bench" -version = "0.0.1" +name = "objc2-foundation" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904" +dependencies = [ + "block2", + "dispatch", + "objc2", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +dependencies = [ + "libredox", +] + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "owned_ttf_parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.1", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "path_bench" +version = "0.0.1" dependencies = [ "bencher", "lyon", @@ -1480,9 +2071,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pico-args" @@ -1490,11 +2081,31 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1504,58 +2115,77 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "png" -version = "0.17.7" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "crc32fast", + "fdeflate", "flate2", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] -name = "proc-macro-crate" -version = "1.0.0" +name = "polling" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ - "thiserror", - "toml", + "cfg-if", + "concurrent-queue", + "hermit-abi 0.3.9", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "proc-macro-hack" -version = "0.5.19" +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] [[package]] -name = "proc-macro-nested" -version = "0.1.7" +name = "proc-macro-crate" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] [[package]] name = "proc-macro2" -version = "1.0.27" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.3" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd5592a8eed7e74f56ad7b125f8234763b805c30f0c7c95c486920026a6ec" +checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" [[package]] name = "quick-error" @@ -1563,11 +2193,20 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + [[package]] name = "quote" -version = "1.0.9" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1578,7 +2217,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "libc", "rand_chacha", "rand_core 0.4.2", @@ -1597,7 +2236,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.3.1", ] @@ -1665,7 +2304,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.4.2", ] @@ -1680,9 +2319,9 @@ dependencies = [ [[package]] name = "range-alloc" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" +checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "raw-window-handle" @@ -1695,12 +2334,15 @@ dependencies = [ [[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b" [[package]] name = "rdrand" @@ -1713,18 +2355,39 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.9" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "bitflags 1.2.1", + "bitflags 2.5.0", ] [[package]] name = "regex" -version = "1.5.5" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -1733,9 +2396,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "renderdoc-sys" @@ -1743,6 +2406,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + [[package]] name = "roxmltree" version = "0.19.0" @@ -1755,13 +2424,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustybuzz" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytemuck", "smallvec", "ttf-parser", @@ -1780,17 +2462,26 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" @@ -1800,28 +2491,41 @@ checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", - "smithay-client-toolkit", - "tiny-skia", + "smithay-client-toolkit 0.16.1", + "tiny-skia 0.7.0", +] + +[[package]] +name = "sctk-adwaita" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de61fa7334ee8ee1f5c3c58dcc414fb9361e7e8f5bff9d45f4d69eeb89a7169" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.9.4", + "smithay-client-toolkit 0.18.1", + "tiny-skia 0.11.4", ] [[package]] name = "serde" -version = "1.0.126" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.126" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.60", ] [[package]] @@ -1845,6 +2549,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simplecss" version = "0.2.1" @@ -1862,42 +2572,79 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.3" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg 1.2.0", +] [[package]] name = "slotmap" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ "version_check", ] [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ - "bitflags 1.2.1", - "calloop", + "bitflags 1.3.2", + "calloop 0.10.6", "dlib", "lazy_static", "log", - "memmap2 0.5.8", - "nix 0.24.2", + "memmap2 0.5.10", + "nix 0.24.3", "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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" +dependencies = [ + "bitflags 2.5.0", + "calloop 0.12.4", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.4", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client 0.31.2", + "wayland-csd-frame", + "wayland-cursor 0.31.1", + "wayland-protocols 0.31.2", + "wayland-protocols-wlr", + "wayland-scanner 0.31.1", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", ] [[package]] @@ -1906,10 +2653,25 @@ version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "num-traits", ] +[[package]] +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.5.0", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strict-num" version = "0.1.1" @@ -1942,8 +2704,8 @@ dependencies = [ "lyon", "tiny-skia-path 0.11.4", "usvg", - "wgpu", - "winit", + "wgpu 0.13.1", + "winit 0.27.5", ] [[package]] @@ -1958,20 +2720,31 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.73" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "termcolor" -version = "1.1.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -2005,28 +2778,28 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.25" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.25" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.60", ] [[package]] @@ -2044,6 +2817,20 @@ dependencies = [ "tiny-skia-path 0.7.0", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path 0.11.4", +] + [[package]] name = "tiny-skia-path" version = "0.7.0" @@ -2081,14 +2868,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] -name = "toml" -version = "0.5.8" +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "serde", + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", ] +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + [[package]] name = "ttf-parser" version = "0.20.0" @@ -2113,6 +2935,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-properties" version = "0.1.1" @@ -2125,6 +2953,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad8d71f5726e5f285a935e9fe8edfd53f0491eb6e9a5774097fdabee7cd8c9cd" +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-vo" version = "0.1.0" @@ -2133,15 +2967,15 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "usvg" @@ -2184,15 +3018,31 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.81" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2200,24 +3050,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.81" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.31" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -2227,9 +3077,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.81" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2237,101 +3087,220 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.81" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.81" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] -name = "wayland-client" -version = "0.29.4" +name = "wayland-backend" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys 0.31.1", +] + +[[package]] +name = "wayland-client" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "downcast-rs", "libc", - "nix 0.22.2", + "nix 0.24.3", "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +dependencies = [ + "bitflags 2.5.0", + "rustix", + "wayland-backend", + "wayland-scanner 0.31.1", ] [[package]] name = "wayland-commons" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix 0.22.2", + "nix 0.24.3", "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.5.0", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix 0.22.2", - "wayland-client", + "nix 0.24.3", + "wayland-client 0.29.5", + "xcursor", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" +dependencies = [ + "rustix", + "wayland-client 0.31.2", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ - "bitflags 1.2.1", - "wayland-client", + "bitflags 1.3.2", + "wayland-client 0.29.5", "wayland-commons", - "wayland-scanner", + "wayland-scanner 0.29.5", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client 0.31.2", + "wayland-scanner 0.31.1", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client 0.31.2", + "wayland-protocols 0.31.2", + "wayland-scanner 0.31.1", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.5.0", + "wayland-backend", + "wayland-client 0.31.2", + "wayland-protocols 0.31.2", + "wayland-scanner 0.31.1", ] [[package]] name = "wayland-scanner" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" dependencies = [ "proc-macro2", "quote", "xml-rs", ] +[[package]] +name = "wayland-scanner" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + [[package]] name = "wayland-sys" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" dependencies = [ "dlib", "lazy_static", "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.58" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -2343,19 +3312,45 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.4", "js-sys", "log", - "naga", + "naga 0.9.0", "parking_lot", "raw-window-handle 0.4.3", "smallvec", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "wgpu-core 0.13.2", + "wgpu-hal 0.13.2", + "wgpu-types 0.13.2", +] + +[[package]] +name = "wgpu" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ff1bfee408e1028e2e3acbf6d32d98b08a5a059ccbf5f33305534453ba5d3e" +dependencies = [ + "arrayvec 0.7.4", + "cfg-if", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "naga 0.20.0", + "parking_lot", + "profiling", + "raw-window-handle 0.6.1", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 0.20.0", + "wgpu-hal 0.20.0", + "wgpu-types 0.20.0", ] [[package]] @@ -2364,23 +3359,50 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" dependencies = [ - "arrayvec 0.7.1", + "arrayvec 0.7.4", "bit-vec", - "bitflags 1.2.1", - "cfg_aliases", + "bitflags 1.3.2", + "cfg_aliases 0.1.1", "codespan-reporting", "copyless", "fxhash", "log", - "naga", + "naga 0.9.0", "parking_lot", "profiling", "raw-window-handle 0.4.3", "smallvec", "thiserror", "web-sys", - "wgpu-hal", - "wgpu-types", + "wgpu-hal 0.13.2", + "wgpu-types 0.13.2", +] + +[[package]] +name = "wgpu-core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6a86eaa5e763e59c73cf9e97d55fffd4dfda69fd8bda19589fcf851ddfef1f" +dependencies = [ + "arrayvec 0.7.4", + "bit-vec", + "bitflags 2.5.0", + "cfg_aliases 0.1.1", + "codespan-reporting", + "document-features", + "indexmap 2.2.6", + "log", + "naga 0.20.0", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.1", + "rustc-hash", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal 0.20.0", + "wgpu-types 0.20.0", ] [[package]] @@ -2388,11 +3410,11 @@ name = "wgpu-example" version = "0.1.0" dependencies = [ "bytemuck", - "env_logger 0.9.0", + "env_logger 0.11.3", "futures", "lyon", - "wgpu", - "winit", + "wgpu 0.20.0", + "winit 0.30.0", ] [[package]] @@ -2402,35 +3424,80 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" dependencies = [ "android_system_properties", - "arrayvec 0.7.1", + "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 1.2.1", + "bitflags 1.3.2", "block", "core-graphics-types", - "d3d12", + "d3d12 0.5.0", "foreign-types 0.3.2", "fxhash", - "glow", - "gpu-alloc", - "gpu-descriptor", + "glow 0.11.2", + "gpu-alloc 0.5.4", + "gpu-descriptor 0.2.4", "inplace_it", "js-sys", - "khronos-egl", - "libloading", + "khronos-egl 4.1.0", + "libloading 0.7.4", "log", - "metal", - "naga", + "metal 0.24.0", + "naga 0.9.0", "objc", "parking_lot", "profiling", "range-alloc", "raw-window-handle 0.4.3", - "renderdoc-sys", + "renderdoc-sys 0.7.1", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 0.13.2", + "winapi", +] + +[[package]] +name = "wgpu-hal" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d71c8ae05170583049b65ee562fd839fdc0b3e9ddb84f4e40c9d5f8ea0d4c8c" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.4", + "ash", + "bit-set", + "bitflags 2.5.0", + "block", + "cfg_aliases 0.1.1", + "core-graphics-types", + "d3d12 0.20.0", + "glow 0.13.1", + "glutin_wgl_sys", + "gpu-alloc 0.6.0", + "gpu-allocator", + "gpu-descriptor 0.3.0", + "hassle-rs", + "js-sys", + "khronos-egl 6.0.0", + "libc", + "libloading 0.8.3", + "log", + "metal 0.28.0", + "naga 0.20.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.6.1", + "renderdoc-sys 1.1.0", + "rustc-hash", + "smallvec", "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types", + "wgpu-types 0.20.0", "winapi", ] @@ -2440,9 +3507,26 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", ] +[[package]] +name = "wgpu-types" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" +dependencies = [ + "bitflags 2.5.0", + "js-sys", + "web-sys", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -2461,11 +3545,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2474,6 +3558,25 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.36.1" @@ -2489,17 +3592,20 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm 0.42.0", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm 0.42.0", - "windows_x86_64_msvc 0.42.0", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -2508,35 +3614,72 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -2546,15 +3689,21 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -2564,15 +3713,27 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -2582,15 +3743,21 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -2600,27 +3767,39 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -2630,15 +3809,21 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winit" @@ -2646,33 +3831,92 @@ version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ - "bitflags 1.2.1", - "cocoa", + "bitflags 1.3.2", + "cocoa 0.24.1", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "dispatch", "instant", "libc", "log", "mio", - "ndk", + "ndk 0.7.0", "ndk-glue", "objc", "once_cell", "parking_lot", "percent-encoding", "raw-window-handle 0.4.3", - "raw-window-handle 0.5.0", - "sctk-adwaita", - "smithay-client-toolkit", + "raw-window-handle 0.5.2", + "sctk-adwaita 0.4.3", + "smithay-client-toolkit 0.16.1", "wasm-bindgen", - "wayland-client", - "wayland-protocols", + "wayland-client 0.29.5", + "wayland-protocols 0.29.5", "web-sys", "windows-sys 0.36.1", "x11-dl", ] +[[package]] +name = "winit" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea9e6d5d66cbf702e0dd820302144f51b69a95acdc495dd98ca280ff206562b1" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.5.0", + "bytemuck", + "calloop 0.12.4", + "cfg_aliases 0.2.0", + "concurrent-queue", + "core-foundation", + "core-graphics 0.23.2", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2 0.9.4", + "ndk 0.9.0", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle 0.6.1", + "redox_syscall 0.4.1", + "rustix", + "sctk-adwaita 0.9.0", + "smithay-client-toolkit 0.18.1", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client 0.31.2", + "wayland-protocols 0.31.2", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "wio" version = "0.2.2" @@ -2684,33 +3928,89 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.18.5" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc", - "maybe-uninit", + "once_cell", "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.3", + "once_cell", + "rustix", + "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.3" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9a231574ae78801646617cefd13bfe94be907c0e4fa979cfd8b770aa3c5d08" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "nom", + "bitflags 2.5.0", + "dlib", + "log", + "once_cell", + "xkeysym", ] +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" + [[package]] name = "xml-rs" -version = "0.8.3" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "xmlwriter" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[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.60", +] diff --git a/examples/wgpu/Cargo.toml b/examples/wgpu/Cargo.toml index 2d9d78a1..6e256a8a 100644 --- a/examples/wgpu/Cargo.toml +++ b/examples/wgpu/Cargo.toml @@ -11,9 +11,9 @@ path = "src/main.rs" [dependencies] lyon = { path = "../../crates/lyon", features = ["extra"] } -env_logger = "0.9.0" -wgpu = "0.13.1" -winit = "0.27.5" -futures = "0.3.5" -bytemuck = "1.2.0" +bytemuck = { version = "1.15.0", features = ["derive"] } +env_logger = "0.11.3" +futures = "0.3.30" +wgpu = "0.20.0" +winit = "0.30.0" diff --git a/examples/wgpu/README.md b/examples/wgpu/README.md index 252fe700..36bd4410 100644 --- a/examples/wgpu/README.md +++ b/examples/wgpu/README.md @@ -6,4 +6,4 @@ This program renders the rust logo (fill and stroke). The geometry is tessellate ## Screenshot -![Screenshot](screenshot.png) +![Demo GIF](demo_recording.gif) diff --git a/examples/wgpu/demo_recording.gif b/examples/wgpu/demo_recording.gif new file mode 100644 index 00000000..25ba680d Binary files /dev/null and b/examples/wgpu/demo_recording.gif differ diff --git a/examples/wgpu/src/main.rs b/examples/wgpu/src/main.rs index a5186f82..bd0b0521 100644 --- a/examples/wgpu/src/main.rs +++ b/examples/wgpu/src/main.rs @@ -1,3 +1,7 @@ +use std::ops::{Range, Rem}; +use std::sync::Arc; +use std::time::{Duration, Instant}; + use lyon::extra::rust_logo::build_logo_path; use lyon::math::*; use lyon::path::{Path, Polygon, NO_ATTRIBUTES}; @@ -8,24 +12,38 @@ use lyon::tessellation::{StrokeOptions, StrokeTessellator}; use lyon::algorithms::{rounded_polygon, walk}; +use winit::application::ApplicationHandler; use winit::dpi::PhysicalSize; -use winit::event::{ElementState, Event, KeyboardInput, VirtualKeyCode, WindowEvent}; -use winit::event_loop::{ControlFlow, EventLoop}; -use winit::window::{Window, WindowBuilder}; +use winit::event::{ElementState, KeyEvent, WindowEvent}; +use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop}; +use winit::keyboard::{KeyCode, PhysicalKey}; +use winit::window::{Window, WindowId}; // For create_buffer_init() use wgpu::util::DeviceExt; +use bytemuck::{Pod, Zeroable}; use futures::executor::block_on; -use std::ops::Rem; -use std::time::{Duration, Instant}; - -//use log; const PRIM_BUFFER_LEN: usize = 256; +/// Number of samples for anti-aliasing. Set to 1 to disable. +const SAMPLE_COUNT: u32 = 4; +const NUM_INSTANCES: u32 = 32; + +/// The first primitive we have is +const LOGO_STROKE_PRIM_ID: usize = 0; +/// The second primitive +const LOGO_FILL_PRIM_ID: usize = 1; + +const ARROWS_PRIM_ID: u32 = NUM_INSTANCES + 1; + +const DEFAULT_WINDOW_WIDTH: f32 = 800.0; +const DEFAULT_WINDOW_HEIGHT: f32 = 800.0; + +/// Globals stored in a uniform buffer #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug, Pod, Zeroable)] struct Globals { resolution: [f32; 2], scroll_offset: [f32; 2], @@ -33,21 +51,47 @@ struct Globals { _pad: f32, } -unsafe impl bytemuck::Pod for Globals {} -unsafe impl bytemuck::Zeroable for Globals {} - +/// Data shared in the vertex buffer #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug, Pod, Zeroable)] struct GpuVertex { + /// Center position of the vertex position: [f32; 2], + /// Direction the position needs to be moved from center, if any. + /// + /// This is used when stroking a line; the tessellator could calculate the exact vertex + /// position for us, but it is cheaper to only calculate the normal on the CPU and offload + /// the final position calculation to the GPU. normal: [f32; 2], + /// Reference to a [`Primitive`] descriptor prim_id: u32, } -unsafe impl bytemuck::Pod for GpuVertex {} -unsafe impl bytemuck::Zeroable for GpuVertex {} +impl GpuVertex { + fn desc() -> &'static [wgpu::VertexAttribute] { + &[ + wgpu::VertexAttribute { + offset: 0, + format: wgpu::VertexFormat::Float32x2, + shader_location: 0, + }, + wgpu::VertexAttribute { + offset: 8, + format: wgpu::VertexFormat::Float32x2, + shader_location: 1, + }, + wgpu::VertexAttribute { + offset: 16, + format: wgpu::VertexFormat::Uint32, + shader_location: 2, + }, + ] + } +} + +/// Descriptor for primitives, which will be stored in an array in a uniform buffer. #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug, Pod, Zeroable)] struct Primitive { color: [f32; 4], translate: [f32; 2], @@ -59,57 +103,26 @@ struct Primitive { _pad2: i32, } -impl Primitive { - const DEFAULT: Self = Primitive { - color: [0.0; 4], - translate: [0.0; 2], - z_index: 0, - width: 0.0, - angle: 0.0, - scale: 1.0, - _pad1: 0, - _pad2: 0, - }; +impl Default for Primitive { + fn default() -> Self { + Self { + color: [0.0; 4], + translate: [0.0; 2], + z_index: 0, + width: 0.0, + angle: 0.0, + scale: 1.0, + _pad1: 0, + _pad2: 0, + } + } } -unsafe impl bytemuck::Pod for Primitive {} -unsafe impl bytemuck::Zeroable for Primitive {} - #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug, Pod, Zeroable)] struct BgPoint { point: [f32; 2], } -unsafe impl bytemuck::Pod for BgPoint {} -unsafe impl bytemuck::Zeroable for BgPoint {} - -const DEFAULT_WINDOW_WIDTH: f32 = 800.0; -const DEFAULT_WINDOW_HEIGHT: f32 = 800.0; - -/// Creates a texture that uses MSAA and fits a given swap chain -fn create_multisampled_framebuffer( - device: &wgpu::Device, - desc: &wgpu::SurfaceConfiguration, - sample_count: u32, -) -> wgpu::TextureView { - let multisampled_frame_descriptor = &wgpu::TextureDescriptor { - label: Some("Multisampled frame descriptor"), - size: wgpu::Extent3d { - width: desc.width, - height: desc.height, - depth_or_array_layers: 1, - }, - mip_level_count: 1, - sample_count, - dimension: wgpu::TextureDimension::D2, - format: desc.format, - usage: wgpu::TextureUsages::RENDER_ATTACHMENT, - }; - - device - .create_texture(multisampled_frame_descriptor) - .create_view(&wgpu::TextureViewDescriptor::default()) -} fn main() { env_logger::init(); @@ -120,465 +133,656 @@ fn main() { println!(" b: toggle drawing the background"); println!(" a/z: increase/decrease the stroke width"); - // Number of samples for anti-aliasing - // Set to 1 to disable - let sample_count = 4; + let app_state = AppState::new(); + let event_loop = EventLoop::new().unwrap(); + event_loop.set_control_flow(ControlFlow::Poll); - let num_instances: u32 = 32; - let tolerance = 0.02; + let mut app = App { + window: None, + state: app_state, + gfx_state: None, + }; - let stroke_prim_id = 0; - let fill_prim_id = 1; - let arrows_prim_id = num_instances + 1; + event_loop.run_app(&mut app).unwrap(); +} - let mut geometry: VertexBuffers = VertexBuffers::new(); +/// This vertex constructor forwards the positions and normals provided by the +/// tessellators and add a shape id. +pub struct WithId(pub u32); - let mut fill_tess = FillTessellator::new(); - let mut stroke_tess = StrokeTessellator::new(); +impl FillVertexConstructor for WithId { + fn new_vertex(&mut self, vertex: tessellation::FillVertex) -> GpuVertex { + GpuVertex { + position: vertex.position().to_array(), + normal: [0.0, 0.0], + prim_id: self.0, + } + } +} - // Build a Path for the rust logo. - let mut builder = Path::builder().with_svg(); - build_logo_path(&mut builder); - let path = builder.build(); +impl StrokeVertexConstructor for WithId { + fn new_vertex(&mut self, vertex: tessellation::StrokeVertex) -> GpuVertex { + GpuVertex { + position: vertex.position_on_path().to_array(), + normal: vertex.normal().to_array(), + prim_id: self.0, + } + } +} - let arrow_points = [ - point(-1.0, -0.3), - point(0.0, -0.3), - point(0.0, -1.0), - point(1.5, 0.0), - point(0.0, 1.0), - point(0.0, 0.3), - point(-1.0, 0.3), - ]; +pub struct Custom; - let arrow_polygon = Polygon { - points: &arrow_points, - closed: true, - }; - // Build a Path for the arrow. - let mut builder = Path::builder(); - rounded_polygon::add_rounded_polygon(&mut builder, arrow_polygon, 0.2, NO_ATTRIBUTES); - //builder.add_polygon(arrow_polygon); - let arrow_path = builder.build(); - - fill_tess - .tessellate_path( - &path, - &FillOptions::tolerance(tolerance).with_fill_rule(tessellation::FillRule::NonZero), - &mut BuffersBuilder::new(&mut geometry, WithId(fill_prim_id as u32)), - ) - .unwrap(); - - let fill_range = 0..(geometry.indices.len() as u32); - - stroke_tess - .tessellate_path( - &path, - &StrokeOptions::tolerance(tolerance), - &mut BuffersBuilder::new(&mut geometry, WithId(stroke_prim_id as u32)), - ) - .unwrap(); - - let stroke_range = fill_range.end..(geometry.indices.len() as u32); - - fill_tess - .tessellate_path( - &arrow_path, - &FillOptions::tolerance(tolerance), - &mut BuffersBuilder::new(&mut geometry, WithId(arrows_prim_id)), - ) - .unwrap(); - - let arrow_range = stroke_range.end..(geometry.indices.len() as u32); - - let mut bg_geometry: VertexBuffers = VertexBuffers::new(); - - fill_tess - .tessellate_rectangle( - &Box2D { - min: point(-1.0, -1.0), - max: point(1.0, 1.0), - }, - &FillOptions::DEFAULT, - &mut BuffersBuilder::new(&mut bg_geometry, Custom), - ) - .unwrap(); - - let mut cpu_primitives = Vec::with_capacity(PRIM_BUFFER_LEN); - for _ in 0..PRIM_BUFFER_LEN { - cpu_primitives.push(Primitive { - color: [1.0, 0.0, 0.0, 1.0], - z_index: 0, - width: 0.0, - translate: [0.0, 0.0], - angle: 0.0, - ..Primitive::DEFAULT - }); +impl FillVertexConstructor for Custom { + fn new_vertex(&mut self, vertex: tessellation::FillVertex) -> BgPoint { + BgPoint { + point: vertex.position().to_array(), + } } +} - // Stroke primitive - cpu_primitives[stroke_prim_id] = Primitive { - color: [0.0, 0.0, 0.0, 1.0], - z_index: num_instances as i32 + 2, - width: 1.0, - ..Primitive::DEFAULT - }; - // Main fill primitive - cpu_primitives[fill_prim_id] = Primitive { - color: [1.0, 1.0, 1.0, 1.0], - z_index: num_instances as i32 + 1, - ..Primitive::DEFAULT - }; - // Instance primitives - for (idx, cpu_prim) in cpu_primitives - .iter_mut() - .enumerate() - .skip(fill_prim_id + 1) - .take(num_instances as usize - 1) - { - cpu_prim.z_index = (idx as u32 + 1) as i32; - cpu_prim.color = [ - (0.1 * idx as f32).rem(1.0), - (0.5 * idx as f32).rem(1.0), - (0.9 * idx as f32).rem(1.0), - 1.0, - ]; +/// The configured state of our application +struct SceneParams { + target_zoom: f32, + zoom: f32, + target_scroll: Vector, + scroll: Vector, + show_points: bool, + stroke_width: f32, + target_stroke_width: f32, + draw_background: bool, + window_size: PhysicalSize, + size_changed: bool, + render: bool, +} + +impl Default for SceneParams { + fn default() -> Self { + Self { + target_zoom: 5.0, + zoom: 5.0, + target_scroll: vector(70.0, 70.0), + scroll: vector(70.0, 70.0), + show_points: false, + stroke_width: 1.0, + target_stroke_width: 1.0, + draw_background: true, + window_size: PhysicalSize::new( + DEFAULT_WINDOW_WIDTH as u32, + DEFAULT_WINDOW_HEIGHT as u32, + ), + size_changed: true, + render: false, + } } +} - let mut scene = SceneParams { - target_zoom: 5.0, - zoom: 5.0, - target_scroll: vector(70.0, 70.0), - scroll: vector(70.0, 70.0), - show_points: false, - stroke_width: 1.0, - target_stroke_width: 1.0, - draw_background: true, - window_size: PhysicalSize::new(DEFAULT_WINDOW_WIDTH as u32, DEFAULT_WINDOW_HEIGHT as u32), - size_changed: true, - render: false, - }; +/// The application itself +struct App { + /// We need to store an `Arc` because both `App` (for `ApplicationHandler`) and `GfxState` + /// (for the surface) require references to the `Window`. + window: Option>, + gfx_state: Option, + state: AppState, +} - let event_loop = EventLoop::new(); - let window_builder = WindowBuilder::new().with_inner_size(scene.window_size); - let window = window_builder.build(&event_loop).unwrap(); - - // create an instance - let instance = wgpu::Instance::new(wgpu::Backends::all()); - - // create an surface - let surface = unsafe { instance.create_surface(&window) }; - - // create an adapter - let adapter = block_on(instance.request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::LowPower, - compatible_surface: Some(&surface), - force_fallback_adapter: false, - })) - .unwrap(); - // create a device and a queue - let (device, queue) = block_on(adapter.request_device( - &wgpu::DeviceDescriptor { - label: None, - features: wgpu::Features::default(), - limits: wgpu::Limits::default(), - }, - None, - )) - .unwrap(); - - let vbo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: bytemuck::cast_slice(&geometry.vertices), - usage: wgpu::BufferUsages::VERTEX, - }); - - let ibo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: bytemuck::cast_slice(&geometry.indices), - usage: wgpu::BufferUsages::INDEX, - }); - - let bg_vbo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: bytemuck::cast_slice(&bg_geometry.vertices), - usage: wgpu::BufferUsages::VERTEX, - }); - - let bg_ibo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: None, - contents: bytemuck::cast_slice(&bg_geometry.indices), - usage: wgpu::BufferUsages::INDEX, - }); - - let prim_buffer_byte_size = (PRIM_BUFFER_LEN * std::mem::size_of::()) as u64; - let globals_buffer_byte_size = std::mem::size_of::() as u64; - - let prims_ubo = device.create_buffer(&wgpu::BufferDescriptor { - label: Some("Prims ubo"), - size: prim_buffer_byte_size, - usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, - mapped_at_creation: false, - }); - - let globals_ubo = device.create_buffer(&wgpu::BufferDescriptor { - label: Some("Globals ubo"), - size: globals_buffer_byte_size, - usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, - mapped_at_creation: false, - }); - - let vs_module = &device.create_shader_module(wgpu::ShaderModuleDescriptor { - label: Some("Geometry vs"), - source: wgpu::ShaderSource::Wgsl(include_str!("./../shaders/geometry.vs.wgsl").into()), - }); - let fs_module = &device.create_shader_module(wgpu::ShaderModuleDescriptor { - label: Some("Geometry fs"), - source: wgpu::ShaderSource::Wgsl(include_str!("./../shaders/geometry.fs.wgsl").into()), - }); - let bg_vs_module = &device.create_shader_module(wgpu::ShaderModuleDescriptor { - label: Some("Background vs"), - source: wgpu::ShaderSource::Wgsl(include_str!("./../shaders/background.vs.wgsl").into()), - }); - let bg_fs_module = &device.create_shader_module(wgpu::ShaderModuleDescriptor { - label: Some("Background fs"), - source: wgpu::ShaderSource::Wgsl(include_str!("./../shaders/background.fs.wgsl").into()), - }); - - let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { - label: Some("Bind group layout"), - entries: &[ - wgpu::BindGroupLayoutEntry { - binding: 0, - visibility: wgpu::ShaderStages::VERTEX, - ty: wgpu::BindingType::Buffer { - ty: wgpu::BufferBindingType::Uniform, - has_dynamic_offset: false, - min_binding_size: wgpu::BufferSize::new(globals_buffer_byte_size), - }, - count: None, +impl ApplicationHandler for App { + /// Create a new window + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + let win_attrs = Window::default_attributes() + .with_title("Lyon tessellation example") + .with_inner_size(self.state.scene.window_size); + let window = Arc::new(event_loop.create_window(win_attrs).unwrap()); + + let gfx_state = GfxState::new(Arc::clone(&window), &mut self.state); + window.request_redraw(); + + self.window = Some(window); + self.gfx_state = Some(gfx_state); + } + + /// Handle redraw requests and other state changes + fn window_event(&mut self, event_loop: &ActiveEventLoop, _id: WindowId, event: WindowEvent) { + let scene = &mut self.state.scene; + + match event { + WindowEvent::RedrawRequested => { + self.window.as_ref().unwrap().request_redraw(); + scene.render = true; + } + WindowEvent::Destroyed | WindowEvent::CloseRequested => event_loop.exit(), + WindowEvent::Resized(size) => { + scene.window_size = size; + scene.size_changed = true; + } + WindowEvent::KeyboardInput { + event: + KeyEvent { + physical_key: PhysicalKey::Code(key_code), + state: ElementState::Pressed, + .. + }, + .. + } => match key_code { + KeyCode::Escape => event_loop.exit(), + KeyCode::PageDown => scene.target_zoom *= 0.8, + KeyCode::PageUp => scene.target_zoom *= 1.25, + KeyCode::ArrowLeft => scene.target_scroll.x += 50.0 / scene.target_zoom, + KeyCode::ArrowRight => scene.target_scroll.x -= 50.0 / scene.target_zoom, + KeyCode::ArrowUp => scene.target_scroll.y -= 50.0 / scene.target_zoom, + KeyCode::ArrowDown => scene.target_scroll.y += 50.0 / scene.target_zoom, + KeyCode::KeyP => scene.show_points = !scene.show_points, + KeyCode::KeyB => scene.draw_background = !scene.draw_background, + KeyCode::KeyA => scene.target_stroke_width /= 0.8, + KeyCode::KeyZ => scene.target_stroke_width *= 0.8, + _key => {} }, - wgpu::BindGroupLayoutEntry { - binding: 1, - visibility: wgpu::ShaderStages::VERTEX, - ty: wgpu::BindingType::Buffer { - ty: wgpu::BufferBindingType::Uniform, - has_dynamic_offset: false, - min_binding_size: wgpu::BufferSize::new(prim_buffer_byte_size), + _evt => {} + }; + + if event_loop.exiting() { + return; + } + + scene.zoom += (scene.target_zoom - scene.zoom) / 3.0; + scene.scroll = scene.scroll + (scene.target_scroll - scene.scroll) / 3.0; + scene.stroke_width = + scene.stroke_width + (scene.target_stroke_width - scene.stroke_width) / 5.0; + + self.gfx_state.as_mut().unwrap().paint(&mut self.state); + } +} + +/// Store values that are reused throughout drawings +struct AppState { + scene: SceneParams, + path: Path, + /// Tessellated vertices for the main geometry + geometry: VertexBuffers, + /// Tessellated vertices for the background + bg_geometry: VertexBuffers, + cpu_primitives: Vec, + + // Ranges of different primitive types in the buffer + logo_fill_range: Range, + logo_stroke_range: Range, + arrow_range: Range, + + // Values for FPS reporting + start: Instant, + next_report: Instant, + frame_count: u32, + time_secs: f32, +} + +impl AppState { + /// Tessellate the example geometry to create an initial application state + fn new() -> Self { + let scene = SceneParams::default(); + let tolerance = 0.02; + let mut geometry: VertexBuffers = VertexBuffers::new(); + + let mut fill_tess = FillTessellator::new(); + let mut stroke_tess = StrokeTessellator::new(); + + /* Tessellate the fill and stroke of the Rust logo */ + + // Build a Path for the rust logo. + let mut logo_builder = Path::builder().with_svg(); + build_logo_path(&mut logo_builder); + let logo_path = logo_builder.build(); + + fill_tess + .tessellate_path( + &logo_path, + &FillOptions::tolerance(tolerance).with_fill_rule(tessellation::FillRule::NonZero), + &mut BuffersBuilder::new(&mut geometry, WithId(LOGO_FILL_PRIM_ID as u32)), + ) + .unwrap(); + + let logo_fill_range = 0..(geometry.indices.len() as u32); + + stroke_tess + .tessellate_path( + &logo_path, + &StrokeOptions::tolerance(tolerance), + &mut BuffersBuilder::new(&mut geometry, WithId(LOGO_STROKE_PRIM_ID as u32)), + ) + .unwrap(); + + let logo_stroke_range = logo_fill_range.end..(geometry.indices.len() as u32); + + /* Tessellate an arrow primitive */ + + // Create an arrow shape that we can reuse + let arrow_points = [ + point(-1.0, -0.3), + point(0.0, -0.3), + point(0.0, -1.0), + point(1.5, 0.0), + point(0.0, 1.0), + point(0.0, 0.3), + point(-1.0, 0.3), + ]; + + let arrow_polygon = Polygon { + points: &arrow_points, + closed: true, + }; + + // Build a Path for the arrow. + let mut arrow_builder = Path::builder(); + rounded_polygon::add_rounded_polygon(&mut arrow_builder, arrow_polygon, 0.2, NO_ATTRIBUTES); + let arrow_path = arrow_builder.build(); + + fill_tess + .tessellate_path( + &arrow_path, + &FillOptions::tolerance(tolerance), + &mut BuffersBuilder::new(&mut geometry, WithId(ARROWS_PRIM_ID)), + ) + .unwrap(); + + let arrow_range = logo_stroke_range.end..(geometry.indices.len() as u32); + + /* Create the background grid */ + + let mut bg_geometry: VertexBuffers = VertexBuffers::new(); + + fill_tess + .tessellate_rectangle( + &Box2D { + min: point(-1.0, -1.0), + max: point(1.0, 1.0), }, - count: None, - }, - ], - }); - let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { - label: Some("Bind group"), - layout: &bind_group_layout, - entries: &[ - wgpu::BindGroupEntry { - binding: 0, - resource: wgpu::BindingResource::Buffer(globals_ubo.as_entire_buffer_binding()), - }, - wgpu::BindGroupEntry { - binding: 1, - resource: wgpu::BindingResource::Buffer(prims_ubo.as_entire_buffer_binding()), - }, - ], - }); - - let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { - bind_group_layouts: &[&bind_group_layout], - push_constant_ranges: &[], - label: None, - }); - - let depth_stencil_state = Some(wgpu::DepthStencilState { - format: wgpu::TextureFormat::Depth32Float, - depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::Greater, - stencil: wgpu::StencilState { - front: wgpu::StencilFaceState::IGNORE, - back: wgpu::StencilFaceState::IGNORE, - read_mask: 0, - write_mask: 0, - }, - bias: wgpu::DepthBiasState::default(), - }); - - let mut render_pipeline_descriptor = wgpu::RenderPipelineDescriptor { - label: None, - layout: Some(&pipeline_layout), - vertex: wgpu::VertexState { - module: vs_module, - entry_point: "main", - buffers: &[wgpu::VertexBufferLayout { - array_stride: std::mem::size_of::() as u64, - step_mode: wgpu::VertexStepMode::Vertex, - attributes: &[ - wgpu::VertexAttribute { - offset: 0, - format: wgpu::VertexFormat::Float32x2, - shader_location: 0, - }, - wgpu::VertexAttribute { - offset: 8, - format: wgpu::VertexFormat::Float32x2, - shader_location: 1, - }, - wgpu::VertexAttribute { - offset: 16, - format: wgpu::VertexFormat::Uint32, - shader_location: 2, + &FillOptions::DEFAULT, + &mut BuffersBuilder::new(&mut bg_geometry, Custom), + ) + .unwrap(); + + /* Build all primitives */ + + // Create red primitives by default + let mut cpu_primitives = Vec::with_capacity(PRIM_BUFFER_LEN); + for _ in 0..PRIM_BUFFER_LEN { + cpu_primitives.push(Primitive { + color: [1.0, 0.0, 0.0, 1.0], + z_index: 0, + width: 0.0, + translate: [0.0, 0.0], + angle: 0.0, + ..Primitive::default() + }); + } + + // Stroke the logo with black + cpu_primitives[LOGO_STROKE_PRIM_ID] = Primitive { + color: [0.0, 0.0, 0.0, 1.0], + z_index: NUM_INSTANCES as i32 + 2, + width: 1.0, + ..Primitive::default() + }; + + // Fill the logo with white + cpu_primitives[LOGO_FILL_PRIM_ID] = Primitive { + color: [1.0, 1.0, 1.0, 1.0], + z_index: NUM_INSTANCES as i32 + 1, + ..Primitive::default() + }; + + // Instance primitives + for (idx, cpu_prim) in cpu_primitives + .iter_mut() + .enumerate() + .skip(LOGO_FILL_PRIM_ID + 1) + .take(NUM_INSTANCES as usize - 1) + { + cpu_prim.z_index = (idx as u32 + 1) as i32; + cpu_prim.color = [ + (0.1 * idx as f32).rem(1.0), + (0.5 * idx as f32).rem(1.0), + (0.9 * idx as f32).rem(1.0), + 1.0, + ]; + } + + let start = Instant::now(); + + Self { + scene, + cpu_primitives, + logo_fill_range, + logo_stroke_range, + arrow_range, + geometry, + bg_geometry, + start, + next_report: start + Duration::from_secs(1), + frame_count: 0, + time_secs: 0.0, + path: logo_path, + } + } +} + +/// Everything needed for wgpu graphics +struct GfxState { + device: wgpu::Device, + surface_desc: wgpu::SurfaceConfiguration, + /// Drawable surface, which contains an `Arc` + surface: wgpu::Surface<'static>, + /// Primitive uniform buffer + prims_ubo: wgpu::Buffer, + /// Globals uniform buffer + globals_ubo: wgpu::Buffer, + /// Index buffer object for the main shader + geo_ibo: wgpu::Buffer, + /// Vertex buffer object for the main shader + geo_vbo: wgpu::Buffer, + /// Main shader render pipeline + geo_pipeline: wgpu::RenderPipeline, + /// Index buffer object for the background shader + bg_ibo: wgpu::Buffer, + /// Vertex buffer object for the backgroundshader + bg_vbo: wgpu::Buffer, + /// Background shader render pipeline + bg_pipeline: wgpu::RenderPipeline, + bind_group: wgpu::BindGroup, + queue: wgpu::Queue, + depth_texture_view: Option, + multisampled_render_target: Option, +} + +impl GfxState { + // impl<'win> GfxState<'win> { + fn new(window: Arc, app_state: &mut AppState) -> Self { + // Create an instance + let instance = wgpu::Instance::default(); + let size = window.inner_size(); + + // Create a surface + let surface = instance.create_surface(window).unwrap(); + + let (device, queue) = block_on(async { + // Create an adapter + let adapter = instance + .request_adapter(&wgpu::RequestAdapterOptions { + power_preference: wgpu::PowerPreference::LowPower, + compatible_surface: Some(&surface), + force_fallback_adapter: false, + }) + .await + .unwrap(); + + // Create a device and a queue + adapter + .request_device( + &wgpu::DeviceDescriptor { + label: None, + required_features: wgpu::Features::empty(), + required_limits: wgpu::Limits::default(), }, - ], - }], - }, - fragment: Some(wgpu::FragmentState { - module: fs_module, - entry_point: "main", - targets: &[Some(wgpu::ColorTargetState { - format: wgpu::TextureFormat::Bgra8Unorm, - blend: None, - write_mask: wgpu::ColorWrites::ALL, - })], - }), - primitive: wgpu::PrimitiveState { - topology: wgpu::PrimitiveTopology::TriangleList, - polygon_mode: wgpu::PolygonMode::Fill, - front_face: wgpu::FrontFace::Ccw, - strip_index_format: None, - cull_mode: Some(wgpu::Face::Back), - conservative: false, - unclipped_depth: false, - }, - depth_stencil: depth_stencil_state.clone(), - multisample: wgpu::MultisampleState { - count: sample_count, - mask: !0, - alpha_to_coverage_enabled: false, - }, - multiview: None, - }; + None, + ) + .await + .unwrap() + }); - let render_pipeline = device.create_render_pipeline(&render_pipeline_descriptor); - - // TODO: this isn't what we want: we'd need the equivalent of VK_POLYGON_MODE_LINE, - // but it doesn't seem to be exposed by wgpu? - render_pipeline_descriptor.primitive.topology = wgpu::PrimitiveTopology::LineList; - - let bg_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { - label: None, - layout: Some(&pipeline_layout), - vertex: wgpu::VertexState { - module: bg_vs_module, - entry_point: "main", - buffers: &[wgpu::VertexBufferLayout { - array_stride: std::mem::size_of::() as u64, - step_mode: wgpu::VertexStepMode::Vertex, - attributes: &[wgpu::VertexAttribute { - offset: 0, - format: wgpu::VertexFormat::Float32x2, - shader_location: 0, - }], - }], - }, - fragment: Some(wgpu::FragmentState { - module: bg_fs_module, - entry_point: "main", - targets: &[Some(wgpu::ColorTargetState { - format: wgpu::TextureFormat::Bgra8Unorm, - blend: None, - write_mask: wgpu::ColorWrites::ALL, - })], - }), - primitive: wgpu::PrimitiveState { - topology: wgpu::PrimitiveTopology::TriangleList, - polygon_mode: wgpu::PolygonMode::Fill, - front_face: wgpu::FrontFace::Ccw, - strip_index_format: None, - cull_mode: None, - unclipped_depth: false, - conservative: false, - }, - depth_stencil: depth_stencil_state, - multisample: wgpu::MultisampleState { - count: sample_count, - mask: !0, - alpha_to_coverage_enabled: false, - }, - multiview: None, - }); + let surface_desc = wgpu::SurfaceConfiguration { + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + format: wgpu::TextureFormat::Bgra8Unorm, + width: size.width, + height: size.height, + present_mode: wgpu::PresentMode::AutoVsync, + // defaults from `surface.get_default_config(...)`` + desired_maximum_frame_latency: 2, + alpha_mode: wgpu::CompositeAlphaMode::Auto, + view_formats: vec![], + }; - let size = window.inner_size(); + surface.configure(&device, &surface_desc); - let mut surface_desc = wgpu::SurfaceConfiguration { - usage: wgpu::TextureUsages::RENDER_ATTACHMENT, - format: wgpu::TextureFormat::Bgra8Unorm, - width: size.width, - height: size.height, - present_mode: wgpu::PresentMode::AutoVsync, - }; + // Geometry shader vertex buffer + let geo_vbo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("geo_vbo"), + contents: bytemuck::cast_slice(&app_state.geometry.vertices), + usage: wgpu::BufferUsages::VERTEX, + }); - let mut multisampled_render_target = None; + // Geometry shader index buffer + let geo_ibo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("geo_ibo"), + contents: bytemuck::cast_slice(&app_state.geometry.indices), + usage: wgpu::BufferUsages::INDEX, + }); - surface.configure(&device, &surface_desc); + // Background shader vertex buffer + let bg_vbo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("bg_vbo"), + contents: bytemuck::cast_slice(&app_state.bg_geometry.vertices), + usage: wgpu::BufferUsages::VERTEX, + }); - let mut depth_texture_view = None; + // Background shader index buffer + let bg_ibo = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("bg_ibo"), + contents: bytemuck::cast_slice(&app_state.bg_geometry.indices), + usage: wgpu::BufferUsages::INDEX, + }); - let start = Instant::now(); - let mut next_report = start + Duration::from_secs(1); - let mut frame_count: u32 = 0; - let mut time_secs: f32 = 0.0; + let prim_buffer_byte_size = (PRIM_BUFFER_LEN * std::mem::size_of::()) as u64; + let globals_buffer_byte_size = std::mem::size_of::() as u64; - window.request_redraw(); + // Primitive uniform buffer + let prims_ubo = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Prims ubo"), + size: prim_buffer_byte_size, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); - event_loop.run(move |event, _, control_flow| { - if !update_inputs(event, &window, control_flow, &mut scene) { - // keep polling inputs. - return; - } + // Globals uniform buffer + let globals_ubo = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Globals ubo"), + size: globals_buffer_byte_size, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); - if scene.size_changed { - scene.size_changed = false; - let physical = scene.window_size; - surface_desc.width = physical.width; - surface_desc.height = physical.height; - surface.configure(&device, &surface_desc); - - let depth_texture = device.create_texture(&wgpu::TextureDescriptor { - label: Some("Depth texture"), - size: wgpu::Extent3d { - width: surface_desc.width, - height: surface_desc.height, - depth_or_array_layers: 1, + let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: Some("Bind group layout"), + entries: &[ + wgpu::BindGroupLayoutEntry { + binding: 0, + visibility: wgpu::ShaderStages::VERTEX, + ty: wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: wgpu::BufferSize::new(globals_buffer_byte_size), + }, + count: None, }, - mip_level_count: 1, - sample_count, - dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Depth32Float, - usage: wgpu::TextureUsages::RENDER_ATTACHMENT, - }); + wgpu::BindGroupLayoutEntry { + binding: 1, + visibility: wgpu::ShaderStages::VERTEX, + ty: wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: wgpu::BufferSize::new(prim_buffer_byte_size), + }, + count: None, + }, + ], + }); - depth_texture_view = - Some(depth_texture.create_view(&wgpu::TextureViewDescriptor::default())); + let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("Bind group"), + layout: &bind_group_layout, + entries: &[ + wgpu::BindGroupEntry { + binding: 0, + resource: wgpu::BindingResource::Buffer(globals_ubo.as_entire_buffer_binding()), + }, + wgpu::BindGroupEntry { + binding: 1, + resource: wgpu::BindingResource::Buffer(prims_ubo.as_entire_buffer_binding()), + }, + ], + }); - multisampled_render_target = if sample_count > 1 { - Some(create_multisampled_framebuffer( - &device, - &surface_desc, - sample_count, - )) - } else { - None - }; + // Geometry shaders + let geo_vs_module = + &device.create_shader_module(wgpu::include_wgsl!("./../shaders/geometry.vs.wgsl")); + let geo_fs_module = + &device.create_shader_module(wgpu::include_wgsl!("./../shaders/geometry.fs.wgsl")); + + // Background shaders + let bg_vs_module = + &device.create_shader_module(wgpu::include_wgsl!("./../shaders/background.vs.wgsl")); + let bg_fs_module = + &device.create_shader_module(wgpu::include_wgsl!("./../shaders/background.fs.wgsl")); + + let depth_stencil_state = Some(wgpu::DepthStencilState { + format: wgpu::TextureFormat::Depth32Float, + depth_write_enabled: true, + depth_compare: wgpu::CompareFunction::Greater, + stencil: wgpu::StencilState { + front: wgpu::StencilFaceState::IGNORE, + back: wgpu::StencilFaceState::IGNORE, + read_mask: 0, + write_mask: 0, + }, + bias: wgpu::DepthBiasState::default(), + }); + + let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + bind_group_layouts: &[&bind_group_layout], + push_constant_ranges: &[], + label: Some("pl_layout"), + }); + + let mut render_pipeline_descriptor = wgpu::RenderPipelineDescriptor { + label: None, + layout: Some(&pipeline_layout), + vertex: wgpu::VertexState { + module: geo_vs_module, + entry_point: "main", + buffers: &[wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: GpuVertex::desc(), + }], + compilation_options: wgpu::PipelineCompilationOptions::default(), + }, + fragment: Some(wgpu::FragmentState { + module: geo_fs_module, + entry_point: "main", + targets: &[Some(wgpu::ColorTargetState { + format: wgpu::TextureFormat::Bgra8Unorm, + blend: None, + write_mask: wgpu::ColorWrites::ALL, + })], + compilation_options: wgpu::PipelineCompilationOptions::default(), + }), + primitive: wgpu::PrimitiveState { + topology: wgpu::PrimitiveTopology::TriangleList, + polygon_mode: wgpu::PolygonMode::Fill, + front_face: wgpu::FrontFace::Ccw, + strip_index_format: None, + cull_mode: Some(wgpu::Face::Back), + conservative: false, + unclipped_depth: false, + }, + depth_stencil: depth_stencil_state.clone(), + multisample: wgpu::MultisampleState { + count: SAMPLE_COUNT, + mask: !0, + alpha_to_coverage_enabled: false, + }, + multiview: None, + }; + + let geo_pipeline = device.create_render_pipeline(&render_pipeline_descriptor); + + // TODO: this isn't what we want: we'd need the equivalent of VK_POLYGON_MODE_LINE, + // but it doesn't seem to be exposed by wgpu? + render_pipeline_descriptor.primitive.topology = wgpu::PrimitiveTopology::LineList; + + let bg_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: None, + layout: Some(&pipeline_layout), + vertex: wgpu::VertexState { + module: bg_vs_module, + entry_point: "main", + buffers: &[wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &[wgpu::VertexAttribute { + offset: 0, + format: wgpu::VertexFormat::Float32x2, + shader_location: 0, + }], + }], + compilation_options: wgpu::PipelineCompilationOptions::default(), + }, + fragment: Some(wgpu::FragmentState { + module: bg_fs_module, + entry_point: "main", + targets: &[Some(wgpu::ColorTargetState { + format: wgpu::TextureFormat::Bgra8Unorm, + blend: None, + write_mask: wgpu::ColorWrites::ALL, + })], + compilation_options: wgpu::PipelineCompilationOptions::default(), + }), + primitive: wgpu::PrimitiveState { + topology: wgpu::PrimitiveTopology::TriangleList, + polygon_mode: wgpu::PolygonMode::Fill, + front_face: wgpu::FrontFace::Ccw, + strip_index_format: None, + cull_mode: None, + unclipped_depth: false, + conservative: false, + }, + depth_stencil: depth_stencil_state, + multisample: wgpu::MultisampleState { + count: SAMPLE_COUNT, + mask: !0, + alpha_to_coverage_enabled: false, + }, + multiview: None, + }); + + Self { + device, + surface_desc, + surface, + prims_ubo, + globals_ubo, + geo_ibo, + geo_vbo, + bind_group, + geo_pipeline, + bg_ibo, + bg_vbo, + bg_pipeline, + queue, + depth_texture_view: None, + multisampled_render_target: None, + } + } + + fn paint(&mut self, state: &mut AppState) { + if state.scene.size_changed { + self.update_scene_size(state); } - if !scene.render { + if !state.scene.render { return; } - scene.render = false; + state.scene.render = false; - let frame = match surface.get_current_texture() { + let frame = match self.surface.get_current_texture() { Ok(texture) => texture, Err(e) => { println!("Swap-chain error: {e:?}"); @@ -590,45 +794,49 @@ fn main() { .texture .create_view(&wgpu::TextureViewDescriptor::default()); - let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { - label: Some("Encoder"), - }); + let mut encoder = self + .device + .create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("Encoder"), + }); - cpu_primitives[stroke_prim_id].width = scene.stroke_width; - cpu_primitives[stroke_prim_id].color = [ - (time_secs * 0.8 - 1.6).sin() * 0.1 + 0.1, - (time_secs * 0.5 - 1.6).sin() * 0.1 + 0.1, - (time_secs - 1.6).sin() * 0.1 + 0.1, + state.cpu_primitives[LOGO_STROKE_PRIM_ID].width = state.scene.stroke_width; + state.cpu_primitives[LOGO_STROKE_PRIM_ID].color = [ + (state.time_secs * 0.8 - 1.6).sin() * 0.1 + 0.1, + (state.time_secs * 0.5 - 1.6).sin() * 0.1 + 0.1, + (state.time_secs - 1.6).sin() * 0.1 + 0.1, 1.0, ]; - for idx in 2..(num_instances + 1) { - cpu_primitives[idx as usize].translate = [ - (time_secs * 0.05 * idx as f32).sin() * (100.0 + idx as f32 * 10.0), - (time_secs * 0.1 * idx as f32).sin() * (100.0 + idx as f32 * 10.0), + for idx in 2..(NUM_INSTANCES + 1) { + state.cpu_primitives[idx as usize].translate = [ + (state.time_secs * 0.05 * idx as f32).sin() * (100.0 + idx as f32 * 10.0), + (state.time_secs * 0.1 * idx as f32).sin() * (100.0 + idx as f32 * 10.0), ]; } let mut arrow_count = 0; - let offset = (time_secs * 10.0).rem(5.0); + let offset = (state.time_secs * 10.0).rem(5.0); + let prims = &mut state.cpu_primitives; + walk::walk_along_path( - path.iter(), + state.path.iter(), offset, 0.1, &mut walk::RepeatedPattern { callback: |event: walk::WalkerEvent| { - if arrow_count + num_instances as usize + 1 >= PRIM_BUFFER_LEN { + if arrow_count + NUM_INSTANCES as usize + 1 >= PRIM_BUFFER_LEN { // Don't want to overflow the primitive buffer, // just skip the remaining arrows. return false; } - cpu_primitives[arrows_prim_id as usize + arrow_count] = Primitive { + prims[ARROWS_PRIM_ID as usize + arrow_count] = Primitive { color: [0.7, 0.9, 0.8, 1.0], translate: (event.position * 2.3 - vector(80.0, 80.0)).to_array(), angle: event.tangent.angle_from_x_axis().get(), scale: 2.0, - z_index: arrows_prim_id as i32, - ..Primitive::DEFAULT + z_index: ARROWS_PRIM_ID as i32, + ..Primitive::default() }; arrow_count += 1; true @@ -638,31 +846,35 @@ fn main() { }, ); - queue.write_buffer( - &globals_ubo, + self.queue.write_buffer( + &self.globals_ubo, 0, bytemuck::cast_slice(&[Globals { resolution: [ - scene.window_size.width as f32, - scene.window_size.height as f32, + state.scene.window_size.width as f32, + state.scene.window_size.height as f32, ], - zoom: scene.zoom, - scroll_offset: scene.scroll.to_array(), + zoom: state.scene.zoom, + scroll_offset: state.scene.scroll.to_array(), _pad: 0.0, }]), ); - queue.write_buffer(&prims_ubo, 0, bytemuck::cast_slice(&cpu_primitives)); + self.queue.write_buffer( + &self.prims_ubo, + 0, + bytemuck::cast_slice(&state.cpu_primitives), + ); { // A resolve target is only supported if the attachment actually uses anti-aliasing // So if sample_count == 1 then we must render directly to the surface's buffer - let color_attachment = if let Some(msaa_target) = &multisampled_render_target { + let color_attachment = if let Some(msaa_target) = &self.multisampled_render_target { wgpu::RenderPassColorAttachment { view: msaa_target, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::WHITE), - store: true, + store: wgpu::StoreOp::Store, }, resolve_target: Some(&frame_view), } @@ -671,7 +883,7 @@ fn main() { view: &frame_view, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::WHITE), - store: true, + store: wgpu::StoreOp::Store, }, resolve_target: None, } @@ -681,191 +893,109 @@ fn main() { label: None, color_attachments: &[Some(color_attachment)], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { - view: depth_texture_view.as_ref().unwrap(), + view: self.depth_texture_view.as_ref().unwrap(), depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(0.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(0), - store: true, + store: wgpu::StoreOp::Store, }), }), + timestamp_writes: None, + occlusion_query_set: None, }); - pass.set_pipeline(&render_pipeline); - pass.set_bind_group(0, &bind_group, &[]); - pass.set_index_buffer(ibo.slice(..), wgpu::IndexFormat::Uint16); - pass.set_vertex_buffer(0, vbo.slice(..)); + pass.set_pipeline(&self.geo_pipeline); + pass.set_bind_group(0, &self.bind_group, &[]); + pass.set_index_buffer(self.geo_ibo.slice(..), wgpu::IndexFormat::Uint16); + pass.set_vertex_buffer(0, self.geo_vbo.slice(..)); - pass.draw_indexed(fill_range.clone(), 0, 0..num_instances); - pass.draw_indexed(stroke_range.clone(), 0, 0..1); - pass.draw_indexed(arrow_range.clone(), 0, 0..(arrow_count as u32)); + pass.draw_indexed(state.logo_fill_range.clone(), 0, 0..NUM_INSTANCES); + pass.draw_indexed(state.logo_stroke_range.clone(), 0, 0..1); + pass.draw_indexed(state.arrow_range.clone(), 0, 0..(arrow_count as u32)); - if scene.draw_background { - pass.set_pipeline(&bg_pipeline); - pass.set_bind_group(0, &bind_group, &[]); - pass.set_index_buffer(bg_ibo.slice(..), wgpu::IndexFormat::Uint16); - pass.set_vertex_buffer(0, bg_vbo.slice(..)); + if state.scene.draw_background { + pass.set_pipeline(&self.bg_pipeline); + pass.set_bind_group(0, &self.bind_group, &[]); + pass.set_index_buffer(self.bg_ibo.slice(..), wgpu::IndexFormat::Uint16); + pass.set_vertex_buffer(0, self.bg_vbo.slice(..)); pass.draw_indexed(0..6, 0, 0..1); } } - queue.submit(Some(encoder.finish())); + self.queue.submit(Some(encoder.finish())); frame.present(); - frame_count += 1; let now = Instant::now(); - time_secs = (now - start).as_secs_f32(); - if now >= next_report { - println!("{frame_count} FPS"); - frame_count = 0; - next_report = now + Duration::from_secs(1); - } - }); -} - -/// This vertex constructor forwards the positions and normals provided by the -/// tessellators and add a shape id. -pub struct WithId(pub u32); - -impl FillVertexConstructor for WithId { - fn new_vertex(&mut self, vertex: tessellation::FillVertex) -> GpuVertex { - GpuVertex { - position: vertex.position().to_array(), - normal: [0.0, 0.0], - prim_id: self.0, + state.frame_count += 1; + state.time_secs = (now - state.start).as_secs_f32(); + if now >= state.next_report { + println!("{} FPS", state.frame_count); + state.frame_count = 0; + state.next_report = now + Duration::from_secs(1); } } -} -impl StrokeVertexConstructor for WithId { - fn new_vertex(&mut self, vertex: tessellation::StrokeVertex) -> GpuVertex { - GpuVertex { - position: vertex.position_on_path().to_array(), - normal: vertex.normal().to_array(), - prim_id: self.0, - } - } -} + fn update_scene_size(&mut self, state: &mut AppState) { + state.scene.size_changed = false; + let physical = state.scene.window_size; + self.surface_desc.width = physical.width; + self.surface_desc.height = physical.height; + self.surface.configure(&self.device, &self.surface_desc); + + let depth_texture = self.device.create_texture(&wgpu::TextureDescriptor { + label: Some("Depth texture"), + size: wgpu::Extent3d { + width: self.surface_desc.width, + height: self.surface_desc.height, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: SAMPLE_COUNT, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Depth32Float, + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + view_formats: &[], + }); -pub struct Custom; + self.depth_texture_view = + Some(depth_texture.create_view(&wgpu::TextureViewDescriptor::default())); -impl FillVertexConstructor for Custom { - fn new_vertex(&mut self, vertex: tessellation::FillVertex) -> BgPoint { - BgPoint { - point: vertex.position().to_array(), - } + self.multisampled_render_target = if SAMPLE_COUNT > 1 { + Some(create_multisampled_framebuffer( + &self.device, + &self.surface_desc, + )) + } else { + None + }; } } -struct SceneParams { - target_zoom: f32, - zoom: f32, - target_scroll: Vector, - scroll: Vector, - show_points: bool, - stroke_width: f32, - target_stroke_width: f32, - draw_background: bool, - window_size: PhysicalSize, - size_changed: bool, - render: bool, -} - -fn update_inputs( - event: Event<()>, - window: &Window, - control_flow: &mut ControlFlow, - scene: &mut SceneParams, -) -> bool { - match event { - Event::RedrawRequested(_) => { - scene.render = true; - } - Event::RedrawEventsCleared => { - window.request_redraw(); - } - Event::WindowEvent { - event: WindowEvent::Destroyed, - .. - } - | Event::WindowEvent { - event: WindowEvent::CloseRequested, - .. - } => { - *control_flow = ControlFlow::Exit; - return false; - } - Event::WindowEvent { - event: WindowEvent::Resized(size), - .. - } => { - scene.window_size = size; - scene.size_changed = true - } - Event::WindowEvent { - event: - WindowEvent::KeyboardInput { - input: - KeyboardInput { - state: ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - }, - .. - } => match key { - VirtualKeyCode::Escape => { - *control_flow = ControlFlow::Exit; - return false; - } - VirtualKeyCode::PageDown => { - scene.target_zoom *= 0.8; - } - VirtualKeyCode::PageUp => { - scene.target_zoom *= 1.25; - } - VirtualKeyCode::Left => { - scene.target_scroll.x -= 50.0 / scene.target_zoom; - } - VirtualKeyCode::Right => { - scene.target_scroll.x += 50.0 / scene.target_zoom; - } - VirtualKeyCode::Up => { - scene.target_scroll.y -= 50.0 / scene.target_zoom; - } - VirtualKeyCode::Down => { - scene.target_scroll.y += 50.0 / scene.target_zoom; - } - VirtualKeyCode::P => { - scene.show_points = !scene.show_points; - } - VirtualKeyCode::B => { - scene.draw_background = !scene.draw_background; - } - VirtualKeyCode::A => { - scene.target_stroke_width /= 0.8; - } - VirtualKeyCode::Z => { - scene.target_stroke_width *= 0.8; - } - _key => {} +/// Creates a texture that uses MSAA and fits a given swap chain +fn create_multisampled_framebuffer( + device: &wgpu::Device, + desc: &wgpu::SurfaceConfiguration, +) -> wgpu::TextureView { + let multisampled_frame_descriptor = &wgpu::TextureDescriptor { + label: Some("Multisampled frame descriptor"), + size: wgpu::Extent3d { + width: desc.width, + height: desc.height, + depth_or_array_layers: 1, }, - _evt => { - //println!("{:?}", _evt); - } - } - //println!(" -- zoom: {}, scroll: {:?}", scene.target_zoom, scene.target_scroll); - - scene.zoom += (scene.target_zoom - scene.zoom) / 3.0; - scene.scroll = scene.scroll + (scene.target_scroll - scene.scroll) / 3.0; - scene.stroke_width = - scene.stroke_width + (scene.target_stroke_width - scene.stroke_width) / 5.0; - - *control_flow = ControlFlow::Poll; + mip_level_count: 1, + sample_count: SAMPLE_COUNT, + dimension: wgpu::TextureDimension::D2, + format: desc.format, + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + view_formats: &[], + }; - true + device + .create_texture(multisampled_frame_descriptor) + .create_view(&wgpu::TextureViewDescriptor::default()) }