diff --git a/Cargo.lock b/Cargo.lock index c5318da..815c858 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.23" +version = "0.2.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" +checksum = "79faae4620f45232f599d9bc7b290f88247a0834162c4495ab2f02d60004adfb" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] @@ -33,6 +33,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aes" version = "0.8.4" @@ -46,11 +52,12 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -84,27 +91,36 @@ dependencies = [ ] [[package]] -name = "allocator-api2" -version = "0.2.16" +name = "aligned-vec" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + +[[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.4.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.6.0", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", "ndk", "ndk-context", - "ndk-sys", - "num_enum 0.6.1", + "ndk-sys 0.6.0+11769913", + "num_enum", + "thiserror", ] [[package]] @@ -124,21 +140,44 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "as-slice" @@ -151,11 +190,11 @@ dependencies = [ [[package]] name = "ash" -version = "0.37.3+1.3.251" +version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading 0.7.4", + "libloading", ] [[package]] @@ -181,12 +220,11 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 4.0.2", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -194,15 +232,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.8.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 3.2.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.1.0", + "fastrand", + "futures-lite", "slab", ] @@ -212,126 +249,99 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.1.1", + "async-channel 2.3.1", "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", + "async-io", + "async-lock", "blocking", - "futures-lite 2.1.0", + "futures-lite", "once_cell", ] [[package]] name = "async-io" -version = "1.13.0" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" -dependencies = [ - "async-lock 3.2.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.1.0", + "futures-lite", "parking", - "polling 3.3.1", - "rustix 0.38.28", + "polling", + "rustix", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "async-lock" -version = "2.8.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" -dependencies = [ - "event-listener 4.0.2", + "event-listener 5.3.1", "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel 2.3.1", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.28", - "windows-sys 0.48.0", + "event-listener 5.3.1", + "futures-lite", + "rustix", + "tracing", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.2.2", - "async-lock 2.8.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.28", + "rustix", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-attributes", "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", + "futures-lite", "gloo-timers", "kv-log-macro", "log", @@ -345,19 +355,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -374,9 +384,32 @@ checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" +dependencies = [ + "arrayvec", +] [[package]] name = "az" @@ -386,17 +419,17 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.8.0", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -407,9 +440,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -425,18 +458,18 @@ checksum = "171f0236f66c7be99f32060539c2bade94033ded356ecf4c9dc9b1e6198326cd" [[package]] name = "bit-set" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" [[package]] name = "bit_field" @@ -452,9 +485,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitstream-io" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" [[package]] name = "block" @@ -471,65 +510,58 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.1.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" -dependencies = [ - "objc-sys", -] - [[package]] name = "block2" -version = "0.2.0-alpha.6" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "block-sys", - "objc2-encode", + "objc2", ] [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.1.1", - "async-lock 3.2.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.1.0", + "futures-lite", "piper", - "tracing", ] [[package]] -name = "bumpalo" -version = "3.14.0" +name = "built" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -539,10 +571,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "bytes" -version = "1.5.0" +name = "byteorder-lite" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -567,26 +605,55 @@ dependencies = [ [[package]] name = "calloop" -version = "0.10.6" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "log", - "nix 0.25.1", - "slotmap", + "polling", + "rustix", + "slab", "thiserror", - "vec_map", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "45bcde016d64c21da4be18b655631e5ab6d3107607e71a73a9f53eb48aae23fb" dependencies = [ "jobserver", "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", ] [[package]] @@ -601,6 +668,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "cipher" version = "0.4.4" @@ -628,16 +701,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] -name = "com-rs" -version = "0.2.1" +name = "com" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.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.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -660,20 +768,20 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -690,18 +798,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -721,33 +829,29 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.17" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", ] @@ -762,9 +866,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -783,13 +887,19 @@ dependencies = [ ] [[package]] -name = "d3d12" -version = "0.6.0" +name = "cursor-icon" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + +[[package]] +name = "d3d12" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" dependencies = [ - "bitflags 1.3.2", - "libloading 0.7.4", + "bitflags 2.6.0", + "libloading", "winapi", ] @@ -831,7 +941,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.1", + "libloading", ] [[package]] @@ -841,16 +951,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] -name = "downcast-rs" -version = "1.2.0" +name = "document-features" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +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 = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elapsed" @@ -875,16 +1000,16 @@ dependencies = [ "proc-macro2", "quote", "reqwest", - "syn 2.0.51", + "syn 2.0.77", "tempdir", "zip", ] [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -897,9 +1022,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -913,20 +1038,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218a870470cce1469024e9fb66b901aa983929d81304a1cdb299f28118e550d5" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -935,25 +1049,25 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 4.0.2", + "event-listener 5.3.1", "pin-project-lite", ] [[package]] name = "exr" -version = "1.71.0" +version = "1.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" dependencies = [ "bit_field", "flume", "half", "lebe", - "miniz_oxide", + "miniz_oxide 0.7.4", "rayon-core", "smallvec", "zune-inflate", @@ -973,24 +1087,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fdeflate" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209098dd6dfc4445aa6111f0e98653ac323eaa4dfd212c9ca3931bf9955c31bd" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" dependencies = [ "simd-adler32", ] @@ -1006,21 +1111,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox 0.1.3", + "windows-sys 0.59.0", ] [[package]] name = "fixed" -version = "1.27.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc715d38bea7b5bf487fcd79bcf8c209f0b58014f3018a7a19c2b855f472048" +checksum = "85c6e0b89bf864acd20590dbdbad56f69aeb898abfc9443008fd7bd48b2cc85a" dependencies = [ "az", "bytemuck", @@ -1049,12 +1154,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1078,7 +1183,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] @@ -1087,6 +1213,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1143,26 +1275,11 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" -dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1196,26 +1313,17 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generator" -version = "0.7.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +checksum = "dbb949699c3e4df3a183b1d2142cb24277057055ed23c68ed58894f76c517223" dependencies = [ - "cc", + "cfg-if", "libc", "log", "rustversion", - "windows 0.48.0", + "windows 0.58.0", ] [[package]] @@ -1229,10 +1337,20 @@ dependencies = [ ] [[package]] -name = "getrandom" -version = "0.2.11" +name = "gethostname" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1241,55 +1359,45 @@ dependencies = [ [[package]] name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", ] [[package]] -name = "gilrs-core" -version = "0.5.10" +name = "gimli" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0af1827b7dd2f36d740ae804c1b3ea0d64c12533fb61ff91883005143a0e8c5a" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" dependencies = [ - "core-foundation", - "inotify 0.10.2", - "io-kit-sys", - "js-sys", - "libc", - "libudev-sys", + "khronos_api", "log", - "nix 0.27.1", - "uuid", - "vec_map", - "wasm-bindgen", - "web-sys", - "windows 0.52.0", + "xml-rs", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - [[package]] name = "glam" -version = "0.24.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +checksum = "c28091a37a5d09b555cb6628fd954da299b536433834f5b8e59eba78e0cbbf8a" dependencies = [ "bytemuck", ] [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -1299,9 +1407,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -1311,9 +1419,9 @@ dependencies = [ [[package]] name = "gltf" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78f069cf941075835822953c345b9e1edd67ae347b81ace3aea9de38c2ef33" +checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" dependencies = [ "base64 0.13.1", "byteorder", @@ -1326,21 +1434,21 @@ dependencies = [ [[package]] name = "gltf-derive" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "438ffe1a5540d75403feaf23636b164e816e93f6f03131674722b3886ce32a57" +checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" dependencies = [ "inflections", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] name = "gltf-json" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655951ba557f2bc69ea4b0799446bae281fa78efae6319968bdd2c3e9a06d8e1" +checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" dependencies = [ "gltf-derive", "serde", @@ -1349,62 +1457,71 @@ dependencies = [ ] [[package]] -name = "gpu-alloc" -version = "0.5.4" +name = "glutin_wgl_sys" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" dependencies = [ - "bitflags 1.3.2", + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.6.0", "gpu-alloc-types", ] [[package]] name = "gpu-alloc-types" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "gpu-allocator" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" dependencies = [ - "backtrace", "log", + "presser", "thiserror", "winapi", - "windows 0.44.0", + "windows 0.52.0", ] [[package]] name = "gpu-descriptor" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "gpu-descriptor-types", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] name = "gpu-descriptor-types" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", ] [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1412,7 +1529,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -1421,24 +1538,19 @@ dependencies = [ [[package]] name = "half" -version = "2.2.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ + "cfg-if", "crunchy", ] [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1446,24 +1558,36 @@ dependencies = [ [[package]] name = "hassle-rs" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90601c6189668c7345fc53842cb3f3a3d872203d523be1b3cb44a36a3e62fb85" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.6.0", + "com", "libc", - "libloading 0.7.4", + "libloading", "thiserror", "widestring", "winapi", ] [[package]] -name = "hermit-abi" -version = "0.3.3" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hexf-parse" @@ -1482,9 +1606,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1504,9 +1628,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1516,9 +1640,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1531,7 +1655,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower-service", "tracing", @@ -1563,41 +1687,51 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", "gif", - "jpeg-decoder", - "num-rational", + "image-webp", "num-traits", "png", "qoi", + "ravif", + "rayon", + "rgb", "tiff", + "zune-core", + "zune-jpeg", ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "image-webp" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "byteorder-lite", + "quick-error", ] [[package]] -name = "indexmap" -version = "2.1.0" +name = "imgref" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" + +[[package]] +name = "indexmap" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1623,17 +1757,6 @@ dependencies = [ "libc", ] -[[package]] -name = "inotify" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - [[package]] name = "inotify-sys" version = "0.1.5" @@ -1654,66 +1777,69 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] -name = "io-kit-sys" -version = "0.4.0" +name = "interpolate_name" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4769cb30e5dcf1710fc6730d3e94f78c47723a014a567de385e113c737394640" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ - "core-foundation-sys", - "mach2", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[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" @@ -1723,42 +1849,45 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "jpeg-decoder" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" -dependencies = [ - "rayon", -] +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "khronos-egl" -version = "4.1.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.7.4", + "libloading", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "kiddo" version = "2.1.2" @@ -1810,9 +1939,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lebe" @@ -1822,28 +1951,29 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] -name = "libloading" -version = "0.7.4" +name = "libfuzzer-sys" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" dependencies = [ - "cfg-if", - "winapi", + "arbitrary", + "cc", + "once_cell", ] [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.6", ] [[package]] @@ -1858,38 +1988,39 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "libc", "redox_syscall 0.4.1", ] [[package]] -name = "libudev-sys" -version = "0.1.4" +name = "libredox" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ + "bitflags 2.6.0", "libc", - "pkg-config", + "redox_syscall 0.5.4", ] [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] -name = "linux-raw-sys" -version = "0.4.12" +name = "litrs" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1897,18 +2028,18 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] [[package]] name = "loom" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e045d70ddfbc984eacfa964ded019534e8f6cbf36f6410aee0ed5cefa5a9175" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" dependencies = [ "cfg-if", "generator", @@ -1917,6 +2048,15 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lua-scripting" version = "0.1.0" @@ -1949,7 +2089,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -1971,11 +2111,10 @@ dependencies = [ "bytemuck", "cfg-if", "fast_poisson", - "gilrs-core", "glam", "image", "instant", - "itertools 0.11.0", + "itertools 0.13.0", "lyra-ecs", "lyra-game-derive", "lyra-math", @@ -1985,12 +2124,12 @@ dependencies = [ "petgraph", "quote", "round_mult", - "rustc-hash", - "syn 2.0.51", + "rustc-hash 2.0.0", + "syn 2.0.77", "thiserror", "tracing", "tracing-appender", - "tracing-log 0.1.4", + "tracing-log", "tracing-subscriber", "tracing-tracy", "unique", @@ -2006,7 +2145,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -2031,7 +2170,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -2040,7 +2179,7 @@ version = "0.0.1" dependencies = [ "anyhow", "async-std", - "base64 0.21.5", + "base64 0.21.7", "crossbeam", "glam", "gltf", @@ -2078,7 +2217,7 @@ dependencies = [ "anyhow", "atomic_refcell", "elua", - "itertools 0.12.0", + "itertools 0.12.1", "lyra-ecs", "lyra-game", "lyra-reflect", @@ -2097,16 +2236,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.51", -] - -[[package]] -name = "mach2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" -dependencies = [ - "libc", + "syn 2.0.77", ] [[package]] @@ -2140,41 +2270,42 @@ dependencies = [ ] [[package]] -name = "memchr" -version = "2.7.1" +name = "maybe-rayon" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "metal" -version = "0.24.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "log", "objc", + "paste", ] [[package]] @@ -2190,20 +2321,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2687e6cf9c00f48e9284cf9fd15f2ef341d03cc7743abf9df4c5f07fdee50b18" [[package]] -name = "miniz_oxide" -version = "0.7.1" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", "simd-adler32", ] [[package]] -name = "mio" -version = "0.8.10" +name = "miniz_oxide" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -2212,10 +2358,22 @@ dependencies = [ ] [[package]] -name = "mlua-sys" -version = "0.5.1" +name = "mio" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2847b42764435201d8cbee1f517edb79c4cca4181877b90047587c89e1b7bce4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "mlua-sys" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16a9ba1dd2c6ac971b204262d434c24d65067038598f0638b64e5dca28d52b8" dependencies = [ "cc", "cfg-if", @@ -2224,18 +2382,19 @@ dependencies = [ [[package]] name = "naga" -version = "0.11.1" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d4269bcb7d50121097702fde1afb75f4ea8083aeb7a55688dcf289a853271" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ + "arrayvec", "bit-set", - "bitflags 1.3.2", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", - "indexmap 1.9.3", + "indexmap", "log", - "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -2244,11 +2403,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -2262,14 +2420,15 @@ dependencies = [ [[package]] name = "ndk" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "jni-sys", - "ndk-sys", - "num_enum 0.5.11", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", "raw-window-handle", "thiserror", ] @@ -2282,48 +2441,43 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.1+23.1.7779620" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] [[package]] -name = "nix" -version = "0.24.3" +name = "ndk-sys" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", + "jni-sys", ] [[package]] -name = "nix" -version = "0.25.1" +name = "new_debug_unreachable" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", + "memchr", + "minimal-lexical", ] [[package]] -name = "nix" -version = "0.27.1" +name = "noop_proc_macro" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "libc", -] +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" [[package]] name = "notify" @@ -2331,15 +2485,15 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", - "inotify 0.9.6", + "inotify", "kqueue", "libc", "log", - "mio", + "mio 0.8.11", "walkdir", "windows-sys 0.48.0", ] @@ -2369,86 +2523,81 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "num-bigint" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", + "num-bigint", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", + "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -2458,49 +2607,216 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] name = "objc-sys" -version = "0.2.0-beta.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "block2", "objc-sys", "objc2-encode", ] [[package]] -name = "objc2-encode" -version = "2.0.0-pre.2" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "objc-sys", + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", ] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2-cloud-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "cc", + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2513,13 +2829,13 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -2534,7 +2850,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -2545,9 +2861,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2561,7 +2877,7 @@ version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "libredox", + "libredox 0.0.2", ] [[package]] @@ -2572,24 +2888,24 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owned_ttf_parser" -version = "0.20.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" +checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" dependencies = [ "ttf-parser", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2597,15 +2913,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall 0.5.4", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2621,9 +2937,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -2645,9 +2961,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" dependencies = [ "memchr", "thiserror", @@ -2656,9 +2972,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" dependencies = [ "pest", "pest_generator", @@ -2666,22 +2982,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" dependencies = [ "once_cell", "pest", @@ -2695,14 +3011,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap", +] + +[[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.77", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2712,62 +3048,47 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "png" -version = "0.17.10" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.4", ] [[package]] name = "polling" -version = "2.8.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.28", + "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2778,34 +3099,55 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +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" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "once_cell", "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135ede8821cf6376eb7a64148901e1690b788c11ae94dc297ae917dbc91dc0e" +checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" +dependencies = [ + "quote", + "syn 2.0.77", +] [[package]] name = "qoi" @@ -2817,10 +3159,25 @@ dependencies = [ ] [[package]] -name = "quote" -version = "1.0.35" +name = "quick-error" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2909,16 +3266,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] -name = "raw-window-handle" -version = "0.5.2" +name = "rav1e" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha", + "simd_helpers", + "system-deps", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rgb", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2926,9 +3332,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2945,20 +3351,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] @@ -2969,8 +3375,8 @@ checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2984,13 +3390,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -3001,9 +3407,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "remove_dir_all" @@ -3016,17 +3422,17 @@ dependencies = [ [[package]] name = "renderdoc-sys" -version = "0.7.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -3060,6 +3466,15 @@ dependencies = [ "winreg", ] +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" +dependencies = [ + "bytemuck", +] + [[package]] name = "round_mult" version = "0.1.3" @@ -3071,9 +3486,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3082,38 +3497,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rustc-hash" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.37.27" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" -dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -3123,20 +3530,20 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3149,11 +3556,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3170,9 +3577,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", @@ -3183,11 +3590,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3196,9 +3603,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3212,35 +3619,45 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.194" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.194" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3295,10 +3712,16 @@ dependencies = [ ] [[package]] -name = "signal-hook-registry" -version = "1.4.1" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -3309,6 +3732,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simple_scene" version = "0.1.0" @@ -3339,44 +3771,49 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smithay-client-toolkit" -version = "0.16.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "calloop", - "dlib", - "lazy_static", + "calloop-wayland-source", + "cursor-icon", + "libc", "log", "memmap2", - "nix 0.24.3", - "pkg-config", + "rustix", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", "wayland-cursor", "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", ] [[package]] -name = "socket2" -version = "0.4.10" +name = "smol_str" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ - "libc", - "winapi", + "serde", ] [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3393,12 +3830,11 @@ dependencies = [ [[package]] name = "spirv" -version = "0.2.0+1.5.4" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 1.3.2", - "num-traits", + "bitflags 2.6.0", ] [[package]] @@ -3421,9 +3857,9 @@ checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -3438,9 +3874,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.51" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3474,6 +3910,25 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "tempdir" version = "0.3.7" @@ -3486,22 +3941,22 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.28", - "windows-sys 0.52.0", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -3533,14 +3988,14 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -3548,9 +4003,9 @@ dependencies = [ [[package]] name = "tiff" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", "jpeg-decoder", @@ -3559,12 +4014,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -3579,32 +4035,33 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] [[package]] name = "tiny-skia" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if", - "png", + "log", "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", @@ -3613,9 +4070,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3628,18 +4085,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.2", "pin-project-lite", - "socket2 0.5.6", - "windows-sys 0.48.0", + "socket2", + "windows-sys 0.52.0", ] [[package]] @@ -3654,40 +4110,56 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", +] + +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ - "indexmap 2.1.0", + "indexmap", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3720,7 +4192,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -3733,17 +4205,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-log" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -3770,14 +4231,14 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", ] [[package]] name = "tracing-tracy" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6024d04f84a69fd0d1dc1eee3a2b070bd246530a0582f9982ae487cb6c703614" +checksum = "c6a90519f16f55e5c62ffd5976349f10744435a919ecff83d918300575dfb69b" dependencies = [ "tracing-core", "tracing-subscriber", @@ -3786,9 +4247,9 @@ dependencies = [ [[package]] name = "tracy-client" -version = "0.17.0" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb931a64ff88984f86d3e9bcd1ae8843aa7fe44dd0f8097527bc172351741d" +checksum = "373db47331c3407b343538df77eea2516884a0b126cdfb4b135acfd400015dd7" dependencies = [ "loom", "once_cell", @@ -3797,9 +4258,9 @@ dependencies = [ [[package]] name = "tracy-client-sys" -version = "0.22.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d104d610dfa9dd154535102cc9c6164ae1fa37842bc2d9e83f9ac82b0ae0882" +checksum = "49cf0064dcb31c99aa1244c1b93439359e53f72ed217eef5db50abd442241e9a" dependencies = [ "cc", ] @@ -3812,9 +4273,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "ttf-parser" -version = "0.20.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" +checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" [[package]] name = "typenum" @@ -3836,30 +4297,36 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] -name = "unicode-width" -version = "0.1.11" +name = "unicode-segmentation" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unique" @@ -3869,9 +4336,9 @@ checksum = "d360722e1f3884f5b14d332185f02ff111f771f0c76a313268fe6af1409aba96" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -3886,14 +4353,25 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", "rand 0.8.5", ] +[[package]] +name = "v_frame" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.0" @@ -3902,9 +4380,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.3" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ce5bb364b23e66b528d03168df78b38c0f7b6fe17386928f29d5ab2e7cb2f7" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vcpkg" @@ -3913,28 +4391,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "vec_map" -version = "0.8.2" +name = "version-compare" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3957,34 +4429,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3994,9 +4467,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4004,101 +4477,147 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] -name = "wayland-client" -version = "0.29.5" +name = "wayland-backend" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ - "bitflags 1.3.2", + "cc", "downcast-rs", - "libc", - "nix 0.24.3", + "rustix", "scoped-tls", - "wayland-commons", - "wayland-scanner", - "wayland-sys", -] - -[[package]] -name = "wayland-commons" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" -dependencies = [ - "nix 0.24.3", - "once_cell", "smallvec", "wayland-sys", ] [[package]] -name = "wayland-cursor" -version = "0.29.5" +name = "wayland-client" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ - "nix 0.24.3", + "bitflags 2.6.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.6.0", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb" +dependencies = [ + "rustix", "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.29.5" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", + "wayland-backend", "wayland-client", - "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.29.5" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", + "quick-xml", "quote", - "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.29.5" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", - "lazy_static", + "log", + "once_cell", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +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", @@ -4106,18 +4625,19 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "0.15.1" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d745a1b6d91d85c33defbb29f0eee0450e1d2614d987e14bf6baf26009d132d7" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" dependencies = [ "arrayvec", - "cfg-if", + "cfg_aliases 0.1.1", + "document-features", "js-sys", "log", "naga", @@ -4136,44 +4656,46 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.15.1" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131408d940e335792645a98f03639573b0480e9e2e7cddbbab74f7c6d9f3fff" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec", "bit-vec", - "bitflags 1.3.2", - "codespan-reporting", - "fxhash", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "document-features", + "indexmap", "log", "naga", + "once_cell", "parking_lot", "profiling", "raw-window-handle", + "rustc-hash 1.1.0", "smallvec", "thiserror", - "web-sys", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "0.15.4" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcf61a283adc744bb5453dd88ea91f3f86d5ca6b027661c6c73c7734ae0288b" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 1.3.2", + "bitflags 2.6.0", "block", + "cfg_aliases 0.1.1", "core-graphics-types", "d3d12", - "foreign-types", - "fxhash", "glow", + "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", @@ -4181,16 +4703,19 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.7.4", + "libloading", "log", "metal", "naga", + "ndk-sys 0.5.0+25.2.9519653", "objc", + "once_cell", "parking_lot", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -4201,11 +4726,11 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.15.2" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32444e121b0bd00cb02c0de32fde457a9491bd44e03e7a5db6df9b1da2f6f110" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "js-sys", "web-sys", ] @@ -4224,9 +4749,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.5.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -4246,11 +4771,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -4259,32 +4784,24 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - [[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.0", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", ] [[package]] @@ -4293,7 +4810,61 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -4320,7 +4891,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4355,17 +4935,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4382,9 +4963,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4400,9 +4981,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4418,9 +4999,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4436,9 +5023,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4454,9 +5041,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4472,9 +5059,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4490,50 +5077,67 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.28.7" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" +checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67" dependencies = [ + "ahash", "android-activity", - "bitflags 1.3.2", - "cfg_aliases", + "atomic-waker", + "bitflags 2.6.0", + "block2", + "bytemuck", + "calloop", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "dpi", + "js-sys", "libc", - "log", - "mio", + "memmap2", "ndk", "objc2", - "once_cell", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", + "rustix", "sctk-adwaita", "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", "wayland-client", - "wayland-commons", "wayland-protocols", - "wayland-scanner", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.52.0", "x11-dl", + "x11rb", + "xkbcommon-dl", ] [[package]] name = "winnow" -version = "0.5.32" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -4560,35 +5164,76 @@ dependencies = [ ] [[package]] -name = "xcursor" -version = "0.3.5" +name = "x11rb" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "xcursor" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.6.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "xml-rs" -version = "0.8.19" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.77", ] [[package]] @@ -4632,14 +5277,20 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", ] +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + [[package]] name = "zune-inflate" version = "0.2.54" @@ -4648,3 +5299,12 @@ checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" dependencies = [ "simd-adler32", ] + +[[package]] +name = "zune-jpeg" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" +dependencies = [ + "zune-core", +] diff --git a/examples/fixed-timestep-rotating-model/src/main.rs b/examples/fixed-timestep-rotating-model/src/main.rs index cadcd51..79312af 100644 --- a/examples/fixed-timestep-rotating-model/src/main.rs +++ b/examples/fixed-timestep-rotating-model/src/main.rs @@ -25,7 +25,7 @@ use tracing::info; #[async_std::main] async fn main() { - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) .add_action(ACTLBL_MOVE_FORWARD_BACKWARD, Action::new(ActionKind::Axis)) @@ -105,7 +105,7 @@ async fn main() { .await; } -fn setup_scene_plugin(game: &mut Game) { +fn setup_scene_plugin(app: &mut App) { let world = game.world_mut(); let resman = world.get_resource_mut::(); let camera_gltf = resman diff --git a/examples/lua-scripting/src/main.rs b/examples/lua-scripting/src/main.rs index 610ec6f..1a4ed03 100644 --- a/examples/lua-scripting/src/main.rs +++ b/examples/lua-scripting/src/main.rs @@ -18,7 +18,7 @@ use lyra_engine::{ #[async_std::main] async fn main() { - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) .add_action(ACTLBL_MOVE_FORWARD_BACKWARD, Action::new(ActionKind::Axis)) @@ -99,7 +99,7 @@ async fn main() { .await; } -fn setup_scene_plugin(game: &mut Game) { +fn setup_scene_plugin(app: &mut App) { let world = game.world_mut(); let resman = world.get_resource_mut::(); let camera_gltf = resman @@ -136,7 +136,7 @@ fn setup_scene_plugin(game: &mut Game) { world.spawn((camera, FreeFlyCamera::default())); } -fn setup_script_plugin(game: &mut Game) { +fn setup_script_plugin(app: &mut App) { game.with_plugin(LuaScriptingPlugin); let world = game.world_mut(); diff --git a/examples/many-lights/src/main.rs b/examples/many-lights/src/main.rs index a3b17a2..b05e895 100644 --- a/examples/many-lights/src/main.rs +++ b/examples/many-lights/src/main.rs @@ -21,7 +21,7 @@ const POINT_LIGHT_MIN_Z: f32 = -5.0; #[async_std::main] async fn main() { - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) @@ -80,7 +80,7 @@ async fn main() { .run().await; } -fn setup_scene_plugin(game: &mut Game) { +fn setup_scene_plugin(app: &mut App) { let fps_counter = |mut counter: ResMut, delta: Res| -> anyhow::Result<()> { let tick = counter.tick(); @@ -174,7 +174,7 @@ fn setup_scene_plugin(game: &mut Game) { world.spawn(( camera, FreeFlyCamera::default() )); } -fn camera_debug_plugin(game: &mut Game) { +fn camera_debug_plugin(app: &mut App) { let sys = |handler: Res, view: View<&mut CameraComponent>| -> anyhow::Result<()> { if handler.was_action_just_pressed("Debug") { for mut cam in view.into_iter() { diff --git a/examples/shadows/src/main.rs b/examples/shadows/src/main.rs index 1391c6f..639093a 100644 --- a/examples/shadows/src/main.rs +++ b/examples/shadows/src/main.rs @@ -19,7 +19,7 @@ use lyra_engine::{ #[async_std::main] async fn main() { - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) .add_action(ACTLBL_MOVE_FORWARD_BACKWARD, Action::new(ActionKind::Axis)) @@ -99,7 +99,7 @@ async fn main() { .await; } -fn setup_scene_plugin(game: &mut Game) { +fn setup_scene_plugin(app: &mut App) { let world = game.world_mut(); let resman = world.get_resource_mut::(); diff --git a/examples/simple_scene/src/main.rs b/examples/simple_scene/src/main.rs index 64eca82..aef2890 100644 --- a/examples/simple_scene/src/main.rs +++ b/examples/simple_scene/src/main.rs @@ -1,6 +1,6 @@ use lyra_engine::{ assets::{gltf::Gltf, ResourceManager}, - game::Game, + game::App, input::{ Action, ActionHandler, ActionKind, ActionMapping, ActionMappingId, ActionSource, InputActionPlugin, KeyCode, LayoutId, MouseAxis, MouseInput, @@ -16,7 +16,7 @@ use lyra_engine::{ #[async_std::main] async fn main() { - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) .add_action(ACTLBL_MOVE_FORWARD_BACKWARD, Action::new(ActionKind::Axis)) @@ -31,75 +31,73 @@ async fn main() { .bind( ACTLBL_MOVE_FORWARD_BACKWARD, &[ - ActionSource::Keyboard(KeyCode::W).into_binding_modifier(1.0), - ActionSource::Keyboard(KeyCode::S).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::KeyW).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::KeyS).into_binding_modifier(-1.0), ], ) .bind( ACTLBL_MOVE_LEFT_RIGHT, &[ - ActionSource::Keyboard(KeyCode::A).into_binding_modifier(-1.0), - ActionSource::Keyboard(KeyCode::D).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::KeyA).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::KeyD).into_binding_modifier(1.0), ], ) .bind( ACTLBL_MOVE_UP_DOWN, &[ - ActionSource::Keyboard(KeyCode::C).into_binding_modifier(1.0), - ActionSource::Keyboard(KeyCode::Z).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::KeyC).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::KeyZ).into_binding_modifier(-1.0), ], ) .bind( ACTLBL_LOOK_LEFT_RIGHT, &[ ActionSource::Mouse(MouseInput::Axis(MouseAxis::X)).into_binding(), - ActionSource::Keyboard(KeyCode::Left).into_binding_modifier(-1.0), - ActionSource::Keyboard(KeyCode::Right).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::ArrowLeft).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::ArrowRight).into_binding_modifier(1.0), ], ) .bind( ACTLBL_LOOK_UP_DOWN, &[ ActionSource::Mouse(MouseInput::Axis(MouseAxis::Y)).into_binding(), - ActionSource::Keyboard(KeyCode::Up).into_binding_modifier(-1.0), - ActionSource::Keyboard(KeyCode::Down).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::ArrowUp).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::ArrowDown).into_binding_modifier(1.0), ], ) .bind( ACTLBL_LOOK_ROLL, &[ - ActionSource::Keyboard(KeyCode::E).into_binding_modifier(-1.0), - ActionSource::Keyboard(KeyCode::Q).into_binding_modifier(1.0), + ActionSource::Keyboard(KeyCode::KeyE).into_binding_modifier(-1.0), + ActionSource::Keyboard(KeyCode::KeyQ).into_binding_modifier(1.0), ], ) .bind( "Debug", - &[ActionSource::Keyboard(KeyCode::B).into_binding()], + &[ActionSource::Keyboard(KeyCode::KeyB).into_binding()], ) .finish(), ) .finish(); - let world = game.world_mut(); - world.add_resource(action_handler); - game.with_plugin(InputActionPlugin); + //let world = app.world; + app.add_resource(action_handler); + app.with_plugin(InputActionPlugin); }; - Game::initialize() - .await - .with_plugin(lyra_engine::DefaultPlugins) + let mut a = App::new(); + a.with_plugin(lyra_engine::DefaultPlugins) .with_plugin(setup_scene_plugin) .with_plugin(action_handler_plugin) //.with_plugin(camera_debug_plugin) - .with_plugin(FreeFlyCameraPlugin) - .run() - .await; + .with_plugin(FreeFlyCameraPlugin); + a.run(); } -fn setup_scene_plugin(game: &mut Game) { - let world = game.world_mut(); +fn setup_scene_plugin(app: &mut App) { + let world = &mut app.world; let resman = world.get_resource_mut::(); - + /* let camera_gltf = resman .request::("../assets/AntiqueCamera.glb") .unwrap(); @@ -146,4 +144,4 @@ fn setup_scene_plugin(game: &mut Game) { let mut camera = CameraComponent::new_3d(); camera.transform.translation += math::Vec3::new(0.0, 0.0, 5.5); world.spawn((camera, FreeFlyCamera::default())); -} \ No newline at end of file +} diff --git a/examples/testbed/src/main.rs b/examples/testbed/src/main.rs index d5057c5..1ae39d6 100644 --- a/examples/testbed/src/main.rs +++ b/examples/testbed/src/main.rs @@ -260,7 +260,7 @@ async fn main() { Ok(()) }; - let camera_debug_plugin = move |game: &mut Game| { + let camera_debug_plugin = move |app: &mut App| { let sys = |handler: Res, view: View<&mut CameraComponent>| -> anyhow::Result<()> { if handler.was_action_just_pressed("Debug") { for mut cam in view.into_iter() { @@ -275,7 +275,7 @@ async fn main() { game.with_system("update_world_transforms", scene::system_update_world_transforms, &[]); }; - let action_handler_plugin = |game: &mut Game| { + let action_handler_plugin = |app: &mut App| { let action_handler = ActionHandler::builder() .add_layout(LayoutId::from(0)) @@ -327,7 +327,7 @@ async fn main() { game.with_plugin(InputActionPlugin); }; - /* let script_test_plugin = |game: &mut Game| { + /* let script_test_plugin = |app: &mut App| { game.with_plugin(LuaScriptingPlugin); let world = game.world_mut(); diff --git a/lyra-ecs/src/lib.rs b/lyra-ecs/src/lib.rs index 7244349..6586a34 100644 --- a/lyra-ecs/src/lib.rs +++ b/lyra-ecs/src/lib.rs @@ -1,3 +1,5 @@ +#![feature(associated_type_defaults)] + extern crate self as lyra_ecs; #[allow(unused_imports)] diff --git a/lyra-ecs/src/query/dynamic/view.rs b/lyra-ecs/src/query/dynamic/view.rs index 94221c1..75bbeff 100644 --- a/lyra-ecs/src/query/dynamic/view.rs +++ b/lyra-ecs/src/query/dynamic/view.rs @@ -197,11 +197,9 @@ mod tests { let mut view_iter = view.into_iter(); while let Some((_e, view_row)) = view_iter.next(&world) { assert_eq!(view_row.len(), 1); - - let mut row_iter = view_row.row.iter(); + let mut row_iter = view_row.iter(); let dynamic_type = row_iter.next().unwrap(); - let component_data = unsafe { dynamic_type.ptr.cast::().as_ref() }; assert_eq!(*component_data, 50); } @@ -226,11 +224,9 @@ mod tests { for (_e, view_row) in view.into_iter() { assert_eq!(view_row.len(), 1); + let mut row_iter = view_row.iter(); - let mut row_iter = view_row.row.iter(); - - let dynamic_type = row_iter.next().unwrap(); - + let dynamic_type = row_iter.next().unwrap(); let component_data = unsafe { dynamic_type.ptr.cast::().as_ref() }; assert_eq!(*component_data, 50); } diff --git a/lyra-ecs/src/query/filter/changed.rs b/lyra-ecs/src/query/filter/changed.rs new file mode 100644 index 0000000..7169f64 --- /dev/null +++ b/lyra-ecs/src/query/filter/changed.rs @@ -0,0 +1,97 @@ +use std::marker::PhantomData; + +use crate::{query::{AsFilter, AsQuery, Fetch, Filter, Query}, Component, ComponentColumn, DynTypeId, Tick, World}; + +pub struct ChangedFetcher<'a, T> { + col: &'a ComponentColumn, + tick: Tick, + _phantom: PhantomData<&'a T>, +} + +impl<'a, T> Fetch<'a> for ChangedFetcher<'a, T> +where + T: 'a, +{ + type Item = bool; + + fn dangling() -> Self { + unreachable!() + } + + unsafe fn get_item(&mut self, entity: crate::world::ArchetypeEntityId) -> Self::Item { + let tick = self.col.entity_ticks[entity.0 as usize]; + tick >= self.tick + } +} + +/// A filter that fetches components that have changed. +/// +/// Since [`AsQuery`] is implemented for `&T`, you can use this query like this: +/// ```nobuild +/// for ts in world.view::<&T>() { +/// println!("Got a &T!"); +/// } +/// ``` +pub struct Changed { + type_id: DynTypeId, + _phantom: PhantomData +} + +impl Default for Changed { + fn default() -> Self { + Self { + type_id: DynTypeId::of::(), + _phantom: PhantomData, + } + } +} + +// manually implemented to avoid a Copy bound on T +impl Copy for Changed {} + +// manually implemented to avoid a Clone bound on T +impl Clone for Changed { + fn clone(&self) -> Self { + *self + } +} + +impl Changed { + pub fn new() -> Self { + Self::default() + } +} + +impl Query for Changed +where + T: 'static +{ + type Item<'a> = bool; + type Fetch<'a> = ChangedFetcher<'a, T>; + + fn new() -> Self { + Changed::::new() + } + + fn can_visit_archetype(&self, archetype: &crate::archetype::Archetype) -> bool { + archetype.has_column(self.type_id) + } + + unsafe fn fetch<'a>(&self, w: &'a World, a: &'a crate::archetype::Archetype, _: crate::Tick) -> Self::Fetch<'a> { + ChangedFetcher { + col: a.get_column(self.type_id).unwrap(), + tick: w.current_tick(), + _phantom: PhantomData::<&T>, + } + } +} + +impl AsQuery for Changed { + type Query = Self; +} + +impl<'a, T: Component> Filter for Changed { } + +impl AsFilter for Changed { + type Filter = Self; +} \ No newline at end of file diff --git a/lyra-ecs/src/query/filter/mod.rs b/lyra-ecs/src/query/filter/mod.rs index e9bb05b..abc346f 100644 --- a/lyra-ecs/src/query/filter/mod.rs +++ b/lyra-ecs/src/query/filter/mod.rs @@ -5,4 +5,7 @@ mod or; pub use or::*; mod not; -pub use not::*; \ No newline at end of file +pub use not::*; + +mod changed; +pub use changed::*; \ No newline at end of file diff --git a/lyra-ecs/src/query/mod.rs b/lyra-ecs/src/query/mod.rs index fa39907..d3e95d6 100644 --- a/lyra-ecs/src/query/mod.rs +++ b/lyra-ecs/src/query/mod.rs @@ -89,6 +89,12 @@ pub trait AsQuery { type Query: Query; } +/// A trait for getting the filter of a type. +pub trait AsFilter { + /// The query for this type + type Filter: Filter; +} + pub trait IntoQuery { fn into_query(self) -> Self; } @@ -125,10 +131,22 @@ impl Query for () { } } +impl Filter for () { + type Item<'a> = bool; +} + impl AsQuery for () { type Query = (); } +pub trait Filter: Query { + type Item<'a> = bool; +} + +impl AsFilter for () { + type Filter = (); +} + #[cfg(test)] mod tests { use crate::{World, archetype::Archetype, tests::Vec2}; diff --git a/lyra-ecs/src/query/tuple.rs b/lyra-ecs/src/query/tuple.rs index 2d423cb..818b4ca 100644 --- a/lyra-ecs/src/query/tuple.rs +++ b/lyra-ecs/src/query/tuple.rs @@ -1,8 +1,8 @@ use crate::World; -use super::{Query, Fetch, AsQuery}; +use super::{Query, Fetch, AsQuery, Filter, AsFilter}; -impl<'a, F1> Fetch<'a> for (F1,) +/* impl<'a, F1> Fetch<'a> for (F1,) where F1: Fetch<'a>, { @@ -102,7 +102,7 @@ where Q2: AsQuery, { type Query = (Q1::Query, Q2::Query); -} +} */ macro_rules! impl_bundle_tuple { ( $($name: ident),+ ) => ( @@ -154,10 +154,39 @@ macro_rules! impl_bundle_tuple { impl<$($name: AsQuery),+> AsQuery for ($($name,)+) { type Query = ($($name::Query,)+); } + + #[allow(non_snake_case)] + impl<$($name: Filter),+> Filter for ($($name,)+) { + //type Item<'a> = ($(<$name as Query>::Item<'a>,)+); + //type Fetch<'a> = ($(<$name as Query>::Fetch<'a>,)+); + + /* fn new() -> Self { + ( $($name::new(),)+ ) + } + + fn can_visit_archetype(&self, archetype: &crate::archetype::Archetype) -> bool { + let ( $($name,)+ ) = self; + + // this is the only way I could figure out how to do an 'and' + let bools = vec![$($name.can_visit_archetype(archetype),)+]; + bools.iter().all(|b| *b) + } + + unsafe fn fetch<'a>(&self, world: &'a World, archetype: &'a crate::archetype::Archetype, tick: crate::Tick) -> Self::Fetch<'a> { + let ( $($name,)+ ) = self; + ( $($name.fetch(world, archetype, tick),)+ ) + } */ + } + + impl<$($name: AsFilter),+> AsFilter for ($($name,)+) { + type Filter = ($($name::Filter,)+); + } ); } // Hopefully up to 16 queries in a SINGLE view is enough +impl_bundle_tuple! { Q1 } +impl_bundle_tuple! { Q1, Q2 } impl_bundle_tuple! { Q1, Q2, Q3 } impl_bundle_tuple! { Q1, Q2, Q3, Q4 } impl_bundle_tuple! { Q1, Q2, Q3, Q4, Q5 } diff --git a/lyra-ecs/src/query/view.rs b/lyra-ecs/src/query/view.rs index d212295..d73f526 100644 --- a/lyra-ecs/src/query/view.rs +++ b/lyra-ecs/src/query/view.rs @@ -2,11 +2,11 @@ use std::ops::Range; use crate::{archetype::Archetype, world::{ArchetypeEntityId, World}, EntityId, Tick}; -use super::{Query, Fetch, AsQuery}; +use super::{AsFilter, AsQuery, Fetch, Filter, Query}; pub type View<'a, Q, F = ()> = ViewState<'a, ::Query, ::Query>; -pub struct ViewState<'a, Q: Query, F: Query> { +pub struct ViewState<'a, Q: Query, F: Filter> { world: &'a World, query: Q, filter: F, @@ -16,7 +16,7 @@ pub struct ViewState<'a, Q: Query, F: Query> { impl<'a, Q, F> ViewState<'a, Q, F> where Q: Query, - F: Query, + F: Filter, { pub fn new(world: &'a World, query: Q, filter: F, archetypes: Vec<&'a Archetype>) -> Self { Self { @@ -38,7 +38,7 @@ where } /// Consumes `self`, adding a filter to the view. - pub fn with(self, filter: U::Query) -> ViewState<'a, Q, (F, U::Query)> { + pub fn with(self, filter: U::Filter) -> ViewState<'a, Q, (F, U::Filter)> { ViewState::new(self.world, self.query, (self.filter, filter), self.archetypes) } } @@ -46,18 +46,19 @@ where impl<'a, Q, F> IntoIterator for ViewState<'a, Q, F> where Q: Query, - F: Query, + F: Filter, { type Item = Q::Item<'a>; type IntoIter = ViewIter<'a, Q, F>; fn into_iter(self) -> Self::IntoIter { - let tick = self.world.tick_tracker().tick_when(Q::MUTATES); + //let tick = self.world.tick_tracker().tick_when(Q::MUTATES); ViewIter { world: self.world, - tick, + tick: self.world.current_tick(), + has_ticked: false, query: self.query, filter: self.filter, fetcher: None, @@ -69,9 +70,10 @@ where } } -pub struct ViewIter<'a, Q: Query, F: Query> { +pub struct ViewIter<'a, Q: Query, F: Filter> { world: &'a World, tick: Tick, + has_ticked: bool, query: Q, filter: F, fetcher: Option>, @@ -84,7 +86,7 @@ pub struct ViewIter<'a, Q: Query, F: Query> { impl<'a, Q, F> Iterator for ViewIter<'a, Q, F> where Q: Query, - F: Query, + F: Filter, { type Item = Q::Item<'a>; @@ -110,6 +112,13 @@ where let entity_index = ArchetypeEntityId(entity_index); if fetcher.can_visit_item(entity_index) && filter_fetcher.can_visit_item(entity_index) { + // only tick the world if the filter has fetched, and when the world hasn't + // been ticked yet. + if Q::MUTATES && !self.has_ticked { + self.has_ticked = true; + self.tick = self.world.tick(); + } + let i = unsafe { fetcher.get_item(entity_index) }; return Some(i); } @@ -147,17 +156,17 @@ pub struct ViewOne<'a, Q: Query> { impl<'a, Q: Query> ViewOne<'a, Q> { pub fn new(world: &'a World, entity: EntityId, query: Q) -> Self { - let tick = world.tick_tracker().tick_when(Q::MUTATES); + //let tick = world.tick_tracker().tick_when(Q::MUTATES); Self { world, - tick, + tick: world.current_tick(), entity, query } } - pub fn get(&self) -> Option> { + pub fn get(self) -> Option> { if let Some(record) = self.world.entities.arch_index.get(&self.entity) { let arch = self.world.archetypes.get(&record.id) .expect("An invalid record was specified for an entity"); @@ -165,6 +174,9 @@ impl<'a, Q: Query> ViewOne<'a, Q> { if self.query.can_visit_archetype(arch) { let mut fetch = unsafe { self.query.fetch(self.world, arch, self.tick) }; if fetch.can_visit_item(record.index) { + // only tick the world when something is actually fetched. + self.world.tick(); + return Some(unsafe { fetch.get_item(record.index) }); } } diff --git a/lyra-ecs/src/relation/mod.rs b/lyra-ecs/src/relation/mod.rs index 6ad396a..e460070 100644 --- a/lyra-ecs/src/relation/mod.rs +++ b/lyra-ecs/src/relation/mod.rs @@ -2,6 +2,7 @@ use std::marker::PhantomData; use lyra_ecs_derive::Component; +use crate::query::Filter; use crate::query::Query; use crate::query::ViewState; use crate::Entity; @@ -98,7 +99,7 @@ impl World { impl<'a, Q, F> ViewState<'a, Q, F> where Q: Query, - F: Query, + F: Filter, { /// Consumes `self` to return a view that fetches the relation to a specific target entity. pub fn relates_to(self, target: Entity) -> ViewState<'a, (Q, QueryRelatesTo), F> diff --git a/lyra-ecs/src/system/fn_sys.rs b/lyra-ecs/src/system/fn_sys.rs index 0ffac88..471847b 100644 --- a/lyra-ecs/src/system/fn_sys.rs +++ b/lyra-ecs/src/system/fn_sys.rs @@ -1,7 +1,7 @@ use std::{any::Any, marker::PhantomData, ptr::NonNull}; use paste::paste; -use crate::{World, Access, ResourceObject, query::{Query, ViewState, ResMut, Res}}; +use crate::{World, Access, ResourceObject, query::{Query, Filter, ViewState, ResMut, Res}}; use super::{System, IntoSystem}; @@ -140,7 +140,7 @@ impl_fn_system_tuple!{ A, B, C, D, E, F2, G, H, I, J, K, L, M, N, O, P } impl<'c, Q, F> FnArgFetcher for ViewState<'c, Q, F> where Q: Query + 'static, - F: Query + 'static, + F: Filter + 'static, { type State = (Q, F); type Arg<'a, 'state> = ViewState<'a, Q, F>; diff --git a/lyra-ecs/src/world.rs b/lyra-ecs/src/world.rs index 746a06e..4daf4c1 100644 --- a/lyra-ecs/src/world.rs +++ b/lyra-ecs/src/world.rs @@ -2,7 +2,7 @@ use std::{any::TypeId, collections::HashMap, ptr::NonNull}; use atomic_refcell::{AtomicRef, AtomicRefMut}; -use crate::{archetype::{Archetype, ArchetypeId}, bundle::Bundle, query::{dynamic::DynamicView, AsQuery, Query, ViewIter, ViewOne, ViewState}, resource::ResourceData, ComponentInfo, DynTypeId, DynamicBundle, Entities, Entity, ResourceObject, Tick, TickTracker}; +use crate::{archetype::{Archetype, ArchetypeId}, bundle::Bundle, query::{dynamic::DynamicView, AsFilter, AsQuery, Query, ViewIter, ViewOne, ViewState}, resource::ResourceData, ComponentInfo, DynTypeId, DynamicBundle, Entities, Entity, ResourceObject, Tick, TickTracker}; /// The id of the entity for the Archetype. /// @@ -347,9 +347,9 @@ impl World { } /// View into the world for a set of entities that satisfy the query and the filter. - pub fn filtered_view(&self) -> ViewState { + pub fn filtered_view(&self) -> ViewState { let archetypes = self.archetypes.values().collect(); - ViewState::::new(self, Q::Query::new(), F::Query::new(), archetypes) + ViewState::::new(self, Q::Query::new(), F::Filter::new(), archetypes) } /// View into the world for a set of entities that satisfy the queries. @@ -360,9 +360,9 @@ impl World { } /// View into the world for a set of entities that satisfy the queries. - pub fn filtered_view_iter(&self) -> ViewIter { + pub fn filtered_view_iter(&self) -> ViewIter { let archetypes = self.archetypes.values().collect(); - let v = ViewState::new(self, Q::Query::new(), F::Query::new(), archetypes); + let v = ViewState::new(self, Q::Query::new(), F::Filter::new(), archetypes); v.into_iter() } diff --git a/lyra-game/Cargo.toml b/lyra-game/Cargo.toml index a9e125d..9302e91 100644 --- a/lyra-game/Cargo.toml +++ b/lyra-game/Cargo.toml @@ -12,31 +12,30 @@ lyra-math = { path = "../lyra-math" } lyra-scene = { path = "../lyra-scene" } wgsl_preprocessor = { path = "../wgsl-preprocessor" } -winit = "0.28.1" -wgpu = { version = "0.15.1", features = [ "expose-ids"] } +winit = "0.30.5" +wgpu = { version = "22.1.0" } tracing = "0.1.37" tracing-subscriber = { version = "0.3.16", features = [ "tracing-log" ] } -tracing-log = "0.1.3" +tracing-log = "0.2.0" tracing-appender = "0.2.2" tracing-tracy = { version = "0.11.0", optional = true } async-std = { version = "1.12.0", features = [ "unstable", "attributes" ] } cfg-if = "1" bytemuck = { version = "1.12", features = [ "derive", "min_const_generics" ] } -image = { version = "0.24", default-features = false, features = ["png", "jpeg"] } +image = "0.25.2" anyhow = "1.0" instant = "0.1" async-trait = "0.1.65" -glam = { version = "0.24.0", features = ["bytemuck", "debug-glam-assert"] } -gilrs-core = "0.5.6" +glam = { version = "0.29.0", features = ["bytemuck", "debug-glam-assert"] } syn = "2.0.26" quote = "1.0.29" uuid = { version = "1.5.0", features = ["v4", "fast-rng"] } -itertools = "0.11.0" +itertools = "0.13.0" thiserror = "1.0.56" unique = "0.9.1" -rustc-hash = "1.1.0" +rustc-hash = "2.0.0" petgraph = { version = "0.6.5", features = ["matrix_graph"] } bind_match = "0.1.2" round_mult = "0.1.3" diff --git a/lyra-game/src/delta_time.rs b/lyra-game/src/delta_time.rs index 4d9a31e..4bec6f0 100644 --- a/lyra-game/src/delta_time.rs +++ b/lyra-game/src/delta_time.rs @@ -42,8 +42,8 @@ pub fn delta_time_system(world: &mut World) -> anyhow::Result<()> { pub struct DeltaTimePlugin; impl Plugin for DeltaTimePlugin { - fn setup(&self, game: &mut crate::game::Game) { - game.world_mut().add_resource(DeltaTime(0.0, None)); - game.add_system_to_stage(GameStages::First, "delta_time", delta_time_system, &[]); + fn setup(&mut self, app: &mut crate::game::App) { + app.world.add_resource(DeltaTime(0.0, None)); + app.add_system_to_stage(GameStages::First, "delta_time", delta_time_system, &[]); } } \ No newline at end of file diff --git a/lyra-game/src/events.rs b/lyra-game/src/events.rs index 73f4a7b..cadc106 100644 --- a/lyra-game/src/events.rs +++ b/lyra-game/src/events.rs @@ -196,7 +196,7 @@ impl Iterator for EventReader { pub struct EventsPlugin; impl Plugin for EventsPlugin { - fn setup(&self, game: &mut crate::game::Game) { - game.world_mut().add_resource(EventQueue::new()); + fn setup(&mut self, app: &mut crate::game::App) { + app.world.add_resource(EventQueue::new()); } } \ No newline at end of file diff --git a/lyra-game/src/game.rs b/lyra-game/src/game.rs index 2ecf253..e4f14fa 100755 --- a/lyra-game/src/game.rs +++ b/lyra-game/src/game.rs @@ -1,9 +1,8 @@ -use std::{sync::Arc, collections::VecDeque, ptr::NonNull}; +use std::{cell::OnceCell, collections::VecDeque, ptr::NonNull}; -use async_std::task::block_on; - -use lyra_ecs::{World, system::{System, IntoSystem}}; -use tracing::{error, info, Level}; +use lyra_ecs::{system::{IntoSystem, System}, ResourceObject, World}; +use lyra_math::IVec2; +use tracing::{info, error, Level}; use tracing_appender::non_blocking; use tracing_subscriber::{ layer::SubscriberExt, @@ -11,9 +10,7 @@ use tracing_subscriber::{ util::SubscriberInitExt, fmt, }; -use winit::{window::{WindowBuilder, Window}, event::{Event, WindowEvent, KeyboardInput, ElementState, VirtualKeyCode, DeviceEvent}, event_loop::{EventLoop, ControlFlow}}; - -use crate::{render::{renderer::{Renderer, BasicRenderer}, window::WindowOptions}, input::InputEvent, plugin::Plugin, change_tracker::Ct, EventQueue, StagedExecutor, Stage}; +use crate::{plugin::Plugin, render::renderer::Renderer, Stage, StagedExecutor}; #[derive(Clone, Copy, Hash, Debug)] pub enum GameStages { @@ -37,8 +34,13 @@ pub struct Controls<'a> { #[derive(Clone, Default)] pub struct WindowState { - pub is_focused: bool, - pub is_cursor_inside_window: bool, + /// Indicates if the window is currently focused. + pub focused: bool, + /// Indicates if the window is currently occluded. + pub occluded: bool, + /// Indicates if the cursor is inside of the window. + pub cursor_inside_window: bool, + pub position: IVec2, } impl WindowState { @@ -47,305 +49,19 @@ impl WindowState { } } -struct GameLoop { - window: Arc, - renderer: Box, - - world: World, - - staged_exec: StagedExecutor, -} - -impl GameLoop { - pub async fn new(window: Arc, mut world: World, staged_exec: StagedExecutor) -> Self { - let renderer = BasicRenderer::create_with_window(&mut world, window.clone()).await; - - Self { - window: Arc::clone(&window), - renderer: Box::new(renderer), - - world, - staged_exec, - } - } - - pub async fn on_resize(&mut self, new_size: winit::dpi::PhysicalSize) { - self.renderer.on_resize(&mut self.world, new_size); - } - - pub async fn on_init(&mut self) { - // Create the EventQueue resource in the world - self.world.add_resource(self.window.clone()); - } - - pub fn run_sync(&mut self, event: Event<()>, control_flow: &mut ControlFlow) { - block_on(self.run_event_loop(event, control_flow)) - } - - async fn update(&mut self) { - let world_ptr = NonNull::from(&self.world); - - if let Err(e) = self.staged_exec.execute(world_ptr, true) { - error!("Error when executing staged systems: '{}'", e); - } - } - - async fn input_update(&mut self, event: &InputEvent) -> Option { - match event { - InputEvent::KeyboardInput { - input: - KeyboardInput { - state: ElementState::Pressed, - virtual_keycode: Some(VirtualKeyCode::Escape), - .. - }, - .. - } => { - self.on_exit(); - - Some(ControlFlow::Exit) - }, - - _ => { - //debug!("Got unhandled input event: \"{:?}\"", event); - - None - } - } - } - - fn on_exit(&mut self) { - info!("On exit!"); - } - - pub async fn run_event_loop(&mut self, event: Event<'_, ()>, control_flow: &mut ControlFlow) { - *control_flow = ControlFlow::Poll; - match event { - Event::DeviceEvent { device_id, event: DeviceEvent::MouseMotion { delta } } => { - //debug!("motion: {delta:?}"); - // convert a MouseMotion event to an InputEvent - // make sure that the mouse is inside the window and the mouse has focus before reporting mouse motion - /* let trigger = matches!(self.world.get_resource::(), Some(window_state) - if window_state.is_focused && window_state.is_cursor_inside_window); */ - - let trigger = matches!(self.world.try_get_resource::>(), Some(window) - if window.focused && window.cursor_inside_window); - - if trigger { - let mut event_queue = self.world.try_get_resource_mut::().unwrap(); - - let input_event = InputEvent::MouseMotion { device_id, delta, }; - event_queue.trigger_event(input_event); - } - }, - Event::WindowEvent { - ref event, - window_id, - } if window_id == self.window.id() => { - - // If try_from failed, that means that the WindowEvent is not an - // input related event. - if let Ok(input_event) = InputEvent::try_from(event) { - // Its possible to receive multiple input events before the update event for - // the InputSystem is called, so we must use a queue for the events. - { - if let Some(mut event_queue) = self.world.try_get_resource_mut::() { - event_queue.trigger_event(input_event.clone()); - }; - } - - if let Some(new_control) = self.input_update(&input_event).await { - *control_flow = new_control; - } - } else { - match event { - WindowEvent::CloseRequested => { - self.on_exit(); - - *control_flow = ControlFlow::Exit - }, - - WindowEvent::Resized(physical_size) => { - self.on_resize(*physical_size).await; - }, - - WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { - self.on_resize(**new_inner_size).await; - }, - - WindowEvent::Focused(is_focused) => { - let mut state = self.world.get_resource_or_else(WindowState::new); - state.is_focused = *is_focused; - }, - - _ => {} - } - } - }, - - Event::RedrawRequested(window_id) if window_id == self.window.id() => { - // Update the world - self.update().await; - - /* self.fps_counter.tick(); - if let Some(fps) = self.fps_counter.get_change() { - debug!("FPS: {}fps, {:.2}ms/frame", fps, self.fps_counter.get_tick_time()); - } */ - - self.renderer.as_mut().prepare(&mut self.world); - if let Some(mut event_queue) = self.world.try_get_resource_mut::() { - event_queue.update_events(); - } - - match self.renderer.as_mut().render() { - Ok(_) => {} - // Reconfigure the surface if lost - Err(wgpu::SurfaceError::Lost) => self.on_resize(self.renderer.as_ref().surface_size()).await, - // The system is out of memory, we should probably quit - Err(wgpu::SurfaceError::OutOfMemory) => *control_flow = ControlFlow::Exit, - // All other errors (Outdated, Timeout) should be resolved by the next frame - Err(e) => eprintln!("{:?}", e), - } - }, - - Event::MainEventsCleared => { - self.window.request_redraw(); - }, - _ => {} - } - } -} - -pub struct Game { - world: Option, +pub struct App { + pub(crate) renderer: OnceCell>, + pub world: World, plugins: VecDeque>, - system_exec: Option, startup_systems: VecDeque>, - + staged_exec: StagedExecutor, + run_fn: OnceCell>, } -impl Default for Game { - fn default() -> Self { - let mut staged = StagedExecutor::new(); - staged.add_stage(GameStages::First); - staged.add_stage_after(GameStages::First, GameStages::PreUpdate); - staged.add_stage_after(GameStages::PreUpdate, GameStages::Update); - staged.add_stage_after(GameStages::Update, GameStages::PostUpdate); - staged.add_stage_after(GameStages::PostUpdate, GameStages::Last); - - Self { - world: Some(World::new()), - plugins: VecDeque::new(), - system_exec: Some(staged), - startup_systems: VecDeque::new(), - } - } -} - -impl Game { - pub async fn initialize() -> Game { - Self::default() - } - - /// Get the world of this game - pub fn world_mut(&mut self) -> &mut World { - // world is always `Some`, so unwrapping is safe - self.world.as_mut().unwrap() - } - - /// Get the world of this game - pub fn world(&self) -> &World { - // world is always `Some`, so unwrapping is safe - self.world.as_ref().unwrap() - } - - /// Add a system to the ecs world - pub fn with_system(&mut self, name: &str, system: S, depends: &[&str]) -> &mut Self - where - S: IntoSystem, - >::System: 'static - { - let system_dispatcher = self.system_exec.as_mut().unwrap(); - system_dispatcher.add_system_to_stage(GameStages::Update, name, system.into_system(), depends); - - self - } - - /// Add a stage. - /// - /// This stage could run at any moment if nothing is dependent on it. - pub fn add_stage(&mut self, stage: T) -> &mut Self { - let system_dispatcher = self.system_exec.as_mut().unwrap(); - system_dispatcher.add_stage(stage); - - self - } - - /// Add a stage that executes after another one. - /// - /// Parameters: - /// * `before` - The stage that will run before `after`. - /// * `after` - The stage that will run after `before`. - pub fn add_stage_after(&mut self, before: T, after: U) -> &mut Self { - let system_dispatcher = self.system_exec.as_mut().unwrap(); - system_dispatcher.add_stage_after(before, after); - - self - } - - /// Add a system to an already existing stage. - /// - /// # Panics - /// Panics if the stage was not already added to the executor - pub fn add_system_to_stage(&mut self, stage: T, - name: &str, system: S, depends: &[&str]) -> &mut Self - where - T: Stage, - S: IntoSystem, - >::System: 'static - { - let system_dispatcher = self.system_exec.as_mut().unwrap(); - system_dispatcher.add_system_to_stage(stage, name, system.into_system(), depends); - - self - } - - /// Add a startup system that will be ran right after plugins are setup. - /// They will only be ran once - pub fn with_startup_system(&mut self, system: S) -> &mut Self - where - S: System + 'static - { - self.startup_systems.push_back(Box::new(system)); - - self - } - - /// Add a plugin to the game. These are executed as they are added. - pub fn with_plugin

(&mut self, plugin: P) -> &mut Self - where - P: Plugin + 'static - { - let plugin = Box::new(plugin); - plugin.as_ref().setup(self); - self.plugins.push_back(plugin); - - self - } - - /// Override the default (empty) world - /// - /// This isn't recommended, you should create a startup system and add it to `with_startup_system` - pub fn with_world(&mut self, world: World) -> &mut Self { - self.world = Some(world); - - self - } - - /// Start the game - pub async fn run(&mut self) { +impl App { + pub fn new() -> Self { // init logging - let (stdout_layer, _stdout_nb) = non_blocking(std::io::stdout()); + let (stdout_layer, stdout_nb) = non_blocking(std::io::stdout()); { let t = tracing_subscriber::registry() .with(fmt::layer().with_writer(stdout_layer)); @@ -362,28 +78,140 @@ impl Game { .with_default(Level::INFO)) .init(); } - - let world = self.world.take().unwrap_or_default(); + // store the logger worker guard to ensure logging still happens + let mut world = World::new(); + world.add_resource(stdout_nb); - // run startup systems - while let Some(mut startup) = self.startup_systems.pop_front() { - let startup = startup.as_mut(); - let world_ptr = NonNull::from(&world); - startup.setup(world_ptr).expect("World returned an error!"); - startup.execute(world_ptr).expect("World returned an error!"); + // initialize ecs system stages + let mut staged = StagedExecutor::new(); + staged.add_stage(GameStages::First); + staged.add_stage_after(GameStages::First, GameStages::PreUpdate); + staged.add_stage_after(GameStages::PreUpdate, GameStages::Update); + staged.add_stage_after(GameStages::Update, GameStages::PostUpdate); + staged.add_stage_after(GameStages::PostUpdate, GameStages::Last); + + Self { + renderer: OnceCell::new(), + world, + plugins: Default::default(), + startup_systems: Default::default(), + staged_exec: staged, + run_fn: OnceCell::new(), } - - // start winit event loops - let event_loop = EventLoop::new(); - let window = Arc::new(WindowBuilder::new().build(&event_loop).unwrap()); - - let system_dispatcher = self.system_exec.take().unwrap(); - let mut g_loop = GameLoop::new(Arc::clone(&window), world, system_dispatcher).await; - g_loop.on_init().await; - - event_loop.run(move |event, _, control_flow| { - g_loop.run_sync(event, control_flow); - }); } -} \ No newline at end of file + + pub fn update(&mut self) { + let wptr = NonNull::from(&self.world); + + if let Err(e) = self.staged_exec.execute(wptr, true) { + error!("Error when executing staged systems: '{}'", e); + } + } + + pub(crate) fn on_resize(&mut self, new_size: winit::dpi::PhysicalSize) { + self.renderer.get_mut() + .expect("renderer was not initialized") + .on_resize(&mut self.world, new_size); + } + + pub(crate) fn on_exit(&mut self) { + info!("On exit!"); + } + + pub fn add_resource(&mut self, data: T) { + self.world.add_resource(data); + } + + /// Add a system to the ecs world + pub fn with_system(&mut self, name: &str, system: S, depends: &[&str]) -> &mut Self + where + S: IntoSystem, + >::System: 'static + { + self.staged_exec.add_system_to_stage(GameStages::Update, name, system.into_system(), depends); + + self + } + + /// Add a stage. + /// + /// This stage could run at any moment if nothing is dependent on it. + pub fn add_stage(&mut self, stage: T) -> &mut Self { + self.staged_exec.add_stage(stage); + + self + } + + /// Add a stage that executes after another one. + /// + /// Parameters: + /// * `before` - The stage that will run before `after`. + /// * `after` - The stage that will run after `before`. + pub fn add_stage_after(&mut self, before: T, after: U) -> &mut Self { + self.staged_exec.add_stage_after(before, after); + + self + } + + /// Add a system to an already existing stage. + /// + /// # Panics + /// Panics if the stage was not already added to the executor + pub fn add_system_to_stage(&mut self, stage: T, + name: &str, system: S, depends: &[&str]) -> &mut Self + where + T: Stage, + S: IntoSystem, + >::System: 'static + { + self.staged_exec.add_system_to_stage(stage, name, system.into_system(), depends); + + self + } + + /// Add a startup system that will be ran right after plugins are setup. + /// They will only be ran once + pub fn with_startup_system(&mut self, system: S) -> &mut Self + where + S: System + 'static + { + self.startup_systems.push_back(Box::new(system)); + + self + } + + /// Add a plugin to the game. These are executed as they are added. + pub fn with_plugin

(&mut self, mut plugin: P) -> &mut Self + where + P: Plugin + 'static + { + plugin.setup(self); + let plugin = Box::new(plugin); + self.plugins.push_back(plugin); + + self + } + + /// Override the default (empty) world + /// + /// This isn't recommended, you should create a startup system and add it to `with_startup_system` + pub fn with_world(&mut self, world: World) -> &mut Self { + self.world = world; + self + } + + pub fn set_run_fn(&self, f: F) + where + F: FnOnce(App) + 'static + { + // ignore if a runner function was already set + let _ = self.run_fn.set(Box::new(f)); + } + + pub fn run(mut self) { + let f = self.run_fn.take() + .expect("No run function set"); + f(self); + } +} diff --git a/lyra-game/src/input/action.rs b/lyra-game/src/input/action.rs index 229dcf5..ba24861 100644 --- a/lyra-game/src/input/action.rs +++ b/lyra-game/src/input/action.rs @@ -597,7 +597,7 @@ fn actions_system(world: &mut World) -> anyhow::Result<()> { pub struct InputActionPlugin; impl Plugin for InputActionPlugin { - fn setup(&self, game: &mut crate::game::Game) { - game.add_system_to_stage(GameStages::PreUpdate, "input_actions", actions_system, &[]); + fn setup(&mut self, app: &mut crate::game::App) { + app.add_system_to_stage(GameStages::PreUpdate, "input_actions", actions_system, &[]); } } \ No newline at end of file diff --git a/lyra-game/src/input/events.rs b/lyra-game/src/input/events.rs index ec061e9..b7d7bd9 100644 --- a/lyra-game/src/input/events.rs +++ b/lyra-game/src/input/events.rs @@ -88,6 +88,8 @@ pub enum MouseButton { Left, Right, Middle, + Back, + Forward, Other(u16), } diff --git a/lyra-game/src/input/input_event.rs b/lyra-game/src/input/input_event.rs index 2aeda0a..1a6c16f 100755 --- a/lyra-game/src/input/input_event.rs +++ b/lyra-game/src/input/input_event.rs @@ -1,4 +1,4 @@ -use winit::{event::{DeviceId, KeyboardInput, ModifiersState, MouseScrollDelta, TouchPhase, MouseButton, AxisId, Touch, WindowEvent, ElementState}, dpi::PhysicalPosition}; +use winit::{dpi::PhysicalPosition, event::{AxisId, DeviceId, ElementState, KeyEvent, MouseButton, MouseScrollDelta, Touch, TouchPhase, WindowEvent}}; /// Wrapper around events from `winit::WindowEvent` that are specific to input related events. /// @@ -19,7 +19,7 @@ pub enum InputEvent { /// An event from the keyboard has been received. KeyboardInput { device_id: DeviceId, - input: KeyboardInput, + event: KeyEvent, /// If true, the event was generated synthetically by winit in one of the following circumstances: /// Synthetic key press events are generated for all keys pressed when a window gains focus. @@ -28,20 +28,10 @@ pub enum InputEvent { is_synthetic: bool, }, - /// Change in physical position of a pointing device. - /// This represents raw, unfiltered physical motion. - /// - /// This is from winit's `DeviceEvent::MouseMotion` - MouseMotion { - device_id: DeviceId, - delta: (f64, f64), - }, - /// The cursor has moved on the window. CursorMoved { device_id: DeviceId, position: PhysicalPosition, - modifiers: ModifiersState, }, /// The cursor has entered the window. @@ -59,8 +49,6 @@ pub enum InputEvent { device_id: DeviceId, delta: MouseScrollDelta, phase: TouchPhase, - /// Deprecated in favor of WindowEvent::ModifiersChanged - modifiers: ModifiersState, }, /// An mouse button press has been received. @@ -68,51 +56,6 @@ pub enum InputEvent { device_id: DeviceId, state: ElementState, button: MouseButton, - #[deprecated = "Deprecated in favor of WindowEvent::ModifiersChanged"] - modifiers: ModifiersState, - }, - - /// Touchpad magnification event with two-finger pinch gesture. - /// Positive delta values indicate magnification (zooming in) and negative delta values indicate shrinking (zooming out). - /// - /// Note: Only available on macOS - TouchpadMagnify { - device_id: DeviceId, - delta: f64, - phase: TouchPhase, - }, - - /// Smart magnification event. - /// - /// On a Mac, smart magnification is triggered by a double tap with two fingers - /// on the trackpad and is commonly used to zoom on a certain object - /// (e.g. a paragraph of a PDF) or (sort of like a toggle) to reset any zoom. - /// The gesture is also supported in Safari, Pages, etc. - /// - /// The event is general enough that its generating gesture is allowed to vary - /// across platforms. It could also be generated by another device. - /// - /// Unfortunatly, neither [Windows](https://support.microsoft.com/en-us/windows/touch-gestures-for-windows-a9d28305-4818-a5df-4e2b-e5590f850741) - /// nor [Wayland](https://wayland.freedesktop.org/libinput/doc/latest/gestures.html) - /// support this gesture or any other gesture with the same effect. - /// - /// ## Platform-specific - /// - /// - Only available on **macOS 10.8** and later. - SmartMagnify { device_id: DeviceId }, - - /// Touchpad rotation event with two-finger rotation gesture. - /// - /// Positive delta values indicate rotation counterclockwise and - /// negative delta values indicate rotation clockwise. - /// - /// ## Platform-specific - /// - /// - Only available on **macOS**. - TouchpadRotate { - device_id: DeviceId, - delta: f32, - phase: TouchPhase, }, /// Touchpad pressure event. @@ -136,89 +79,62 @@ pub enum InputEvent { /// Touch event has been received /// /// ## Platform-specific - /// + /// - **Web**: Doesn’t take into account CSS border, padding, or transform. /// - **macOS:** Unsupported. Touch(Touch), } -#[derive(Debug, PartialEq)] -pub enum InputEventConversionError<'a> { - FromError(&'a WindowEvent<'a>) -} - -impl<'a> TryFrom<&'a WindowEvent<'a>> for InputEvent { - type Error = InputEventConversionError<'a>; - - fn try_from(value: &'a WindowEvent<'a>) -> Result { +impl InputEvent { + pub fn from_window_event(value: &WindowEvent) -> Option { match value { - WindowEvent::KeyboardInput { device_id, input, is_synthetic } => - Ok(InputEvent::KeyboardInput { + WindowEvent::KeyboardInput { device_id, event, is_synthetic } => + Some(InputEvent::KeyboardInput { device_id: *device_id, - input: *input, + event: event.clone(), is_synthetic: *is_synthetic }), #[allow(deprecated, reason="Compatibility")] - WindowEvent::CursorMoved { device_id, position, modifiers } => - Ok(InputEvent::CursorMoved { + WindowEvent::CursorMoved { device_id, position, } => + Some(InputEvent::CursorMoved { device_id: *device_id, position: *position, - modifiers: *modifiers }), WindowEvent::CursorEntered { device_id } => - Ok(InputEvent::CursorEntered { + Some(InputEvent::CursorEntered { device_id: *device_id }), WindowEvent::CursorLeft { device_id } => - Ok(InputEvent::CursorLeft { + Some(InputEvent::CursorLeft { device_id: *device_id }), #[allow(deprecated, reason="Compatibility")] - WindowEvent::MouseWheel { device_id, delta, phase, modifiers } => - Ok(InputEvent::MouseWheel { + WindowEvent::MouseWheel { device_id, delta, phase } => + Some(InputEvent::MouseWheel { device_id: *device_id, delta: *delta, phase: *phase, - modifiers: *modifiers }), #[allow(deprecated, reason="Compatibility")] - WindowEvent::MouseInput { device_id, state, button, modifiers } => - Ok(InputEvent::MouseInput { + WindowEvent::MouseInput { device_id, state, button } => + Some(InputEvent::MouseInput { device_id: *device_id, state: *state, button: *button, - modifiers: *modifiers - }), - WindowEvent::TouchpadMagnify { device_id, delta, phase } => - Ok(InputEvent::TouchpadMagnify { - device_id: *device_id, - delta: *delta, - phase: *phase - }), - WindowEvent::SmartMagnify { device_id } => - Ok(InputEvent::SmartMagnify { - device_id: *device_id - }), - WindowEvent::TouchpadRotate { device_id, delta, phase } => - Ok(InputEvent::TouchpadRotate { - device_id: *device_id, - delta: *delta, - phase: *phase }), WindowEvent::TouchpadPressure { device_id, pressure, stage } => - Ok(InputEvent::TouchpadPressure { + Some(InputEvent::TouchpadPressure { device_id: *device_id, pressure: *pressure, stage: *stage }), WindowEvent::AxisMotion { device_id, axis, value } => - Ok(InputEvent::AxisMotion { + Some(InputEvent::AxisMotion { device_id: *device_id, axis: *axis, value: *value }), - WindowEvent::Touch(t) => Ok(InputEvent::Touch(*t)), - - _ => Err(InputEventConversionError::FromError(value)) + WindowEvent::Touch(t) => Some(InputEvent::Touch(*t)), + _ => None, } } } \ No newline at end of file diff --git a/lyra-game/src/input/mod.rs b/lyra-game/src/input/mod.rs index bfa8175..a73012b 100644 --- a/lyra-game/src/input/mod.rs +++ b/lyra-game/src/input/mod.rs @@ -13,7 +13,7 @@ pub use buttons::*; pub mod action; pub use action::*; -pub type KeyCode = winit::event::VirtualKeyCode; +pub type KeyCode = winit::keyboard::KeyCode; /// Parses a [`KeyCode`] from a [`&str`]. /// @@ -24,42 +24,42 @@ pub fn keycode_from_str(s: &str) -> Option { let s = s.as_str(); match s { - "1" => Some(KeyCode::Key1), - "2" => Some(KeyCode::Key2), - "3" => Some(KeyCode::Key3), - "4" => Some(KeyCode::Key4), - "5" => Some(KeyCode::Key5), - "6" => Some(KeyCode::Key6), - "7" => Some(KeyCode::Key7), - "8" => Some(KeyCode::Key8), - "9" => Some(KeyCode::Key9), - "0" => Some(KeyCode::Key0), - "a" => Some(KeyCode::A), - "b" => Some(KeyCode::B), - "c" => Some(KeyCode::C), - "d" => Some(KeyCode::D), - "e" => Some(KeyCode::E), - "f" => Some(KeyCode::F), - "g" => Some(KeyCode::G), - "h" => Some(KeyCode::H), - "i" => Some(KeyCode::I), - "j" => Some(KeyCode::J), - "k" => Some(KeyCode::K), - "l" => Some(KeyCode::L), - "m" => Some(KeyCode::M), - "n" => Some(KeyCode::N), - "o" => Some(KeyCode::O), - "p" => Some(KeyCode::P), - "q" => Some(KeyCode::Q), - "r" => Some(KeyCode::R), - "s" => Some(KeyCode::S), - "t" => Some(KeyCode::T), - "u" => Some(KeyCode::U), - "v" => Some(KeyCode::V), - "w" => Some(KeyCode::W), - "x" => Some(KeyCode::X), - "y" => Some(KeyCode::Y), - "z" => Some(KeyCode::Z), + "1" => Some(KeyCode::Digit1), + "2" => Some(KeyCode::Digit2), + "3" => Some(KeyCode::Digit3), + "4" => Some(KeyCode::Digit4), + "5" => Some(KeyCode::Digit5), + "6" => Some(KeyCode::Digit6), + "7" => Some(KeyCode::Digit7), + "8" => Some(KeyCode::Digit8), + "9" => Some(KeyCode::Digit9), + "0" => Some(KeyCode::Digit0), + "a" => Some(KeyCode::KeyA), + "b" => Some(KeyCode::KeyB), + "c" => Some(KeyCode::KeyC), + "d" => Some(KeyCode::KeyD), + "e" => Some(KeyCode::KeyE), + "f" => Some(KeyCode::KeyF), + "g" => Some(KeyCode::KeyG), + "h" => Some(KeyCode::KeyH), + "i" => Some(KeyCode::KeyI), + "j" => Some(KeyCode::KeyJ), + "k" => Some(KeyCode::KeyK), + "l" => Some(KeyCode::KeyL), + "m" => Some(KeyCode::KeyM), + "n" => Some(KeyCode::KeyN), + "o" => Some(KeyCode::KeyO), + "p" => Some(KeyCode::KeyP), + "q" => Some(KeyCode::KeyQ), + "r" => Some(KeyCode::KeyR), + "s" => Some(KeyCode::KeyS), + "t" => Some(KeyCode::KeyT), + "u" => Some(KeyCode::KeyU), + "v" => Some(KeyCode::KeyV), + "w" => Some(KeyCode::KeyW), + "x" => Some(KeyCode::KeyX), + "y" => Some(KeyCode::KeyY), + "z" => Some(KeyCode::KeyZ), "escape" => Some(KeyCode::Escape), "f1" => Some(KeyCode::F1), "f2" => Some(KeyCode::F2), @@ -85,25 +85,23 @@ pub fn keycode_from_str(s: &str) -> Option { "f22" => Some(KeyCode::F22), "f23" => Some(KeyCode::F23), "f24" => Some(KeyCode::F24), - "snapshot" => Some(KeyCode::Snapshot), - "scroll" => Some(KeyCode::Scroll), + "print_screen" => Some(KeyCode::PrintScreen), + "scroll_lock" => Some(KeyCode::ScrollLock), "pause" => Some(KeyCode::Pause), "insert" => Some(KeyCode::Insert), "home" => Some(KeyCode::Home), "delete" => Some(KeyCode::Delete), "end" => Some(KeyCode::End), - "pagedown" => Some(KeyCode::PageDown), - "pageup" => Some(KeyCode::PageUp), - "left" => Some(KeyCode::Left), - "up" => Some(KeyCode::Up), - "right" => Some(KeyCode::Right), - "down" => Some(KeyCode::Down), - "back" => Some(KeyCode::Back), - "return" => Some(KeyCode::Return), + "page_down" => Some(KeyCode::PageDown), + "page_up" => Some(KeyCode::PageUp), + "left" => Some(KeyCode::ArrowLeft), + "up" => Some(KeyCode::ArrowUp), + "right" => Some(KeyCode::ArrowRight), + "down" => Some(KeyCode::ArrowDown), + "backspace" => Some(KeyCode::Backspace), + "enter" => Some(KeyCode::Enter), "space" => Some(KeyCode::Space), - "compose" => Some(KeyCode::Compose), - "caret" => Some(KeyCode::Caret), - "numlock" => Some(KeyCode::Numlock), + "numlock" => Some(KeyCode::NumLock), "numpad0" => Some(KeyCode::Numpad0), "numpad1" => Some(KeyCode::Numpad1), "numpad2" => Some(KeyCode::Numpad2), @@ -114,76 +112,62 @@ pub fn keycode_from_str(s: &str) -> Option { "numpad7" => Some(KeyCode::Numpad7), "numpad8" => Some(KeyCode::Numpad8), "numpad9" => Some(KeyCode::Numpad9), - "numpadadd" => Some(KeyCode::NumpadAdd), - "numpaddivide" => Some(KeyCode::NumpadDivide), - "numpaddecimal" => Some(KeyCode::NumpadDecimal), - "numpadcomma" => Some(KeyCode::NumpadComma), - "numpadenter" => Some(KeyCode::NumpadEnter), - "numpadequals" => Some(KeyCode::NumpadEquals), - "numpadmultiply" => Some(KeyCode::NumpadMultiply), - "numpadsubtract" => Some(KeyCode::NumpadSubtract), - "abntc1" => Some(KeyCode::AbntC1), - "abntc2" => Some(KeyCode::AbntC2), - "apostrophe" => Some(KeyCode::Apostrophe), - "apps" => Some(KeyCode::Apps), - "asterisk" => Some(KeyCode::Asterisk), - "at" => Some(KeyCode::At), - "ax" => Some(KeyCode::Ax), + "numpad_add" => Some(KeyCode::NumpadAdd), + "numpad_divide" => Some(KeyCode::NumpadDivide), + "numpad_decimal" => Some(KeyCode::NumpadDecimal), + "numpad_comma" => Some(KeyCode::NumpadComma), + "numpad_enter" => Some(KeyCode::NumpadEnter), + "numpad_multiply" => Some(KeyCode::NumpadMultiply), + "numpad_subtract" => Some(KeyCode::NumpadSubtract), + "numpad_star" => Some(KeyCode::NumpadStar), + "quote" => Some(KeyCode::Quote), + "launch_app1" => Some(KeyCode::LaunchApp1), + "launch_app1" => Some(KeyCode::LaunchApp2), "backslash" => Some(KeyCode::Backslash), - "calculator" => Some(KeyCode::Calculator), - "capital" => Some(KeyCode::Capital), - "colon" => Some(KeyCode::Colon), + "caps_lock" => Some(KeyCode::CapsLock), "comma" => Some(KeyCode::Comma), "convert" => Some(KeyCode::Convert), - "equals" => Some(KeyCode::Equals), - "grave" => Some(KeyCode::Grave), - "kana" => Some(KeyCode::Kana), - "kanji" => Some(KeyCode::Kanji), - "lalt" => Some(KeyCode::LAlt), - "lbracket" => Some(KeyCode::LBracket), - "lcontrol" => Some(KeyCode::LControl), - "lshift" => Some(KeyCode::LShift), - "lwin" => Some(KeyCode::LWin), - "mail" => Some(KeyCode::Mail), - "mediaselect" => Some(KeyCode::MediaSelect), - "mediastop" => Some(KeyCode::MediaStop), + "equal" => Some(KeyCode::Equal), + "grave" | "backquote" => Some(KeyCode::Backquote), + "kana_mode" => Some(KeyCode::KanaMode), + "katakana" => Some(KeyCode::Katakana), + "alt_left" => Some(KeyCode::AltLeft), + "alt_right" => Some(KeyCode::AltRight), + "bracket_left" => Some(KeyCode::BracketLeft), + "bracket_right" => Some(KeyCode::BracketRight), + "control_left" => Some(KeyCode::ControlLeft), + "control-right" => Some(KeyCode::ControlRight), + "shift_left" => Some(KeyCode::ShiftLeft), + "shift_right" => Some(KeyCode::ShiftRight), + "meta" => Some(KeyCode::Meta), + "mail" => Some(KeyCode::LaunchMail), + "media_select" => Some(KeyCode::MediaSelect), + "media_stop" => Some(KeyCode::MediaStop), + "stop" => Some(KeyCode::MediaStop), + "track_next" => Some(KeyCode::MediaTrackNext), + "track_prev" => Some(KeyCode::MediaTrackPrevious), "minus" => Some(KeyCode::Minus), - "mute" => Some(KeyCode::Mute), - "mycomputer" => Some(KeyCode::MyComputer), - "navigateforward" => Some(KeyCode::NavigateForward), - "navigatebackward" => Some(KeyCode::NavigateBackward), - "nexttrack" => Some(KeyCode::NextTrack), - "noconvert" => Some(KeyCode::NoConvert), - "oem102" => Some(KeyCode::OEM102), + "mute" => Some(KeyCode::AudioVolumeMute), + "browser_forward" => Some(KeyCode::BrowserForward), + "browser_back" => Some(KeyCode::BrowserBack), + "webfavorites" => Some(KeyCode::BrowserFavorites), + "webhome" => Some(KeyCode::BrowserHome), + "webrefresh" => Some(KeyCode::BrowserRefresh), + "websearch" => Some(KeyCode::BrowserSearch), + "webstop" => Some(KeyCode::BrowserStop), + "non_convert" => Some(KeyCode::NonConvert), "period" => Some(KeyCode::Period), - "playpause" => Some(KeyCode::PlayPause), - "plus" => Some(KeyCode::Plus), + "play_pause" => Some(KeyCode::MediaPlayPause), + "plus" => Some(KeyCode::NumpadAdd), "power" => Some(KeyCode::Power), - "prevtrack" => Some(KeyCode::PrevTrack), - "ralt" => Some(KeyCode::RAlt), - "rbracket" => Some(KeyCode::RBracket), - "rcontrol" => Some(KeyCode::RControl), - "rshift" => Some(KeyCode::RShift), - "rwin" => Some(KeyCode::RWin), "semicolon" => Some(KeyCode::Semicolon), "slash" => Some(KeyCode::Slash), "sleep" => Some(KeyCode::Sleep), - "stop" => Some(KeyCode::Stop), - "sysrq" => Some(KeyCode::Sysrq), "tab" => Some(KeyCode::Tab), - "underline" => Some(KeyCode::Underline), - "unlabeled" => Some(KeyCode::Unlabeled), - "volumedown" => Some(KeyCode::VolumeDown), - "volumeup" => Some(KeyCode::VolumeUp), - "wake" => Some(KeyCode::Wake), - "webback" => Some(KeyCode::WebBack), - "webfavorites" => Some(KeyCode::WebFavorites), - "webforward" => Some(KeyCode::WebForward), - "webhome" => Some(KeyCode::WebHome), - "webrefresh" => Some(KeyCode::WebRefresh), - "websearch" => Some(KeyCode::WebSearch), - "webstop" => Some(KeyCode::WebStop), - "yen" => Some(KeyCode::Yen), + "volume_down" => Some(KeyCode::AudioVolumeDown), + "volume_up" => Some(KeyCode::AudioVolumeUp), + "wake_up" => Some(KeyCode::WakeUp), + "yen" => Some(KeyCode::IntlYen), "copy" => Some(KeyCode::Copy), "paste" => Some(KeyCode::Paste), "cut" => Some(KeyCode::Cut), diff --git a/lyra-game/src/input/system.rs b/lyra-game/src/input/system.rs index 1ff55cc..1cacd6c 100755 --- a/lyra-game/src/input/system.rs +++ b/lyra-game/src/input/system.rs @@ -2,7 +2,7 @@ use std::ptr::NonNull; use glam::Vec2; use lyra_ecs::{World, system::IntoSystem}; -use winit::event::MouseScrollDelta; +use winit::{event::MouseScrollDelta, keyboard::PhysicalKey}; use crate::{EventQueue, plugin::Plugin, game::GameStages}; @@ -20,21 +20,14 @@ impl InputSystem { let mut event_queue = event_queue.unwrap(); match event { - InputEvent::KeyboardInput { input, .. } => { - if let Some(code) = input.virtual_keycode { + InputEvent::KeyboardInput { device_id, event, .. } => { + if let PhysicalKey::Code(code) = event.physical_key { drop(event_queue); - let mut e = world.get_resource_or_else(InputButtons::::new); + let mut e = world.get_resource_or_else(InputButtons::::new); //let mut e = with_resource_mut(world, || InputButtons::::new()); - e.add_input_from_winit(code, input.state); + e.add_input_from_winit(code, event.state); } }, - InputEvent::MouseMotion { delta, .. } => { - let delta = MouseMotion { - delta: Vec2::new(delta.0 as f32, delta.1 as f32) - }; - - event_queue.trigger_event(delta); - }, InputEvent::CursorMoved { position, .. } => { let exact = MouseExact { pos: Vec2::new(position.x as f32, position.y as f32) @@ -67,6 +60,8 @@ impl InputSystem { winit::event::MouseButton::Left => MouseButton::Left, winit::event::MouseButton::Right => MouseButton::Right, winit::event::MouseButton::Middle => MouseButton::Middle, + winit::event::MouseButton::Back => MouseButton::Back, + winit::event::MouseButton::Forward => MouseButton::Forward, winit::event::MouseButton::Other(v) => MouseButton::Other(*v), }; @@ -102,7 +97,7 @@ impl crate::ecs::system::System for InputSystem { let queue = world.try_get_resource_mut::() .and_then(|q| q.read_events::()); - let mut e = world.get_resource_or_else(InputButtons::::new); + let mut e = world.get_resource_or_else(InputButtons::::new); e.update(); drop(e); @@ -140,7 +135,7 @@ impl IntoSystem<()> for InputSystem { pub struct InputPlugin; impl Plugin for InputPlugin { - fn setup(&self, game: &mut crate::game::Game) { - game.add_system_to_stage(GameStages::PreUpdate, "input", InputSystem, &[]); + fn setup(&mut self, app: &mut crate::game::App) { + app.add_system_to_stage(GameStages::PreUpdate, "input", InputSystem, &[]); } } \ No newline at end of file diff --git a/lyra-game/src/lib.rs b/lyra-game/src/lib.rs index 83d7615..46c08a4 100644 --- a/lyra-game/src/lib.rs +++ b/lyra-game/src/lib.rs @@ -9,6 +9,7 @@ pub mod game; pub mod render; pub mod resources; pub mod input; +pub mod winit; pub mod as_any; pub mod plugin; pub mod change_tracker; diff --git a/lyra-game/src/plugin.rs b/lyra-game/src/plugin.rs index f1b8db7..9fd1a8c 100644 --- a/lyra-game/src/plugin.rs +++ b/lyra-game/src/plugin.rs @@ -1,35 +1,37 @@ use lyra_ecs::CommandQueue; use lyra_resource::ResourceManager; +use crate::game::App; +use crate::winit::WinitPlugin; use crate::EventsPlugin; use crate::DeltaTimePlugin; -use crate::game::Game; use crate::input::InputPlugin; use crate::render::window::WindowPlugin; /// A Plugin is something you can add to a `Game` that can be used to define systems, or spawn initial entities. pub trait Plugin { - /// Setup this plugin. This runs before the game has started - fn setup(&self, game: &mut Game); + /// Setup this plugin. This runs before the app has started + fn setup(&mut self, app: &mut App); - fn is_ready(&self, _game: &mut Game) -> bool { + fn is_ready(&self, app: &mut App) -> bool { + let _ = app; true } - fn complete(&self, _game: &mut Game) { - + fn complete(&self, app: &mut App) { + let _ = app; } - fn cleanup(&self, _game: &mut Game) { - + fn cleanup(&self, app: &mut App) { + let _ = app; } } impl

Plugin for P - where P: Fn(&mut Game) + where P: Fn(&mut App) { - fn setup(&self, game: &mut Game) { - self(game); + fn setup(&mut self, app: &mut App) { + self(app); } } @@ -56,9 +58,9 @@ impl PluginSet { } impl Plugin for PluginSet { - fn setup(&self, game: &mut Game) { - for plugin in self.plugins.iter() { - plugin.setup(game); + fn setup(&mut self, app: &mut App) { + for plugin in self.plugins.iter_mut() { + plugin.setup(app); } } } @@ -98,8 +100,8 @@ impl_tuple_plugin_set! { (C0, 0) (C1, 1) (C2, 2) (C3, 3) (C4, 4) (C5, 5) (C6, 6) pub struct ResourceManagerPlugin; impl Plugin for ResourceManagerPlugin { - fn setup(&self, game: &mut Game) { - game.world_mut().add_resource(ResourceManager::new()); + fn setup(&mut self, app: &mut App) { + app.world.add_resource(ResourceManager::new()); } } @@ -108,13 +110,14 @@ impl Plugin for ResourceManagerPlugin { pub struct DefaultPlugins; impl Plugin for DefaultPlugins { - fn setup(&self, game: &mut Game) { - CommandQueuePlugin.setup(game); - EventsPlugin.setup(game); - InputPlugin.setup(game); - ResourceManagerPlugin.setup(game); - WindowPlugin::default().setup(game); - DeltaTimePlugin.setup(game); + fn setup(&mut self, app: &mut App) { + WinitPlugin::default().setup(app); + CommandQueuePlugin.setup(app); + EventsPlugin.setup(app); + InputPlugin.setup(app); + ResourceManagerPlugin.setup(app); + WindowPlugin::default().setup(app); + DeltaTimePlugin.setup(app); } } @@ -124,7 +127,7 @@ impl Plugin for DefaultPlugins { pub struct CommandQueuePlugin; impl Plugin for CommandQueuePlugin { - fn setup(&self, game: &mut Game) { - game.world_mut().add_resource(CommandQueue::default()); + fn setup(&mut self, app: &mut App) { + app.world.add_resource(CommandQueue::default()); } } \ No newline at end of file diff --git a/lyra-game/src/render/graph/context.rs b/lyra-game/src/render/graph/context.rs index deee15c..2bdfc63 100644 --- a/lyra-game/src/render/graph/context.rs +++ b/lyra-game/src/render/graph/context.rs @@ -22,7 +22,7 @@ pub struct RenderGraphContext<'a> { pub device: Arc, pub queue: Arc, pub(crate) buffer_writes: VecDeque, - renderpass_desc: Vec>, + renderpass_desc: Vec>, /// The label of this Node. pub label: RenderGraphLabelValue, } @@ -41,7 +41,7 @@ impl<'a> RenderGraphContext<'a> { pub fn begin_render_pass( &'a mut self, - desc: wgpu::RenderPassDescriptor<'a, 'a>, + desc: wgpu::RenderPassDescriptor<'a>, ) -> wgpu::RenderPass { self.encoder .as_mut() diff --git a/lyra-game/src/render/graph/passes/fxaa.rs b/lyra-game/src/render/graph/passes/fxaa.rs index 6eef5bc..328385f 100644 --- a/lyra-game/src/render/graph/passes/fxaa.rs +++ b/lyra-game/src/render/graph/passes/fxaa.rs @@ -17,7 +17,7 @@ pub struct FxaaPass { /// Store bind groups for the input textures. /// The texture may change due to resizes, or changes to the view target chain /// from other nodes. - bg_cache: HashMap, + bg_cache: HashMap, wgpu::BindGroup>, } impl FxaaPass { @@ -157,10 +157,12 @@ impl Node for FxaaPass { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Load, - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, // TODO: occlusion queries }); pass.set_pipeline(pipeline.as_render()); diff --git a/lyra-game/src/render/graph/passes/light_cull_compute.rs b/lyra-game/src/render/graph/passes/light_cull_compute.rs index ba34741..0b5a81d 100644 --- a/lyra-game/src/render/graph/passes/light_cull_compute.rs +++ b/lyra-game/src/render/graph/passes/light_cull_compute.rs @@ -235,6 +235,8 @@ impl Node for LightCullComputePass { ], shader, shader_entry_point: "cs_main".into(), + cache: None, + compilation_options: Default::default(), }); self.pipeline = Some(pipeline); @@ -251,6 +253,7 @@ impl Node for LightCullComputePass { let mut pass = context.begin_compute_pass(&wgpu::ComputePassDescriptor { label: Some("light_cull_pass"), + ..Default::default() }); pass.set_pipeline(pipeline); diff --git a/lyra-game/src/render/graph/passes/mesh_prepare.rs b/lyra-game/src/render/graph/passes/mesh_prepare.rs index 9058b66..78baaf7 100644 --- a/lyra-game/src/render/graph/passes/mesh_prepare.rs +++ b/lyra-game/src/render/graph/passes/mesh_prepare.rs @@ -604,8 +604,8 @@ impl GpuMaterial { &img.to_rgba8(), wgpu::ImageDataLayout { offset: 0, - bytes_per_row: std::num::NonZeroU32::new(4 * dim.0), - rows_per_image: std::num::NonZeroU32::new(dim.1), + bytes_per_row: Some(4 * dim.0), + rows_per_image: Some(dim.1), }, wgpu::Extent3d { width: dim.0, diff --git a/lyra-game/src/render/graph/passes/meshes.rs b/lyra-game/src/render/graph/passes/meshes.rs index 6c03544..8e9c0c6 100644 --- a/lyra-game/src/render/graph/passes/meshes.rs +++ b/lyra-game/src/render/graph/passes/meshes.rs @@ -420,7 +420,7 @@ impl Node for MeshPass { b: 0.3, a: 1.0, }), - store: true, + store: wgpu::StoreOp::Store, }, })], // enable depth buffer @@ -428,10 +428,11 @@ impl Node for MeshPass { view: depth_view, depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); pass.set_pipeline(pipeline); diff --git a/lyra-game/src/render/graph/passes/shadows.rs b/lyra-game/src/render/graph/passes/shadows.rs index 0f86ccd..6c52b8b 100644 --- a/lyra-game/src/render/graph/passes/shadows.rs +++ b/lyra-game/src/render/graph/passes/shadows.rs @@ -865,10 +865,11 @@ impl Node for ShadowMapsPass { view: atlas.view(), depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); for light_depth_map in self.depth_maps.values() { diff --git a/lyra-game/src/render/graph/passes/tint.rs b/lyra-game/src/render/graph/passes/tint.rs index 1b05f43..28ab231 100644 --- a/lyra-game/src/render/graph/passes/tint.rs +++ b/lyra-game/src/render/graph/passes/tint.rs @@ -17,7 +17,7 @@ pub struct TintPass { /// Store bind groups for the input textures. /// The texture may change due to resizes, or changes to the view target chain /// from other nodes. - bg_cache: HashMap, + bg_cache: HashMap, wgpu::BindGroup>, } impl TintPass { @@ -152,10 +152,12 @@ impl Node for TintPass { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Load, - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); pass.set_pipeline(pipeline.as_render()); diff --git a/lyra-game/src/render/graph/render_target.rs b/lyra-game/src/render/graph/render_target.rs index a125e5d..fb37291 100644 --- a/lyra-game/src/render/graph/render_target.rs +++ b/lyra-game/src/render/graph/render_target.rs @@ -6,10 +6,19 @@ use crate::math; enum RenderTargetInner { Surface { - surface: wgpu::Surface, + /// The surface that will be rendered to. + /// + /// You can create a new surface with a `'static` lifetime if you have an `Arc`: + /// ```nobuild + /// let window = Arc::new(window); + /// let surface = instance.create_surface(Arc::clone(&window))?; + /// ``` + surface: wgpu::Surface<'static>, + /// the configuration of the surface render target.. config: wgpu::SurfaceConfiguration, }, Texture { + /// The texture that will be rendered to. texture: Arc, } } @@ -25,7 +34,7 @@ impl From for RenderTarget { } impl RenderTarget { - pub fn from_surface(surface: wgpu::Surface, config: wgpu::SurfaceConfiguration) -> Self { + pub fn from_surface(surface: wgpu::Surface<'static>, config: wgpu::SurfaceConfiguration) -> Self { Self(RenderTargetInner::Surface { surface, config }) } diff --git a/lyra-game/src/render/graph/slot_desc.rs b/lyra-game/src/render/graph/slot_desc.rs index 5c56eab..aa25d20 100644 --- a/lyra-game/src/render/graph/slot_desc.rs +++ b/lyra-game/src/render/graph/slot_desc.rs @@ -1,4 +1,4 @@ -use std::{mem, num::{NonZeroU32, NonZeroU8}}; +use std::mem; #[derive(Clone, Debug, Eq, PartialEq)] pub struct TextureViewDescriptor { @@ -16,13 +16,13 @@ pub struct TextureViewDescriptor { /// Mip level count. /// If `Some(count)`, `base_mip_level + count` must be less or equal to underlying texture mip count. /// If `None`, considered to include the rest of the mipmap levels, but at least 1 in total. - pub mip_level_count: Option, + pub mip_level_count: Option, /// Base array layer. pub base_array_layer: u32, /// Layer count. /// If `Some(count)`, `base_array_layer + count` must be less or equal to the underlying array count. /// If `None`, considered to include the rest of the array layers, but at least 1 in total. - pub array_layer_count: Option, + pub array_layer_count: Option, } impl TextureViewDescriptor { @@ -79,7 +79,7 @@ pub struct SamplerDescriptor { /// If this is enabled, this is a comparison sampler using the given comparison function. pub compare: Option, /// Valid values: 1, 2, 4, 8, and 16. - pub anisotropy_clamp: Option, + pub anisotropy_clamp: u16, /// Border color to use when address_mode is [`AddressMode::ClampToBorder`] pub border_color: Option, } diff --git a/lyra-game/src/render/renderer.rs b/lyra-game/src/render/renderer.rs index 592f541..3b0dc82 100755 --- a/lyra-game/src/render/renderer.rs +++ b/lyra-game/src/render/renderer.rs @@ -75,10 +75,11 @@ impl BasicRenderer { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends: wgpu::Backends::all(), dx12_shader_compiler: Default::default(), + flags: wgpu::InstanceFlags::default(), + gles_minor_version: wgpu::Gles3MinorVersion::Automatic, }); - // This should be safe since surface will live as long as the window that created it - let surface = unsafe { instance.create_surface(window.as_ref()) }.unwrap(); + let surface: wgpu::Surface::<'static> = instance.create_surface(window.clone()).unwrap(); let adapter = instance.request_adapter( &wgpu::RequestAdapterOptions { @@ -90,11 +91,12 @@ impl BasicRenderer { let (device, queue) = adapter.request_device( &wgpu::DeviceDescriptor { - features: wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | wgpu::Features::ADDRESS_MODE_CLAMP_TO_BORDER, + label: None, + required_features: wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | wgpu::Features::ADDRESS_MODE_CLAMP_TO_BORDER, // WebGL does not support all wgpu features. // Not sure if the engine will ever completely support WASM, // but its here just in case - limits: if cfg!(target_arch = "wasm32") { + required_limits: if cfg!(target_arch = "wasm32") { wgpu::Limits::downlevel_webgl2_defaults() } else { wgpu::Limits { @@ -102,7 +104,7 @@ impl BasicRenderer { ..Default::default() } }, - label: None, + memory_hints: wgpu::MemoryHints::MemoryUsage, }, None, ).await.unwrap(); @@ -113,7 +115,7 @@ impl BasicRenderer { let surface_format = surface_caps.formats.iter() .copied() - .find(|f| f.describe().srgb) + .find(|f| f.is_srgb()) .unwrap_or(surface_caps.formats[0]); let config = wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_DST, @@ -122,6 +124,7 @@ impl BasicRenderer { height: size.height, present_mode: wgpu::PresentMode::default(), //wgpu::PresentMode::Mailbox, // "Fast Vsync" alpha_mode: surface_caps.alpha_modes[0], + desired_maximum_frame_latency: 2, view_formats: vec![], }; surface.configure(&device, &config); diff --git a/lyra-game/src/render/resource/compute_pipeline.rs b/lyra-game/src/render/resource/compute_pipeline.rs index 8145ab0..d08949f 100644 --- a/lyra-game/src/render/resource/compute_pipeline.rs +++ b/lyra-game/src/render/resource/compute_pipeline.rs @@ -2,19 +2,25 @@ use std::{ops::Deref, rc::Rc, sync::Arc}; use wgpu::PipelineLayout; -use super::Shader; +use super::{PipelineCompilationOptions, Shader}; //#[derive(Debug, Clone)] pub struct ComputePipelineDescriptor { pub label: Option, pub layouts: Vec>, - pub push_constant_ranges: Vec, // TODO: make this a ResHandle /// The compiled shader module for the stage. pub shader: Rc, /// The entry point in the compiled shader. /// There must be a function in the shader with the same name. pub shader_entry_point: String, + /// Advanced options for when this pipeline is compiled + /// + /// This implements `Default`, and for most users can be set to `Default::default()` + pub compilation_options: PipelineCompilationOptions, + pub push_constant_ranges: Vec, + /// The pipeline cache to use when creating this pipeline. + pub cache: Option>, } impl ComputePipelineDescriptor { @@ -28,7 +34,7 @@ impl ComputePipelineDescriptor { device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: None, //self.label.as_ref().map(|s| format!("{}Layout", s)), - bind_group_layouts: &bgs, + bind_group_layouts: &bgs, push_constant_ranges: &self.push_constant_ranges, }) } @@ -85,6 +91,8 @@ impl ComputePipeline { layout: layout.as_ref(), module: &compiled_shader, entry_point: &desc.shader_entry_point, + cache: desc.cache.as_ref().map(|c| &**c), + compilation_options: desc.compilation_options.as_wgpu(), }; let pipeline = device.create_compute_pipeline(&desc); diff --git a/lyra-game/src/render/resource/mod.rs b/lyra-game/src/render/resource/mod.rs index 68adfe2..cbc1144 100644 --- a/lyra-game/src/render/resource/mod.rs +++ b/lyra-game/src/render/resource/mod.rs @@ -1,4 +1,6 @@ mod shader; +use std::collections::HashMap; + pub use shader::*; mod pipeline; @@ -11,4 +13,21 @@ mod render_pipeline; pub use render_pipeline::*; mod pass; -pub use pass::*; \ No newline at end of file +pub use pass::*; + +#[derive(Default, Clone)] +pub struct PipelineCompilationOptions { + pub constants: HashMap, + pub zero_initialize_workgroup_memory: bool, + pub vertex_pulling_transform: bool, +} + +impl PipelineCompilationOptions { + pub fn as_wgpu(&self) -> wgpu::PipelineCompilationOptions { + wgpu::PipelineCompilationOptions { + constants: &self.constants, + zero_initialize_workgroup_memory: self.zero_initialize_workgroup_memory, + vertex_pulling_transform: self.vertex_pulling_transform, + } + } +} \ No newline at end of file diff --git a/lyra-game/src/render/resource/render_pipeline.rs b/lyra-game/src/render/resource/render_pipeline.rs index c149b09..efe0cef 100755 --- a/lyra-game/src/render/resource/render_pipeline.rs +++ b/lyra-game/src/render/resource/render_pipeline.rs @@ -97,6 +97,7 @@ impl RenderPipeline { module: &vrtx_shad, entry_point: &desc.vertex.entry_point, buffers: &vrtx_buffs, + compilation_options: Default::default(), }; let frag_module = desc.fragment.as_ref().map(|f| { @@ -115,6 +116,7 @@ impl RenderPipeline { module: fm.unwrap(), entry_point: &f.entry_point, targets: &f.targets, + compilation_options: Default::default(), }); let render_desc = wgpu::RenderPipelineDescriptor { @@ -126,6 +128,7 @@ impl RenderPipeline { multisample: desc.multisample, fragment: fstate, multiview: desc.multiview, + cache: None, }; let render_pipeline = device.create_render_pipeline(&render_desc); diff --git a/lyra-game/src/render/shaders/light_cull.comp.wgsl b/lyra-game/src/render/shaders/light_cull.comp.wgsl index 7897095..b77aa71 100644 --- a/lyra-game/src/render/shaders/light_cull.comp.wgsl +++ b/lyra-game/src/render/shaders/light_cull.comp.wgsl @@ -5,9 +5,9 @@ const LIGHT_TY_DIRECTIONAL = 0u; const LIGHT_TY_POINT = 1u; const LIGHT_TY_SPOT = 2u; -type vec2f = vec2; -type vec3f = vec3; -type vec4f = vec4; +alias vec2f = vec2; +alias vec3f = vec3; +alias vec4f = vec4; struct CameraUniform { view: mat4x4, @@ -317,8 +317,8 @@ fn cone_inside_plane(cone: Cone, plane: Plane) -> bool { return point_inside_plane(cone.tip, plane) && point_inside_plane(furthest, plane); } -fn cone_inside_frustum(cone: Cone, frustum: array) -> bool { - var frustum = frustum; +fn cone_inside_frustum(cone: Cone, frustum_in: array) -> bool { + var frustum = frustum_in; for (var i = 0u; i < 4u; i++) { // TODO: better cone checking if (sphere_inside_plane(cone.tip, cone.radius, frustum[i])) { diff --git a/lyra-game/src/render/texture.rs b/lyra-game/src/render/texture.rs index 716b566..c0858cb 100755 --- a/lyra-game/src/render/texture.rs +++ b/lyra-game/src/render/texture.rs @@ -105,8 +105,8 @@ impl RenderTexture { &rgba, wgpu::ImageDataLayout { offset: 0, - bytes_per_row: std::num::NonZeroU32::new(4 * dimensions.0), - rows_per_image: std::num::NonZeroU32::new(dimensions.1), + bytes_per_row: Some(4 * dimensions.0), + rows_per_image: Some(dimensions.1), }, size, ); @@ -169,8 +169,8 @@ impl RenderTexture { &rgba, wgpu::ImageDataLayout { offset: 0, - bytes_per_row: std::num::NonZeroU32::new(4 * dimensions.0), - rows_per_image: std::num::NonZeroU32::new(dimensions.1), + bytes_per_row: Some(4 * dimensions.0), + rows_per_image: Some(dimensions.1), }, size, ); @@ -247,8 +247,8 @@ impl RenderTexture { &rgba, wgpu::ImageDataLayout { offset: 0, - bytes_per_row: std::num::NonZeroU32::new(4 * dimensions.0), - rows_per_image: std::num::NonZeroU32::new(dimensions.1), + bytes_per_row: Some(4 * dimensions.0), + rows_per_image: Some(dimensions.1), }, size, ); diff --git a/lyra-game/src/render/window.rs b/lyra-game/src/render/window.rs index d7c9696..d1e7a15 100644 --- a/lyra-game/src/render/window.rs +++ b/lyra-game/src/render/window.rs @@ -1,213 +1,506 @@ -use std::sync::Arc; +use std::ops::{Deref, DerefMut}; -use glam::{Vec2, IVec2}; -use lyra_ecs::World; -use tracing::{warn, error}; -use winit::{window::{Window, Fullscreen}, dpi::{LogicalPosition, LogicalSize, PhysicalPosition}, error::ExternalError}; +use lyra_ecs::{query::{filter::Changed, Entities, ResMut}, Component, World}; +use lyra_resource::Image; +use tracing::error; +use winit::window::{CustomCursor, Fullscreen, Window}; pub use winit::window::{CursorGrabMode, CursorIcon, Icon, Theme, WindowButtons, WindowLevel}; -use crate::{plugin::Plugin, change_tracker::Ct, input::InputEvent, EventQueue}; +use crate::{change_tracker::Ct, plugin::Plugin, winit::WinitWindows}; -#[derive(Default, Clone)] -pub enum WindowMode { - /// The window will use the full size of the screen. - Fullscreen, - /// The window will be fullscreen with the full size of the screen without a border. - Borderless, - /// The window will not be fullscreen and will use the windows resolution size. - #[default] - Windowed, +#[derive(Default, Clone, Copy, PartialEq)] +pub struct Area { + position: Position, + size: Size, +} + +#[derive(Clone, Copy, PartialEq)] +pub enum Size { + Physical { x: u32, y: u32 }, + Logical { x: f64, y: f64 }, +} + +impl Default for Size { + fn default() -> Self { + Self::Physical { x: 0, y: 0 } + } +} + +impl Into for Size { + fn into(self) -> winit::dpi::Size { + match self { + Size::Physical { x, y } => winit::dpi::PhysicalSize::new(x, y).into(), + Size::Logical { x, y } => winit::dpi::LogicalSize::new(x, y).into(), + } + } +} + +impl From for Size { + fn from(value: winit::dpi::Size) -> Self { + match value { + winit::dpi::Size::Physical(physical_position) => Self::new_physical(physical_position.width, physical_position.height), + winit::dpi::Size::Logical(logical_position) => Self::new_logical(logical_position.width, logical_position.height), + } + } +} + + +impl Size { + pub fn new_physical(x: u32, y: u32) -> Self { + Self::Physical { x, y } + } + + pub fn new_logical(x: f64, y: f64) -> Self { + Self::Logical { x, y } + } +} + +#[derive(Clone, Copy, PartialEq)] +pub enum Position { + Physical { x: i32, y: i32 }, + Logical { x: f64, y: f64 }, +} + +impl Default for Position { + fn default() -> Self { + Self::Physical { x: 0, y: 0 } + } +} + +impl Into for Position { + fn into(self) -> winit::dpi::Position { + match self { + Position::Physical { x, y } => winit::dpi::PhysicalPosition::new(x, y).into(), + Position::Logical { x, y } => winit::dpi::LogicalPosition::new(x, y).into(), + } + } +} + +impl From for Position { + fn from(value: winit::dpi::Position) -> Self { + match value { + winit::dpi::Position::Physical(physical_position) => Self::new_physical(physical_position.x, physical_position.y), + winit::dpi::Position::Logical(logical_position) => Self::new_logical(logical_position.x, logical_position.y), + } + } +} + +impl Position { + pub fn new_physical(x: i32, y: i32) -> Self { + Self::Physical { x, y } + } + + pub fn new_logical(x: f64, y: f64) -> Self { + Self::Logical { x, y } + } +} + +/// Flag component that +#[derive(Clone, Component)] +pub struct PrimaryWindow; + +#[derive(Clone, PartialEq, Eq)] +pub enum CursorAppearance { + Icon(CursorIcon), + Custom(CustomCursor) +} + +#[derive(Clone)] +pub struct Cursor { + /// Modifies the cursor icon of the window. + /// + /// Platform-specific + /// * **iOS / Android / Orbital:** Unsupported. + /// * **Web:** Custom cursors have to be loaded and decoded first, until then the previous cursor is shown. + appearance: CursorAppearance, + + /// Gets/sets the window's cursor grab mode + /// + /// # Tip: + /// First try confining the cursor, and if it fails, try locking it instead. + grab: CursorGrabMode, + + /// Gets/sets whether the window catches cursor events. + /// + /// If `false`, events are passed through the window such that any other window behind it + /// receives them. By default hittest is enabled. + /// + /// Platform-specific + /// * **iOS / Android / Web / Orbital:** Unsupported. + hittest: bool, + + /// Gets/sets the cursor's visibility + /// + /// Platform-specific + /// * **Windows / X11 / Wayland:** The cursor is only hidden within the confines of the window. + /// * **macOS:** The cursor is hidden as long as the window has input focus, even if the + /// cursor is outside of the window. + /// * **iOS / Android:** Unsupported. + visible: bool, + //cursor_position: Option>, } /// Options that the window will be created with. -#[derive(Clone)] +#[derive(Clone, Component)] pub struct WindowOptions { - /// Prevents the window contents from being captured by other apps. - /// - /// Platform-specific: - /// * macOS: if false, NSWindowSharingNone is used but doesn’t completely prevent all apps - /// from reading the window content, for instance, QuickTime. - /// * iOS / Android / x11 / Wayland / Web / Orbital: Unsupported. - pub content_protected: bool, - - /// Set grabbing mode on the cursor preventing it from leaving the window. - pub cursor_grab: CursorGrabMode, - - /// Modifies whether the window catches cursor events. - - /// If true, the window will catch the cursor events. If false, events are passed through - /// the window such that any otherwindow behind it receives them. By default hittest is enabled. - /// - /// Platform-specific: - /// * iOS / Android / Web / X11 / Orbital: Unsupported. - pub cursor_hittest: bool, - - /// The cursor icon of the window. - /// + /// The enabled window buttons. + /// /// Platform-specific - /// * iOS / Android / Orbital: Unsupported. - pub cursor_icon: CursorIcon, - - /// The cursor’s visibility. - /// If false, this will hide the cursor. If true, this will show the cursor. - /// - /// Platform-specific: - /// * Windows: The cursor is only hidden within the confines of the window. - /// * X11: The cursor is only hidden within the confines of the window. - /// * Wayland: The cursor is only hidden within the confines of the window. - /// * macOS: The cursor is hidden as long as the window has input focus, even if - /// the cursor is outside of the window. - /// * iOS / Android / Orbital: Unsupported. - pub cursor_visible: bool, - - /// Turn window decorations on or off. - /// Enable/disable window decorations provided by the server or Winit. By default this is enabled. - /// - /// Platform-specific - /// * iOS / Android / Web: No effect. - pub decorations: bool, - - /// Sets the enabled window buttons. - /// - /// Platform-specific: - /// * Wayland / X11 / Orbital: Not implemented. - /// * Web / iOS / Android: Unsupported. + /// * **Wayland / X11 / Orbital:** Not implemented. Always set to [`WindowButtons::all`]. + /// * **Web / iOS / Android:** Unsupported. Always set to [`WindowButtons::all`]. pub enabled_buttons: WindowButtons, - - /// The window mode. Can be used to set fullscreen and borderless. - pub mode: WindowMode, - - /// Sets whether the window should get IME events. - /// - /// If its allowed, the window will receive Ime events instead of KeyboardInput events. - /// This should only be allowed if the window is expecting text input. - /// - /// Platform-specific: - /// * iOS / Android / Web / Orbital: Unsupported. - pub ime_allowed: bool, - - /// Sets location of IME candidate box in client area coordinates relative to the top left. - /// - /// This is the window / popup / overlay that allows you to select the desired characters. - /// The look of this box may differ between input devices, even on the same platform. - pub ime_position: Vec2, - - /// Modifies the inner size of the window. - /// - /// Platform-specific: - /// * iOS / Android: Unsupported. - /// * Web: Sets the size of the canvas element. - pub inner_size: IVec2, - - /// Sets a maximum dimension size for the window. - /// - /// Platform-specific: - /// * iOS / Android / Web / Orbital: Unsupported. - pub max_inner_size: Option, - - /// Sets a minimum dimension size for the window. - /// - /// Platform-specific: - /// * iOS / Android / Web / Orbital: Unsupported. - pub min_inner_size: Option, - - /// Sets the window to maximized or back. - /// - /// Platform-specific: - /// * iOS / Android / Web / Orbital: Unsupported. - pub maximized: bool, - - /// Sets the window to minimized or back. - /// - /// Platform-specific: - /// * iOS / Android / Web / Orbital: Unsupported. - pub minimized: bool, - - /// Modifies the position of the window. - /// - /// Platform-specific: - /// * Web: Sets the top-left coordinates relative to the viewport. - /// * Android / Wayland: Unsupported. - //pub outer_position: Vec2, - - /// Sets whether the window is resizable or not. - /// - /// Platform-specific: - /// * X11: Due to a bug in XFCE, this has no effect on Xfwm. - /// * iOS / Android / Web: Unsupported. - pub resizeable: bool, - - /// Sets window resize increments. - /// This is a niche constraint hint usually employed by terminal emulators and other apps that need “blocky” resizes. - /// - /// Platform-specific: - /// * Wayland / Windows: Not implemented. - /// * iOS / Android / Web / Orbital: Unsupported. - pub resize_increments: Option, - - /// Sets the current window theme. Use None to fallback to system default. - /// - /// Platform-specific: - /// * macOS: This is an app-wide setting. - /// * x11: If None is used, it will default to Theme::Dark. - /// * iOS / Android / Web / x11 / Orbital: Unsupported. - pub theme: Option, - - /// Modifies the title of the window. - /// - /// Platform-specific: - /// * iOS / Android: Unsupported. - pub title: String, - - /// Sets the window icon. - /// On Windows and X11, this is typically the small icon in the top-left corner of the titlebar. - /// + + /// Gets or sets if the window is in focus. + /// /// Platform-specific - /// * iOS / Android / Web / Wayland / macOS / Orbital: Unsupported. - /// * Windows: Sets ICON_SMALL. The base size for a window icon is 16x16, but it’s recommended to account for screen scaling and pick a multiple of that, i.e. 32x32. - /// * X11: Has no universal guidelines for icon sizes, so you’re at the whims of the WM. That said, it’s usually in the same ballpark as on Windows. - pub icon: Option, - - /// Change the window level. - /// This is just a hint to the OS, and the system could ignore it. - pub level: WindowLevel, - - /// Get/set the window's focused state. + /// * **iOS / Android / Wayland / Orbital:** Unsupported. pub focused: bool, - /// Get whether or not the cursor is inside the window. - pub cursor_inside_window: bool, + /// Gets or sets the fullscreen setting. + /// + /// If this is `None`, the window is windowed. + /// + /// Platform-specific + /// * **iOS:** Can only be called on the main thread. + /// * **Android / Orbital:** Will always return None. + /// * **Wayland:** Can return Borderless(None) when there are no monitors. + /// * **Web:** Can only return None or Borderless(None). + pub fullscreen: Option, + + /// Gets the position of the top-left hand corner of the window’s client area relative to + /// the top-left hand corner of the desktop. + /// + /// Note that the top-left hand corner of the desktop is not necessarily the same + /// as the screen. If the user uses a desktop with multiple monitors, the top-left + /// hand corner of the desktop is the top-left hand corner of the monitor at the + /// top-left of the desktop. + /// + /// If this is none, the position will be chosen by the windowing manager at creation, then set + /// when the window is created. + /// + /// Platform-specific + /// * **iOS:** Value is the top left coordinates of the window’s safe area in the screen + /// space coordinate system. + /// * **Web:** Value is the top-left coordinates relative to the viewport. Note: this will be + /// the same value as [`WindowOptions::outer_position`]. + /// * **Android / Wayland:** Unsupported. + pub inner_position: Option, + + /// Gets/sets the size of the view in the window. + /// + /// The size does not include the window title bars and borders. + /// + /// Platform-specific + /// * **Web:** The size of the canvas element. Doesn’t account for CSS `transform`. + pub size: Size, + + /// Gets/sets if the window has decorations. + /// + /// Platform-specific + /// * **iOS / Android / Web:** Always set to `true`. + pub decorated: bool, + + /// Gets/sets the window's current maximized state + /// + /// Platform-specific + /// * **iOS / Android / Web:** Unsupported. + pub maximized: bool, + + /// Gets/sets the window's current minimized state. + /// + /// Is `None` if the minimized state could not be determined. + /// + /// Platform-specific + /// * **Wayland:** always `None`, un-minimize is unsupported. + /// * **iOS / Android / Web / Orbital:** Unsupported. + pub minimized: Option, + + /// Gets/sets the window's current resizable state + /// + /// If this is false, the window can still be resized by changing [`WindowOptions::size`]. + /// + /// Platform-specific + /// Setting this only has an affect on desktop platforms. + /// + /// * **X11:** Due to a bug in XFCE, setting this has no effect.. + /// * **iOS / Android / Web:** Unsupported. + pub resizable: bool, + + /// Gets/sets the window's current visibility state. + /// + /// `None` means it couldn't be determined. + /// + /// Platform-specific + /// * **X11:** Not implemented. + /// * **Wayland / Android / Web:** Unsupported. + /// * **iOS:** Setting is not implemented, getting is unsupported. + pub visible: Option, + + /// Gets/sets the position of the top-left hand corner of the window relative to + /// the top-left hand corner of the desktop. + /// + /// Note that the top-left hand corner of the desktop is not necessarily the same + /// as the screen. If the user uses a desktop with multiple monitors, the top-left + /// hand corner of the desktop is the top-left hand corner of the monitor at the + /// top-left of the desktop. + /// + /// If this is none, the position will be chosen by the windowing manager at creation, then set + /// when the window is created. + /// + /// Platform-specific + /// * **iOS:** Value is the top left coordinates of the window’s safe area in the screen + /// space coordinate system. + /// * **Web:** Value is the top-left coordinates relative to the viewport. + /// * **Android / Wayland:** Unsupported. + pub outer_position: Option, + + /// Gets/sets the window resize increments. + /// + /// This is a niche constraint hint usually employed by terminal emulators and other apps + /// that need “blocky” resizes. + /// + /// Platform-specific + /// * **macOS:** Increments are converted to logical size and then macOS rounds them to whole numbers. + /// * **Wayland:** Not implemented, always `None`. + /// * **iOS / Android / Web / Orbital:** Unsupported. + pub resize_increments: Option, + + /// Gets the scale factor. + /// + /// The scale factor is the ratio of physical pixels to logical pixels. + /// See [winit docs](https://docs.rs/winit/latest/winit/window/struct.Window.html#method.scale_factor) + /// for more information. + pub scale_factor: f64, + + /// Gets/sets the window's blur state. + /// + /// Platform-specific + /// * **Android / iOS / X11 / Web / Windows:** Unsupported. + /// * **Wayland:** Only works with org_kde_kwin_blur_manager protocol. + pub blur: bool, + + /// Prevents the window contents from being captured by other apps. + /// + /// Platform-specific + /// * **macOS:** if false, [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindowsharingtype/nswindowsharingnone) + /// is used but doesn’t completely prevent all apps from reading the window content, + /// for instance, QuickTime. + /// * **iOS / Android / x11 / Wayland / Web / Orbital:** Unsupported. + pub content_protected: bool, + + pub cursor: Cursor, + + /// Sets whether the window should get IME events + /// + /// When IME is allowed, the window will receive [`Ime`](winit::event::WindowEvent::Ime) + /// events, and during the preedit phase the window will NOT get KeyboardInput events. + /// The window should allow IME while it is expecting text input. + /// + /// When IME is not allowed, the window won’t receive [`Ime`](winit::event::WindowEvent::Ime) + /// events, and will receive [`KeyboardInput`](winit::event::WindowEvent::KeyboardInput) events + /// for every keypress instead. Not allowing IME is useful for games for example. + /// IME is not allowed by default. + /// + /// Platform-specific + /// * **macOS:** IME must be enabled to receive text-input where dead-key sequences are combined. + /// * **iOS / Android / Web / Orbital:** Unsupported. + /// * **X11:** Enabling IME will disable dead keys reporting during compose. + pub ime_allowed: bool, + + /// Sets area of IME candidate box in window client area coordinates relative to the top left. + /// + /// Platform-specific + /// * **X11:** - area is not supported, only position. + /// * **iOS / Android / Web / Orbital:** Unsupported. + pub ime_cursor_area: Option, + + /// Gets/sets the minimum size of the window. + /// + /// Platform-specific + /// * **iOS / Android / Orbital:** Unsupported. + pub min_size: Option, + + /// Gets/sets the maximum size of the window. + /// + /// Platform-specific + /// * **iOS / Android / Orbital:** Unsupported. + pub max_size: Option, + + /// Gets/sets the current window theme. + /// + /// Specify `None` to reset the theme to the system default. May also be `None` on unsupported + /// platforms. + /// + /// Platform-specific + /// * **Wayland:** Sets the theme for the client side decorations. Using `None` will use dbus + /// to get the system preference. + /// * **X11:** Sets `_GTK_THEME_VARIANT` hint to `dark` or `light` and if `None` is used, + /// it will default to [`Theme::Dark`](winit::window::Theme::Dark). + /// * **iOS / Android / Web / Orbital:** Unsupported. + pub theme: Option, + + /// Gets/sets the title of the window. + /// + /// Platform-specific + /// * **iOS / Android:** Unsupported. + /// * **X11 / Wayland / Web:** Cannot get, will always be an empty string. + pub title: String, + + /// Gets/sets the window's transparency state. + /// + /// This is just a hint that may not change anything about the window transparency, however + /// doing a mismatch between the content of your window and this hint may result in visual + /// artifacts. + /// + /// Platform-specific + /// * **macOS:** This will reset the window’s background color. + /// * **Web / iOS / Android:** Unsupported. + /// * **X11:** Can only be set while building the window. + pub transparent: bool, + + /// Sets the window's icon. + /// + /// On Windows and X11, this is typically the small icon in the top-left corner of + /// the titlebar. + /// + /// Platform-specific + /// * **iOS / Android / Web / Wayland / macOS / Orbital:** Unsupported. + /// * **Windows:** Sets `ICON_SMALL`. The base size for a window icon is 16x16, but it’s + /// recommended to account for screen scaling and pick a multiple of that, i.e. 32x32. + /// * **X11:** Has no universal guidelines for icon sizes, so you’re at the whims of + /// the WM. That said, it’s usually in the same ballpark as on Windows. + pub window_icon: Option>, + + /// Change the window level. + /// + /// This is just a hint to the OS, and the system could ignore it. + /// + /// See [`WindowLevel`] for details. + pub window_level: WindowLevel, + + /// Show [window menu](https://en.wikipedia.org/wiki/Common_menus_in_Microsoft_Windows#System_menu) + /// at a specified position. + /// + /// This is the context menu that is normally shown when interacting with the title bar. This is useful when implementing custom decorations. + /// Platform-specific + /// * **Android / iOS / macOS / Orbital / Wayland / Web / X11:** Unsupported. + pub show_window_menu: Option, + + /// Gets the window's occluded state (completely hidden from view). + /// + /// This is different to window visibility as it depends on whether the window is + /// closed, minimised, set invisible, or fully occluded by another window. + /// + /// Platform-specific + /// * **iOS:** this is set to `false` in response to an applicationWillEnterForeground + /// callback which means the application should start preparing its data. + /// Its `true` in response to an applicationDidEnterBackground callback which means + /// the application should free resources (according to the iOS application lifecycle). + /// * **Web:** Doesn't take into account CSS border, padding, or transform. + /// * **Android / Wayland / Windows / Orbital:** Unsupported. + pub occluded: bool, +} + +impl From for WindowOptions { + fn from(value: winit::window::WindowAttributes) -> Self { + Self { + enabled_buttons: value.enabled_buttons, + focused: false, + fullscreen: value.fullscreen, + inner_position: None, + size: value.inner_size.map(|s| s.into()) + .unwrap_or(Size::new_physical(1280, 720)), + decorated: value.decorations, + maximized: value.maximized, + minimized: None, + resizable: value.resizable, + visible: Some(value.visible), + outer_position: value.position.map(|p| p.into()), + resize_increments: value.resize_increments.map(|r| r.into()), + scale_factor: 1.0, + blur: value.blur, + content_protected: value.content_protected, + cursor: Cursor { + appearance: match value.cursor { + winit::window::Cursor::Icon(icon) => CursorAppearance::Icon(icon), + winit::window::Cursor::Custom(custom) => CursorAppearance::Custom(custom), + }, + grab: CursorGrabMode::None, + hittest: true, + visible: true, + }, + ime_allowed: false, + ime_cursor_area: None, + min_size: value.min_inner_size.map(|m| m.into()), + max_size: value.max_inner_size.map(|m| m.into()), + theme: value.preferred_theme, + title: value.title, + transparent: value.transparent, + window_icon: None, + window_level: value.window_level, + show_window_menu: None, + occluded: false, + } + } } impl Default for WindowOptions { fn default() -> Self { - Self { - content_protected: false, - cursor_grab: CursorGrabMode::None, - cursor_hittest: true, - cursor_icon: CursorIcon::Default, - cursor_visible: true, - decorations: true, - enabled_buttons: WindowButtons::all(), - mode: WindowMode::Windowed, - ime_allowed: false, - ime_position: Default::default(), - inner_size: glam::i32::IVec2::new(800, 600), - max_inner_size: None, - min_inner_size: None, - maximized: false, - minimized: false, - //outer_position: Default::default(), - resizeable: false, - resize_increments: None, - theme: None, - title: "Lyra Engine Game".to_string(), - icon: None, - level: WindowLevel::Normal, - focused: false, - cursor_inside_window: false, + Self::from(Window::default_attributes()) + } +} + +impl WindowOptions { + /// Create winit [`WindowAttributes`] from self. + pub(crate) fn as_attributes(&self) -> winit::window::WindowAttributes { + let mut att = winit::window::Window::default_attributes(); + + att.enabled_buttons = self.enabled_buttons.clone(); + att.fullscreen = self.fullscreen.clone(); + att.inner_size = Some(self.size.into()); + att.decorations = self.decorated; + att.maximized = self.maximized; + att.resizable = self.resizable; + att.visible = self.visible.unwrap_or(true); + att.position = self.outer_position.map(|p| p.into()); + att.resize_increments = self.resize_increments.map(|i| i.into()); + att.blur = self.blur; + att.content_protected = self.content_protected; + att.cursor = match self.cursor.appearance.clone() { + CursorAppearance::Icon(icon) => winit::window::Cursor::Icon(icon), + CursorAppearance::Custom(custom) => winit::window::Cursor::Custom(custom), + }; + att.min_inner_size = self.min_size.map(|s| s.into()); + att.max_inner_size = self.max_size.map(|s| s.into()); + att.preferred_theme = self.theme; + att.title = self.title.clone(); + att.transparent = self.transparent; + if self.window_icon.is_some() { + todo!("cannot set window attribute icon yet"); } + att.window_level = self.window_level; + + att + } +} + +#[derive(Clone, Component)] +struct LastWindow { + last: WindowOptions, +} + +impl Deref for LastWindow { + type Target = WindowOptions; + + fn deref(&self) -> &Self::Target { + &self.last + } +} + +impl DerefMut for LastWindow { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.last } } @@ -217,163 +510,143 @@ pub struct WindowPlugin { create_options: WindowOptions, } -/// Convert an Vec2 to a LogicalPosition -fn vec2_to_logical_pos(pos: Vec2) -> LogicalPosition { - LogicalPosition { x: pos.x, y: pos.y } -} +/// A system that syncs Winit Windows with [`WindowOptions`] components. +pub fn window_sync_system(world: &mut World) -> anyhow::Result<()> { + for (entity, opts, mut last, windows) in world.filtered_view_iter::<(Entities, &WindowOptions, &mut LastWindow, ResMut), Changed>() { + let window = windows.get_entity_window(entity) + .expect("entity's window is missing"); -/// Convert an IVec2 to a LogicalSize -fn ivec2_to_logical_size(size: IVec2) -> LogicalSize { - LogicalSize { width: size.x, height: size.y } -} - -/// Convert an Option to an Option> -fn ivec2_to_logical_size_op(size: Option) -> Option> { - size.map(ivec2_to_logical_size) -} - -/// Convert an Option to an Option> -fn vec2_to_logical_size_op(size: Option) -> Option> { - size.map(|size| LogicalSize { width: size.x, height: size.y } ) -} - -/// Set the cursor grab of a window depending on the platform. -/// This will also modify the parameter `grab` to ensure it matches what the platform can support -fn set_cursor_grab(window: &Window, grab: &mut CursorGrabMode) -> anyhow::Result<()> { - if *grab != CursorGrabMode::None { - if cfg!(unix) { - *grab = CursorGrabMode::Confined; - // TODO: Find a way to see if winit is using x11 or wayland. wayland supports Locked - } else if cfg!(wasm) { - *grab = CursorGrabMode::Locked; - } else if cfg!(windows) { - *grab = CursorGrabMode::Confined; // NOTE: May support Locked later - } else if cfg!(target_os = "macos") { - *grab = CursorGrabMode::Locked; // NOTE: May support Confined later - } else if cfg!(any(target_os = "android", target_os = "ios", target_os = "orbital")) { - warn!("CursorGrabMode is not supported on Android, IOS, or Oribital, skipping"); - return Ok(()) + if opts.enabled_buttons != last.enabled_buttons { + window.set_enabled_buttons(opts.enabled_buttons); } - } - window.set_cursor_grab(*grab)?; + if opts.focused != last.focused && opts.focused { + window.focus_window(); + } - Ok(()) -} + if opts.fullscreen != last.fullscreen { + window.set_fullscreen(opts.fullscreen.clone()); + } -/// if the window is set to confine the cursor, the cursor is invisible, -/// and the window is focused, set the cursor position to the center of the screen. -fn center_mouse(window: &Window, options: &WindowOptions) { - if options.cursor_grab == CursorGrabMode::Confined && !options.cursor_visible - && options.focused { - let size = window.inner_size(); - let middle = PhysicalPosition { - x: size.width / 2, - y: size.height / 2, - }; - window.set_cursor_position(middle).unwrap(); - } -} - -fn window_updater_system(world: &mut World) -> anyhow::Result<()> { - if let (Some(window), Some(opts)) = (world.try_get_resource::>(), world.try_get_resource::>()) { - // if the options changed, update the window - if opts.peek_changed() { - drop(opts); // drop the Ref, we're about to get a RefMut - - // now we can get it mutable, this will trigger the ChangeTracker, so it will be reset at the end of this scope. - let mut opts = world.get_resource_mut::>(); - - if opts.focused { - window.focus_window(); - } - window.set_content_protected(opts.content_protected); - set_cursor_grab(&window, &mut opts.cursor_grab)?; - match window.set_cursor_hittest(opts.cursor_hittest) { - Ok(()) => {}, - Err(ExternalError::NotSupported(_)) => { /* ignore */ }, - Err(e) => { - error!("OS error when setting cursor hittest: {:?}", e); - } - } - window.set_cursor_icon(opts.cursor_icon); // TODO: Handle unsupported platforms - window.set_cursor_visible(opts.cursor_visible); // TODO: Handle unsupported platforms - window.set_decorations(opts.decorations); // TODO: Handle unsupported platforms - window.set_enabled_buttons(opts.enabled_buttons); // TODO: Handle unsupported platforms - - // Update the window mode. can only be done if the monitor is found - if let Some(monitor) = window.current_monitor() - .or_else(|| window.primary_monitor()) - .or_else(|| window.available_monitors().next()) { - match opts.mode { - WindowMode::Borderless => window.set_fullscreen(Some(Fullscreen::Borderless(Some(monitor)))), - WindowMode::Fullscreen => window.set_fullscreen(Some(Fullscreen::Exclusive(monitor.video_modes().next().unwrap()))), - WindowMode::Windowed => window.set_fullscreen(None), - } - } else { - warn!("Failure to get monitor handle, could not update WindowMode"); + if opts.size != last.size { + if window.request_inner_size(opts.size).is_some() { + error!("request to increase window size failed"); } + } - window.set_ime_allowed(opts.ime_allowed); - window.set_ime_position(vec2_to_logical_pos(opts.ime_position)); - window.set_inner_size(ivec2_to_logical_size(opts.inner_size)); - if opts.max_inner_size.is_some() { - window.set_max_inner_size(ivec2_to_logical_size_op(opts.max_inner_size)); - } - if opts.min_inner_size.is_some() { - window.set_min_inner_size(ivec2_to_logical_size_op(opts.min_inner_size)); - } + if opts.decorated != last.decorated { + window.set_decorations(opts.decorated); + } + + if opts.maximized != last.maximized { window.set_maximized(opts.maximized); - window.set_minimized(opts.minimized); - window.set_resizable(opts.resizeable); - window.set_resize_increments(vec2_to_logical_size_op(opts.resize_increments)); - window.set_theme(opts.theme); - window.set_title(&opts.title); - window.set_window_icon(opts.icon.clone()); - window.set_window_level(opts.level); - - // reset the tracker after we mutably used it - opts.reset(); - - center_mouse(&window, &opts); - } else { - drop(opts); // drop the Ref, we're about to get a RefMut - let mut opts = world.get_resource_mut::>(); - - if let Some(event_queue) = world.try_get_resource_mut::() { - if let Some(events) = event_queue.read_events::() { - for ev in events { - match ev { - InputEvent::CursorEntered { .. } => { - opts.cursor_inside_window = true; - }, - InputEvent::CursorLeft { .. } => { - opts.cursor_inside_window = false; - }, - _ => {}, - } - } - } - } - - // update the stored state of the window to match the actual window - - opts.focused = window.has_focus(); - - opts.reset(); - - center_mouse(&window, &opts); } + + if opts.minimized != last.minimized && opts.minimized.is_some() { + window.set_minimized(opts.minimized.unwrap()); + } + + if opts.visible != last.visible && opts.visible.is_some() { + window.set_visible(opts.visible.unwrap()); + } + + if opts.outer_position != last.outer_position && opts.outer_position.is_some() { + window.set_outer_position(opts.outer_position.unwrap()); + } + + if opts.resize_increments != last.resize_increments { + window.set_resize_increments(opts.resize_increments); + } + + if opts.blur != last.blur { + window.set_blur(opts.blur) + } + + if opts.content_protected != last.content_protected { + window.set_content_protected(opts.content_protected); + } + + if opts.cursor.appearance != last.cursor.appearance { + match opts.cursor.appearance.clone() { + CursorAppearance::Icon(icon) => window.set_cursor(winit::window::Cursor::Icon(icon)), + CursorAppearance::Custom(custom) => window.set_cursor(winit::window::Cursor::Custom(custom)), + } + } + + if opts.cursor.grab != last.cursor.grab { + if let Err(e) = window.set_cursor_grab(opts.cursor.grab) { + error!("could not set cursor grab mode: {}", e); + } + } + + if opts.cursor.hittest != last.cursor.hittest { + if let Err(e) = window.set_cursor_hittest(opts.cursor.hittest) { + error!("could not set cursor hittest: {}", e); + } + } + + if opts.cursor.visible != last.cursor.visible { + window.set_cursor_visible(opts.cursor.visible); + } + + if opts.ime_allowed != last.ime_allowed { + window.set_ime_allowed(opts.ime_allowed); + } + + if opts.ime_cursor_area != last.ime_cursor_area && opts.ime_cursor_area.is_some() { + let area = opts.ime_cursor_area.as_ref().unwrap(); + window.set_ime_cursor_area(area.position, area.size); + } + + if opts.min_size != last.min_size { + window.set_min_inner_size(opts.min_size); + } + + if opts.max_size != last.max_size { + window.set_max_inner_size(opts.max_size); + } + + if opts.theme != last.theme { + window.set_theme(opts.theme); + } + + if opts.title != last.title { + window.set_title(&opts.title); + } + + if opts.transparent != last.transparent { + window.set_transparent(opts.transparent); + } + + // compare the resource version and uuid. These will get changed + // when the image is reloaded + let opts_icon = opts.window_icon.as_ref() + .map(|i| (i.version(), i.uuid())); + let last_icon = last.window_icon.as_ref() + .map(|i| (i.version(), i.uuid())); + if opts_icon != last_icon { + todo!("cannot set window icon yet"); + } + + if opts.window_level != last.window_level { + window.set_window_level(opts.window_level); + } + + if opts.show_window_menu != last.show_window_menu && opts.show_window_menu.is_some() { + window.show_window_menu(opts.show_window_menu.unwrap()); + } + + last.last = opts.clone(); } Ok(()) } impl Plugin for WindowPlugin { - fn setup(&self, game: &mut crate::game::Game) { + fn setup(&mut self, app: &mut crate::game::App) { let window_options = WindowOptions::default(); - game.world_mut().add_resource(Ct::new(window_options)); - game.with_system("window_updater", window_updater_system, &[]); + app.world.add_resource(Ct::new(window_options)); + app.with_system("window_sync", window_sync_system, &[]); } } diff --git a/lyra-game/src/scene/free_fly_camera.rs b/lyra-game/src/scene/free_fly_camera.rs index b02e3f7..39510ad 100644 --- a/lyra-game/src/scene/free_fly_camera.rs +++ b/lyra-game/src/scene/free_fly_camera.rs @@ -1,7 +1,7 @@ use glam::{EulerRot, Quat, Vec3}; use lyra_ecs::{query::{Res, View}, Component}; -use crate::{game::Game, input::ActionHandler, plugin::Plugin, DeltaTime}; +use crate::{game::App, input::ActionHandler, plugin::Plugin, DeltaTime}; use super::CameraComponent; @@ -97,7 +97,7 @@ pub fn free_fly_camera_controller(delta_time: Res, handler: Res, +} + +impl Default for WinitPlugin { + fn default() -> Self { + Self { primary_window: Some(WindowOptions::default()) } + } +} + +impl Plugin for WinitPlugin { + fn setup(&mut self, app: &mut crate::game::App) { + app.set_run_fn(winit_app_runner); + + if let Some(prim) = self.primary_window.take() { + app.add_resource(WinitWindows::with_window(prim)); + } else { + app.add_resource(WinitWindows::default()); + } + } + + fn is_ready(&self, _app: &mut crate::game::App) -> bool { + true + } + + fn complete(&self, _app: &mut crate::game::App) { + + } + + fn cleanup(&self, _app: &mut crate::game::App) { + + } +} + +#[derive(Default)] +pub struct WinitWindows { + pub windows: FxHashMap>, + pub entity_to_window: FxHashMap, + pub window_to_entity: FxHashMap, + /// windows that will be created when the Winit runner first starts. + window_queue: VecDeque, +} + +impl WinitWindows { + pub fn with_window(window: WindowOptions) -> Self { + Self { + window_queue: vec![window].into(), + ..Default::default() + } + } + + pub fn create_window(&mut self, event_loop: &ActiveEventLoop, entity: Entity, attr: WindowAttributes) -> Result { + let win = event_loop.create_window(attr)?; + let id = win.id(); + + self.windows.insert(id, Arc::new(win)); + self.entity_to_window.insert(entity, id); + self.window_to_entity.insert(id, entity); + + Ok(id) + } + + pub fn get_entity_window(&self, entity: Entity) -> Option<&Arc> { + self.entity_to_window.get(&entity) + .and_then(|id| self.windows.get(id)) + } +} + +pub fn winit_app_runner(app: App) { + let evloop = EventLoop::new() + .expect("failed to create winit EventLoop"); + + let mut winit_runner = WinitRunner { + app, + }; + evloop.run_app(&mut winit_runner) + .expect("loop error"); +} + +struct WinitRunner { + app: App +} + +impl ApplicationHandler for WinitRunner { + fn about_to_wait(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { + self.app.update(); + + let renderer = self.app.renderer.get_mut().expect("renderer was not initialized"); + renderer.prepare(&mut self.app.world); + + if let Some(mut event_queue) = self.app.world.try_get_resource_mut::() { + event_queue.update_events(); + } + + match renderer.render() { + Ok(_) => {} + // Reconfigure the surface if lost + //Err(wgpu::SurfaceError::Lost) => self.on_resize(.surface_size()), + // The system is out of memory, we should probably quit + Err(wgpu::SurfaceError::OutOfMemory) => { + error!("OOM"); + event_loop.exit(); + } + // All other errors (Outdated, Timeout) should be resolved by the next frame + Err(e) => eprintln!("{:?}", e), + } + + let windows = self.app.world.get_resource::(); + for window in windows.windows.values() { + window.request_redraw(); + } + } + + fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) { + let world = &mut self.app.world; + + let mut windows = world.get_resource_mut::(); + let to_create_window = windows.window_queue.pop_front().unwrap_or_default(); + let window_attr = to_create_window.as_attributes(); + drop(windows); + let en = world.spawn((to_create_window, PrimaryWindow)); + + let mut windows = world.get_resource_mut::(); + let wid = windows.create_window(event_loop, en, window_attr).unwrap(); + let window = windows.windows.get(&wid).unwrap().clone(); + drop(windows); + + debug!("Created window after resume"); + + let renderer = block_on(BasicRenderer::create_with_window(world, window)); + if self.app.renderer.set(Box::new(renderer)).is_err() { + warn!("renderer was re-initialized"); + } + } + + fn window_event( + &mut self, + event_loop: &winit::event_loop::ActiveEventLoop, + window_id: winit::window::WindowId, + event: WindowEvent, + ) { + let windows = self.app.world.get_resource::(); + let window = match windows.windows.get(&window_id) { + Some(w) => w.clone(), + None => return, + }; + drop(windows); + + // If try_from failed, that means that the WindowEvent is not an + // input related event. + if let Some(input_ev) = InputEvent::from_window_event(&event) { + // Its possible to receive multiple input events before the update event for + // the InputSystem is called, so we must use a queue for the events. + if let Some(mut event_queue) = self.app.world.try_get_resource_mut::() { + event_queue.trigger_event(input_ev.clone()); + } + } else { + + match event { + WindowEvent::ActivationTokenDone { serial, token } => todo!(), + WindowEvent::Resized(physical_size) => { + self.app.on_resize(physical_size); + + let mut window_opts = self.app.world.get_resource::() + .window_to_entity.get(&window_id) + .and_then(|e| self.app.world.view_one::<&mut WindowOptions>(*e).get()) + .unwrap(); + window_opts.size = Size::new_physical(physical_size.width, physical_size.height); + }, + WindowEvent::Moved(physical_position) => { + let mut state = self.app.world.get_resource_or_else(WindowState::new); + state.position = IVec2::new(physical_position.x, physical_position.y); + }, + WindowEvent::CloseRequested => { + self.app.on_exit(); + event_loop.exit(); + }, + WindowEvent::Destroyed => todo!(), + WindowEvent::DroppedFile(path_buf) => todo!(), + WindowEvent::HoveredFile(path_buf) => todo!(), + WindowEvent::HoveredFileCancelled => todo!(), + WindowEvent::Focused(focused) => { + let mut window_opts = self.app.world.get_resource::() + .window_to_entity.get(&window_id) + .and_then(|e| self.app.world.view_one::<&mut WindowOptions>(*e).get()) + .unwrap(); + window_opts.focused = focused; + }, + WindowEvent::ModifiersChanged(modifiers) => debug!("modifiers changed: {:?}", modifiers), + WindowEvent::ScaleFactorChanged { scale_factor, .. } => { + let mut window_opts = self.app.world.get_resource::() + .window_to_entity.get(&window_id) + .and_then(|e| self.app.world.view_one::<&mut WindowOptions>(*e).get()) + .unwrap(); + window_opts.scale_factor = scale_factor; + }, + WindowEvent::ThemeChanged(theme) => { + let mut window_opts = self.app.world.get_resource::() + .window_to_entity.get(&window_id) + .and_then(|e| self.app.world.view_one::<&mut WindowOptions>(*e).get()) + .unwrap(); + window_opts.theme = Some(theme); + }, + WindowEvent::Occluded(occ) => { + let mut window_opts = self.app.world.get_resource::() + .window_to_entity.get(&window_id) + .and_then(|e| self.app.world.view_one::<&mut WindowOptions>(*e).get()) + .unwrap(); + window_opts.occluded = occ; + }, + WindowEvent::RedrawRequested => { + //debug!("should redraw"); + }, + _ => {} + } + } + } +} \ No newline at end of file diff --git a/lyra-math/Cargo.toml b/lyra-math/Cargo.toml index 463fe9b..fa5e35a 100644 --- a/lyra-math/Cargo.toml +++ b/lyra-math/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -glam = { version = "0.24.0" } \ No newline at end of file +glam = { version = "0.29.0" } \ No newline at end of file diff --git a/lyra-resource/Cargo.toml b/lyra-resource/Cargo.toml index 51b160d..eadd19a 100644 --- a/lyra-resource/Cargo.toml +++ b/lyra-resource/Cargo.toml @@ -13,9 +13,9 @@ lyra-scene = { path = "../lyra-scene" } anyhow = "1.0.75" base64 = "0.21.4" crossbeam = { version = "0.8.4", features = [ "crossbeam-channel" ] } -glam = "0.24.1" +glam = "0.29.0" gltf = { version = "1.3.0", features = ["KHR_materials_pbrSpecularGlossiness", "KHR_materials_specular"] } -image = "0.24.7" +image = "0.25.2" # not using custom matcher, or file type from file path infer = { version = "0.15.0", default-features = false } mime = "0.3.17" diff --git a/lyra-scripting/elua b/lyra-scripting/elua index 54c9926..a761f40 160000 --- a/lyra-scripting/elua +++ b/lyra-scripting/elua @@ -1 +1 @@ -Subproject commit 54c9926a04cdef657289fd67730c0b85d1bdda3e +Subproject commit a761f4094bc18190285b4687ec804161fea874b6 diff --git a/lyra-scripting/src/lua/system.rs b/lyra-scripting/src/lua/system.rs index 0dec88b..1456e41 100644 --- a/lyra-scripting/src/lua/system.rs +++ b/lyra-scripting/src/lua/system.rs @@ -190,7 +190,7 @@ pub fn lua_script_last_stage_system(world: &mut World) -> anyhow::Result<()> { pub struct LuaScriptingPlugin; impl Plugin for LuaScriptingPlugin { - fn setup(&self, game: &mut lyra_game::game::Game) { + fn setup(&mut self, game: &mut lyra_game::game::Game) { let world = game.world_mut(); world.add_resource_default::(); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 50b32f7..6a31466 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,5 @@ [toolchain] -channel = "nightly-2023-11-21" +#channel = "nightly-2023-11-21" +channel = "nightly" #date = "2023-11-21" targets = [ "x86_64-unknown-linux-gnu" ] \ No newline at end of file