diff --git a/Cargo.lock b/Cargo.lock index 8f21bf3..caf42da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,10 +3,19 @@ version = 3 [[package]] -name = "ab_glyph_rasterizer" -version = "0.1.5" +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13739d7177fbd22bb0ed28badfff9f372f8bef46c863db4e1c6248f6b223b6e" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" @@ -29,16 +38,39 @@ dependencies = [ ] [[package]] -name = "andrew" -version = "0.3.1" +name = "android-activity" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" +checksum = "39b801912a977c3fd52d80511fe1c0c8480c6f957f21ae2ce1b92ffe970cf4b9" dependencies = [ - "bitflags", - "rusttype", - "walkdir", - "xdg", - "xml-rs", + "android-properties", + "bitflags 2.4.1", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", ] [[package]] @@ -61,7 +93,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.82", ] [[package]] @@ -70,12 +102,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38de00daab4eac7d753e97697066238d67ce9d7e2d823ab4f72fe14af29f3f33" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -84,30 +110,57 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ash" -version = "0.33.3+1.2.191" +version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4f1d82f164f838ae413296d1131aa6fa79b917d25bebaa7033d25620c09219" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ "libloading 0.7.2", ] [[package]] -name = "atty" -version = "0.2.14" +name = "async-trait" +version = "0.1.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "proc-macro2", + "quote", + "syn 2.0.43", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "bit-set" version = "0.5.2" @@ -129,12 +182,46 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "block" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd7cf50912cddc06dc5ea7c08c5e81c1b2c842a70d19def1848d54c586fed92" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys", + "objc2", +] + [[package]] name = "bmp" version = "0.5.0" @@ -152,9 +239,9 @@ checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "bytemuck" -version = "1.7.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72957246c41db82b8ef88a5486143830adeb8227ef9837740bdec67724cf2c5b" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" @@ -163,13 +250,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] -name = "calloop" -version = "0.6.5" +name = "bytes" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "calloop" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ + "bitflags 2.4.1", "log", - "nix 0.18.0", + "polling", + "rustix", + "slab", + "thiserror", ] [[package]] @@ -177,12 +274,15 @@ name = "cc" version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +dependencies = [ + "jobserver", +] [[package]] -name = "cfg-if" -version = "0.1.10" +name = "cesu8" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" @@ -204,42 +304,11 @@ checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ "libc", "num-integer", - "num-traits 0.2.14", + "num-traits", "time", "winapi", ] -[[package]] -name = "cocoa" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" -dependencies = [ - "bitflags", - "block", - "cocoa-foundation", - "core-foundation 0.9.2", - "core-graphics 0.22.3", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" -dependencies = [ - "bitflags", - "block", - "core-foundation 0.9.2", - "core-graphics-types", - "foreign-types", - "libc", - "objc", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -251,81 +320,75 @@ dependencies = [ ] [[package]] -name = "config" -version = "0.11.0" +name = "com-rs" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1b9d958c2b1368a663f05538fc1b5975adce1e19f435acceae987aceeeb369" +checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "config" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +dependencies = [ + "async-trait", + "json5", "lazy_static", - "nom 5.1.2", + "nom", + "pathdiff", + "ron", "rust-ini", - "serde 1.0.130", - "serde-hjson", + "serde", "serde_json", "toml", "yaml-rust", ] -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "core-foundation-sys 0.7.0", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" -dependencies = [ - "core-foundation-sys 0.8.3", + "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.19.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ - "bitflags", - "core-foundation 0.7.0", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags", - "core-foundation 0.9.2", + "bitflags 1.3.2", + "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -335,178 +398,93 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags", - "core-foundation 0.9.2", - "foreign-types", + "bitflags 1.3.2", + "core-foundation", + "foreign-types 0.3.2", "libc", ] [[package]] -name = "core-video-sys" -version = "0.1.4" +name = "cpufeatures" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ - "cfg-if 0.1.10", - "core-foundation-sys 0.7.0", - "core-graphics 0.19.2", "libc", - "objc", -] - -[[package]] -name = "crossbeam" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" dependencies = [ - "cfg-if 1.0.0", - "lazy_static", + "cfg-if", ] [[package]] -name = "cty" -version = "0.2.2" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" +dependencies = [ + "serde", +] [[package]] name = "d3d12" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2daefd788d1e96e0a9d66dee4b828b883509bc3ea9ce30665f04c3246372690c" +checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libloading 0.7.2", "winapi", ] [[package]] name = "darling" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - -[[package]] -name = "darling" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4" -dependencies = [ - "darling_core 0.13.1", - "darling_macro 0.13.1", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.9.3", - "syn", -] - -[[package]] -name = "darling_core" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn", + "strsim", + "syn 2.0.43", ] [[package]] name = "darling_macro" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.10.2", + "darling_core", "quote", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b" -dependencies = [ - "darling_core 0.13.1", - "quote", - "syn", + "syn 2.0.43", ] [[package]] @@ -522,7 +500,7 @@ dependencies = [ "log", "paste", "pixels", - "serde 1.0.130", + "serde", "sha1", "thiserror", "winit", @@ -533,41 +511,20 @@ dependencies = [ name = "deemgee-opcode" version = "0.1.0" dependencies = [ - "darling 0.13.1", + "darling", "proc-macro2", "quote", - "syn", + "syn 2.0.43", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" -dependencies = [ - "libc", - "redox_users", - "winapi", + "block-buffer", + "crypto-common", ] [[package]] @@ -578,41 +535,42 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dlib" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.6.7", + "libloading 0.8.1", ] [[package]] -name = "dlib" -version = "0.5.0" +name = "dlv-list" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" -dependencies = [ - "libloading 0.7.2", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "env_logger" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", ] +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "fnv" version = "1.0.7" @@ -625,7 +583,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.43", ] [[package]] @@ -635,30 +614,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "fxhash" -version = "0.2.1" +name = "foreign-types-shared" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "byteorder", + "typenum", + "version_check", ] [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "glow" -version = "0.11.0" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f04649123493bc2483cbef4daddb45d40bbdae5adb221a63a23efdb0cc99520" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glow" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" dependencies = [ "js-sys", "slotmap", @@ -672,7 +664,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e64cbb8d36508d3e19da95e56e196a84f674fc190881f2cc010000798838aa6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gpu-alloc-types", ] @@ -682,7 +674,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "gpu-allocator" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +dependencies = [ + "backtrace", + "log", + "thiserror", + "winapi", + "windows", ] [[package]] @@ -691,9 +696,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a538f217be4d405ff4719a283ca68323cc2384003eca5baaa87501e821c81dda" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] @@ -702,7 +707,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -714,6 +719,30 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hassle-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +dependencies = [ + "bitflags 1.3.2", + "com-rs", + "libc", + "libloading 0.7.2", + "thiserror", + "widestring", + "winapi", +] + [[package]] name = "heck" version = "0.3.3" @@ -725,12 +754,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hexf-parse" @@ -744,6 +770,17 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2", + "dispatch", + "objc2", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -752,30 +789,32 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.7.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] -[[package]] -name = "inplace_it" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90953f308a79fe6d62a4643e51f848fbfddcd05975a38e69fdf4ab86a7baf7ca" - [[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", + "cfg-if", +] + +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -784,6 +823,22 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -791,14 +846,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] -name = "js-sys" -version = "0.3.55" +name = "jobserver" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + [[package]] name = "khronos-egl" version = "4.1.0" @@ -807,6 +882,7 @@ checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", "libloading 0.7.2", + "pkg-config", ] [[package]] @@ -815,34 +891,11 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "cfg-if 1.0.0", - "ryu", - "static_assertions", -] - [[package]] name = "libc" -version = "0.2.109" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" - -[[package]] -name = "libloading" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -850,16 +903,43 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "linked-hash-map" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + [[package]] name = "lock_api" version = "0.4.5" @@ -875,7 +955,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -893,34 +973,16 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" -[[package]] -name = "memmap2" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" -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.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0514f491f4cc03632ab399ee01e2c1c1b12d3e1cf2d667c1ff5f87d6dcd2084" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "log", "objc", ] @@ -932,135 +994,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mio" -version = "0.7.14" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "mio-misc" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ddf05411bb159cdb5801bb10002afb66cb4572be656044315e363460ce69dc2" -dependencies = [ - "crossbeam", - "crossbeam-queue", - "log", - "mio", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "adler", ] [[package]] name = "naga" -version = "0.7.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63765d243f5d32ece09b2ff95c1f50ec7353266024a2ce89619a09e1b6aa4cce" +checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "codespan-reporting", - "fxhash", "hexf-parse", "indexmap", "log", - "num-traits 0.2.14", + "num-traits", + "rustc-hash", "spirv", + "termcolor", "thiserror", + "unicode-xid", ] [[package]] name = "ndk" -version = "0.3.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ + "bitflags 2.4.1", "jni-sys", + "log", "ndk-sys", "num_enum", + "raw-window-handle", "thiserror", ] [[package]] -name = "ndk-glue" -version = "0.3.0" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk", - "ndk-macro", - "ndk-sys", -] - -[[package]] -name = "ndk-macro" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" -dependencies = [ - "darling 0.10.2", - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.2.2" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" - -[[package]] -name = "nix" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", -] - -[[package]] -name = "nix" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" -dependencies = [ - "bitflags", - "cc", - "cfg-if 1.0.0", - "libc", -] - -[[package]] -name = "nom" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" -dependencies = [ - "lexical-core", - "memchr", - "version_check", + "jni-sys", ] [[package]] @@ -1074,15 +1063,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -1090,16 +1070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ "autocfg", - "num-traits 0.2.14", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -dependencies = [ - "num-traits 0.2.14", + "num-traits", ] [[package]] @@ -1113,24 +1084,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" dependencies = [ - "derivative", "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.43", ] [[package]] @@ -1143,6 +1113,28 @@ dependencies = [ "objc_exception", ] +[[package]] +name = "objc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + [[package]] name = "objc_exception" version = "0.1.2" @@ -1153,18 +1145,37 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.8.0" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] [[package]] -name = "owned_ttf_parser" -version = "0.6.0" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "ttf-parser", + "libredox", +] + +[[package]] +name = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown 0.12.3", ] [[package]] @@ -1184,10 +1195,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.10", "smallvec", "winapi", ] @@ -1199,20 +1210,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "pathdiff" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pest" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.43", +] + +[[package]] +name = "pest_meta" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pixels" -version = "0.7.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ab1e297051c39cc7b7511e7e2b3ab151f14aff6a44e73bdde652b1e2190950" +checksum = "8ba8189b31db4f12fbf0d4a8eab2d7d7343a504a8d8a7ea4b14ffb2e6129136a" dependencies = [ "bytemuck", "pollster", - "raw-window-handle 0.3.4", + "raw-window-handle", "thiserror", "ultraviolet", "wgpu", @@ -1225,19 +1287,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1a3ea4f0dd7f1f3e512cf97bf100819aa547f36a6eccac8dbaae839eb92363e" [[package]] -name = "pollster" -version = "0.2.4" +name = "polling" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb20dcc30536a1508e75d47dd0e399bb2fe7354dcf35cda9127f2bf1ed92e30e" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] [[package]] -name = "proc-macro-crate" -version = "0.1.5" +name = "pollster" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" [[package]] name = "proc-macro-crate" @@ -1251,11 +1318,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.33" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1266,9 +1333,9 @@ checksum = "9926767b8b8244d7b6b64546585121d193c3d0b4856ccd656b7bfa9deb91ab6a" [[package]] name = "quote" -version = "1.0.10" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1281,22 +1348,9 @@ checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" [[package]] name = "raw-window-handle" -version = "0.3.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" -dependencies = [ - "libc", - "raw-window-handle 0.4.2", -] - -[[package]] -name = "raw-window-handle" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba75eee94a9d5273a68c9e1e105d9cffe1ef700532325788389e5a83e2522b7" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" @@ -1304,17 +1358,25 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.0" +name = "redox_syscall" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "getrandom", - "redox_syscall", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1336,24 +1398,54 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "renderdoc-sys" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" + +[[package]] +name = "ron" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" +checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +dependencies = [ + "base64", + "bitflags 1.3.2", + "serde", +] [[package]] name = "rust-ini" -version = "0.13.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] [[package]] -name = "rusttype" -version = "0.9.2" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1364,9 +1456,9 @@ checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" [[package]] name = "safe_arch" -version = "0.5.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -1380,12 +1472,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" @@ -1394,40 +1480,22 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "0.8.23" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" - -[[package]] -name = "serde" -version = "1.0.130" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-hjson" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" -dependencies = [ - "lazy_static", - "num-traits 0.1.43", - "regex", - "serde 0.8.23", -] - [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.43", ] [[package]] @@ -1438,14 +1506,39 @@ checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" dependencies = [ "itoa", "ryu", - "serde 1.0.130", + "serde", ] [[package]] name = "sha1" -version = "0.6.0" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "slotmap" @@ -1458,27 +1551,17 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.7.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] -name = "smithay-client-toolkit" -version = "0.12.3" +name = "smol_str" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" dependencies = [ - "andrew", - "bitflags", - "calloop", - "dlib 0.4.2", - "lazy_static", - "log", - "memmap2", - "nix 0.18.0", - "wayland-client", - "wayland-cursor", - "wayland-protocols", + "serde", ] [[package]] @@ -1487,8 +1570,8 @@ version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ - "bitflags", - "num-traits 0.2.14", + "bitflags 1.3.2", + "num-traits", ] [[package]] @@ -1497,12 +1580,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - [[package]] name = "strsim" version = "0.10.0" @@ -1520,6 +1597,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "syn" +version = "2.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "termcolor" version = "1.1.2" @@ -1531,22 +1619,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.43", ] [[package]] @@ -1556,7 +1644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", - "wasi", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] @@ -1566,24 +1654,52 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.130", + "serde", ] [[package]] -name = "ttf-parser" -version = "0.6.2" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "ultraviolet" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b9e3507eba17043af05c8a72fce3ec2c24b58945f45732e71dbc6646d904a7" +checksum = "6a28554d13eb5daba527cc1b91b6c341372a0ae45ed277ffb2c6fbc04f319d7e" dependencies = [ "wide", ] +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-segmentation" version = "1.8.0" @@ -1598,15 +1714,15 @@ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -1626,37 +1742,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] -name = "wasm-bindgen" -version = "0.2.78" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.43", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -1664,9 +1786,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1674,101 +1796,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.43", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" - -[[package]] -name = "wayland-client" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ab332350e502f159382201394a78e3cc12d0f04db863429260164ea40e0355" -dependencies = [ - "bitflags", - "downcast-rs", - "libc", - "nix 0.20.0", - "scoped-tls", - "wayland-commons", - "wayland-scanner", - "wayland-sys", -] - -[[package]] -name = "wayland-commons" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21817947c7011bbd0a27e11b17b337bfd022e8544b071a2641232047966fbda" -dependencies = [ - "nix 0.20.0", - "once_cell", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-cursor" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be610084edd1586d45e7bdd275fe345c7c1873598caa464c4fb835dee70fa65a" -dependencies = [ - "nix 0.20.0", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286620ea4d803bacf61fa087a4242ee316693099ee5a140796aaba02b29f861f" -dependencies = [ - "bitflags", - "wayland-client", - "wayland-commons", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce923eb2deb61de332d1f356ec7b6bf37094dc5573952e1c8936db03b54c03f1" -dependencies = [ - "proc-macro2", - "quote", - "xml-rs", -] - -[[package]] -name = "wayland-sys" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d841fca9aed7febf9bed2e9796c49bf58d4152ceda8ac949ebe00868d8f0feb8" -dependencies = [ - "dlib 0.5.0", - "lazy_static", - "pkg-config", -] +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1776,16 +1835,20 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.11.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7181fe6ba5f4b632a9079cc9e922a64555156c87def72c063f94b180c7d68" +checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", + "cfg-if", "js-sys", "log", + "naga", "parking_lot", - "raw-window-handle 0.3.4", + "profiling", + "raw-window-handle", "smallvec", + "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -1796,48 +1859,51 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.11.3" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35600627b6c718ad0e23ed75fb6140bfe32cdf21c8f539ce3c9ab8180e2cb38e" +checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ - "arrayvec 0.7.2", - "bitflags", - "cfg_aliases", - "copyless", - "fxhash", + "arrayvec", + "bit-vec", + "bitflags 2.4.1", + "codespan-reporting", "log", "naga", "parking_lot", "profiling", - "raw-window-handle 0.3.4", + "raw-window-handle", + "rustc-hash", "smallvec", "thiserror", + "web-sys", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "0.11.5" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af28b29ef0b44cd22dd9895d4349b9d5a687df42f58da234871198637eabe328" +checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" dependencies = [ - "arrayvec 0.7.2", + "android_system_properties", + "arrayvec", "ash", "bit-set", - "bitflags", + "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", - "foreign-types", - "fxhash", + "foreign-types 0.3.2", "glow", "gpu-alloc", + "gpu-allocator", "gpu-descriptor", - "inplace_it", + "hassle-rs", "js-sys", "khronos-egl", - "libloading 0.7.2", + "libc", + "libloading 0.8.1", "log", "metal", "naga", @@ -1845,8 +1911,10 @@ dependencies = [ "parking_lot", "profiling", "range-alloc", - "raw-window-handle 0.3.4", + "raw-window-handle", "renderdoc-sys", + "rustc-hash", + "smallvec", "thiserror", "wasm-bindgen", "web-sys", @@ -1856,23 +1924,31 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.11.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e15e44ba88ec415466e18e91881319e7c9e96cb905dc623305168aea65b85ccc" +checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" dependencies = [ - "bitflags", + "bitflags 2.4.1", + "js-sys", + "web-sys", ] [[package]] name = "wide" -version = "0.6.5" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bbe7c604a27ca0b05c5503221e76da628225b568e6f1280b42dbad3b72d89b" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", ] +[[package]] +name = "widestring" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" + [[package]] name = "winapi" version = "0.3.9" @@ -1905,81 +1981,276 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winit" -version = "0.25.0" +name = "windows" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79610794594d5e86be473ef7763f604f2159cbac8c94debd00df8fb41e86c2f8" +checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" dependencies = [ - "bitflags", - "cocoa", - "core-foundation 0.9.2", - "core-graphics 0.22.3", - "core-video-sys", - "dispatch", - "instant", - "lazy_static", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winit" +version = "0.29.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd430cd4560ee9c48885a4ef473b609a56796e37b1e18222abee146143f7457" +dependencies = [ + "android-activity", + "atomic-waker", + "bitflags 2.4.1", + "calloop", + "cfg_aliases", + "core-foundation", + "core-graphics", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", - "mio-misc", "ndk", - "ndk-glue", "ndk-sys", - "objc", - "parking_lot", - "percent-encoding", - "raw-window-handle 0.3.4", - "scopeguard", - "serde 1.0.130", - "smithay-client-toolkit", - "wayland-client", - "winapi", - "x11-dl", + "objc2", + "once_cell", + "orbclient", + "raw-window-handle", + "redox_syscall 0.3.5", + "rustix", + "serde", + "smol_str", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "windows-sys 0.48.0", + "xkbcommon-dl", ] [[package]] name = "winit_input_helper" -version = "0.10.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8af691f04e6d8a892e80a2176221b2c13d5832a8929d8c0fed1e3e3d4fe831" +checksum = "ce9b125e561cd7bc59323760750178c2654a97c3d87d1d8a7a38f545e071d42a" dependencies = [ "winit", ] [[package]] -name = "x11-dl" -version = "2.19.1" +name = "xkbcommon-dl" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea26926b4ce81a6f5d9d0f3a0bc401e5a37c6ae14a1bfaa8ff6099ca80038c59" +checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699" dependencies = [ - "lazy_static", - "libc", - "pkg-config", + "bitflags 2.4.1", + "dlib", + "log", + "once_cell", + "xkeysym", ] [[package]] -name = "xcursor" -version = "0.3.4" +name = "xkeysym" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" -dependencies = [ - "nom 7.1.0", -] - -[[package]] -name = "xdg" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803" -dependencies = [ - "dirs", -] - -[[package]] -name = "xml-rs" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" [[package]] name = "yaml-rust" diff --git a/config.example.toml b/config.example.toml index 3d29557..bc4bd67 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,12 +1,13 @@ [bindings] -a = "A" -b = "S" -select = "Q" -start = "W" -up = "Up" -down = "Down" -left = "Left" -right = "Right" -pause = "P" +a = "KeyA" +b = "KeyS" +select = "KeyQ" +start = "KeyW" +up = "ArrowUp" +down = "ArrowDown" +left = "ArrowLeft" +right = "ArrowRight" +pause = "KeyP" exit = "Escape" -log_ops = "L" \ No newline at end of file +log_ops = "KeyL" +dump_memory = "Comma" \ No newline at end of file diff --git a/deemgee-opcode/Cargo.toml b/deemgee-opcode/Cargo.toml index 21660ef..40d38cf 100644 --- a/deemgee-opcode/Cargo.toml +++ b/deemgee-opcode/Cargo.toml @@ -8,7 +8,7 @@ proc-macro = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -darling = "0.13.1" +darling = "0.20.3" proc-macro2 = "1.0.33" quote = "1.0.10" -syn = "1.0.82" +syn = "2.0.43" diff --git a/deemgee-opcode/src/lib.rs b/deemgee-opcode/src/lib.rs index 9655432..50809f8 100644 --- a/deemgee-opcode/src/lib.rs +++ b/deemgee-opcode/src/lib.rs @@ -1,8 +1,6 @@ use proc_macro::TokenStream; -use proc_macro2::Ident; use syn::{ - braced, parse::Parse, parse_macro_input, punctuated::Punctuated, Expr, ExprMacro, LitBool, - LitInt, LitStr, Stmt, Token, + braced, parse::Parse, parse_macro_input, punctuated::Punctuated, Expr, LitBool, LitInt, Token, }; struct OpcodeImpl { @@ -49,6 +47,8 @@ pub fn opcode(item: TokenStream) -> TokenStream { let OpcodeArgs { name, opcode, readable, extended, implementation } = parse_macro_input!(item as OpcodeArgs); + let name_s = name.to_string(); + let opcode = opcode.base10_parse::().expect("Failed to parse opcode as u8"); let fn_sig = quote::quote! { @@ -72,7 +72,7 @@ pub fn opcode(item: TokenStream) -> TokenStream { }*/ let regs = quote::quote! { - log::trace!("-- Registers --\nAF: {:04X}\nBC: {:04X}\nDE: {:04X}\nHL: {:04X}\nSP: {:04X}\nPC: {:04X}\nZero: {}\nSubtract: {}\nHalf-Carry: {}\nCarry: {}", state.registers.get_af(), state.registers.get_bc(), state.registers.get_de(), state.registers.get_hl(), state.registers.get_sp(), state.registers.pc, state.registers.get_zero(), state.registers.get_subtract(), state.registers.get_half_carry(), state.registers.get_carry()); + log::info!("\nSTART OF {}\n-- Registers --\nAF: {:04X}\nBC: {:04X}\nDE: {:04X}\nHL: {:04X}\nSP: {:04X}\nPC: {:04X}\nZero: {}\nSubtract: {}\nHalf-Carry: {}\nCarry: {}\n-- Interrupts --\nIME: {}\nIE VBlank: {}\nIE LCD Stat: {}\nIE Timer: {}\nIE Serial: {}\nIE Joypad: {}\nIF VBlank: {}\nIF LCD Stat: {}\nIF Timer: {}\nIF Serial: {}\nIF Joypad: {}\nEND OF {}", #name_s, state.registers.get_af(), state.registers.get_bc(), state.registers.get_de(), state.registers.get_hl(), state.registers.get_sp(), state.registers.pc, state.registers.get_zero(), state.registers.get_subtract(), state.registers.get_half_carry(), state.registers.get_carry(), state.interrupts.ime, state.interrupts.read_ie_vblank(), state.interrupts.read_ie_lcd_stat(), state.interrupts.read_ie_timer(), state.interrupts.read_ie_serial(), state.interrupts.read_ie_joypad(), state.interrupts.read_if_vblank(), state.interrupts.read_if_lcd_stat(), state.interrupts.read_if_timer(), state.interrupts.read_if_serial(), state.interrupts.read_if_joypad(), #name_s); }; let match_statement = quote::quote! { diff --git a/deemgee/Cargo.toml b/deemgee/Cargo.toml index cc6e08e..282eb10 100644 --- a/deemgee/Cargo.toml +++ b/deemgee/Cargo.toml @@ -9,14 +9,14 @@ edition = "2021" argh = "0.1.6" bmp = "0.5.0" chrono = "0.4.19" -config = "0.11.0" +config = "0.13.4" deemgee-opcode = { path = "../deemgee-opcode" } -env_logger = "0.9.0" +env_logger = "0.10.1" log = "0.4.14" paste = "1.0.6" -pixels = "0.7.0" +pixels = "0.13.0" serde = { version = "1.0.130", features = ["derive"] } -sha1 = { version = "0.6.0", features = ["std"] } +sha1 = { version = "0.10.6", features = ["std"] } thiserror = "1.0.30" -winit = { version = "0.25.0", features = ["serde"] } -winit_input_helper = "0.10.0" +winit = { version = "0.29.7", default-features = false, features = ["serde", "rwh_05"] } +winit_input_helper = "0.15.1" diff --git a/deemgee/src/gameboy.rs b/deemgee/src/gameboy.rs index cef02cf..0c3f29e 100644 --- a/deemgee/src/gameboy.rs +++ b/deemgee/src/gameboy.rs @@ -117,7 +117,7 @@ impl Gameboy { } fn log_state(&self) { - log::info!("-- Registers --\nAF: {:04X}\nBC: {:04X}\nDE: {:04X}\nHL: {:04X}\nSP: {:04X}\nPC: {:04X}\nZero: {}\nSubtract: {}\nHalf-Carry: {}\nCarry: {}", self.registers.get_af(), self.registers.get_bc(), self.registers.get_de(), self.registers.get_hl(), self.registers.get_sp(), self.registers.pc, self.registers.get_zero(), self.registers.get_subtract(), self.registers.get_half_carry(), self.registers.get_carry()); + log::info!("\n-- Registers --\nAF: {:04X}\nBC: {:04X}\nDE: {:04X}\nHL: {:04X}\nSP: {:04X}\nPC: {:04X}\nZero: {}\nSubtract: {}\nHalf-Carry: {}\nCarry: {}\n-- Interrupts --\nIME: {}\nIE VBlank: {}\nIE LCD Stat: {}\nIE Timer: {}\nIE Serial: {}\nIE Joypad: {}\nIF VBlank: {}\nIF LCD Stat: {}\nIF Timer: {}\nIF Serial: {}\nIF Joypad: {}\n", self.registers.get_af(), self.registers.get_bc(), self.registers.get_de(), self.registers.get_hl(), self.registers.get_sp(), self.registers.pc, self.registers.get_zero(), self.registers.get_subtract(), self.registers.get_half_carry(), self.registers.get_carry(), self.interrupts.ime, self.interrupts.read_ie_vblank(), self.interrupts.read_ie_lcd_stat(), self.interrupts.read_ie_timer(), self.interrupts.read_ie_serial(), self.interrupts.read_ie_joypad(), self.interrupts.read_if_vblank(), self.interrupts.read_if_lcd_stat(), self.interrupts.read_if_timer(), self.interrupts.read_if_serial(), self.interrupts.read_if_joypad()); } pub fn tick(&mut self) -> bool { @@ -189,7 +189,12 @@ impl Gameboy { log::info!("Continuing"); exit = false; } - "s" | "step" => { + "p" | "pause" => { + self.single_step = true; + log::info!("Single step activated"); + exit = false; + } + "s" | "step" | "" => { self.log_next_opcode(); exit = false; } @@ -286,7 +291,7 @@ impl Gameboy { 0xFF06 => self.timer.tma, 0xFF07 => self.timer.read_tac(), 0xFF08..=0xFF0E => 0, // Unused - 0xFF0F => self.interrupts.interrupt_enable, + 0xFF0F => self.interrupts.interrupt_flag, 0xFF10 => self.sound.nr10, 0xFF11 => self.sound.nr11, 0xFF12 => self.sound.nr12, @@ -346,7 +351,7 @@ impl Gameboy { 0xFF06 => self.timer.tma = value, 0xFF07 => self.timer.write_tac(value), 0xFF08..=0xFF0E => {} // Unused - 0xFF0F => self.interrupts.interrupt_enable = value & 0b1_1111, + 0xFF0F => self.interrupts.interrupt_flag = value & 0b1_1111, 0xFF10 => self.sound.nr10 = value, 0xFF11 => self.sound.nr11 = value, 0xFF12 => self.sound.nr12 = value, @@ -403,6 +408,34 @@ impl Gameboy { } } + pub fn dump_memory(&self) -> [u8; 0xFFFF] { + let mut out = [0u8; 0xFFFF]; + + for address in 0..0xFFFF { + out[address as usize] = match address { + 0..=0xFF if !self.memory.bootrom_disabled => self.memory.bootrom[address as usize], + 0..=0x7FFF => match self.cartridge.as_ref() { + Some(mapper) => mapper.read_rom_u8(address), + None => 0, + }, + 0x8000..=0x9FFF => self.ppu.cpu_read_vram(address), + 0xA000..=0xBFFF => match self.cartridge.as_ref() { + Some(mapper) => mapper.read_eram_u8(address), + None => 0, + }, + 0xC000..=0xDFFF => self.memory.wram[address as usize - 0xC000], + 0xE000..=0xFDFF => self.memory.wram[address as usize - 0xE000], + 0xFE00..=0xFE9F => self.ppu.cpu_read_oam(address), + 0xFEA0..=0xFEFF => 0, + 0xFF00..=0xFF7F => self.cpu_read_io(address), + 0xFF80..=0xFFFE => self.memory.hram[address as usize - 0xFF80], + 0xFFFF => self.interrupts.interrupt_enable, + }; + } + + out + } + fn internal_cpu_read_u8(&self, address: u16) -> u8 { if self.dma.remaining_cycles == 0 { match address { diff --git a/deemgee/src/gameboy/cpu.rs b/deemgee/src/gameboy/cpu.rs index ea3fc2d..f91e939 100644 --- a/deemgee/src/gameboy/cpu.rs +++ b/deemgee/src/gameboy/cpu.rs @@ -40,6 +40,7 @@ macro_rules! define_flag { pub enum CycleResult { NeedsMore, Finished, + FinishedChangedPc, } #[derive(Debug, Default)] @@ -213,6 +214,7 @@ pub fn tick_cpu(state: &mut Gameboy) { 0x04 => alu::inc_b, 0x05 => alu::dec_b, 0x06 => load_store_move::ld_b_imm_u8, + 0x07 => alu::rlca, 0x08 => load_store_move::ld_deref_imm_u16_sp, 0x09 => alu::add_hl_bc, 0x0a => load_store_move::ld_a_deref_bc, @@ -220,6 +222,7 @@ pub fn tick_cpu(state: &mut Gameboy) { 0x0c => alu::inc_c, 0x0d => alu::dec_c, 0x0e => load_store_move::ld_c_imm_u8, + 0x0F => alu::rrca, 0x11 => load_store_move::ld_de_imm_u16, 0x12 => load_store_move::ld_deref_de_a, 0x13 => alu::inc_de, @@ -242,6 +245,7 @@ pub fn tick_cpu(state: &mut Gameboy) { 0x24 => alu::inc_h, 0x25 => alu::dec_h, 0x26 => load_store_move::ld_h_imm_u8, + 0x27 => alu::daa, 0x28 => flow::jr_z_i8, 0x29 => alu::add_hl_hl, 0x2a => load_store_move::ld_a_hl_plus, @@ -413,7 +417,7 @@ pub fn tick_cpu(state: &mut Gameboy) { 0xD0 => flow::ret_nc, 0xD1 => load_store_move::pop_de, 0xD2 => flow::jp_nc_u16, - 0xD3 => panic!("Executing bad opcode {:#02X}", opcode), + 0xD3 => panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc), 0xD4 => flow::call_nc_u16, 0xD5 => load_store_move::push_de, 0xD6 => alu::sub_a_imm_u8, @@ -421,21 +425,25 @@ pub fn tick_cpu(state: &mut Gameboy) { 0xD8 => flow::ret_c, 0xD9 => flow::reti, 0xDA => flow::jp_c_u16, - 0xDB => panic!("Executing bad opcode {:#02X}", opcode), + 0xDB => panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc), 0xDC => flow::call_c_u16, - 0xDD => panic!("Executing bad opcode {:#02X}", opcode), + 0xDD => panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc), 0xDE => alu::sbc_a_imm_u8, 0xDF => flow::rst_0x18, 0xE0 => load_store_move::ldh_imm_u8_a, 0xE1 => load_store_move::pop_hl, 0xE2 => load_store_move::ldh_deref_c_a, - 0xE3 | 0xE4 => panic!("Executing bad opcode {:#02X}", opcode), + 0xE3 | 0xE4 => { + panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc) + } 0xE5 => load_store_move::push_hl, 0xE6 => alu::and_a_imm_u8, 0xE7 => flow::rst_0x20, 0xE9 => flow::jp_hl, 0xEA => load_store_move::ld_deref_imm_u16_a, - 0xEB | 0xEC | 0xED => panic!("Executing bad opcode {:#02X}", opcode), + 0xEB | 0xEC | 0xED => { + panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc) + } 0xEE => alu::xor_a_imm_u8, 0xEF => flow::rst_0x28, 0xF0 => load_store_move::ldh_a_imm_u8, @@ -449,7 +457,9 @@ pub fn tick_cpu(state: &mut Gameboy) { 0xF9 => load_store_move::ld_sp_hl, 0xFA => load_store_move::ld_a_deref_imm_u16, 0xFB => misc::ei, - 0xFC | 0xFD => panic!("Executing bad opcode {:#02X}", opcode), + 0xFC | 0xFD => { + panic!("Executing bad opcode {:#02X} @ PC={:#04X}", opcode, state.registers.pc) + } 0xFE => alu::cp_a_imm_u8, 0xFF => flow::rst_0x38, unknown => { @@ -464,14 +474,16 @@ pub fn tick_cpu(state: &mut Gameboy) { result }; - if result == CycleResult::Finished { + if result == CycleResult::Finished || result == CycleResult::FinishedChangedPc { if state.used_halt_bug { state.registers.pc = state.registers.pc.overflowing_add(1).0; } - match state.registers.opcode_bytecount { - Some(len) => state.registers.pc = state.registers.pc.overflowing_add(len as u16).0, - None => panic!("Forgot to set opcode len"), + if result != CycleResult::FinishedChangedPc { + match state.registers.opcode_bytecount { + Some(len) => state.registers.pc = state.registers.pc.overflowing_add(len as u16).0, + None => panic!("Forgot to set opcode len"), + } } if !state.registers.mem_op_happened { diff --git a/deemgee/src/gameboy/cpu/alu.rs b/deemgee/src/gameboy/cpu/alu.rs index fca8aa1..fb8ede3 100644 --- a/deemgee/src/gameboy/cpu/alu.rs +++ b/deemgee/src/gameboy/cpu/alu.rs @@ -877,3 +877,60 @@ opcode!(add_hl_sp, 0x39, "ADD HL, SP", false, { CycleResult::Finished } }); + +opcode!(rlca, 0x7, "RLCA", false, { + 0 => { + let carry = state.registers.a >> 7 == 1; + state.registers.a <<= 1; + state.registers.a |= carry as u8; + + state.registers.set_zero(state.registers.a == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(1); + CycleResult::Finished + } +}); + +opcode!(rrca, 0xF, "RRCA", false, { + 0 => { + let carry = state.registers.a & 0b1 == 1; + state.registers.a >>= 1; + state.registers.a |= (carry as u8) << 7; + + state.registers.set_zero(state.registers.a == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(1); + CycleResult::Finished + } +}); + +opcode!(daa, 0x27, "DAA", false, { + 0 => { + let mut value = 0; + let mut carry = false; + + if state.registers.get_half_carry() || (!state.registers.get_subtract() && (state.registers.a & 0xF) > 9) { + value |= 0x06; + } + + if state.registers.get_carry() || (!state.registers.get_subtract() && state.registers.a > 0x99) { + value |= 0x60; + carry = true; + } + + state.registers.a = match state.registers.get_subtract() { + true => state.registers.a.wrapping_sub(value), + false => state.registers.a.wrapping_add(value) + }; + + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.set_zero(state.registers.a == 0); + state.registers.opcode_bytecount = Some(1); + CycleResult::Finished + } +}); diff --git a/deemgee/src/gameboy/cpu/flow.rs b/deemgee/src/gameboy/cpu/flow.rs index 6cd213f..dfdb66c 100644 --- a/deemgee/src/gameboy/cpu/flow.rs +++ b/deemgee/src/gameboy/cpu/flow.rs @@ -477,7 +477,6 @@ opcode!(ret, 0xC9, "RET", false, { }, 3 => { let address = (state.registers.take_mem() as u16) << 8 | state.registers.take_hold(); - println!("RET to {:#04X}", address); state.registers.pc = address; state.registers.opcode_bytecount = Some(0); CycleResult::Finished diff --git a/deemgee/src/gameboy/cpu/prefixed.rs b/deemgee/src/gameboy/cpu/prefixed.rs index 0ac5177..83d3c0f 100644 --- a/deemgee/src/gameboy/cpu/prefixed.rs +++ b/deemgee/src/gameboy/cpu/prefixed.rs @@ -19,6 +19,20 @@ pub fn prefixed_handler(state: &mut Gameboy) -> CycleResult { }; let res: CycleResult = match opcode { + 0x00 => rlc_b, + 0x01 => rlc_c, + 0x02 => rlc_d, + 0x03 => rlc_e, + 0x04 => rlc_h, + 0x05 => rlc_l, + 0x07 => rlc_a, + 0x08 => rrc_b, + 0x09 => rrc_c, + 0x0a => rrc_d, + 0x0b => rrc_e, + 0x0c => rrc_h, + 0x0d => rrc_l, + 0x0f => rrc_a, 0x10 => rl_b, 0x11 => rl_c, 0x12 => rl_d, @@ -33,6 +47,20 @@ pub fn prefixed_handler(state: &mut Gameboy) -> CycleResult { 0x1c => rr_h, 0x1d => rr_l, 0x1f => rr_a, + 0x20 => sra_b, + 0x21 => sra_c, + 0x22 => sra_d, + 0x23 => sra_e, + 0x24 => sra_h, + 0x25 => sra_l, + 0x27 => sra_a, + 0x28 => sla_b, + 0x29 => sla_c, + 0x2a => sla_d, + 0x2b => sla_e, + 0x2c => sla_h, + 0x2d => sla_l, + 0x2f => sla_a, 0x30 => swap_b, 0x31 => swap_c, 0x32 => swap_d, @@ -240,7 +268,7 @@ pub fn prefixed_handler(state: &mut Gameboy) -> CycleResult { 0xFE => set_7_deref_hl, 0xFF => set_7_a, unknown => panic!( - "Unrecognized prefixed opcode: {:#X}\nRegisters: {:#?}", + "Unrecognized prefixed opcode: {:#X}\nRegisters: {:#X?}", unknown, state.registers ), }(state); @@ -351,6 +379,64 @@ define_bit_deref_hl!(0x6e, 5); define_bit_deref_hl!(0x76, 6); define_bit_deref_hl!(0x7e, 7); +macro_rules! define_rlc_reg { + ($op:literal, $reg:ident) => { + paste::paste! { + opcode!([], $op, std::concat!("RLC ", std::stringify!($reg)), true, { + 1 => { + let carry = state.registers.$reg >> 7 == 1; + state.registers.$reg <<= 1; + state.registers.$reg |= carry as u8; + + state.registers.set_zero(state.registers.$reg == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(2); + CycleResult::Finished + } + }); + } + }; +} + +define_rlc_reg!(0x00, b); +define_rlc_reg!(0x01, c); +define_rlc_reg!(0x02, d); +define_rlc_reg!(0x03, e); +define_rlc_reg!(0x04, h); +define_rlc_reg!(0x05, l); +define_rlc_reg!(0x07, a); + +macro_rules! define_rrc_reg { + ($op:literal, $reg:ident) => { + paste::paste! { + opcode!([], $op, std::concat!("RRC ", std::stringify!($reg)), true, { + 1 => { + let carry = state.registers.$reg & 0b1 == 1; + state.registers.$reg >>= 1; + state.registers.$reg |= (carry as u8) << 7; + + state.registers.set_zero(state.registers.$reg == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(2); + CycleResult::Finished + } + }); + } + }; +} + +define_rrc_reg!(0x08, b); +define_rrc_reg!(0x09, c); +define_rrc_reg!(0x0A, d); +define_rrc_reg!(0x0B, e); +define_rrc_reg!(0x0C, h); +define_rrc_reg!(0x0D, l); +define_rrc_reg!(0x0F, a); + macro_rules! define_rl_reg { ($op:literal, $reg:ident) => { paste::paste! { @@ -383,6 +469,62 @@ define_rl_reg!(0x14, h); define_rl_reg!(0x15, l); define_rl_reg!(0x17, a); +macro_rules! define_sla_reg { + ($op:literal, $reg:ident) => { + paste::paste! { + opcode!([], $op, std::concat!("SLA ", std::stringify!($reg)), true, { + 1 => { + let carry = state.registers.$reg & (0b1 << 7) == 1; + state.registers.$reg = ((state.registers.$reg as i8) << 1) as u8; + + state.registers.set_zero(state.registers.$reg == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(2); + CycleResult::Finished + } + }); + } + }; +} + +define_sla_reg!(0x20, b); +define_sla_reg!(0x21, c); +define_sla_reg!(0x22, d); +define_sla_reg!(0x23, e); +define_sla_reg!(0x24, h); +define_sla_reg!(0x25, l); +define_sla_reg!(0x27, a); + +macro_rules! define_sra_reg { + ($op:literal, $reg:ident) => { + paste::paste! { + opcode!([], $op, std::concat!("SRA ", std::stringify!($reg)), true, { + 1 => { + let carry = state.registers.$reg & 0b1 == 1; + state.registers.$reg = ((state.registers.$reg as i8) >> 1) as u8; + + state.registers.set_zero(state.registers.$reg == 0); + state.registers.set_subtract(false); + state.registers.set_half_carry(false); + state.registers.set_carry(carry); + state.registers.opcode_bytecount = Some(2); + CycleResult::Finished + } + }); + } + }; +} + +define_sra_reg!(0x28, b); +define_sra_reg!(0x29, c); +define_sra_reg!(0x2A, d); +define_sra_reg!(0x2B, e); +define_sra_reg!(0x2C, h); +define_sra_reg!(0x2D, l); +define_sra_reg!(0x2F, a); + macro_rules! define_swap_reg { ($op:literal, $reg:ident) => { paste::paste! { diff --git a/deemgee/src/gameboy/interrupts.rs b/deemgee/src/gameboy/interrupts.rs index 0a43f61..ae1801c 100644 --- a/deemgee/src/gameboy/interrupts.rs +++ b/deemgee/src/gameboy/interrupts.rs @@ -5,6 +5,7 @@ macro_rules! define_bitfield_u8_gs { ((self.$loc >> $offset) & 0b1) == 1 } + #[allow(unused)] pub fn [](&mut self, value: bool) { log::debug!(std::concat!("Setting ", std::stringify!($name), " to {}"), value); self.$loc &= !(0b1 << $offset); diff --git a/deemgee/src/gameboy/mapper/mbc1.rs b/deemgee/src/gameboy/mapper/mbc1.rs index 4e378cb..62d94ba 100644 --- a/deemgee/src/gameboy/mapper/mbc1.rs +++ b/deemgee/src/gameboy/mapper/mbc1.rs @@ -66,6 +66,7 @@ impl MBC1 { self.rom_bank_count > 4 } + #[allow(unused)] fn is_large_ram(&self) -> bool { self.ram_bank_count > 2 } @@ -98,16 +99,16 @@ impl Mapper for MBC1 { } } - fn read_eram_u8(&self, address: u16) -> u8 { + fn read_eram_u8(&self, _address: u16) -> u8 { match self.ram.as_ref() { - Some(ram) => unimplemented!(), + Some(_ram) => unimplemented!(), None => 0, } } - fn write_eram_u8(&mut self, address: u16, value: u8) { + fn write_eram_u8(&mut self, _address: u16, _value: u8) { match self.ram.as_ref() { - Some(ram) => unimplemented!(), + Some(_ram) => unimplemented!(), None => {} } } diff --git a/deemgee/src/gameboy/ppu.rs b/deemgee/src/gameboy/ppu.rs index ccf7784..7d04791 100644 --- a/deemgee/src/gameboy/ppu.rs +++ b/deemgee/src/gameboy/ppu.rs @@ -120,6 +120,7 @@ impl OAMEntry { (self.flags >> 5) & 0b1 == 1 } + #[allow(unused)] pub fn palette_number(&self) -> bool { (self.flags >> 4) & 0b1 == 1 } diff --git a/deemgee/src/gameboy/serial.rs b/deemgee/src/gameboy/serial.rs index c06612d..b9b51c3 100644 --- a/deemgee/src/gameboy/serial.rs +++ b/deemgee/src/gameboy/serial.rs @@ -25,6 +25,7 @@ impl Serial { self.sc & 0b1 == 1 } + #[allow(unused)] pub fn set_side(&mut self, conductor: bool) { self.sc &= !0b1; self.sc |= conductor as u8; @@ -35,7 +36,7 @@ impl Serial { if self.internal_tick < 128 { self.internal_tick += 1; } else { - print!("{}", self.sb as char); + std::io::stdout().write_all(&[self.sb]).expect("writing stdout failed"); std::io::stdout().flush().expect("flushing stdout failed"); self.sb = 0; self.set_transfer_in_process(false); diff --git a/deemgee/src/main.rs b/deemgee/src/main.rs index bfdcb64..35bd513 100644 --- a/deemgee/src/main.rs +++ b/deemgee/src/main.rs @@ -8,10 +8,11 @@ use std::{ }; use argh::FromArgs; -use chrono::Duration; +use chrono::{Duration, Utc}; use gameboy::Gameboy; use settings::DeemgeeConfig; -use window::WindowEvent; +use sha1::{Digest, Sha1}; +use window::EmulatorWindowEvent; use crate::window::GameboyEvent; @@ -46,10 +47,13 @@ fn main() { let args: CliArgs = argh::from_env(); let config = DeemgeeConfig::from_file(); - let (window_side_tx, gb_side_rx) = channel::(); + let (window_side_tx, gb_side_rx) = channel::(); let (gb_side_tx, window_side_rx) = channel::(); - let jh = std::thread::spawn(move || run_gameboy(config, args, gb_side_rx, gb_side_tx).unwrap()); + let jh = std::thread::Builder::new() + .name(String::from("mewmulator")) + .spawn(move || run_gameboy(config, args, gb_side_rx, gb_side_tx).unwrap()) + .unwrap(); window::run_window(config, window_side_rx, window_side_tx); @@ -59,7 +63,7 @@ fn main() { pub fn run_gameboy( _config: DeemgeeConfig, args: CliArgs, - rx: Receiver, + rx: Receiver, tx: Sender, ) -> Result<(), DmgError> { if !args.bootrom.is_file() { @@ -78,8 +82,12 @@ pub fn run_gameboy( return Err(DmgError::BootromInvalidSize(bootrom.len() as u64)); } - if sha1::Sha1::from(bootrom.as_slice()).hexdigest().as_str() - != "4ed31ec6b0b175bb109c0eb5fd3d193da823339f" + let mut hash_ctx = Sha1::new(); + hash_ctx.update(&bootrom); + let digest = hash_ctx.finalize(); + + if digest.as_slice() + != b"\x4e\xd3\x1e\xc6\xb0\xb1\x75\xbb\x10\x9c\x0e\xb5\xfd\x3d\x19\x3d\xa8\x23\x33\x9f" { return Err(DmgError::BootromInvalidHash); } @@ -103,21 +111,35 @@ pub fn run_gameboy( 'outer: loop { while let Ok(event) = rx.try_recv() { match event { - window::WindowEvent::AToggle => gameboy.joypad.set_a(!gameboy.joypad.a), - window::WindowEvent::BToggle => gameboy.joypad.set_b(!gameboy.joypad.b), - window::WindowEvent::SelectToggle => { + window::EmulatorWindowEvent::AToggle => gameboy.joypad.set_a(!gameboy.joypad.a), + window::EmulatorWindowEvent::BToggle => gameboy.joypad.set_b(!gameboy.joypad.b), + window::EmulatorWindowEvent::SelectToggle => { gameboy.joypad.set_select(!gameboy.joypad.select) } - window::WindowEvent::StartToggle => gameboy.joypad.set_start(!gameboy.joypad.start), - window::WindowEvent::UpToggle => gameboy.joypad.set_up(!gameboy.joypad.up), - window::WindowEvent::DownToggle => gameboy.joypad.set_down(!gameboy.joypad.down), - window::WindowEvent::LeftToggle => gameboy.joypad.set_left(!gameboy.joypad.left), - window::WindowEvent::RightToggle => gameboy.joypad.set_right(!gameboy.joypad.right), - window::WindowEvent::PauseToggle => paused = !paused, - window::WindowEvent::LogToggle => { + window::EmulatorWindowEvent::StartToggle => { + gameboy.joypad.set_start(!gameboy.joypad.start) + } + window::EmulatorWindowEvent::UpToggle => gameboy.joypad.set_up(!gameboy.joypad.up), + window::EmulatorWindowEvent::DownToggle => { + gameboy.joypad.set_down(!gameboy.joypad.down) + } + window::EmulatorWindowEvent::LeftToggle => { + gameboy.joypad.set_left(!gameboy.joypad.left) + } + window::EmulatorWindowEvent::RightToggle => { + gameboy.joypad.set_right(!gameboy.joypad.right) + } + window::EmulatorWindowEvent::PauseToggle => paused = !paused, + window::EmulatorWindowEvent::LogToggle => { gameboy.log_instructions = !gameboy.log_instructions } - window::WindowEvent::Exit => break 'outer, + window::EmulatorWindowEvent::Exit => break 'outer, + window::EmulatorWindowEvent::DumpMemory => { + let timestamp = Utc::now().timestamp(); + let contents = gameboy.dump_memory(); + std::fs::write(format!("./memdump-{}.bin", timestamp), contents) + .expect("Failed to write memory dump"); + } } } diff --git a/deemgee/src/settings.rs b/deemgee/src/settings.rs index 451a851..1c0ab02 100644 --- a/deemgee/src/settings.rs +++ b/deemgee/src/settings.rs @@ -1,4 +1,4 @@ -use winit::event::VirtualKeyCode; +use winit::keyboard::KeyCode; #[derive(Debug, serde::Deserialize, Clone, Copy)] pub struct DeemgeeConfig { @@ -7,24 +7,27 @@ pub struct DeemgeeConfig { impl DeemgeeConfig { pub fn from_file() -> Self { - let mut settings = config::Config::default(); - settings.merge(config::File::with_name("config")).unwrap(); - settings.try_into().expect("Config Error") + config::Config::builder() + .add_source(config::File::with_name("config")) + .build() + .and_then(config::Config::try_deserialize) + .expect("config") } } #[derive(Debug, serde::Deserialize, Clone, Copy)] pub struct Bindings { - pub a: VirtualKeyCode, - pub b: VirtualKeyCode, - pub select: VirtualKeyCode, - pub start: VirtualKeyCode, - pub up: VirtualKeyCode, - pub down: VirtualKeyCode, - pub left: VirtualKeyCode, - pub right: VirtualKeyCode, + pub a: KeyCode, + pub b: KeyCode, + pub select: KeyCode, + pub start: KeyCode, + pub up: KeyCode, + pub down: KeyCode, + pub left: KeyCode, + pub right: KeyCode, - pub pause: VirtualKeyCode, - pub exit: VirtualKeyCode, - pub log_ops: VirtualKeyCode, + pub pause: KeyCode, + pub exit: KeyCode, + pub log_ops: KeyCode, + pub dump_memory: KeyCode, } diff --git a/deemgee/src/window.rs b/deemgee/src/window.rs index 78b21ea..03abcf6 100644 --- a/deemgee/src/window.rs +++ b/deemgee/src/window.rs @@ -2,8 +2,9 @@ use std::sync::mpsc::{Receiver, Sender}; use pixels::{Pixels, SurfaceTexture}; use winit::{ - event::{Event, VirtualKeyCode}, + event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, + keyboard::KeyCode, window::WindowBuilder, }; use winit_input_helper::WinitInputHelper; @@ -15,21 +16,21 @@ macro_rules! define_keypress { if $input.key_pressed($config.bindings.$key) && !*$keymap.idx(&$config, $config.bindings.$key) { - $tx.send(WindowEvent::$event).unwrap(); + $tx.send(EmulatorWindowEvent::$event).unwrap(); *$keymap.idx(&$config, $config.bindings.$key) = true; } if $input.key_released($config.bindings.$key) && *$keymap.idx(&$config, $config.bindings.$key) { - $tx.send(WindowEvent::$event).unwrap(); + $tx.send(EmulatorWindowEvent::$event).unwrap(); *$keymap.idx(&$config, $config.bindings.$key) = false; } }; } #[derive(Debug, Clone, Copy)] -pub enum WindowEvent { +pub enum EmulatorWindowEvent { AToggle, BToggle, SelectToggle, @@ -41,6 +42,7 @@ pub enum WindowEvent { PauseToggle, LogToggle, Exit, + DumpMemory, } #[derive(Debug)] @@ -65,7 +67,7 @@ struct Keymap { } impl Keymap { - pub fn idx(&mut self, config: &DeemgeeConfig, kc: VirtualKeyCode) -> &mut bool { + pub fn idx(&mut self, config: &DeemgeeConfig, kc: KeyCode) -> &mut bool { if kc == config.bindings.a { &mut self.a } else if kc == config.bindings.b { @@ -90,8 +92,12 @@ impl Keymap { } } -pub fn run_window(config: DeemgeeConfig, rx: Receiver, tx: Sender) { - let event_loop = EventLoop::new(); +pub fn run_window( + config: DeemgeeConfig, + rx: Receiver, + tx: Sender, +) { + let event_loop = EventLoop::new().unwrap(); let mut input = WinitInputHelper::new(); let window = { WindowBuilder::new().with_title("OwO").build(&event_loop).unwrap() }; @@ -107,70 +113,98 @@ pub fn run_window(config: DeemgeeConfig, rx: Receiver, tx: Sender< let mut keymap = Keymap::default(); - event_loop.run(move |event, _, control_flow| { - if let Event::RedrawRequested(_) = event { - let frame = pixels.get_frame(); + let mut request_redraw = false; + let mut close_requested = false; - match fb.as_ref() { - Some(fb) => { - redraw_happened = true; - frame.copy_from_slice(fb.as_slice()); - } - None => { - let x = vec![0xff; frame.len()]; - frame.copy_from_slice(x.as_slice()) - } - } - if let Err(why) = pixels.render() { - log::error!("Pixels Error: {}", why); - *control_flow = ControlFlow::Exit; - tx.send(WindowEvent::Exit).unwrap(); - return; - } - } + event_loop + .run(move |event, target| { + match &event { + Event::WindowEvent { event, .. } => match event { + WindowEvent::CloseRequested => close_requested = true, + WindowEvent::RedrawRequested => { + let frame = pixels.frame_mut(); - if input.update(&event) { - if input.key_pressed(config.bindings.exit) || input.quit() { - *control_flow = ControlFlow::Exit; - tx.send(WindowEvent::Exit).unwrap(); - return; - } - - if input.key_pressed(config.bindings.pause) { - tx.send(WindowEvent::PauseToggle).unwrap(); - } - - if input.key_pressed(config.bindings.log_ops) { - tx.send(WindowEvent::LogToggle).unwrap(); - } - - define_keypress!(input, config, keymap, tx, a, AToggle); - define_keypress!(input, config, keymap, tx, b, BToggle); - define_keypress!(input, config, keymap, tx, start, StartToggle); - define_keypress!(input, config, keymap, tx, select, SelectToggle); - define_keypress!(input, config, keymap, tx, up, UpToggle); - define_keypress!(input, config, keymap, tx, down, DownToggle); - define_keypress!(input, config, keymap, tx, left, LeftToggle); - define_keypress!(input, config, keymap, tx, right, RightToggle); - } - - if let Some(size) = input.window_resized() { - pixels.resize_surface(size.width, size.height); - window.request_redraw(); - redraw_happened = false; - } - - while let Ok(event) = rx.try_recv() { - match event { - GameboyEvent::Framebuffer(buf) => { - fb = Some(buf); - - if redraw_happened { + match fb.as_ref() { + Some(fb) => { + redraw_happened = true; + frame.copy_from_slice(fb.as_slice()); + } + None => { + let x = vec![0xff; frame.len()]; + frame.copy_from_slice(x.as_slice()) + } + } + if let Err(why) = pixels.render() { + log::error!("Pixels Error: {}", why); + close_requested = true; + tx.send(EmulatorWindowEvent::Exit).unwrap(); + return; + } + } + _ => {} + }, + Event::AboutToWait => { + if request_redraw && !close_requested { window.request_redraw(); - redraw_happened = false; + } + + target.set_control_flow(ControlFlow::Poll); + + if close_requested { + target.exit(); + } + } + _ => {} + } + + if input.update(&event) { + if input.key_pressed(config.bindings.exit) + || (input.close_requested() || input.destroyed()) + { + tx.send(EmulatorWindowEvent::Exit).unwrap(); + return; + } + + if input.key_pressed(config.bindings.pause) { + tx.send(EmulatorWindowEvent::PauseToggle).unwrap(); + } + + if input.key_pressed(config.bindings.log_ops) { + tx.send(EmulatorWindowEvent::LogToggle).unwrap(); + } + + if input.key_pressed(config.bindings.dump_memory) { + tx.send(EmulatorWindowEvent::DumpMemory).unwrap(); + } + + define_keypress!(input, config, keymap, tx, a, AToggle); + define_keypress!(input, config, keymap, tx, b, BToggle); + define_keypress!(input, config, keymap, tx, start, StartToggle); + define_keypress!(input, config, keymap, tx, select, SelectToggle); + define_keypress!(input, config, keymap, tx, up, UpToggle); + define_keypress!(input, config, keymap, tx, down, DownToggle); + define_keypress!(input, config, keymap, tx, left, LeftToggle); + define_keypress!(input, config, keymap, tx, right, RightToggle); + } + + if let Some(size) = input.window_resized() { + pixels.resize_surface(size.width, size.height).unwrap(); + window.request_redraw(); + redraw_happened = false; + } + + while let Ok(event) = rx.try_recv() { + match event { + GameboyEvent::Framebuffer(buf) => { + fb = Some(buf); + + if redraw_happened { + request_redraw = true; + redraw_happened = false; + } } } } - } - }); + }) + .expect("event loop error"); } diff --git a/rust-toolchain b/rust-toolchain index 870bbe4..07ade69 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -stable \ No newline at end of file +nightly \ No newline at end of file