From ceb62d2c536bba68e34680591edce1857d713b7f Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Mon, 22 Jul 2024 14:07:35 -0400 Subject: [PATCH] Initial commit --- .gitignore | 1 + .vscode/launch.json | 83 ++ Cargo.lock | 2166 +++++++++++++++++++++++++++++ Cargo.toml | 3 + chip8_core/Cargo.toml | 9 + chip8_core/src/chip8_constants.rs | 21 + chip8_core/src/chip8_mnemonics.rs | 195 +++ chip8_core/src/lib.rs | 8 + chip8_core/src/parts/CPU.rs | 449 ++++++ chip8_core/src/parts/Display.rs | 28 + chip8_core/src/parts/Keyboard.rs | 82 ++ chip8_toy/Cargo.lock | 7 + chip8_toy/Cargo.toml | 17 + chip8_toy/src/gui/display.rs | 79 ++ chip8_toy/src/lib.rs | 3 + chip8_toy/src/main.rs | 94 ++ 16 files changed, 3245 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 chip8_core/Cargo.toml create mode 100644 chip8_core/src/chip8_constants.rs create mode 100644 chip8_core/src/chip8_mnemonics.rs create mode 100644 chip8_core/src/lib.rs create mode 100644 chip8_core/src/parts/CPU.rs create mode 100644 chip8_core/src/parts/Display.rs create mode 100644 chip8_core/src/parts/Keyboard.rs create mode 100644 chip8_toy/Cargo.lock create mode 100644 chip8_toy/Cargo.toml create mode 100644 chip8_toy/src/gui/display.rs create mode 100644 chip8_toy/src/lib.rs create mode 100644 chip8_toy/src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..30aaa82 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,83 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'trevors_chip8_toy'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=trevors_chip8_toy" + ], + "filter": { + "name": "trevors_chip8_toy", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'trevors_chip8_toy'", + "cargo": { + "args": [ + "build", + "--bin=trevors_chip8_toy", + "--package=trevors_chip8_toy" + ], + "filter": { + "name": "trevors_chip8_toy", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'trevors_chip8_toy'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=trevors_chip8_toy", + "--package=trevors_chip8_toy" + ], + "filter": { + "name": "trevors_chip8_toy", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'trevors_chip8_core'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=trevors_chip8_core" + ], + "filter": { + "name": "trevors_chip8_core", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..3920a96 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2166 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ab_glyph" +version = "0.2.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79faae4620f45232f599d9bc7b290f88247a0834162c4495ab2f02d60004adfb" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-activity" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" +dependencies = [ + "android-properties", + "bitflags 2.6.0", + "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 = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "approx" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arboard" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" +dependencies = [ + "clipboard-win", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "parking_lot", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitmask" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytemuck" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.6.0", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "cgmath" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a98d30140e3296250832bbaaff83b27dcd6fa3cc70fb6f1f3e5c9c0023b5317" +dependencies = [ + "approx", + "mint", + "num-traits", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clipboard-win" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +dependencies = [ + "error-code", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +dependencies = [ + "mint", +] + +[[package]] +name = "easy-imgui" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128099cf608fd52fb6d68f0c341c71b4a7c6fc70d71b70e6d4b95081ba5e0cda" +dependencies = [ + "bitflags 2.6.0", + "cgmath", + "easy-imgui-sys", + "image", + "mint", + "paste", +] + +[[package]] +name = "easy-imgui-renderer" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f35e6e4bcf3d9f028eaec23e044bc50ecd31899fb4407a6f3b9cd26814be97c6" +dependencies = [ + "anyhow", + "cgmath", + "easy-imgui", + "easy-imgui-sys", + "glow", + "log", + "smallvec", +] + +[[package]] +name = "easy-imgui-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c228fb711bf717ca3c3d28f7b6d305c9e50cf1515c9284f38b327825445a870" +dependencies = [ + "bindgen", + "cc", + "pkg-config", + "xshell", +] + +[[package]] +name = "easy-imgui-window" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07d58dd615389e6ac1b7de9df82a800102c575c1f428533a56ca2f6e00512ec7" +dependencies = [ + "anyhow", + "arboard", + "bitflags 2.6.0", + "easy-imgui", + "easy-imgui-renderer", + "easy-imgui-sys", + "glutin", + "glutin-winit", + "raw-window-handle", + "winit", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "error-code" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" + +[[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", +] + +[[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", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2491aa3090f682ddd920b184491844440fdd14379c7eef8f5bc10ef7fb3242fd" +dependencies = [ + "bitflags 2.6.0", + "cfg_aliases", + "cgl", + "core-foundation", + "dispatch", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "image" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +dependencies = [ + "bytemuck", + "byteorder", + "num-traits", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mint" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.6.0", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +dependencies = [ + "libredox", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490d3a563d3122bf7c911a59b0add9389e5ec0f5f0c3ac6b91ff235a0e6a7f90" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.3", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "polling" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[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]] +name = "redox_syscall" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[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.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.6.0", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "syn" +version = "2.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + +[[package]] +name = "trevors_chip8_core" +version = "0.1.0" +dependencies = [ + "bitmask", +] + +[[package]] +name = "trevors_chip8_toy" +version = "0.1.0" +dependencies = [ + "arboard", + "easy-imgui", + "easy-imgui-renderer", + "easy-imgui-sys", + "easy-imgui-window", + "glutin", + "glutin-winit", + "log", + "raw-window-handle", + "trevors_chip8_core", + "winit", +] + +[[package]] +name = "ttf-parser" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8686b91785aff82828ed725225925b33b4fde44c4bb15876e5f7c832724c420a" + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wayland-backend" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" +dependencies = [ + "bitflags 2.6.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.6.0", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef9489a8df197ebf3a8ce8a7a7f0a2320035c3743f3c1bd0bdbccf07ce64f95" +dependencies = [ + "rustix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f79f2d57c7fcc6ab4d602adba364bf59a5c24de57bd194486bf9b8360e06bfc4" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd993de54a40a40fbe5601d9f1fbcaef0aebcc5fda447d7dc8f6dcbaae4f8953" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[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.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4225ddd8ab67b8b59a2fee4b34889ebf13c0460c1c3fa297c58e21eb87801b33" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.6.0", + "block2", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "xcursor" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d491ee231a51ae64a5b762114c3ac2104b967aadba1de45c86ca42cf051513b7" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.6.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" + +[[package]] +name = "xshell" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..b96c0d2 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +members = ["chip8_toy","chip8_core"] +resolver = "2" \ No newline at end of file diff --git a/chip8_core/Cargo.toml b/chip8_core/Cargo.toml new file mode 100644 index 0000000..e7f9fc8 --- /dev/null +++ b/chip8_core/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "trevors_chip8_core" +version = "0.1.0" +edition = "2021" + +[dependencies] +bitmask = "0.5.0" + +[lib] diff --git a/chip8_core/src/chip8_constants.rs b/chip8_core/src/chip8_constants.rs new file mode 100644 index 0000000..bb8637f --- /dev/null +++ b/chip8_core/src/chip8_constants.rs @@ -0,0 +1,21 @@ + +pub const CHIP8_MEMORY_SIZE: u16 = 0x1000; +pub const CHIP8_MEMORY_SIZE_USIZE: usize = 0x1000; + +pub const FONT_0: [u8; 5] = [0xF0, 0x90, 0x90, 0x90, 0xF0]; +pub const FONT_1: [u8; 5] = [0x20, 0x60, 0x20, 0x20, 0x70]; +pub const FONT_2: [u8; 5] = [0xF0, 0x10, 0xF0, 0x80, 0xF0]; +pub const FONT_3: [u8; 5] = [0xF0, 0x10, 0xF0, 0x10, 0xF0]; +pub const FONT_4: [u8; 5] = [0x90, 0x90, 0xF0, 0x10, 0x10]; +pub const FONT_5: [u8; 5] = [0xF0, 0x80, 0xF0, 0x10, 0xF0]; +pub const FONT_6: [u8; 5] = [0xF0, 0x80, 0xF0, 0x90, 0xF0]; +pub const FONT_7: [u8; 5] = [0xF0, 0x10, 0x20, 0x40, 0x40]; +pub const FONT_8: [u8; 5] = [0xF0, 0x90, 0xF0, 0x90, 0xF0]; +pub const FONT_9: [u8; 5] = [0xF0, 0x90, 0xF0, 0x10, 0xF0]; +pub const FONT_A: [u8; 5] = [0xF0, 0x90, 0xF0, 0x90, 0x90]; +pub const FONT_B: [u8; 5] = [0xE0, 0x90, 0xE0, 0x90, 0xE0]; +pub const FONT_C: [u8; 5] = [0xF0, 0x80, 0x80, 0x80, 0xF0]; +pub const FONT_D: [u8; 5] = [0xE0, 0x90, 0x90, 0x90, 0xE0]; +pub const FONT_E: [u8; 5] = [0xF0, 0x80, 0xF0, 0x80, 0xF0]; +pub const FONT_F: [u8; 5] = [0xF0, 0x80, 0xf0, 0x80, 0x80]; + diff --git a/chip8_core/src/chip8_mnemonics.rs b/chip8_core/src/chip8_mnemonics.rs new file mode 100644 index 0000000..36e7fc2 --- /dev/null +++ b/chip8_core/src/chip8_mnemonics.rs @@ -0,0 +1,195 @@ +use bitmask::bitmask; + +use crate::{chip8_constants::CHIP8_MEMORY_SIZE, parts::Display::Chip8Display}; + +enum Chip8StartOffset { + STANDARD, + ETI600, + OTHER, +} + +struct Chip8Registers { + V: [u8; 16], + I: u16, + DelayTimer: u16, + SoundTimer: u16, + StackPointer: u8, + ProgramCounter: u16, +} + +impl Default for Chip8Registers { + fn default() -> Self { + Chip8Registers { + DelayTimer: 60, + V: [ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + ], + I: 0x00, + SoundTimer: 60, + StackPointer: 255, + ProgramCounter: 0x200, + } + } +} + +enum Chip8Instruction { + SYS(u16), + CLS, + RET, + JMP(u16), + CALL(u16), + SNEQ(u8, u16), + SNNE(u8, u8), + SNRE(u8, u8), + STOR(u8, u16), + ADD(u8, u16), + MOV(u8, u8), + OR(u8, u8), + AND(u8, u8), + XOR(u8, u8), + ADC(u8, u8), + SBC(u8, u8), + RSR(u8, u8), + LSR(u8, u8), + SNE(u8, u8), + STO(i16), + JMPI(u16), + RND(u8, u8), + SETD(u8), + SETT(u8), + BCD(u8), +} + +enum Chip8Keys { + KEY0, + KEY1, + KEY2, + KEY3, + KEY4, + KEY5, + KEY6, + KEY7, + KEY8, + KEY9, + KEYA, + KEYB, + KEYC, + KEYD, + KEYE, + KEYF, +} + +pub fn display_video_memory(system_memory: [u8; CHIP8_MEMORY_SIZE as usize]) { + // Assumes memory addresses from +} + +const ZERO: u16 = 0b0000000000000000; +const BOTTOM_BYTE: u16 = 0b0000000011111111; +const TOP_BYTE: u16 = 0b1111111100000000; +const NIBBLE0: u16 = 0b1111000000000000; +const NIBBLE1: u16 = 0b0000111100000000; +const NIBBLE2: u16 = 0b0000000011110000; +const NIBBLE3: u16 = 0b0000000000001111; +const NIBBLE0_BALANCE: u16 = 0x0FFF; +const PMSK_0000: i16 = 0x0000; +const PMSK_00X0: i16 = 0x00F0; +const PMSK_0X00: i16 = 0x0F00; +const PMSK_0XXX: i16 = 0x0FFF; + +// AND against the possible operand to find which one we have +bitmask! { + mask Chip8Instructions: u16 where flags Chip8InstructionFlags { + SYS = 0x00, + CLR = 0b0000000011100000, + RTS = 0b0000000011101110, + JUMP = 0b0001000000000000, + CALL = 0b0010000000000000, + SKE = 0b0011000000000000, + SKNE = 0b0100000000000000, + SKRE = 0b0101000000000000, + LOAD = 0b0110000000000000, + ADD = 0b0111000000000000, + MOVE = 0b1000000000000000, + OR = 0b1000000000000001, + AND = 0b1000000000000010, + XOR = 0b1000000000000011, + ADDR = 0b1000000000000100, + SUB = 0b1000000000000101, + SHR = 0b1000000000000110, + SHL = 0b1000000000001110, + SKRNE = 0b1001000000000000, + LOADI = 0b1010000000000000, + JUMPI = 0b1011000000000000, + RAND = 0b1100000000000000, + DRAW = 0b1101000000000000, + SKPR = 0b1110000000001110, + SKUP = 0b1111000010100001, + MOVED = 0b1111000000000111, + KEYD = 0b1111000000001010, + LOADD = 0b1111000000010101, + LOADS = 0b1111000000011000, + ADDI = 0b1111000000011110, + LDSPR = 0b1111000000101001, + BCD = 0b1111000000110011, + STOR = 0b1111000001010101, + MEMCPY = 0b1111000001100101 + } +} + +enum Chip8Asm { + SYS(u16), + CLR(), + RTS(), + JUMP(u16), + CALL(u16), + SKE(u8, u8), + SKNE(u8, u8), + SKRE(u8, u8), + LOAD(u8, u8), + ADD(u8, u8), + MOVE(u8, u8), + OR(u8, u8), + AND(u8, u8), + XOR(u8, u8), + ADDR(u8, u8), + SUB(u8, u8), + SHR(u8, u8), + SHL(u8, u8), + SKRNE(u8, u8), + LOADI(u16), + JUMPI(u16), + RAND(u8, u8), + DRAW(u8, u8, u8), + SKPR(u8), + SKUP(u8), + MOVED(u8), + KEYD(u8), + LOADD(u8), + LOADS(u8), + ADDI(u8), + LDSPR(u8), + BCD(u8), + STOR(u8), + READ(u8), +} + +struct Chip8Cpu {} + +struct Chip8System { + registers: Chip8Registers, + screen: Chip8Display, +} + +impl Chip8System { + pub fn tick(self: Self) { + println!(" Ticking Chip8System"); + + // Fetch... + // ...Decode... + // ...Execute + + // self.registers.tick(); + self.screen.tick(); + } +} diff --git a/chip8_core/src/lib.rs b/chip8_core/src/lib.rs new file mode 100644 index 0000000..74c7582 --- /dev/null +++ b/chip8_core/src/lib.rs @@ -0,0 +1,8 @@ +pub mod chip8_mnemonics; +pub mod chip8_constants; + +pub mod parts { + pub mod CPU; + pub mod Display; + pub mod Keyboard; +} \ No newline at end of file diff --git a/chip8_core/src/parts/CPU.rs b/chip8_core/src/parts/CPU.rs new file mode 100644 index 0000000..294f74d --- /dev/null +++ b/chip8_core/src/parts/CPU.rs @@ -0,0 +1,449 @@ +struct Chip8Registers { + +} + + +impl Chip8Registers { + pub fn tick(self: &Self) { + println!("Ticking Registers"); + } +} + + +pub struct Chip8InstructionParameter { + mask: u16 +} + +struct Chip8Instruction { + id: String, + mask: u16, + pattern: u16, + arguments: Vec, + description: Box +} + +pub fn fill_chip8_instructions() { + let full_instruction_set = vec![ + Chip8Instruction { + id: "SYS".to_string(), + mask: 0x00, + pattern: 0x00, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0FFF + } + ], + description: "Execute method at address referenced by parameter".into() + }, + Chip8Instruction { + id: "CLR".to_string(), + mask: 0x00E0, + pattern: 0x00E0, + arguments: vec![], + description: "Clear the Screen".into() + }, + Chip8Instruction { + id: "RET".to_string(), + mask: 0x00EE, + pattern: 0x00EE, + arguments: vec![], + description: "Return from Subroutine".into() + }, + Chip8Instruction { + id: "JMP".to_string(), + mask: 0x1FFF, + pattern: 0x1000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0fff + } + ], + description: "Jump to specified location".into() + }, + Chip8Instruction { + id: "SEQ".to_string(), + mask: 0x3FFF, + pattern: 0x3000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00ff + } + ], + description: "Skip next instruction if Register does equal parameter".into() + }, + Chip8Instruction { + id: "SNE".to_string(), + mask: 0x4FFF, + pattern: 0x4000, + arguments: vec! [ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00ff + } + ], + description: "Skip next instruction if Register doesn't equal parameter".into() + }, + Chip8Instruction { + id: "SREQ".to_string(), + mask: 0x5FF0, + pattern: 0x5000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "STO".to_string(), + mask: 0x6FFF, + pattern: 0x6000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00ff + } + ], + description: "Store value into register".into() + }, + Chip8Instruction { + id: "ADD".to_string(), + mask: 0x7FFF, + pattern: 0x7000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00ff + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "CPY".to_string(), + mask: 0x8FF0, + pattern: 0x8000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "OR".to_string(), + mask: 0x8FF1, + pattern: 0x8001, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Logical OR of registers placing result in first register".into() + }, + Chip8Instruction { + id: "AND".to_string(), + mask: 0x8FF2, + pattern: 0x8002, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Logical AND of registers placing result in first register".into() + }, + Chip8Instruction { + id: "XOR".to_string(), + mask: 0x8FF3, + pattern: 0x8003, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Logical XOR of registers placing result in first register".into() + }, + Chip8Instruction { + id: "ADC".to_string(), + mask: 0x8FF4, + pattern: 0x8004, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Add 2 Registers with carry flag".into() + }, + Chip8Instruction { + id: "SUBC".to_string(), + mask: 0x8FF5, + pattern: 0x8005, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Subtract 2 Registers with carry flag".into() + }, + Chip8Instruction { + id: "RSR".to_string(), + mask: 0x8FF6, + pattern: 0x8006, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Register Shifted Right".into() + }, + Chip8Instruction { + id: "SUBC".to_string(), + mask: 0x8FF7, + pattern: 0x8007, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Subtract 2 Regiters with Carry".into() + }, + Chip8Instruction { + id: "RSL".to_string(), + mask: 0x8FFE, + pattern: 0x800E, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Register Shifted Left".into() + }, + Chip8Instruction { + id: "SRNE".to_string(), + mask: 0x9FF0, + pattern: 0x9000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + } + ], + description: "Skip next instruction if registers not equal".into() + }, + Chip8Instruction { + id: "LDI".to_string(), + mask: 0xAFFF, + pattern: 0xA000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0fff + } + ], + description: "Load Data from Memory Address".into() + }, + Chip8Instruction { + id: "JMPI".to_string(), + mask: 0xBFFF, + pattern: 0xB000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0fff + } + ], + description: "Jump to Memory Address".into() + }, + Chip8Instruction { + id: "RNG".to_string(), + mask: 0xCFFF, + pattern: 0xC000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00ff + } + ], + description: "Random number Generator".into() + }, + Chip8Instruction { + id: "SPR".to_string(), + mask: 0xDFFF, + pattern: 0xD000, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + }, + Chip8InstructionParameter { + mask: 0x00f0 + }, + Chip8InstructionParameter { + mask: 0x000f + } + + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "JNK".to_string(), + mask: 0xEF9E, + pattern: 0xE09E, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "Jump over next instruction if Key Pressed".into() + }, + Chip8Instruction { + id: "JKP".to_string(), + mask: 0xEFA1, + pattern: 0xE0A1, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "Jump over next instruction if Key Not Pressed".into() + }, + Chip8Instruction { + id: "SDT".to_string(), + mask: 0xFF07, + pattern: 0xF007, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0F00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "WKP".to_string(), + mask: 0xFF0A, + pattern: 0xF00A, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "LDT".to_string(), + mask: 0xFF15, + pattern: 0xF015, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "LST".to_string(), + mask: 0xFF18, + pattern: 0xF018, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "ADDI".to_string(), + mask: 0xFF1E, + pattern: 0xF01E, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "SETI".to_string(), + mask: 0xFF29, + pattern: 0xF029, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction{ + id: "BCD".to_string(), + mask: 0xFF33, + pattern: 0xF033, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "Binary Coded Decimal of register".into() + }, + Chip8Instruction{ + id: "MSTO".to_string(), + mask: 0xFF55, + pattern: 0xF055, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + }, + Chip8Instruction { + id: "MLOAD".to_string(), + mask: 0xFF65, + pattern: 0xF065, + arguments: vec![ + Chip8InstructionParameter { + mask: 0x0f00 + } + ], + description: "TBD".into() + } + ]; +} \ No newline at end of file diff --git a/chip8_core/src/parts/Display.rs b/chip8_core/src/parts/Display.rs new file mode 100644 index 0000000..e1463a5 --- /dev/null +++ b/chip8_core/src/parts/Display.rs @@ -0,0 +1,28 @@ + +pub struct Chip8Display { + // 64w x 32h + pub memory: [bool; 512], +} + +impl Chip8Display { + pub fn tick(self: &Self) { + println!("Ticking the display"); + + } + + pub fn render_chip8_display(to_render: Chip8Display) { + // 32 rows... + for index_row in 0..=32 { + // ...64 columns + for index_col in 0..=64 { + let offset = (index_row * 64) + index_col; + if (to_render.memory[offset]) { + print!("*") + } else { + print!(" ") + }; + } + println!(""); + } + } +} diff --git a/chip8_core/src/parts/Keyboard.rs b/chip8_core/src/parts/Keyboard.rs new file mode 100644 index 0000000..181135d --- /dev/null +++ b/chip8_core/src/parts/Keyboard.rs @@ -0,0 +1,82 @@ + +#[derive(Clone)] +struct Chip8Keyboard { + keys_state: [bool; 16] +} + +impl Default for Chip8Keyboard { + fn default() -> Self { + Self { keys_state: [ + false, false, false, false, + false, false, false, false, + false, false, false, false, + false, false, false, false + ] } + } +} + +impl Chip8Keyboard { + + fn display_keyboard_key(self: Self, key_id: u8) { + let filler = if self.is_pressed(key_id) { "*" } else { " " }; + print!("{}{}{}", filler, key_id, filler) + } + + fn display_keyboard_horizontal_line(self: Self, row_values: [u8; 4]) { + print!("|"); + for current in row_values { + self.clone().display_keyboard_key(current); + print!("|"); + } + println!(); + } + + fn display_keyboard_seperator_line(self: Self) { + println!("+---+---+---+---+"); + + } + + pub fn display_keyboard(self: Self) { + self.clone().display_keyboard_seperator_line(); + self.clone().display_keyboard_horizontal_line( + [1,2,3,0xC] + ); + println!("+---+---+---+---+"); + println!("| 4 | 5 | 6 | D |"); + println!("+---+---+---+---+"); + println!("| 7 | 8 | 9 | E |"); + println!("+---+---+---+---+"); + println!("| A | 0 | B | F |"); + println!("+---+---+---+---+"); + } + + pub fn press_key(self: &mut Self, key_id: u8) { + self.keys_state[key_id as usize] = true; + } + + pub fn release_key(self: &mut Self, key_id: u8) { + self.keys_state[key_id as usize] = false; + } + + pub fn is_pressed(self: Self, key_id: u8) -> bool { + self.keys_state[key_id as usize] + } +} + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn smoke_test() { + assert_eq!(true, true); + } + + #[test] + fn basic_keyboard_display_works() { + let basic_keyboard = Chip8Keyboard::default(); + + + } +} \ No newline at end of file diff --git a/chip8_toy/Cargo.lock b/chip8_toy/Cargo.lock new file mode 100644 index 0000000..6e32adb --- /dev/null +++ b/chip8_toy/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "trevors_chip8_toy" +version = "0.1.0" diff --git a/chip8_toy/Cargo.toml b/chip8_toy/Cargo.toml new file mode 100644 index 0000000..970b03f --- /dev/null +++ b/chip8_toy/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "trevors_chip8_toy" +version = "0.1.0" +edition = "2021" + +[dependencies] +trevors_chip8_core = { path = "../chip8_core" } +easy-imgui-sys = { version = "=0.6.0" } +easy-imgui = { version = "=0.6.0" } +easy-imgui-renderer = { version = "=0.6.0" } +easy-imgui-window = { version = "0.6.0" } +log ="0.4" +glutin = "0.32" +glutin-winit = { version = "0.5", optional = true } +raw-window-handle = "0.6" +arboard = { version = "3", optional = true, default-features = false } +winit = { version = "0.30", features = ["x11", "mint"] } diff --git a/chip8_toy/src/gui/display.rs b/chip8_toy/src/gui/display.rs new file mode 100644 index 0000000..10ae9ec --- /dev/null +++ b/chip8_toy/src/gui/display.rs @@ -0,0 +1,79 @@ +use easy_imgui::{Ui, UiBuilder}; +use easy_imgui_window::{MainWindow, MainWindowWithRenderer}; +use winit::{application::ApplicationHandler, event_loop::ActiveEventLoop, window::{Window, WindowAttributes}}; + + +pub struct Chip8Display { + pub window: MainWindowWithRenderer, +} + +impl Chip8Display { + pub fn new(event_loop: &ActiveEventLoop) -> Chip8Display { + Chip8Display { window: MainWindowWithRenderer::new( + MainWindow::new::<()>(&event_loop, Window::default_attributes().with_title("Chip8 Display")).unwrap()) + } + } + + pub fn render(ui: &Ui) { + + } +} + +impl UiBuilder for Chip8AppHandler { + fn do_ui(&mut self, ui: &Ui) { + + ui.text("This is where the Chip8 UI Goes"); + ui.text("Controls for Start/Stop/Load/Run Maybe?"); + + + } +} + +#[derive(Default)] +pub struct Chip8AppHandler { + pub windows: Vec, + // pub display: Chip8Display +} + +impl ApplicationHandler for Chip8AppHandler { + fn suspended(&mut self, _event_loop: &ActiveEventLoop) { + self.windows.clear(); + } + + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + self.windows.push(Chip8Display::new(event_loop).window); + } + + fn window_event( + &mut self, + event_loop: &ActiveEventLoop, + window_id: winit::window::WindowId, + event: winit::event::WindowEvent, + ) { + for window in &mut self.windows { + if window.main_window().window().id() != window_id { + continue; + } + let res = window.window_event( + &mut self, + &event, + easy_imgui_window::EventFlags::empty(), + ); + if res.window_closed { + event_loop.exit(); + } + break; + } + } + fn new_events(&mut self, _event_loop: &ActiveEventLoop, _cause: winit::event::StartCause) { + for window in &mut self.windows { + window.new_events(); + } + } + fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) { + for window in &mut self.windows { + window.about_to_wait(); + } + } + +} diff --git a/chip8_toy/src/lib.rs b/chip8_toy/src/lib.rs new file mode 100644 index 0000000..0cd2955 --- /dev/null +++ b/chip8_toy/src/lib.rs @@ -0,0 +1,3 @@ +pub mod gui { + pub mod display; +} \ No newline at end of file diff --git a/chip8_toy/src/main.rs b/chip8_toy/src/main.rs new file mode 100644 index 0000000..e2781fa --- /dev/null +++ b/chip8_toy/src/main.rs @@ -0,0 +1,94 @@ +use easy_imgui_window::{ + easy_imgui as imgui, + easy_imgui_renderer::Renderer, + winit::{ + event_loop::{ActiveEventLoop, EventLoop}, + window::Window, + }, + MainWindow, MainWindowWithRenderer, +}; +use trevors_chip8_toy::gui::display::{Chip8App, Chip8AppHandler}; +use std::rc::Rc; + +fn main() { + let event_loop = EventLoop::new().unwrap(); + + let mut main = Chip8AppHandler { + windows: vec![], + app: Chip8App, + }; + + event_loop.run_app(&mut main).unwrap(); +} + +#[derive(Default)] +struct AppHandler { + windows: Vec, + app: App, +} + +impl winit::application::ApplicationHandler for AppHandler { + fn suspended(&mut self, _event_loop: &ActiveEventLoop) { + self.windows.clear(); + } + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + let wattr_1 = Window::default_attributes().with_title("Example #1"); + let main_window_1 = MainWindow::new::<()>(&event_loop, wattr_1).unwrap(); + let mut window_1 = MainWindowWithRenderer::new(main_window_1); + + let wattr_2 = Window::default_attributes().with_title("Example #2"); + let main_window_2 = MainWindow::new::<()>(&event_loop, wattr_2).unwrap(); + // The GL context can be reused, but the imgui context cannot + let mut renderer_2 = Renderer::new(Rc::clone(window_1.renderer().gl_context())).unwrap(); + renderer_2.set_background_color(Some(imgui::Color::GREEN)); + let window_2 = MainWindowWithRenderer::new_with_renderer(main_window_2, renderer_2); + + self.windows.push(window_1); + self.windows.push(window_2); + } + fn window_event( + &mut self, + event_loop: &ActiveEventLoop, + window_id: winit::window::WindowId, + event: winit::event::WindowEvent, + ) { + for window in &mut self.windows { + if window.main_window().window().id() != window_id { + continue; + } + let res = window.window_event( + &mut self.app, + &event, + easy_imgui_window::EventFlags::empty(), + ); + if res.window_closed { + event_loop.exit(); + } + break; + } + } + fn new_events(&mut self, _event_loop: &ActiveEventLoop, _cause: winit::event::StartCause) { + for window in &mut self.windows { + window.new_events(); + } + } + fn about_to_wait(&mut self, _event_loop: &ActiveEventLoop) { + for window in &mut self.windows { + window.about_to_wait(); + } + } +} + +#[derive(Default)] +struct App; + +impl imgui::UiBuilder for App { + fn do_ui(&mut self, ui: &imgui::Ui) { + #[cfg(feature = "docking")] + { + ui.dock_space_over_viewport(0, imgui::DockNodeFlags::None); + } + + ui.show_demo_window(None); + } +} \ No newline at end of file