diff --git a/.forgejo/workflows/rust.yml b/.forgejo/workflows/rust.yml index 7043701..d1a1ffb 100644 --- a/.forgejo/workflows/rust.yml +++ b/.forgejo/workflows/rust.yml @@ -40,7 +40,7 @@ jobs: sh get-docker.sh # Start Docker daemon directly (instead of using service) - dockerd & + sudo dockerd & # Give the Docker daemon a moment to initialize sleep 10 diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 4d8b2d4..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - // 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 executable 'zenyx'", - "cargo": { - "args": [ - "build", - "--bin=zenyx", - "--package=zenyx" - ], - "filter": { - "name": "zenyx", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'zenyx'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=zenyx", - "--package=zenyx" - ], - "filter": { - "name": "zenyx", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'zen_core'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=zen_core" - ], - "filter": { - "name": "zen_core", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index ffd1ccf..b68631d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,3695 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ab_glyph" -version = "0.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0" -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 = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom 0.2.15", - "once_cell", - "version_check", - "zerocopy 0.7.35", -] - -[[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.9.0", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys 0.6.0+11769913", - "num_enum", - "thiserror 1.0.69", -] - -[[package]] -name = "android-properties" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anyhow" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" - -[[package]] -name = "approx" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" -dependencies = [ - "num-traits", -] - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "ascii" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" - -[[package]] -name = "ash" -version = "0.38.0+1.3.281" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" -dependencies = [ - "libloading", -] - -[[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.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "bit-set" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" -dependencies = [ - "serde", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2", -] - -[[package]] -name = "build-print" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2128d00b7061b82b72844a351e80acd29e05afc60e9261e2ac90dca9ecc2ac" - -[[package]] -name = "built" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b" -dependencies = [ - "cargo-lock", - "chrono", - "git2", -] - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "bytemuck" -version = "1.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.9.0", - "log", - "polling", - "rustix 0.38.44", - "slab", - "thiserror 1.0.69", -] - -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop", - "rustix 0.38.44", - "wayland-backend", - "wayland-client", -] - -[[package]] -name = "cargo-lock" -version = "10.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06acb4f71407ba205a07cb453211e0e6a67b21904e47f6ba1f9589e38f2e454" -dependencies = [ - "semver", - "serde", - "toml", - "url", -] - -[[package]] -name = "cc" -version = "1.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" -dependencies = [ - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfg-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 = "cgmath" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a98d30140e3296250832bbaaff83b27dcd6fa3cc70fb6f1f3e5c9c0023b5317" -dependencies = [ - "approx 0.4.0", - "num-traits", -] - -[[package]] -name = "chrono" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "clap" -version = "4.5.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" -dependencies = [ - "clap_builder", -] - -[[package]] -name = "clap_builder" -version = "4.5.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" -dependencies = [ - "anstyle", - "clap_lex", -] - -[[package]] -name = "clap_lex" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" - -[[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 = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width 0.1.14", -] - -[[package]] -name = "colored" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" -dependencies = [ - "windows-sys 0.59.0", -] - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[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 = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "cursor-icon" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dlib" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" -dependencies = [ - "libloading", -] - -[[package]] -name = "document-features" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" -dependencies = [ - "litrs", -] - -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - -[[package]] -name = "dpi" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "endian-type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "error-code" -version = "3.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" - -[[package]] -name = "fd-lock" -version = "4.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" -dependencies = [ - "cfg-if", - "rustix 1.0.5", - "windows-sys 0.59.0", -] - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "flate2" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[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 = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "git2" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5220b8ba44c68a9a7f7a7659e864dd73692e417ef0211bea133c7b74e031eeb9" -dependencies = [ - "bitflags 2.9.0", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] -name = "glow" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "glutin_wgl_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "glyph_brush" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0060f4ed4ef64a5876d9836d7d6c9ed43a463f3ca431682bec1c326064c8c93e" -dependencies = [ - "glyph_brush_draw_cache", - "glyph_brush_layout", - "ordered-float 5.0.0", - "rustc-hash 2.1.1", - "twox-hash", -] - -[[package]] -name = "glyph_brush_draw_cache" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb6c910def52365fef3f439a6b50a4d5c11b28eec4cf6c191f6dfea18e88d7f" -dependencies = [ - "ab_glyph", - "crossbeam-channel", - "crossbeam-deque", - "linked-hash-map", - "rayon", - "rustc-hash 2.1.1", -] - -[[package]] -name = "glyph_brush_layout" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1e288bfd2f6c0313f78bf5aa538356ad481a3bb97e9b7f93220ab0066c5992" -dependencies = [ - "ab_glyph", - "approx 0.5.1", - "xi-unicode", -] - -[[package]] -name = "gpu-alloc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" -dependencies = [ - "bitflags 2.9.0", - "gpu-alloc-types", -] - -[[package]] -name = "gpu-alloc-types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "gpu-allocator" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" -dependencies = [ - "log", - "presser", - "thiserror 1.0.69", - "windows 0.58.0", -] - -[[package]] -name = "gpu-descriptor" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" -dependencies = [ - "bitflags 2.9.0", - "gpu-descriptor-types", - "hashbrown", -] - -[[package]] -name = "gpu-descriptor-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -dependencies = [ - "foldhash", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core 0.61.0", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "image" -version = "0.25.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" -dependencies = [ - "bytemuck", - "byteorder-lite", - "num-traits", - "png", -] - -[[package]] -name = "indexmap" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -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 1.0.69", - "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.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom 0.3.2", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "khronos-egl" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" -dependencies = [ - "libc", - "libloading", - "pkg-config", -] - -[[package]] -name = "khronos_api" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.171" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" - -[[package]] -name = "libgit2-sys" -version = "0.18.1+1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libloading" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" -dependencies = [ - "cfg-if", - "windows-targets 0.52.6", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.9.0", - "libc", - "redox_syscall 0.5.11", -] - -[[package]] -name = "libz-sys" -version = "1.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "litemap" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" - -[[package]] -name = "litrs" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" -dependencies = [ - "libc", -] - -[[package]] -name = "metal" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" -dependencies = [ - "bitflags 2.9.0", - "block", - "core-graphics-types", - "foreign-types", - "log", - "objc", - "paste", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" -dependencies = [ - "adler2", - "simd-adler32", -] - -[[package]] -name = "naga" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" -dependencies = [ - "arrayvec", - "bit-set", - "bitflags 2.9.0", - "cfg_aliases", - "codespan-reporting", - "hexf-parse", - "indexmap", - "log", - "rustc-hash 1.1.0", - "spirv", - "strum", - "termcolor", - "thiserror 2.0.12", - "unicode-xid", -] - -[[package]] -name = "native-dialog" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e7038885d2aeab236bd60da9e159a5967b47cde3292da3b15ff1bec27c039f" -dependencies = [ - "ascii", - "block", - "cocoa", - "core-foundation", - "dirs-next", - "objc", - "objc-foundation", - "objc_id", - "once_cell", - "raw-window-handle 0.5.2", - "thiserror 1.0.69", - "versions", - "wfd", - "which", - "winapi", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.9.0", - "jni-sys", - "log", - "ndk-sys 0.6.0+11769913", - "num_enum", - "raw-window-handle 0.6.2", - "thiserror 1.0.69", -] - -[[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.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "nibble_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" -dependencies = [ - "smallvec", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.9.0", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[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 = "ntapi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" -dependencies = [ - "winapi", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[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.9.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.9.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.9.0", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" -dependencies = [ - "bitflags 2.9.0", -] - -[[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.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.9.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.9.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.9.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.9.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.9.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "orbclient" -version = "0.3.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" -dependencies = [ - "libredox", -] - -[[package]] -name = "ordered-float" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" -dependencies = [ - "num-traits", -] - -[[package]] -name = "ordered-float" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2c1f9f56e534ac6a9b8a4600bdf0f530fb393b5f393e7b4d03489c3cf0c3f01" -dependencies = [ - "num-traits", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "owned_ttf_parser" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" -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.11", - "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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "polling" -version = "3.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 0.38.44", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy 0.8.24", -] - -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - -[[package]] -name = "proc-macro-crate" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro2" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "profiling" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" - -[[package]] -name = "quick-xml" -version = "0.37.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ce8c88de324ff838700f36fb6ab86c96df0e3c4ab6ef3a9b2044465cce1369" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - -[[package]] -name = "radix_trie" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" -dependencies = [ - "endian-type", - "nibble_vec", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "range-alloc" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" - -[[package]] -name = "raw-cpuid" -version = "11.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[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.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror 1.0.69", -] - -[[package]] -name = "renderdoc-sys" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustversion" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" - -[[package]] -name = "rustyline" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee1e066dc922e513bda599c6ccb5f3bb2b0ea5870a579448f2622993f0a9a2f" -dependencies = [ - "bitflags 2.9.0", - "cfg-if", - "clipboard-win", - "fd-lock", - "libc", - "log", - "memchr", - "nix", - "radix_trie", - "rustyline-derive", - "unicode-segmentation", - "unicode-width 0.2.0", - "utf8parse", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustyline-derive" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327e9d075f6df7e25fbf594f1be7ef55cf0d567a6cb5112eeccbbd51ceb48e0d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[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 = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[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.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" - -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.9.0", - "calloop", - "calloop-wayland-source", - "cursor-icon", - "libc", - "log", - "memmap2", - "rustix 0.38.44", - "thiserror 1.0.69", - "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 = "spirv" -version = "0.3.0+sdk-1.3.268.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - -[[package]] -name = "syn" -version = "2.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sysinfo" -version = "0.34.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b93974b3d3aeaa036504b8eefd4c039dced109171c1ae973f1dc63b2c7e4b2" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "windows 0.57.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tobj" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04aca6092e5978e708ee784e8ab9b5cf3cdb598b28f99a2f257446e7081a7025" - -[[package]] -name = "tokio" -version = "1.44.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" -dependencies = [ - "backtrace", - "pin-project-lite", - "tokio-macros", -] - -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "toml" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "thread_local", - "tracing-core", -] - -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - -[[package]] -name = "twox-hash" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b17f197b3050ba473acf9181f7b1d3b66d1cf7356c6cc57886662276e65908" -dependencies = [ - "rand", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-width" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "versions" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" -dependencies = [ - "itertools", - "nom", -] - -[[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 = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wayland-backend" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf" -dependencies = [ - "cc", - "downcast-rs", - "rustix 0.38.44", - "scoped-tls", - "smallvec", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" -dependencies = [ - "bitflags 2.9.0", - "rustix 0.38.44", - "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.9.0", - "cursor-icon", - "wayland-backend", -] - -[[package]] -name = "wayland-cursor" -version = "0.31.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93029cbb6650748881a00e4922b076092a6a08c11e7fbdb923f064b23968c5d" -dependencies = [ - "rustix 0.38.44", - "wayland-client", - "xcursor", -] - -[[package]] -name = "wayland-protocols" -version = "0.32.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc" -dependencies = [ - "bitflags 2.9.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccaacc76703fefd6763022ac565b590fcade92202492381c95b2edfdf7d46b3" -dependencies = [ - "bitflags 2.9.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2" -dependencies = [ - "bitflags 2.9.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.31.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" -dependencies = [ - "proc-macro2", - "quick-xml", - "quote", -] - -[[package]] -name = "wayland-sys" -version = "0.31.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" -dependencies = [ - "dlib", - "log", - "pkg-config", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -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 = "wfd" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e713040b67aae5bf1a0ae3e1ebba8cc29ab2b90da9aa1bff6e09031a8a41d7a8" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "wgpu" -version = "24.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35904fb00ba2d2e0a4d002fcbbb6e1b89b574d272a50e5fc95f6e81cf281c245" -dependencies = [ - "arrayvec", - "bitflags 2.9.0", - "cfg_aliases", - "document-features", - "js-sys", - "log", - "naga", - "parking_lot", - "profiling", - "raw-window-handle 0.6.2", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core" -version = "24.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c25545d479b47d3f0a8e373aceb2060b67c6eb841b24ac8c32348151c7a0c" -dependencies = [ - "arrayvec", - "bit-vec", - "bitflags 2.9.0", - "cfg_aliases", - "document-features", - "indexmap", - "log", - "naga", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle 0.6.2", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 2.0.12", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-hal" -version = "24.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f112f464674ca69f3533248508ee30cb84c67cf06c25ff6800685f5e0294e259" -dependencies = [ - "android_system_properties", - "arrayvec", - "ash", - "bit-set", - "bitflags 2.9.0", - "block", - "bytemuck", - "cfg_aliases", - "core-graphics-types", - "glow", - "glutin_wgl_sys", - "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", - "js-sys", - "khronos-egl", - "libc", - "libloading", - "log", - "metal", - "naga", - "ndk-sys 0.5.0+25.2.9519653", - "objc", - "once_cell", - "ordered-float 4.6.0", - "parking_lot", - "profiling", - "range-alloc", - "raw-window-handle 0.6.2", - "renderdoc-sys", - "rustc-hash 1.1.0", - "smallvec", - "thiserror 2.0.12", - "wasm-bindgen", - "web-sys", - "wgpu-types", - "windows 0.58.0", - "windows-core 0.58.0", -] - -[[package]] -name = "wgpu-types" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" -dependencies = [ - "bitflags 2.9.0", - "js-sys", - "log", - "web-sys", -] - -[[package]] -name = "wgpu_text" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd192487eb81eb51f8f0eb82fea0865e71ab4f002f7942bee0bba04fc2a0b8c" -dependencies = [ - "bytemuck", - "glyph_brush", - "log", - "wgpu", -] - -[[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 0.38.44", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" -dependencies = [ - "windows-core 0.57.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" -dependencies = [ - "windows-implement 0.60.0", - "windows-interface 0.59.1", - "windows-link", - "windows-result 0.3.2", - "windows-strings 0.4.0", -] - -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" -dependencies = [ - "windows-link", -] - -[[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-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -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.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.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.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.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.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.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.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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winit" -version = "0.30.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a809eacf18c8eca8b6635091543f02a5a06ddf3dad846398795460e6e0ae3cc0" -dependencies = [ - "ahash", - "android-activity", - "atomic-waker", - "bitflags 2.9.0", - "block2", - "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", - "pin-project", - "raw-window-handle 0.6.2", - "redox_syscall 0.4.1", - "rustix 0.38.44", - "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", - "xkbcommon-dl", -] - -[[package]] -name = "winnow" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "xcursor" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61" - -[[package]] -name = "xi-unicode" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" - -[[package]] -name = "xkbcommon-dl" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" -dependencies = [ - "bitflags 2.9.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.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" - -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zen_core" -version = "0.1.0" -dependencies = [ - "anyhow", - "parking_lot", - "thiserror 2.0.12", -] - [[package]] name = "zenyx" version = "0.1.0" -dependencies = [ - "ahash", - "build-print", - "built", - "bytemuck", - "cargo-lock", - "cgmath", - "clap", - "colored", - "futures", - "image", - "native-dialog", - "parking_lot", - "raw-cpuid", - "rustyline", - "serde", - "sysinfo", - "thiserror 2.0.12", - "tobj", - "tokio", - "toml", - "tracing", - "tracing-subscriber", - "wgpu", - "wgpu_text", - "winit", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive 0.8.24", -] - -[[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", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerovec" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/Cargo.toml b/Cargo.toml index b9c49a3..1a2b823 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,20 @@ +[package] +name = "zenyx" +version = "0.1.0" +edition = "2024" +authors = ["Caznix (Chance) "] +description = "A memory safe, opinionated Game Engine/Framework, written in Rust." +keywords = ["engine", "graphics", "game"] +categories = ["game-development", "graphics"] +license = "MIT" +homepage = "https://zenyx-engine.github.io/" +repository = "https://codeberg.org/Caznix/Zenyx" + [workspace] resolver = "2" -members = ["engine","subcrates/zen_core"] +# members = ["engine","subcrates/zen_core"] -[workspace.dependencies] -parking_lot = "0.12.3" -zen_core = { path = "./subcrates/zen_core" } [profile.release] lto = true diff --git a/engine/Cargo.toml b/engine/Cargo.toml deleted file mode 100644 index 6c007e7..0000000 --- a/engine/Cargo.toml +++ /dev/null @@ -1,42 +0,0 @@ -[package] -name = "zenyx" -version = "0.1.0" -edition = "2024" -authors = ["Caznix (Chance) "] -description = "A memory safe, opinionated Game Engine/Framework, written in Rust." -keywords = ["engine", "graphics", "game"] -categories = ["game-development", "graphics"] -license = "MIT" -homepage = "https://zenyx-engine.github.io/" -documentation = "https://zenyx-engine.github.io/docs" -repository = "https://codeberg.org/Caznix/Zenyx" - -[dependencies] -colored = { version = "3.0.0", default-features = false } -parking_lot.workspace = true -rustyline = { version = "15.0.0", default-features = false, features = ["custom-bindings", "derive","with-file-history"] } -thiserror = { version = "2.0.11", default-features = false } -tokio = { version = "1.44.2", default-features = false, features = ["macros", "rt", "rt-multi-thread"] } -# Will be updated to 25.x.x when other dependencies are updated to be supported -wgpu = { version = "24.0.3", default-features = false } -winit = { version = "0.30.9", default-features = false, features = ["rwh_06", "wayland"] } -bytemuck = { version = "1.21.0", default-features = false } -futures = { version = "0.3.31", default-features = false, features = ["executor"] } -cgmath = { version = "0.18.0", default-features = false } -tracing = { version = "0.1.41", default-features = false } -tracing-subscriber = { version = "0.3.19", default-features = false, features = ["ansi", "fmt"] } -tobj = { version = "4.0.3", default-features = false } -ahash = { version = "0.8.11", default-features = false, features = ["std"] } -wgpu_text = { version = "0.9.2", default-features = false } -toml = { version = "0.8.20", default-features = false } -serde = { version = "1.0.219", default-features = false, features = ["derive"] } -native-dialog = { version = "0.7.0", default-features = false } -sysinfo = { version = "0.34.2", default-features = false, features = ["system"] } -raw-cpuid = { version = "11.5.0", default-features = false } -image = { version = "0.25.6", default-features = false, features = ["png"] } -clap = { version = "4.5.35", default-features = false, features = ["std"] } - -[build-dependencies] -built = { version = "0.7.7", default-features = false, features = ["cargo-lock", "chrono", "git2"] } -build-print = { version = "0.1.1", default-features = false } -cargo-lock = { version = "10.1.0", default-features = false } diff --git a/engine/Cross.toml b/engine/Cross.toml deleted file mode 100644 index e47cbef..0000000 --- a/engine/Cross.toml +++ /dev/null @@ -1,6 +0,0 @@ -[build] -pre-build = [ - # "dpkg --add-architecture $CROSS_DEB_ARCH", - "apt-get update", - "apt-get --assume-yes install libwayland-dev:$CROSS_DEB_ARCH" -] diff --git a/engine/build.rs b/engine/build.rs deleted file mode 100644 index cd7efea..0000000 --- a/engine/build.rs +++ /dev/null @@ -1,112 +0,0 @@ -use build_print::*; -use cargo_lock::Lockfile; -use std::env; -use std::fs::OpenOptions; -use std::io::Write; -use std::path::Path; -use std::process::Command; - -fn get_git_info() -> String { - match Command::new("git") - .arg("describe") - .arg("--always") - .arg("--dirty") - .output() - { - Ok(output) if output.status.success() => { - String::from_utf8_lossy(&output.stdout).trim().to_string() - } - _ => { - match Command::new("git") - .arg("rev-parse") - .arg("--abbrev-ref") - .arg("HEAD") - .output() - { - Ok(output) if output.status.success() => { - let head = String::from_utf8_lossy(&output.stdout); - let head = head.trim(); - if head == "HEAD" { - "DETACHED".to_string() - } else { - //TDDO: properly parse branch hashes - format!("BRANCH: {}", head) - } - } - _ => "UNKNOWN".to_string(), - } - } - } -} -static ALLOW_DEAD_CODE: &str = "#[allow(dead_code)]\n"; -fn main() { - if let Err(e) = built::write_built_file() { - panic!("{e}"); - } - let out_dir = env::var("OUT_DIR").unwrap(); - let dest_path = Path::new(&out_dir).join("built.rs"); - let proj_root = env!("CARGO_MANIFEST_DIR").to_string(); - let tmp = format!("{}/../Cargo.lock", proj_root); - let lockfile_path = Path::new(&tmp).canonicalize().expect("INvalid"); - - let cargo_version = match Command::new("cargo").arg("--version").output() { - Ok(output) if output.status.success() => { - let mut version = String::new(); - version.push_str(ALLOW_DEAD_CODE); - version.push_str(&String::from_utf8_lossy(&output.stdout).trim().to_string()); - version - } - _ => "unknown".to_string(), - }; - info!("{cargo_version}"); - - let rustc_version = match Command::new("rustc").arg("--version").output() { - Ok(output) if output.status.success() => { - let mut version = String::new(); - version.push_str(ALLOW_DEAD_CODE); - version.push_str(&String::from_utf8_lossy(&output.stdout).trim().to_string()); - version - } - _ => "unknown".to_string(), - }; - info!("{rustc_version}"); - - let git_info = get_git_info(); - info!("Git Info: {}", git_info); - - let mut built_rs = match OpenOptions::new().append(true).open(&dest_path) { - Ok(file) => file, - Err(e) => { - error!("Could not open built.rs for appending: {}", e); - return; - } - }; - - match Lockfile::load(lockfile_path) { - Ok(lockfile) => { - let dependencies_to_track = ["tokio", "winit", "wgpu"]; - - for package in lockfile.packages { - let name = package.name.as_str(); - if dependencies_to_track.contains(&name) { - let version = package.version.to_string(); - writeln!( - built_rs, - "{}pub static {}_VERSION: &str = \"{}\";", - ALLOW_DEAD_CODE, - name.to_uppercase().replace('-', "_"), - version - ) - .unwrap(); - } - } - } - Err(e) => { - error!("Error loading Cargo.lock: {}", e); - } - } - - std::println!("cargo:rerun-if-changed=Cargo.lock"); - std::println!("cargo:rerun-if-changed=.git/HEAD"); - std::println!("cargo:rerun-if-changed=.git/index"); -} diff --git a/engine/src/cli/mod.rs b/engine/src/cli/mod.rs deleted file mode 100644 index af94365..0000000 --- a/engine/src/cli/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -use clap::{Arg, Command}; - -#[derive(Debug)] -pub struct Cli {} - -pub fn parse() { - let matches = Command::new("zenyx") - .version(env!("CARGO_PKG_VERSION")) - .author(env!("CARGO_PKG_AUTHORS")) - .about(env!("CARGO_PKG_DESCRIPTION")) - .arg( - Arg::new("name") - .short('n') - .long("name") - .value_name("NAME") - .help("Sets a custom name"), - ) - .subcommand( - Command::new("greet").about("Greets the given name").arg( - Arg::new("person") - .value_name("PERSON") - .help("The person to greet") - .required(true), - ), - ) - .get_matches(); -} diff --git a/engine/src/core/ecs/mod.rs b/engine/src/core/ecs/mod.rs deleted file mode 100644 index 8b13789..0000000 --- a/engine/src/core/ecs/mod.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/engine/src/core/mod.rs b/engine/src/core/mod.rs deleted file mode 100644 index 7b797a5..0000000 --- a/engine/src/core/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -use serde::{Deserialize, Serialize}; - -pub mod ecs; -pub mod panic; -pub mod repl; -pub mod splash; - -pub mod render; - -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] -pub struct EngineState { - log_level: LogLevel, -} -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] - -enum LogLevel { - Info, - Debug, - Error, - Trace, -} -impl EngineState {} diff --git a/engine/src/core/panic.rs b/engine/src/core/panic.rs deleted file mode 100644 index fc7a75b..0000000 --- a/engine/src/core/panic.rs +++ /dev/null @@ -1,225 +0,0 @@ -use std::str::FromStr; -use std::{env, error::Error, path::PathBuf, thread}; - -use native_dialog::{MessageDialog, MessageType}; -use parking_lot::Once; -use tracing::error; - -static INIT: Once = Once::new(); - -pub fn set_panic_hook() { - INIT.call_once(|| { - let default_hook = std::panic::take_hook(); - std::panic::set_hook(Box::new(move |info| { - if let Err(e) = process_panic(info) { - eprintln!("Error in panic hook: {}", e); - default_hook(info); - } - std::process::exit(1); - })); - }); -} - -fn process_panic(info: &std::panic::PanicHookInfo<'_>) -> Result<(), Box> { - use std::io::Write; - - use colored::Colorize; - - let log_dir = PathBuf::from_str("./").expect("wtf, The current directory no longer exists?"); - if !log_dir.exists() { - std::fs::create_dir_all(&log_dir)?; - } - let log_path = log_dir.join("panic.log"); - - let mut file = std::fs::File::create(&log_path)?; - let payload = info.payload(); - let payload_str = if let Some(s) = payload.downcast_ref::<&str>() { - *s - } else if let Some(s) = payload.downcast_ref::() { - s - } else { - "" - }; - - writeln!(file, "Panic Occurred: {}", payload_str)?; - - if let Some(location) = info.location() { - writeln!(file, "Panic Location: {}", location)?; - } - - writeln!(file, "{}", capture_backtrace().sanitize_path())?; - - // Add more contextual information - writeln!(file, "\n--- Additional Information ---")?; - - // Rust Version - if let Ok(rust_version) = rust_version() { - writeln!(file, "Rust Version: {}", rust_version)?; - } - - // Command-line Arguments - writeln!(file, "Command-line Arguments:")?; - for arg in env::args() { - writeln!(file, " {}", arg)?; - } - - // Environment Variables (consider filtering sensitive ones) - writeln!(file, "\nEnvironment Variables (selected):")?; - let interesting_env_vars = ["PATH", "RUST_VERSION", "CARGO_TARGET_DIR", "HOME", "USER"]; - for (key, value) in env::vars() { - if interesting_env_vars.contains(&key.as_str()) { - writeln!(file, " {}: {}", key, value)?; - } - } - - // Current Working Directory - if let Ok(cwd) = env::current_dir() { - writeln!(file, "\nCurrent Working Directory: {}", cwd.display())?; - } - - // Thread Information - if let Some(thread) = thread::current().name() { - writeln!(file, "\nThread Name: {}", thread)?; - } else { - writeln!(file, "\nThread ID: {:?}", thread::current().id())?; - } - - let panic_msg = format!( - r#"Zenyx had a problem and crashed. To help us diagnose the problem you can send us a crash report. - -We have generated a detailed report file at '{}'. Submit an issue or email with the subject of 'Zenyx Crash Report' and include the report as an attachment. - -To submit the crash report: -https://codeberg.org/Caznix/Zenyx/issues -We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports. - -Thank you kindly!"#, - log_path.display() - ); - - let final_msg = format!( - r#"{} - -For future reference, the error summary is as follows: -{} - -More details can be found in the crash report file."#, - panic_msg, payload_str - ); - - println!("{}", final_msg.red().bold()); - - if let Err(e) = MessageDialog::new() - .set_type(MessageType::Error) - .set_title("A fatal error in Zenyx has occurred") - .set_text(&final_msg) - .show_confirm() - { - error!("Failed to show message dialog: {e}") - } - - Ok(()) -} - -fn rust_version() -> Result> { - let version = env!("CARGO_PKG_RUST_VERSION"); - Ok(version.to_string()) -} - -fn capture_backtrace() -> String { - let mut backtrace = String::new(); - let sysinfo = crate::metadata::SystemMetadata::current(); - backtrace.push_str(&format!( - "--- System Information ---\n{}\n", - sysinfo.verbose_summary() - )); - - let trace = std::backtrace::Backtrace::force_capture(); - let message = format!("\n--- Backtrace ---\n\n"); - backtrace.push_str(&message); - backtrace.push_str(&format!("{trace:#}")); - - backtrace -} - -trait Sanitize { - fn sanitize_path(&self) -> String; -} - -impl Sanitize for str { - fn sanitize_path(&self) -> String { - let prefixes = ["/home/", "/Users/", "\\Users\\", "/opt/home/"]; - let mut result = String::from(self); - - for prefix in prefixes { - if let Some(start_index) = result.find(prefix) { - let start_of_user = start_index + prefix.len(); - let mut end_of_user = result[start_of_user..] - .find(|c| c == '/' || c == '\\') - .map(|i| start_of_user + i) - .unwrap_or(result.len()); - if end_of_user == start_of_user && start_of_user < result.len() { - end_of_user = result.len(); - } - result.replace_range(start_of_user..end_of_user, ""); - break; - } - } - result - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_sanitize_home() { - assert_eq!( - "/home//documents", - "/home/john.doe/documents".sanitize_path() - ); - assert_eq!("/home/", "/home/jane".sanitize_path()); - assert_eq!("/opt/home/", "/opt/home/user".sanitize_path()); - } - - #[test] - fn test_sanitize_users_unix() { - assert_eq!( - "/Users//desktop", - "/Users/alice/desktop".sanitize_path() - ); - assert_eq!("/Users//", "/Users/bob/".sanitize_path()); - assert_eq!("/user/Users/", "/user/Users/name".sanitize_path()); - } - - #[test] - fn test_sanitize_users_windows() { - assert_eq!( - "\\Users\\\\documents", - "\\Users\\charlie\\documents".sanitize_path() - ); - assert_eq!("\\Users\\", "\\Users\\david".sanitize_path()); - assert_eq!( - "C:\\Other\\Users\\", - "C:\\Other\\Users\\folder".sanitize_path() - ); - } - - #[test] - fn test_no_match() { - assert_eq!("/opt/data/file.txt", "/opt/data/file.txt".sanitize_path()); - } - - #[test] - fn test_mixed_separators() { - assert_eq!( - "/home/\\documents", - "/home/eve\\documents".sanitize_path() - ); - assert_eq!( - "\\Users\\/desktop", - "\\Users\\frank/desktop".sanitize_path() - ); - } -} diff --git a/engine/src/core/render/DejaVuSans.ttf b/engine/src/core/render/DejaVuSans.ttf deleted file mode 100644 index 5267218..0000000 Binary files a/engine/src/core/render/DejaVuSans.ttf and /dev/null differ diff --git a/engine/src/core/render/ctx.rs b/engine/src/core/render/ctx.rs deleted file mode 100644 index aab9606..0000000 --- a/engine/src/core/render/ctx.rs +++ /dev/null @@ -1,749 +0,0 @@ -use std::borrow::Cow; -use std::mem::offset_of; -use std::sync::Arc; -use std::time::Instant; - -use cgmath::{Deg, Matrix4, Point3, Rad, SquareMatrix, Vector3, perspective}; -use futures::executor::block_on; -use tracing::{debug, error, trace}; -use wgpu::TextureUsages; -use wgpu::{Backends, InstanceDescriptor, util::DeviceExt}; -use wgpu_text::glyph_brush::ab_glyph::FontRef; -use wgpu_text::glyph_brush::{HorizontalAlign, Layout, OwnedSection, OwnedText, VerticalAlign}; -use wgpu_text::{BrushBuilder, TextBrush}; -use winit::window::Window; - -use crate::error::Result; -use crate::error::{ZenyxError, ZenyxErrorKind}; - -use super::TerminalState; - -const SHADER_SRC: &str = include_str!("shader.wgsl"); - -#[repr(C)] -#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -pub struct Vertex { - pub position: [f32; 3], - pub normal: [f32; 3], -} - -impl Vertex { - const ATTRIBS: [wgpu::VertexAttribute; 2] = [ - wgpu::VertexAttribute { - offset: 0, - shader_location: 0, - format: wgpu::VertexFormat::Float32x3, - }, - wgpu::VertexAttribute { - offset: offset_of!(Vertex, normal) as u64, - shader_location: 1, - format: wgpu::VertexFormat::Float32x3, - }, - ]; - - fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { - wgpu::VertexBufferLayout { - array_stride: std::mem::size_of::() as wgpu::BufferAddress, - step_mode: wgpu::VertexStepMode::Vertex, - attributes: &Self::ATTRIBS, - } - } -} - -#[repr(C)] -#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -struct CameraUniform { - view: [[f32; 4]; 4], - proj: [[f32; 4]; 4], -} - -#[repr(C)] -#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -struct ModelUniform { - model: [[f32; 4]; 4], -} - -struct Camera { - uniform_buffer: wgpu::Buffer, - bind_group: wgpu::BindGroup, - view: Matrix4, - proj: Matrix4, -} - -impl Camera { - fn new( - device: &wgpu::Device, - bind_group_layout: &wgpu::BindGroupLayout, - width: u32, - height: u32, - ) -> Self { - let view = Matrix4::look_at_rh( - Point3::new(0.0, 0.0, 3.0), - Point3::new(0.0, 0.0, 0.0), - Vector3::unit_y(), - ); - let aspect = width as f32 / height as f32; - let proj = perspective(Rad::from(Deg(45.0)), aspect, 0.1, 100.0); - - let uniform_buffer = device.create_buffer(&wgpu::BufferDescriptor { - label: Some("Camera Uniform Buffer"), - size: std::mem::size_of::() as u64, - usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, - mapped_at_creation: false, - }); - - let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { - label: Some("Camera Bind Group"), - layout: bind_group_layout, - entries: &[wgpu::BindGroupEntry { - binding: 0, - resource: uniform_buffer.as_entire_binding(), - }], - }); - - Self { - uniform_buffer, - bind_group, - view, - proj, - } - } - - fn resize(&mut self, width: u32, height: u32) { - let aspect = width as f32 / height as f32; - self.proj = perspective(Rad::from(Deg(45.0)), aspect, 0.1, 100.0); - } - - fn update(&self, queue: &wgpu::Queue) { - let view_array: [[f32; 4]; 4] = self.view.into(); - let proj_array: [[f32; 4]; 4] = self.proj.into(); - let uniform = CameraUniform { - view: view_array, - proj: proj_array, - }; - queue.write_buffer(&self.uniform_buffer, 0, bytemuck::bytes_of(&uniform)); - } -} -#[derive(Debug)] -struct Model { - vertex_buffer: wgpu::Buffer, - index_buffer: wgpu::Buffer, - uniform_buffer: wgpu::Buffer, - bind_group: wgpu::BindGroup, - index_count: u32, - transform: Matrix4, - version: u32, -} - -impl Model { - fn new( - device: &wgpu::Device, - vertices: &[Vertex], - indices: &[u32], - bind_group_layout: &wgpu::BindGroupLayout, - ) -> Self { - let vertex_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: Some("Vertex Buffer"), - contents: bytemuck::cast_slice(vertices), - usage: wgpu::BufferUsages::VERTEX, - }); - - let index_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { - label: Some("Index Buffer"), - contents: bytemuck::cast_slice(indices), - usage: wgpu::BufferUsages::INDEX, - }); - - let uniform_buffer = device.create_buffer(&wgpu::BufferDescriptor { - label: Some("Model Uniform Buffer"), - size: std::mem::size_of::() as u64, - usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, - mapped_at_creation: false, - }); - - let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor { - label: Some("Model Bind Group"), - layout: bind_group_layout, - entries: &[wgpu::BindGroupEntry { - binding: 0, - resource: uniform_buffer.as_entire_binding(), - }], - }); - Self { - vertex_buffer, - index_buffer, - uniform_buffer, - bind_group, - index_count: indices.len() as u32, - transform: Matrix4::identity(), - version: 1, - } - } - - fn update(&self, queue: &wgpu::Queue) { - let model_array: [[f32; 4]; 4] = self.transform.into(); - let uniform = ModelUniform { model: model_array }; - queue.write_buffer(&self.uniform_buffer, 0, bytemuck::bytes_of(&uniform)); - } - - fn set_transform(&mut self, transform: Matrix4) { - if self.transform != transform { - self.transform = transform; - self.version += 1; - } - } -} - -pub struct Renderer<'window> { - device: wgpu::Device, - queue: wgpu::Queue, - surface: wgpu::Surface<'window>, - surface_config: wgpu::SurfaceConfiguration, - camera: Camera, - models: Vec, - render_pipeline: wgpu::RenderPipeline, - depth_texture: wgpu::Texture, - depth_texture_view: wgpu::TextureView, - camera_bind_group_layout: wgpu::BindGroupLayout, - model_bind_group_layout: wgpu::BindGroupLayout, - bg_color: wgpu::Color, - start_time: Instant, - last_frame_instant: Instant, - frame_count: u32, - fps: f32, - font_state: FontState, - model_versions: Vec, -} - -struct FontState { - brush: TextBrush>, - output_section: OwnedSection, - input_section: OwnedSection, - fps_section: OwnedSection, - scale: f32, - color: wgpu::Color, -} -impl<'window> Renderer<'window> { - pub async fn new(window: Arc) -> Result { - let instance = wgpu::Instance::new(&InstanceDescriptor { - backends: Backends::from_comma_list("dx12,metal,opengl,webgpu,vulkan"), - ..Default::default() - }); - - let surface = instance.create_surface(Arc::clone(&window))?; - - let adapter = instance - .request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::default(), - compatible_surface: Some(&surface), - ..Default::default() - }) - .await - .ok_or_else(|| { - ZenyxError::builder(ZenyxErrorKind::AdapterRequest) - .with_message("No suitable adapter found") - .build() - })?; - - let (device, queue) = adapter - .request_device(&wgpu::DeviceDescriptor::default(), None) - .await - .map_err(ZenyxError::from)?; - - let size = window.inner_size(); - let width = size.width.max(1); - let height = size.height.max(1); - - let camera_bind_group_layout = - device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { - label: Some("Camera Bind Group Layout"), - entries: &[wgpu::BindGroupLayoutEntry { - binding: 0, - visibility: wgpu::ShaderStages::VERTEX, - ty: wgpu::BindingType::Buffer { - ty: wgpu::BufferBindingType::Uniform, - has_dynamic_offset: false, - min_binding_size: wgpu::BufferSize::new( - std::mem::size_of::() as u64, - ), - }, - count: None, - }], - }); - - let model_bind_group_layout = - device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { - label: Some("Model Bind Group Layout"), - entries: &[wgpu::BindGroupLayoutEntry { - binding: 0, - visibility: wgpu::ShaderStages::VERTEX_FRAGMENT, - ty: wgpu::BindingType::Buffer { - ty: wgpu::BufferBindingType::Uniform, - has_dynamic_offset: false, - min_binding_size: wgpu::BufferSize::new( - std::mem::size_of::() as u64, - ), - }, - count: None, - }], - }); - - let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { - label: Some("Pipeline Layout"), - bind_group_layouts: &[&camera_bind_group_layout, &model_bind_group_layout], - push_constant_ranges: &[], - }); - - let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { - label: Some("Main Shader"), - source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(SHADER_SRC)), - }); - - let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { - label: Some("Main Pipeline"), - layout: Some(&pipeline_layout), - vertex: wgpu::VertexState { - module: &shader, - entry_point: Some("vs_main"), - buffers: &[Vertex::desc()], - compilation_options: Default::default(), - }, - fragment: Some(wgpu::FragmentState { - module: &shader, - entry_point: Some("fs_main"), - targets: &[Some(wgpu::ColorTargetState { - format: surface.get_capabilities(&adapter).formats[0], - blend: Some(wgpu::BlendState::REPLACE), - write_mask: wgpu::ColorWrites::ALL, - })], - compilation_options: Default::default(), - }), - primitive: wgpu::PrimitiveState { - topology: wgpu::PrimitiveTopology::TriangleList, - strip_index_format: None, - front_face: wgpu::FrontFace::Ccw, - cull_mode: Some(wgpu::Face::Back), - // cull_mode: , - polygon_mode: wgpu::PolygonMode::Fill, - unclipped_depth: false, - conservative: false, - }, - depth_stencil: Some(wgpu::DepthStencilState { - format: wgpu::TextureFormat::Depth32Float, - depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::Less, - stencil: wgpu::StencilState::default(), - bias: wgpu::DepthBiasState::default(), - }), - multisample: wgpu::MultisampleState { - count: 1, - mask: !0, - alpha_to_coverage_enabled: false, - }, - multiview: None, - cache: None, - }); - - let camera = Camera::new(&device, &camera_bind_group_layout, width, height); - - let surface_caps = surface.get_capabilities(&adapter); - let present_mode = [ - wgpu::PresentMode::Immediate, - wgpu::PresentMode::Mailbox, - wgpu::PresentMode::AutoNoVsync, - ] - .iter() - .copied() - .find(|mode| surface_caps.present_modes.contains(mode)) - .unwrap_or(wgpu::PresentMode::Fifo); - - debug!("Using {:#?} present mode.", present_mode); - - let surface_config = wgpu::SurfaceConfiguration { - width, - height, - format: surface_caps.formats[0], - present_mode, - alpha_mode: wgpu::CompositeAlphaMode::Auto, - view_formats: vec![], - usage: TextureUsages::RENDER_ATTACHMENT, - desired_maximum_frame_latency: 3, - }; - surface.configure(&device, &surface_config); - let (depth_texture, depth_texture_view) = - create_depth_texture(&device, surface_config.width, surface_config.height); - - let font_bytes = include_bytes!("DejaVuSans.ttf"); - let font = FontRef::try_from_slice(font_bytes).map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::FontLoading) - .with_message("Font loading failed") - .with_source(e) - .build() - })?; - - let brush = - BrushBuilder::using_font(font).build(&device, width, height, surface_config.format); - let base_width = 1280.0; - let base_scale = 30.0; - let scale = base_scale * (surface_config.width as f32 / base_width as f32).clamp(0.5, 2.0); - let color = wgpu::Color::WHITE; - - let fps_section = OwnedSection::default() - .add_text(OwnedText::new("FPS: 0.00").with_scale(scale).with_color([ - color.r as f32, - color.g as f32, - color.b as f32, - color.a as f32, - ])) - .with_screen_position((10.0, 10.0)) - .with_bounds((200.0, 50.0)) - .with_layout( - Layout::default() - .h_align(HorizontalAlign::Left) - .v_align(VerticalAlign::Top), - ); - - let output_section = OwnedSection::default() - .with_screen_position((10.0, 50.0)) - .with_bounds((width as f32 - 20.0, f32::MAX)) - .with_layout( - Layout::default() - .h_align(HorizontalAlign::Left) - .v_align(VerticalAlign::Top), - ); - - let input_section = OwnedSection::default() - .with_screen_position((10.0, height as f32 - 50.0)) - .with_bounds((width as f32 - 20.0, f32::MAX)) - .with_layout( - Layout::default() - .h_align(HorizontalAlign::Left) - .v_align(VerticalAlign::Top), - ); - - Ok(Self { - device, - queue, - surface, - surface_config, - camera, - models: Vec::new(), - render_pipeline, - camera_bind_group_layout, - model_bind_group_layout, - bg_color: wgpu::Color { - r: 0.1, - g: 0.1, - b: 0.1, - a: 1.0, - }, - start_time: Instant::now(), - last_frame_instant: Instant::now(), - frame_count: 0, - depth_texture, - depth_texture_view, - fps: 0f32, - font_state: FontState { - brush, - fps_section, - output_section, - input_section, - scale, - color, - }, - model_versions: vec![], - }) - } - - pub fn new_blocking(window: Arc) -> Result { - block_on(Self::new(window)) - } - - pub fn add_model(&mut self, vertices: &[Vertex], indicies: &[u32]) { - let model = Model::new( - &self.device, - vertices, - indicies, - &self.model_bind_group_layout, - ); - self.models.push(model); - self.model_versions.push(0); - } - - pub fn resize(&mut self, new_size: (u32, u32)) { - let (width, height) = new_size; - let (depth_texture, depth_view) = create_depth_texture(&self.device, width, height); - self.surface_config.width = width.max(1); - self.surface_config.height = height.max(1); - self.surface.configure(&self.device, &self.surface_config); - self.depth_texture = depth_texture; - self.depth_texture_view = depth_view; - self.font_state - .brush - .resize_view(width as f32, height as f32, &self.queue); - self.font_state.output_section.bounds = (width as f32 - 20.0, height as f32 - 60.0); - self.font_state.input_section.screen_position = (10.0, height as f32 - 50.0); - self.camera.resize(width, height); - } - - pub fn draw(&mut self, terminal_state: Option<&mut TerminalState>) { - let elapsed = self.start_time.elapsed().as_secs_f32(); - if let Some(terminal_state) = terminal_state { - let delta_time = self.last_frame_instant.elapsed().as_secs_f32(); - self.draw_terminal(terminal_state, delta_time); - } else { - self.camera.update(&self.queue); - - for (i, model) in self.models.iter_mut().enumerate() { - let angle = Rad(elapsed * 0.8 + i as f32 * 0.3); - if i % 2 == 0 { - model.set_transform(Matrix4::from_angle_y(angle)); - } else { - model - .set_transform(Matrix4::from_angle_x(angle) * Matrix4::from_angle_y(angle)); - } - } - for (i, model) in self.models.iter().enumerate() { - if model.version > self.model_versions[i] { - model.update(&self.queue); - #[cfg(debug_assertions)] - trace!("Updating model: {:#?}", model); - self.model_versions[i] = model.version; - } - } - } - let surface_texture = self - .surface - .get_current_texture() - .map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::SurfaceTexture) - .with_message("Failed to acquire surface texture") - .with_source(e) - .build() - }) - .unwrap(); - - let view = surface_texture - .texture - .create_view(&wgpu::TextureViewDescriptor::default()); - - let mut encoder = self - .device - .create_command_encoder(&wgpu::CommandEncoderDescriptor { - label: Some("Render Encoder"), - }); - let fps_text = format!("FPS: {:.2}", self.fps); - self.font_state.fps_section.text.clear(); - self.font_state.fps_section.text.push( - OwnedText::new(fps_text) - .with_scale(self.font_state.scale) - .with_color([ - self.font_state.color.r as f32, - self.font_state.color.g as f32, - self.font_state.color.b as f32, - self.font_state.color.a as f32, - ]), - ); - if let Err(e) = self.font_state.brush.queue( - &self.device, - &self.queue, - &[ - self.font_state.fps_section.clone(), - self.font_state.input_section.clone(), - self.font_state.output_section.clone(), - ], - ) { - error!("Failed to queue text: {}", e); - } - - { - let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { - label: Some("Main Render Pass"), - color_attachments: &[Some(wgpu::RenderPassColorAttachment { - view: &view, - resolve_target: None, - ops: wgpu::Operations { - load: wgpu::LoadOp::Clear(self.bg_color), - store: wgpu::StoreOp::Store, - }, - })], - depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { - view: &self.depth_texture_view, - depth_ops: Some(wgpu::Operations { - load: wgpu::LoadOp::Clear(1.0), - store: wgpu::StoreOp::Store, - }), - stencil_ops: None, - }), - occlusion_query_set: None, - timestamp_writes: None, - }); - - render_pass.set_pipeline(&self.render_pipeline); - render_pass.set_bind_group(0, &self.camera.bind_group, &[]); - - for model in &self.models { - render_pass.set_bind_group(1, &model.bind_group, &[]); - render_pass.set_vertex_buffer(0, model.vertex_buffer.slice(..)); - render_pass - .set_index_buffer(model.index_buffer.slice(..), wgpu::IndexFormat::Uint32); - render_pass.draw_indexed(0..model.index_count, 0, 0..1); - } - } - { - let mut text_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { - label: Some("Text Render Pass"), - color_attachments: &[Some(wgpu::RenderPassColorAttachment { - view: &view, - resolve_target: None, - ops: wgpu::Operations { - load: wgpu::LoadOp::Load, - store: wgpu::StoreOp::Store, - }, - })], - depth_stencil_attachment: None, - occlusion_query_set: None, - timestamp_writes: None, - }); - - self.font_state.brush.draw(&mut text_pass); - } - - self.queue.submit(Some(encoder.finish())); - surface_texture.present(); - - self.frame_count += 1; - - let elapsed_secs = self.last_frame_instant.elapsed().as_secs_f32(); - if elapsed_secs >= 1.0 { - let fps = self.frame_count as f32 / elapsed_secs; - // trace!("Renderer FPS: {:.2}", fps); - self.fps = fps; - self.frame_count = 0; - self.last_frame_instant = Instant::now(); - } - } - fn draw_terminal(&mut self, terminal_state: &mut TerminalState, delta_time: f32) { - terminal_state.cursor_blink_timer += delta_time; - if terminal_state.cursor_blink_timer >= 0.5 { - terminal_state.show_cursor = !terminal_state.show_cursor; - terminal_state.cursor_blink_timer = 0.0; - } - - let line_height = self.font_state.scale * 1.5; - let max_visible_lines = (self.surface_config.height as f32 / line_height) as usize; - terminal_state.max_history_lines = max_visible_lines; - - self.font_state.output_section.text.clear(); - let mut current_line = 0; - let mut output_y = 0.0; - - for line in terminal_state.output_history.iter().rev() { - let sublines = line.split('\n').collect::>(); - - for subline in sublines.iter().rev() { - if current_line >= terminal_state.scroll_offset + max_visible_lines { - break; - } - - if current_line >= terminal_state.scroll_offset { - let processed = subline.replace('\t', " "); - self.font_state.output_section.text.push( - OwnedText::new(processed) - .with_scale(self.font_state.scale) - .with_color([1.0, 1.0, 1.0, 1.0]), - ); - output_y += line_height; - } - - current_line += 1; - } - - if current_line >= terminal_state.scroll_offset + max_visible_lines { - break; - } - } - - self.font_state.input_section.text.clear(); - let mut input_y = 0.0; - let input_text = format!( - "> {}{}", - terminal_state.input_buffer.replace('\t', " "), - if terminal_state.show_cursor { "_" } else { "" } - ); - - for (line_num, subline) in input_text.split('\n').enumerate() { - self.font_state.input_section.text.push( - OwnedText::new(subline) - .with_scale(self.font_state.scale) - .with_color([0.0, 1.0, 0.0, 1.0]), // .with_position((0.0, input_y)), - ); - input_y += line_height; - - if line_num >= 2 { - break; - } - } - - self.font_state.output_section.bounds = ( - self.surface_config.width as f32 - 20.0, - self.surface_config.height as f32 - 60.0, - ); - - self.font_state.input_section.bounds = - (self.surface_config.width as f32 - 20.0, line_height * 3.0); - - if let Err(e) = self.font_state.brush.queue( - &self.device, - &self.queue, - &[ - self.font_state.output_section.clone(), - self.font_state.input_section.clone(), - self.font_state.fps_section.clone(), - ], - ) { - error!("Failed to queue text: {}", e); - } - } - pub fn set_bg_color(&mut self, color: wgpu::Color) { - self.bg_color = color; - } - - pub fn bg_color(&self) -> &wgpu::Color { - &self.bg_color - } - - pub fn text_color(&self) -> &wgpu::Color { - &self.font_state.color - } - - pub fn set_text_color(&mut self, color: wgpu::Color) { - self.font_state.color = color; - } -} -fn create_depth_texture( - device: &wgpu::Device, - width: u32, - height: u32, -) -> (wgpu::Texture, wgpu::TextureView) { - let size = wgpu::Extent3d { - width, - height, - depth_or_array_layers: 1, - }; - - let desc = wgpu::TextureDescriptor { - label: Some("Depth Texture"), - size, - mip_level_count: 1, - sample_count: 1, - dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Depth32Float, - usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING, - view_formats: &[], - }; - - let texture = device.create_texture(&desc); - let view = texture.create_view(&wgpu::TextureViewDescriptor::default()); - (texture, view) -} diff --git a/engine/src/core/render/mod.rs b/engine/src/core/render/mod.rs deleted file mode 100644 index 128adfb..0000000 --- a/engine/src/core/render/mod.rs +++ /dev/null @@ -1,575 +0,0 @@ -use std::env; -use std::fs; -use std::io::Cursor; -use std::ops::Deref; -use std::path::PathBuf; -use std::sync::Arc; - -use ctx::{Renderer, Vertex}; -use image::ImageDecoder; -use image::ImageFormat; -use tobj::{LoadOptions, Model}; -use tracing::{debug, error, info, trace, warn}; -use wgpu::rwh::HasWindowHandle; -use winit::application::ApplicationHandler; -use winit::dpi::LogicalSize; -use winit::dpi::Size; -use winit::event::{KeyEvent, WindowEvent}; -use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop}; -use winit::keyboard::NamedKey; -#[cfg(target_os = "windows")] -use winit::platform::windows::WindowAttributesExtWindows; -use winit::window::Fullscreen; -use winit::window::Icon; -use winit::window::Window; -use winit::window::WindowId; - -use super::repl::input::evaluate_command; - -pub mod ctx; - -pub struct WindowContext<'window> { - window: Arc, - ctx: Renderer<'window>, - main_window: bool, - terminal_state: Option, -} - -impl Deref for WindowContext<'_> { - type Target = winit::window::Window; - - fn deref(&self) -> &Self::Target { - self.window.as_ref() - } -} -impl WindowContext<'_> { - pub fn is_main_window(&self) -> bool { - self.main_window - } -} -#[derive(Default)] -pub struct TerminalState { - input_buffer: String, - output_history: Vec, - scroll_offset: usize, - show_cursor: bool, - cursor_blink_timer: f32, - command_queue: Vec, - needs_execution: bool, - max_history_lines: usize, - input_history: Vec, -} - -pub struct App<'window> { - windows: ahash::AHashMap>, - // Number of windows that have been dropped but *NOT* destroyed yet - windows_in_limbo: usize, -} - -impl Default for App<'_> { - fn default() -> Self { - Self { - windows: ahash::AHashMap::new(), - windows_in_limbo: 0, - } - } -} - -static CUBE_OBJ: &str = " -# Blender 4.2.3 LTS -# www.blender.org -mtllib untitled.mtl -o Cube -v 0.645975 0.645975 -0.645975 -v 0.645975 -0.645975 -0.645975 -v 0.645975 0.645975 0.645975 -v 0.645975 -0.645975 0.645975 -v -0.645975 0.645975 -0.645975 -v -0.645975 -0.645975 -0.645975 -v -0.645975 0.645975 0.645975 -v -0.645975 -0.645975 0.645975 -vn -0.0000 1.0000 -0.0000 -vn -0.0000 -0.0000 1.0000 -vn -1.0000 -0.0000 -0.0000 -vn -0.0000 -1.0000 -0.0000 -vn 1.0000 -0.0000 -0.0000 -vn -0.0000 -0.0000 -1.0000 -vt 0.625000 0.500000 -vt 0.875000 0.500000 -vt 0.875000 0.750000 -vt 0.625000 0.750000 -vt 0.375000 0.750000 -vt 0.625000 1.000000 -vt 0.375000 1.000000 -vt 0.375000 0.000000 -vt 0.625000 0.000000 -vt 0.625000 0.250000 -vt 0.375000 0.250000 -vt 0.125000 0.500000 -vt 0.375000 0.500000 -vt 0.125000 0.750000 -s 0 -usemtl Material -f 1/1/1 5/2/1 7/3/1 3/4/1 -f 4/5/2 3/4/2 7/6/2 8/7/2 -f 8/8/3 7/9/3 5/10/3 6/11/3 -f 6/12/4 2/13/4 4/5/4 8/14/4 -f 2/13/5 1/1/5 3/4/5 4/5/5 -f 6/11/6 5/10/6 1/1/6 2/13/6 - -"; - -impl App<'_> { - const ICON: &'static [u8] = - include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/../assets/Badge.png")); - - fn create_main_window(&mut self, event_loop: &ActiveEventLoop) { - let icon = self.load_icon_from_bytes(Self::ICON).unwrap(); - - let win_attr = Window::default_attributes() - .with_title("Zenyx") - .with_min_inner_size(Size::Logical(LogicalSize::new(100.0, 100.0))) - .with_window_icon(icon.clone()); - // .with_taskbar_icon(icon); - - match event_loop.create_window(win_attr) { - Ok(window) => { - let window = Arc::new(window); - let window_id = window.id(); - match Renderer::new_blocking(window.clone()) { - Ok(mut wgpu_ctx) => { - let obj = match tobj::load_obj( - "Pumpkin.obj", - &LoadOptions { - triangulate: true, - single_index: true, - ..Default::default() - }, - ) { - Ok(obj) => obj, - Err(e) => { - error!("Failed to load Pumpkin.obj: {e}"); - let fallback_obj = CUBE_OBJ.to_string(); - tobj::load_obj_buf( - &mut fallback_obj.as_bytes(), - &LoadOptions { - triangulate: true, - single_index: true, - ..Default::default() - }, - |_| Ok(Default::default()), - ) - .expect("Failed to load fallback CUBE_OBJ") - } - }; - - let (combined_vertices, combined_indices) = parse_obj(&obj.0); - - wgpu_ctx.add_model(&combined_vertices, &combined_indices); - - self.windows.insert( - window_id, - WindowContext { - window, - ctx: wgpu_ctx, - main_window: true, - terminal_state: None, - }, - ); - info!("Main window created: {:?}", window_id); - } - Err(e) => error!("Failed to create WGPU context: {:}", e), - } - } - Err(e) => error!("Failed to create main window: {}", e), - } - } - - fn create_terminal_window(&mut self, event_loop: &ActiveEventLoop) { - let icon = self.load_icon_from_bytes(Self::ICON).unwrap(); - - let win_attr = Window::default_attributes() - .with_title("Zenyx Terminal") - .with_inner_size(Size::Logical(LogicalSize::new(800.0, 600.0))) - .with_window_icon(icon); - - match event_loop.create_window(win_attr) { - Ok(window) => { - let window = Arc::new(window); - let window_id = window.id(); - match Renderer::new_blocking(window.clone()) { - Ok(mut wgpu_ctx) => { - wgpu_ctx.set_bg_color(wgpu::Color::BLACK); - wgpu_ctx.set_text_color(wgpu::Color::GREEN); - self.windows.insert( - window_id, - WindowContext { - window, - ctx: wgpu_ctx, - main_window: false, - terminal_state: Some(TerminalState::default()), - }, - ); - } - Err(e) => error!("Failed to create terminal WGPU context: {}", e), - } - } - Err(e) => error!("Failed to create terminal window: {}", e), - } - } - - fn handle_terminal_input(&mut self, window_id: WindowId, key_event: KeyEvent) { - let Some(window_context) = self.windows.get_mut(&window_id) else { - return; - }; - let state = window_context.terminal_state.as_mut().unwrap(); - - if key_event.state.is_pressed() { - match key_event.logical_key { - winit::keyboard::Key::Named(NamedKey::Enter) => { - if !state.input_buffer.is_empty() { - state.command_queue.push(state.input_buffer.clone()); - state.input_history.push("\n\n".to_string()); - state.input_buffer.clear(); - state.needs_execution = true; - } - } - winit::keyboard::Key::Named(NamedKey::Backspace) => { - state.input_buffer.pop(); - } - winit::keyboard::Key::Named(NamedKey::Space) => { - state.input_buffer.push(' '); - } - winit::keyboard::Key::Character(c) => { - state.input_buffer.push_str(&c); - } - _ => {} - } - } - } - - fn handle_close_requested(&mut self, window_id: WindowId) { - if let Some(window) = self.windows.remove(&window_id) { - debug!("Window {:?} closed", window_id); - self.windows_in_limbo += 1; - if window.is_main_window() { - self.windows_in_limbo += self.windows.len(); - self.windows.clear(); - } - } else { - warn!("Tried to close non-existent window {:?}", window_id); - } - } - - fn handle_keyboard_input( - &mut self, - event_loop: &ActiveEventLoop, - window_id: WindowId, - key_event: KeyEvent, - ) { - if !key_event.state.is_pressed() || key_event.repeat { - return; - } - if let Some(window_context) = self.windows.get(&window_id) { - if window_context.terminal_state.is_some() { - self.handle_terminal_input(window_id, key_event); - return; - } - } - match key_event.physical_key { - winit::keyboard::PhysicalKey::Code(code) => match code { - winit::keyboard::KeyCode::Space => { - self.toggle_background(window_id); - } - winit::keyboard::KeyCode::Escape => { - self.spawn_child_window(event_loop); - } - winit::keyboard::KeyCode::F11 => self.toggle_fullscreen(window_id), - winit::keyboard::KeyCode::F12 => self.create_terminal_window(event_loop), - other => error!("Unimplemented keycode: {:?}", other), - }, - _ => error!("Unhandled key event: {:?}", key_event), - } - } - - fn toggle_background(&mut self, window_id: WindowId) { - if let Some(window_context) = self.windows.get_mut(&window_id) { - let current_color = window_context.ctx.bg_color(); - - let new_color = match current_color { - &wgpu::Color::WHITE => wgpu::Color::BLACK, - &wgpu::Color::BLACK => wgpu::Color::WHITE, - _ => wgpu::Color::WHITE, - }; - let new_text_color = match window_context.ctx.text_color() { - &wgpu::Color::WHITE => wgpu::Color::BLACK, - &wgpu::Color::BLACK => wgpu::Color::WHITE, - _ => wgpu::Color::WHITE, - }; - - println!("new text color {new_text_color:#?}"); - window_context.ctx.set_bg_color(new_color); - window_context.ctx.set_text_color(new_text_color); - debug!("Toggled background color for window {:?}", window_id); - } else { - warn!("No window context for toggling background: {:?}", window_id); - } - } - - fn toggle_fullscreen(&mut self, window_id: WindowId) { - if let Some(ctx) = self.windows.get_mut(&window_id) { - let is_fullscreen = ctx.window.fullscreen().is_some(); - let fullscreen_mode = if is_fullscreen { - None - } else { - ctx.window - .current_monitor() - .map(|monitor| Fullscreen::Borderless(Some(monitor))) - }; - - ctx.window.set_fullscreen(fullscreen_mode); - debug!("Fullscreen toggled for window: {:?}", window_id); - } else { - warn!("No window found for fullscreen toggle: {:?}", window_id); - } - } - - fn load_icon_from_bytes(&self, bytes: &[u8]) -> Result, String> { - let cursor = Cursor::new(bytes); - let format = image::guess_format(bytes).map_err(|_| "Failed to guess image format")?; - let decoder = match format { - ImageFormat::Png => image::codecs::png::PngDecoder::new(cursor) - .map_err(|e| format!("Failed to decode PNG: {}", e))?, - _ => { - let img = image::load_from_memory(bytes) - .map_err(|e| format!("Failed to load image: {}", e))? - .into_rgba8(); - let (width, height) = img.dimensions(); - return Icon::from_rgba(img.into_raw(), width, height) - .map(Some) - .map_err(|e| format!("Failed to create icon from bytes: {}", e)); - } - }; - - let (width, height) = decoder.dimensions(); - let mut image_data = vec![0; decoder.total_bytes() as usize]; - decoder - .read_image(&mut image_data) - .map_err(|e| format!("Failed to read image data: {}", e))?; - - Icon::from_rgba(image_data, width, height) - .map(Some) - .map_err(|e| format!("Failed to create icon from bytes: {}", e)) - } - - fn spawn_child_window(&mut self, event_loop: &ActiveEventLoop) { - if let Some(main_ctx) = self.windows.values().find(|ctx| ctx.is_main_window()) { - let title = format!("Zenyx - New Window {}", self.windows.len()); - let icon = self.load_icon_from_bytes(Self::ICON).unwrap(); - - let win_attr = unsafe { - let base = Window::default_attributes() - .with_title(title) - // .with_taskbar_icon(icon) - .with_min_inner_size(Size::Logical(LogicalSize::new(100.0, 100.0))) - .with_window_icon(icon.clone()); - - match main_ctx.window_handle() { - Ok(handle) => { - if !cfg!(target_os = "windows") { - base.with_parent_window(Some(handle.as_raw())) - } else { - base - } - } - Err(e) => { - error!("{e}"); - base - } - } - }; - match event_loop.create_window(win_attr) { - Ok(window) => { - let window = Arc::new(window); - let window_id = window.id(); - match Renderer::new_blocking(window.clone()) { - Ok(mut wgpu_ctx) => { - { - let mut tmp_path: PathBuf = env::temp_dir(); - tmp_path.push("cube.obj"); - if let Err(e) = fs::write(&tmp_path, CUBE_OBJ) { - error!("Failed to write cube OBJ to temp: {}", e); - } - - let load_options = tobj::LoadOptions { - triangulate: true, - single_index: true, - ..Default::default() - }; - match tobj::load_obj(tmp_path.to_str().unwrap(), &load_options) { - Ok(cube_model) => { - let (cube_vertices, cube_indices) = - parse_obj(&cube_model.0); - wgpu_ctx.add_model(&cube_vertices, &cube_indices); - } - Err(e) => { - error!("Failed to load cube OBJ from temp file: {:#}", e) - } - } - } - self.windows.insert( - window_id, - WindowContext { - window, - ctx: wgpu_ctx, - main_window: false, - terminal_state: None, - }, - ); - debug!("Spawned new child window: {:?}", window_id); - } - Err(e) => error!("Failed to create WGPU context for child window: {}", e), - } - } - Err(e) => error!("Failed to create child window: {}", e), - } - } else { - error!("No main window found. Cannot spawn a child window."); - } - } - - fn handle_redraw_requested(&mut self, window_id: WindowId) { - if let Some(window_context) = self.windows.get_mut(&window_id) { - if let Some(terminal_state) = window_context.terminal_state.as_mut() { - if terminal_state.needs_execution { - for command in terminal_state.command_queue.drain(..) { - match evaluate_command(&command) { - Ok(output) => { - for line in output.lines() { - terminal_state.output_history.push(line.to_string()); - } - } - Err(e) => { - terminal_state.output_history.push(format!("Error: {}", e)); - } - } - } - terminal_state.needs_execution = false; - - terminal_state.scroll_offset = terminal_state - .output_history - .len() - .saturating_sub(terminal_state.max_history_lines); - } - } - - let terminal_state = window_context.terminal_state.as_mut(); - window_context.ctx.draw(terminal_state); - window_context.request_redraw(); - } - } - - fn handle_resize(&mut self, window_id: WindowId, new_size: winit::dpi::PhysicalSize) { - if let Some(window_context) = self.windows.get_mut(&window_id) { - // if we dont ignore size 0 this WILL cause a crash. DO NOT REMOVE - - if new_size.height == 0 || new_size.width == 0 { - error!("Attempted to resize a window to 0x0!"); - return; - } - window_context.ctx.resize(new_size.into()); - window_context.window.request_redraw(); - debug!( - "Resized window {:?} to {}x{}", - window_id, new_size.width, new_size.height - ); - } else { - warn!("Received resize for unknown window {:?}", window_id); - } - } - - fn handle_destroyed(&mut self, event_loop: &ActiveEventLoop) { - self.windows_in_limbo -= 1; - if self.windows_in_limbo == 0 && self.windows.is_empty() { - debug!("All windows are closed. Exiting event loop."); - event_loop.exit(); - } - } -} - -fn parse_obj(obj: &Vec) -> (Vec, Vec) { - let mut combined_vertices = Vec::new(); - let mut combined_indices = Vec::new(); - let mut vertex_offset = 0; - - for object in obj { - let mesh: &_ = &object.mesh; - let vertices: Vec = (0..mesh.positions.len() / 3) - .map(|i| Vertex { - position: [ - mesh.positions[i * 3], - mesh.positions[i * 3 + 1], - mesh.positions[i * 3 + 2], - ], - normal: if !mesh.normals.is_empty() { - [ - mesh.normals[i * 3], - mesh.normals[i * 3 + 1], - mesh.normals[i * 3 + 2], - ] - } else { - [0.0; 3] - }, - }) - .collect(); - combined_vertices.extend(vertices); - combined_indices.extend(mesh.indices.iter().map(|&index| index + vertex_offset)); - vertex_offset += (mesh.positions.len() as u32) / 3; - } - - (combined_vertices, combined_indices) -} - -impl ApplicationHandler for App<'_> { - fn resumed(&mut self, event_loop: &ActiveEventLoop) { - if self.windows.is_empty() { - self.create_main_window(event_loop); - } - } - - fn window_event( - &mut self, - event_loop: &ActiveEventLoop, - window_id: WindowId, - event: WindowEvent, - ) { - match event { - WindowEvent::CloseRequested => { - self.handle_close_requested(window_id); - } - WindowEvent::KeyboardInput { - event: key_event, .. - } => { - self.handle_keyboard_input(event_loop, window_id, key_event); - } - WindowEvent::RedrawRequested => { - self.handle_redraw_requested(window_id); - } - WindowEvent::Resized(new_size) => { - self.handle_resize(window_id, new_size); - } - WindowEvent::Destroyed => { - self.handle_destroyed(event_loop); - } - _ => trace!("Unhandled window event for window {:?}", window_id), - } - } -} - -pub fn init_renderer(event_loop: EventLoop<()>) { - event_loop.set_control_flow(ControlFlow::Poll); - let mut app = App::default(); - if let Err(e) = event_loop.run_app(&mut app) { - error!("Failed to run application: {}", e); - } -} diff --git a/engine/src/core/render/shader.wgsl b/engine/src/core/render/shader.wgsl deleted file mode 100644 index 90780f1..0000000 --- a/engine/src/core/render/shader.wgsl +++ /dev/null @@ -1,42 +0,0 @@ -struct CameraUniform { - view: mat4x4, - proj: mat4x4, -}; - -struct ModelUniform { - model: mat4x4, -}; - -@group(0) @binding(0) -var camera: CameraUniform; - -@group(1) @binding(0) -var model: ModelUniform; - -struct VertexInput { - @location(0) position: vec3, - @location(1) normal: vec3, -}; - -struct VertexOutput { - @builtin(position) clip_position: vec4, - @location(0) normal: vec3, -}; - -@vertex -fn vs_main(input: VertexInput) -> VertexOutput { - var output: VertexOutput; - let model_pos = model.model * vec4(input.position, 1.0); - output.clip_position = camera.proj * camera.view * model_pos; - output.normal = input.normal; - return output; -} - -@fragment -fn fs_main(input: VertexOutput) -> @location(0) vec4 { - let ambient: f32 = 0.2; - let light_dir = normalize(vec3(0.5, 1.0, 0.5)); - let diffuse = clamp(dot(normalize(input.normal), light_dir), 0.0, 1.0); - let brightness = ambient + (1.0 - ambient) * diffuse; - return vec4(0.7 * brightness, 0.7 * brightness, 0.9 * brightness, 1.0); -} \ No newline at end of file diff --git a/engine/src/core/repl/commands.rs b/engine/src/core/repl/commands.rs deleted file mode 100644 index f5eac1b..0000000 --- a/engine/src/core/repl/commands.rs +++ /dev/null @@ -1,410 +0,0 @@ -use std::{collections::VecDeque, fs, path::PathBuf, str::FromStr}; - -use parking_lot::RwLock; - -use super::{handler::Command, input::tokenize}; -use crate::core::repl::handler::COMMAND_MANAGER; -use crate::error::{ZenyxError, ZenyxErrorKind}; - -#[derive(Default)] -pub struct HelpCommand; - -impl Command for HelpCommand { - fn execute(&self, _args: Option>) -> Result { - let manager = COMMAND_MANAGER.read(); - let mut output = String::new(); - output.push_str("Available commands:\n\n"); - - for (_, command) in manager.get_commands() { - output.push_str(&format!( - "Command: {}\n\tDescription: {}\n\tParameters: {}\n\tHelp: {}\n\n", - command.get_name().to_lowercase(), - command.get_description(), - command.get_params(), - command.get_help() - )); - } - - if !manager.aliases.is_empty() { - output.push_str("Aliases:\n"); - for (alias, command) in &manager.aliases { - output.push_str(&format!("\t{} -> {}\n", alias, command)); - } - } - Ok(output) - } - - fn undo(&self) {} - - fn redo(&self) {} - - fn get_description(&self) -> String { - String::from("help") - } - - fn get_help(&self) -> String { - String::from("Displays a list of available commands and their descriptions.") - } - - fn get_params(&self) -> String { - String::from("No parameters required.") - } - - fn get_name(&self) -> String { - String::from("Help") - } -} - -#[derive(Default)] -pub struct ClearCommand; - -impl Command for ClearCommand { - fn execute(&self, _args: Option>) -> Result { - let _result = if cfg!(target_os = "windows") { - std::process::Command::new("cmd") - .args(["/c", "cls"]) - .spawn() - } else { - std::process::Command::new("clear").spawn() - }; - Ok(String::from("Screen cleared.")) - } - - fn undo(&self) {} - - fn redo(&self) {} - - fn get_description(&self) -> String { - String::from("A simple command that clears the terminal") - } - - fn get_name(&self) -> String { - String::from("clear") - } - - fn get_help(&self) -> String { - String::from("Clears the terminal") - } - - fn get_params(&self) -> String { - String::from("None") - } -} - -#[derive(Default)] -pub struct ExitCommand; - -impl Command for ExitCommand { - fn execute(&self, args: Option>) -> Result { - match args { - Some(args) => { - let exit_code = args[0].parse().map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Failed to parse exit code") - .with_source(e) - .build() - })?; - std::process::exit(exit_code); - } - None => { - std::process::exit(0); - } - } - } - - fn undo(&self) { - todo!() - } - - fn redo(&self) { - todo!() - } - - fn get_description(&self) -> String { - String::from("Gracefully exists the program") - } - - fn get_name(&self) -> String { - String::from("exit") - } - - fn get_help(&self) -> String { - String::from("Exits, probably") - } - - fn get_params(&self) -> String { - String::from("None") - } -} - -#[derive(Default)] -pub struct ExecFile; - -impl Command for ExecFile { - fn execute(&self, args: Option>) -> Result { - match args { - Some(args) => { - let file_path = PathBuf::from_str(&args[0]).map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Invalid file path") - .with_source(e) - .build() - })?; - if file_path.extension().is_some() && file_path.extension().unwrap() != "zensh" { - Err(ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Selected file was not a zensh file") - .build()) - } else { - let mut script_output = String::new(); - match self.evaluate_script_heap_based(file_path) { - Ok(commands_to_execute) => { - for (cmd_name, cmd_args) in commands_to_execute { - match COMMAND_MANAGER.read().execute(&cmd_name, cmd_args) { - Ok(output) => script_output.push_str(&output), - Err(e) => { - return Err(ZenyxError::builder( - ZenyxErrorKind::CommandExecution, - ) - .with_message(format!( - "Error executing command '{}' in script: {}", - cmd_name, e - )) - .build()); - } - } - } - Ok(script_output) - } - Err(e) => Err(e), - } - } - } - None => Err(ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Not enough arguments") - .build()), - } - } - - fn undo(&self) {} - - fn redo(&self) {} - - fn get_description(&self) -> String { - String::from("Executes a file path") - } - - fn get_name(&self) -> String { - String::from("exec") - } - - fn get_help(&self) -> String { - String::from("this will read the contents of a .zensh file, evaluate it, and run its input") - } - - fn get_params(&self) -> String { - String::from("1: File path") - } -} - -impl ExecFile { - const MAX_RECURSION_DEPTH: usize = 100; // Increased for heap-based approach - - fn evaluate_script_heap_based( - &self, - initial_file_path: PathBuf, - ) -> Result>)>, ZenyxError> { - let mut command_queue: VecDeque<(PathBuf, usize)> = VecDeque::new(); - let mut collected_commands = Vec::new(); - command_queue.push_back((initial_file_path, 0)); - - while let Some((current_file_path, current_depth)) = command_queue.pop_front() { - if current_depth > Self::MAX_RECURSION_DEPTH { - return Err(ZenyxError::builder(ZenyxErrorKind::CommandExecution) - .with_message(format!( - "Recursion limit of {} exceeded while executing script.", - Self::MAX_RECURSION_DEPTH - )) - .build()); - } - - let zscript_result = fs::read_to_string(¤t_file_path).map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::Io) - .with_message(format!("Failed to read file: {}", current_file_path.display())) - .with_source(e) - .build() - }); - - match zscript_result { - Ok(zscript) => { - let commands: Vec<&str> = zscript.split(|c| c == ';' || c == '\n').collect(); - for command_str in commands { - let command_str = command_str.trim(); - if command_str.is_empty() { - continue; - } - - let tokens = tokenize(command_str); - if tokens.is_empty() { - continue; - } - - let cmd_name = &tokens[0]; - let args: Option> = if tokens.len() > 1 { - Some(tokens[1..].iter().map(|s| s.to_string()).collect()) - } else { - None - }; - - if cmd_name.to_lowercase() == "exec" { - if let Some(ref file_args) = args { - if let Some(nested_file_path_str) = file_args.first() { - let nested_file_path = - PathBuf::from_str(nested_file_path_str).map_err(|e| { - ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Invalid file path in nested exec command") - .with_source(e) - .build() - })?; - if nested_file_path.extension().is_some() - && nested_file_path.extension().unwrap() != "zensh" - { - return Err(ZenyxError::builder( - ZenyxErrorKind::CommandParsing, - ) - .with_message("Nested exec file was not a zensh file") - .build()); - } - command_queue.push_back((nested_file_path, current_depth + 1)); - } else { - return Err(ZenyxError::builder( - ZenyxErrorKind::CommandParsing, - ) - .with_message("Not enough arguments for nested exec command") - .build()); - } - } else { - return Err(ZenyxError::builder( - ZenyxErrorKind::CommandParsing, - ) - .with_message("Not enough arguments for nested exec command") - .build()); - } - } else { - collected_commands.push((cmd_name.to_owned(), args)); - } - } - } - Err(e) => return Err(e), - } - } - - Ok(collected_commands) - } -} - -#[derive(Default)] -pub struct CounterCommand { - counter: RwLock, -} - -impl Command for CounterCommand { - fn execute(&self, _args: Option>) -> Result { - let mut count = self.counter.write(); - *count += 1; - Ok(format!( - "CounterCommand executed. Current count: {}", - *count - )) - } - - fn undo(&self) { - println!("Undo CounterCommand."); - } - - fn redo(&self) { - println!("Redo CounterCommand."); - } - - fn get_description(&self) -> String { - String::from("counter") - } - - fn get_help(&self) -> String { - String::from("Increments a counter every time it's executed.") - } - - fn get_params(&self) -> String { - String::from("No parameters for CounterCommand.") - } - - fn get_name(&self) -> String { - String::from("count") - } -} - -#[derive(Default)] -pub struct PanicCommmand; -impl Command for PanicCommmand { - fn execute(&self, args: Option>) -> Result { - if let Some(args) = args { - let panic_msg = &args[0]; - panic!("{}", panic_msg); - } else { - let option: Option = None; - println!("Unwrapping None: {}", option.unwrap()); - panic!("Panic command was called"); - } - } - - fn undo(&self) {} - - fn redo(&self) {} - - fn get_description(&self) -> String { - String::from("causes a panic with your provided message") - } - - fn get_name(&self) -> String { - String::from("panic") - } - - fn get_help(&self) -> String { - String::from("") - } - - fn get_params(&self) -> String { - String::from("optional: panic msg") - } -} - -fn eval(input: String) -> Result>)>, ZenyxError> { - if input.trim().is_empty() { - return Err(ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Input was empty") - .build()); - } - let commands: Vec<&str> = input.split(|c| c == ';' || c == '\n').collect(); - let mut evaluted = vec![]; - - for command in commands { - let command = command.trim(); - if command.is_empty() { - println!("Empty command, skipping."); - continue; - } - - let tokens = tokenize(command); - if tokens.is_empty() { - println!("Empty command, skipping."); - continue; - } - let cmd_name = &tokens[0]; - let args: Option> = if tokens.len() > 1 { - Some(tokens[1..].iter().map(|s| s.to_string()).collect()) - } else { - None - }; - evaluted.push((cmd_name.to_owned(), args)); - } - Ok(evaluted) -} \ No newline at end of file diff --git a/engine/src/core/repl/handler.rs b/engine/src/core/repl/handler.rs deleted file mode 100644 index 943e44b..0000000 --- a/engine/src/core/repl/handler.rs +++ /dev/null @@ -1,166 +0,0 @@ -use std::sync::LazyLock; - -use ahash::AHashMap; -use colored::Colorize; -use parking_lot::RwLock; - -use crate::error::{ZenyxError, ZenyxErrorKind}; - -pub static COMMAND_MANAGER: LazyLock> = - LazyLock::new(|| RwLock::new(CommandManager::init())); - -#[macro_export] -macro_rules! commands { - [$($command:ty),*] => [ - $( - { - let mut manager = $crate::core::repl::handler::COMMAND_MANAGER.write(); - manager.add_command(Box::new(<$command>::default())); - } - )* - ]; -} - -#[macro_export] -macro_rules! alias { - ($($alias:expr => $command:expr),*) => { - $( - { - let mut manager = $crate::COMMAND_MANAGER.write(); - manager.add_alias($alias, $command); - } - )* - }; -} - -fn hamming_distance(a: &str, b: &str) -> Option { - if a.len() != b.len() { - return None; - } - Some( - a.chars() - .zip(b.chars()) - .filter(|(char_a, char_b)| char_a != char_b) - .count(), - ) -} - -fn edit_distance(a: &str, b: &str) -> usize { - let m = a.len(); - let n = b.len(); - - let mut dp = vec![vec![0; n + 1]; m + 1]; - - for i in 0..=m { - for j in 0..=n { - if i == 0 { - dp[i][j] = j; - } else if j == 0 { - dp[i][j] = i; - } else if a.chars().nth(i - 1) == b.chars().nth(j - 1) { - dp[i][j] = dp[i - 1][j - 1]; - } else { - dp[i][j] = 1 + dp[i - 1][j - 1].min(dp[i - 1][j]).min(dp[i][j - 1]); - } - } - } - - dp[m][n] -} - -fn check_similarity(target: &str) -> Option { - let max_hamming_distance: usize = 2; - let max_edit_distance: usize = 2; - let mut best_match: Option = None; - let mut best_distance = usize::MAX; - - for (cmd_name, _) in COMMAND_MANAGER.read().get_commands() { - if let Some(hamming_dist) = hamming_distance(target, cmd_name) { - if hamming_dist <= max_hamming_distance && hamming_dist < best_distance { - best_distance = hamming_dist; - best_match = Some(String::from(cmd_name)); - } - } else { - let edit_dist = edit_distance(target, cmd_name); - if edit_dist <= max_edit_distance && edit_dist < best_distance { - best_distance = edit_dist; - best_match = Some(String::from(cmd_name)); - } - } - } - - best_match -} - -pub struct CommandManager { - pub commands: AHashMap>, - pub aliases: AHashMap, -} - -impl CommandManager { - pub fn init() -> CommandManager { - CommandManager { - commands: AHashMap::new(), - aliases: AHashMap::new(), - } - } - - pub fn get_commands(&self) -> std::collections::hash_map::Iter<'_, String, Box> { - self.commands.iter() - } - - pub fn execute_command( - &self, - command: &str, - args: Option>, - ) -> Result { - if let Some(command) = self.commands.get(command) { - let output = command.execute(args)?; - Ok(output) - } else { - let corrected_cmd = check_similarity(command); - if let Some(corrected_cmd) = corrected_cmd { - println!( - "Command: {} was not found. Did you mean {}?", - command.red().bold(), - corrected_cmd.green().bold().italic() - ); - } - Err(ZenyxError::builder(ZenyxErrorKind::CommandExecution) - .with_message(format!("Command '{}' not found.", command)) - .build()) - } - } - - pub fn execute(&self, command: &str, args: Option>) -> Result { - match self.aliases.get(command) { - Some(command) => self.execute(command, args), - None => { - let output = self.execute_command(command, args)?; - Ok(output) - } - } - } - - pub fn add_command(&mut self, command: Box) { - self.commands - .insert(command.get_name().to_lowercase(), command); - } - - pub fn add_alias(&mut self, alias: &str, command: &str) { - self.aliases.insert( - alias.to_string().to_lowercase(), - command.to_string().to_lowercase(), - ); - } -} - -pub trait Command: Send + Sync { - fn execute(&self, args: Option>) -> Result; - fn undo(&self); - fn redo(&self); - fn get_description(&self) -> String; - fn get_name(&self) -> String; - fn get_help(&self) -> String; - fn get_params(&self) -> String; -} diff --git a/engine/src/core/repl/input.rs b/engine/src/core/repl/input.rs deleted file mode 100644 index ebe932f..0000000 --- a/engine/src/core/repl/input.rs +++ /dev/null @@ -1,240 +0,0 @@ -use std::{ - borrow::Cow::{self, Borrowed, Owned}, - sync::Arc, - time::{SystemTime, UNIX_EPOCH}, -}; - -use colored::Colorize; -use parking_lot::Mutex; -use rustyline::{ - Cmd, Completer, ConditionalEventHandler, Editor, Event, EventContext, EventHandler, Helper, - Hinter, KeyEvent, RepeatCount, Validator, completion::Completer, error::ReadlineError, - highlight::Highlighter, hint::HistoryHinter, history::DefaultHistory, -}; -#[allow(unused_imports)] -use tracing::{debug, error, info, warn}; - -use super::handler::COMMAND_MANAGER; -use crate::error::{Result, ZenyxError, ZenyxErrorKind}; -#[derive(Default)] -struct CommandCompleter; - -impl Completer for CommandCompleter { - type Candidate = String; - - fn complete( - &self, - line: &str, - pos: usize, - _ctx: &rustyline::Context<'_>, - ) -> rustyline::Result<(usize, Vec)> { - let binding = COMMAND_MANAGER.read(); - let binding = binding.get_commands(); - let filtered_commands: Vec<_> = binding - .filter(|(command, _)| command.starts_with(line)) - .collect(); - - let completions: Vec = filtered_commands - .iter() - .filter(|(command, _)| command.starts_with(&line[..pos])) - .map(|(command, _)| command[pos..].to_string()) - .collect(); - println!("{:#?}", completions); - Ok((pos, completions)) - } -} -#[derive(Completer, Helper, Hinter, Validator)] -struct MyHelper { - #[rustyline(Hinter)] - hinter: HistoryHinter, - #[rustyline(Completer)] - completer: CommandCompleter, -} - -impl Highlighter for MyHelper { - fn highlight_prompt<'b, 's: 'b, 'p: 'b>( - &'s self, - prompt: &'p str, - default: bool, - ) -> Cow<'b, str> { - if default { - Owned(prompt.bright_black().bold().to_string()) - } else { - Borrowed(prompt) - } - } - - fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> { - Owned(hint.italic().bright_black().to_string()) - } -} - -#[derive(Clone)] -struct BacktickEventHandler { - toggle_state: Arc>, // Tracks whether logging is enabled or disabled -} - -impl ConditionalEventHandler for BacktickEventHandler { - fn handle(&self, evt: &Event, _: RepeatCount, _: bool, _: &EventContext) -> Option { - if let Some(k) = evt.get(0) { - if *k == KeyEvent::from('`') { - let mut state = self.toggle_state.lock(); - println!( - "Stdout Logging: {}", - if *state { "ON".green() } else { "OFF".red() } - ); - if *state { - // LOGGER.write_to_stdout(); - } else { - // LOGGER.write_to_file("z.log"); - } - *state = !*state; - Some(Cmd::Noop) - } else { - None - } - } else { - unreachable!() - } - } -} - -pub fn tokenize(command: &str) -> Vec { - let mut tokens = Vec::new(); - let mut current_token = String::new(); - let mut inside_string = false; - - for char in command.chars() { - if char == '"' || char == '\'' { - inside_string = !inside_string; - } else if char.is_whitespace() && !inside_string { - if !current_token.is_empty() { - tokens.push(current_token); - current_token = String::new(); - } - } else { - current_token.push(char); - } - } - - // ignore the last token if it's empty. Who are we. Mojang? - Caz - if !current_token.is_empty() { - tokens.push(current_token); - } - - tokens -} - -pub fn parse_command(input: &str) -> Result> { - let commands = input - .split(|c| c == ';' || c == '\n') - .map(|slice| slice.to_string()) - .collect::>(); - Ok(commands) -} - -pub fn evaluate_command(input: &str) -> std::result::Result { - if input.trim().is_empty() { - let err = ZenyxError::builder(ZenyxErrorKind::CommandParsing) - .with_message("Input was empty") - .build(); - return Err(err); - } - - let commands = input - .split(|c| c == ';' || c == '\n') - .map(|slice| slice.to_string()) - .collect::>(); - let mut output = String::new(); - - for command in commands { - let command = command.trim(); - if command.is_empty() { - error!("Empty command, skipping."); - continue; - } - - let tokens = tokenize(command); - if tokens.is_empty() { - error!("Empty command, skipping."); - continue; - } - let cmd_name = &tokens[0]; - let args: Option> = if tokens.len() > 1 { - Some(tokens[1..].iter().map(|s| s.to_string()).collect()) - } else { - None - }; - match COMMAND_MANAGER.read().execute(cmd_name, args) { - Ok(command_output) => output.push_str(&command_output), - Err(e) => { - return Err(e); - } - } - } - Ok(output) -} -pub fn format_time() -> String { - let now = SystemTime::now(); - let duration = now.duration_since(UNIX_EPOCH).unwrap(); - let total_seconds = duration.as_secs(); - let nanos = duration.subsec_nanos(); - let milliseconds = nanos / 1_000_000; - - let seconds_since_midnight_utc = total_seconds % (24 * 3600); - let hour = (seconds_since_midnight_utc / 3600) % 24; - let minute = (seconds_since_midnight_utc / 60) % 60; - let second = seconds_since_midnight_utc % 60; - - format!( - "{:02}:{:02}:{:02}.{:03}", - hour, minute, second, milliseconds - ) -} - -pub async fn handle_repl() -> Result<()> { - let mut rl = Editor::::new()?; - rl.set_helper(Some(MyHelper { - hinter: HistoryHinter::new(), - completer: CommandCompleter::default(), - })); - - rl.bind_sequence( - KeyEvent::from('`'), - EventHandler::Conditional(Box::new(BacktickEventHandler { - toggle_state: Arc::new(Mutex::new(false)), - })), - ); - - if rl.load_history("history.txt").is_err() { - debug!("No previous history."); - } - - loop { - let time = format_time(); - let prompt = format!("[{}/{}] {}", time, "SHELL", ">>\t"); - - let sig = rl.readline(&prompt.bright_white()); - - match sig { - Ok(line) => { - rl.add_history_entry(line.as_str())?; - match evaluate_command(line.as_str()) { - Ok(_) => continue, - Err(e) => error!("{e}"), - } - } - Err(ReadlineError::Interrupted) => { - println!("CTRL+C received, exiting..."); - std::process::exit(0); - } - Err(ReadlineError::Eof) => { - println!("Error: CTRL+D pressed. Exiting..."); - std::process::exit(0); - } - Err(err) => { - println!("Error: {}", err); - } - } - } -} diff --git a/engine/src/core/repl/mod.rs b/engine/src/core/repl/mod.rs deleted file mode 100644 index c850436..0000000 --- a/engine/src/core/repl/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -use commands::{ClearCommand, CounterCommand, ExecFile, ExitCommand, HelpCommand, PanicCommmand}; - -use crate::commands; - -pub mod commands; -pub mod handler; -pub mod input; - -pub fn setup() { - commands!( - HelpCommand, - ExecFile, - ClearCommand, - ExitCommand, - CounterCommand, - PanicCommmand - ); -} diff --git a/engine/src/core/splash.rs b/engine/src/core/splash.rs deleted file mode 100644 index 94f4b5b..0000000 --- a/engine/src/core/splash.rs +++ /dev/null @@ -1,29 +0,0 @@ -use colored::Colorize; - -pub fn print_splash() { - println!( - "{}", - format!( - r#" - ▓▓▓▓▓▓▓▓▓▓▓ - ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ - ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ - ▓▓ ▓▓▓▓▓▓▓▓▓ -▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ -▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓ -▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓ -▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓ -▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓ - ▓▓▓▓▓▓▓▓▓ ▓▓ - ▓▓▓▓▓▓▓▓▓ ▓▓ - ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ - ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ - ▓▓▓▓▓▓▓▓▓▓▓ - - Version: {} - "#, - env!("CARGO_PKG_VERSION").green() - ) - .bright_yellow() - ); -} diff --git a/engine/src/error.rs b/engine/src/error.rs deleted file mode 100644 index f0b717f..0000000 --- a/engine/src/error.rs +++ /dev/null @@ -1,259 +0,0 @@ -use std::fmt::Write; - -use colored::Colorize; -use thiserror::Error; - -#[derive(Debug, Error, PartialEq)] -pub enum ZenyxErrorKind { - #[error("Surface creation failed")] - SurfaceCreation, - #[error("Surface configuration failed")] - SurfaceConfiguration, - #[error("Adapter request failed")] - AdapterRequest, - #[error("Device request failed")] - DeviceRequest, - #[error("Surface texture acquisition failed")] - SurfaceTexture, - #[error("Command parsing failed")] - CommandParsing, - #[error("Command execution failed")] - CommandExecution, - #[error("Font loading failed")] - FontLoading, - #[error("Model loading failed")] - ModelLoading, - #[error("IO operation failed")] - Io, - #[error("REPL operation failed")] - Repl, - #[error("Unknown error occurred")] - Unknown, -} - -#[derive(Debug)] -pub struct ZenyxError { - kind: ZenyxErrorKind, - message: Option, - context: Option, - source: Option>, -} - -impl ZenyxError { - pub fn builder(kind: ZenyxErrorKind) -> Self { - Self { - kind, - message: None, - context: None, - source: None, - } - } - - pub fn kind(&self) -> &ZenyxErrorKind { - &self.kind - } - - pub fn with_message(mut self, message: impl Into) -> Self { - self.message = Some(message.into()); - self - } - - pub fn with_context(mut self, context: impl Into) -> Self { - self.context = Some(context.into()); - self - } - - pub fn with_source(mut self, source: E) -> Self - where - E: std::error::Error + Send + Sync + 'static, - { - self.source = Some(Box::new(source)); - self - } - - pub fn build(self) -> Self { - self - } - - pub fn pretty_print(&self) { - let mut output = String::new(); - let padding_spaces = 2; - writeln!( - output, - "{} {}", - "\nERROR:".red().bold(), - format!("{}", self.kind).bright_white().bold() - ) - .unwrap(); - - if let Some(msg) = &self.message { - let line_padding = " ".repeat(padding_spaces); - writeln!(output, "{}>> {}\x1b[0m", line_padding, msg.bright_white()).unwrap(); - } - if let Some(ctx) = &self.context { - let line_padding = " ".repeat(padding_spaces); - writeln!(output, "{}│\x1b[0m", line_padding.bright_white().bold()).unwrap(); - writeln!(output, "{}╰─ Note: {}\x1b[0m", line_padding, ctx).unwrap(); - } - if let Some(source) = &self.source { - let line_padding = " ".repeat(padding_spaces); - writeln!(output, "{}╰─ Caused by: {}\x1b[0m", line_padding, source).unwrap(); - let mut current = source.source(); - let mut depth = 1; - while let Some(err) = current { - let indent = " ".repeat(padding_spaces * depth); - writeln!(output, "{}↳ {}\x1b[0m", indent, err).unwrap(); - depth += 1; - current = err.source(); - } - } - print!("{}", output); - } -} - -impl std::fmt::Display for ZenyxError { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "{}{}{}{}", - self.kind, - self.message - .as_ref() - .map_or("".to_string(), |msg| format!(" - {}", msg)), - self.context - .as_ref() - .map_or("".to_string(), |ctx| format!(" [{}]", ctx)), - self.source - .as_ref() - .map_or("".to_string(), |src| format!(" - caused by: {}", src)) - ) - } -} - -impl std::error::Error for ZenyxError { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - self.source - .as_ref() - .map(|s| s.as_ref() as &(dyn std::error::Error + 'static)) - } -} - -impl From for ZenyxError { - fn from(err: std::io::Error) -> Self { - Self::builder(ZenyxErrorKind::Io) - .with_message(err.to_string()) - .with_source(err) - .build() - } -} - -impl From for ZenyxError { - fn from(err: wgpu::CreateSurfaceError) -> Self { - Self::builder(ZenyxErrorKind::SurfaceCreation) - .with_message("Failed to create surface") - .with_source(err) - .build() - } -} - -impl From for ZenyxError { - fn from(err: wgpu::RequestDeviceError) -> Self { - Self::builder(ZenyxErrorKind::DeviceRequest) - .with_message("Failed to request device") - .with_source(err) - .build() - } -} - -impl From for ZenyxError { - fn from(err: rustyline::error::ReadlineError) -> Self { - Self::builder(ZenyxErrorKind::Repl) - .with_message("Readline error occurred") - .with_source(err) - .build() - } -} - -pub type Result = std::result::Result; - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_zenyx_error_builder() { - let error = ZenyxError::builder(ZenyxErrorKind::Io) - .with_message("An IO error occurred") - .with_context("Reading file") - .build(); - - assert_eq!(error.kind, ZenyxErrorKind::Io); - assert_eq!(error.message.as_deref(), Some("An IO error occurred")); - assert_eq!(error.context.as_deref(), Some("Reading file")); - assert!(error.source.is_none()); - } - - #[test] - fn test_zenyx_error_with_source() { - let io_error = std::io::Error::new(std::io::ErrorKind::NotFound, "File not found"); - let error = ZenyxError::builder(ZenyxErrorKind::Io) - .with_message("An IO error occurred") - .with_source(io_error) - .build(); - - assert_eq!(error.kind, ZenyxErrorKind::Io); - assert_eq!(error.message.as_deref(), Some("An IO error occurred")); - assert!(error.source.is_some()); - } - - #[test] - fn test_from_io_error() { - let io_error = std::io::Error::new(std::io::ErrorKind::PermissionDenied, "Access denied"); - let error: ZenyxError = io_error.into(); - - assert_eq!(error.kind, ZenyxErrorKind::Io); - assert_eq!(error.message.as_deref(), Some("Access denied")); - assert!(error.source.is_some()); - } - - #[test] - fn test_from_rustyline_error() { - let readline_error = rustyline::error::ReadlineError::Interrupted; - let error: ZenyxError = readline_error.into(); - - assert_eq!(error.kind, ZenyxErrorKind::Repl); - assert_eq!(error.message.as_deref(), Some("Readline error occurred")); - assert!(error.source.is_some()); - } - - #[test] - fn test_print() { - let readline_error = rustyline::error::ReadlineError::Interrupted; - let error: ZenyxError = readline_error.into(); - - println!("{error}"); - } - #[test] - fn test_pretty_print() { - let readline_error = rustyline::error::ReadlineError::Interrupted; - let error: ZenyxError = readline_error.into(); - - error.pretty_print(); - } - - #[test] - fn test_error_source_chain() { - let io_error = std::io::Error::new(std::io::ErrorKind::NotFound, "File not found"); - let error = ZenyxError::builder(ZenyxErrorKind::Io) - .with_message("An IO error occurred") - .with_source(io_error) - .build(); - - let mut source = std::error::Error::source(&error); - assert!(source.is_some()); - assert_eq!(source.unwrap().to_string(), "File not found"); - - source = source.unwrap().source(); - assert!(source.is_none()); - } -} diff --git a/engine/src/main.rs b/engine/src/main.rs deleted file mode 100644 index d01326d..0000000 --- a/engine/src/main.rs +++ /dev/null @@ -1,97 +0,0 @@ -use core::{panic::set_panic_hook, repl::setup, splash}; -use std::{fs::OpenOptions, io::BufWriter}; - -use colored::Colorize; -use tokio::runtime; -use tracing::level_filters::LevelFilter; -#[allow(unused_imports)] -use tracing::{debug, error, info, warn}; -use tracing_subscriber::{Registry, fmt, layer::SubscriberExt}; -use winit::event_loop::EventLoop; -pub mod cli; -pub mod core; -pub mod error; -pub mod metadata; - -fn init_logger() { - let stdout_layer = fmt::layer() - .with_level(true) - .compact() - .pretty() - .log_internal_errors(false) - .without_time() - .with_thread_names(true); - - let file_layer = fmt::layer() - .with_level(true) - .compact() - .with_ansi(false) - .log_internal_errors(false) - .without_time() - .with_writer(|| { - let file = OpenOptions::new() - .write(true) - .append(true) - .open("zenyx.log") - .unwrap_or_else(|_| { - eprintln!("Couldn't open log file, creating a new one."); - OpenOptions::new() - .write(true) - .create(true) - .open("zenyx.log") - .expect("Failed to create log file") - }); - BufWriter::new(file) - }) - .with_thread_names(true); - - let subscriber = Registry::default() - .with(LevelFilter::DEBUG) - .with(stdout_layer) - .with(file_layer); - - tracing::subscriber::set_global_default(subscriber).expect("Failed to set global subscriber"); -} - -#[tokio::main] -async fn main() { - init_logger(); - cli::parse(); - let sysinfo = crate::metadata::SystemMetadata::current(); - - // set_panic_hook(); - setup(); - - splash::print_splash(); - if !cfg!(debug_assertions) { - info!("{}", "Debug mode disabled".bright_blue()); - set_panic_hook(); - } else { - println!("{}", sysinfo.verbose_summary()); - } - - info!("Type 'help' for a list of commands."); - let repl_thread = std::thread::spawn(|| { - let rt = match runtime::Builder::new_current_thread().enable_all().build() { - Ok(rt) => rt, - Err(e) => { - error!("A fatal error has occured: {e}"); - std::process::exit(1) - } - }; - rt.block_on(core::repl::input::handle_repl()) - }); - - match EventLoop::new() { - Ok(event_loop) => { - core::render::init_renderer(event_loop); - } - Err(e) => { - error!("{e}") - } - }; - - if let Err(_) = repl_thread.join() { - error!("REPL thread panicked"); - } -} diff --git a/engine/src/metadata.rs b/engine/src/metadata.rs deleted file mode 100644 index 319db10..0000000 --- a/engine/src/metadata.rs +++ /dev/null @@ -1,816 +0,0 @@ -use std::collections::HashSet; -use std::fmt; -use std::str::FromStr; -use std::{env, error::Error, path::PathBuf, thread}; - -use native_dialog::{MessageDialog, MessageType}; -use parking_lot::Once; -use raw_cpuid::CpuId; -use sysinfo::{CpuRefreshKind, RefreshKind, System}; -use tracing::error; -use wgpu::DeviceType; - -mod build_info { - include!(concat!(env!("OUT_DIR"), "/built.rs")); -} - -static INIT: Once = Once::new(); - -pub fn set_panic_hook() { - INIT.call_once(|| { - let default_hook = std::panic::take_hook(); - std::panic::set_hook(Box::new(move |info| { - if let Err(e) = process_panic(info) { - eprintln!("Error in panic hook: {}", e); - default_hook(info); - } - std::process::exit(1); - })); - }); -} - -fn process_panic(info: &std::panic::PanicHookInfo<'_>) -> Result<(), Box> { - use std::io::Write; - - use colored::Colorize; - - let log_dir = PathBuf::from_str("./").expect("wtf, The current directory no longer exists?"); - if !log_dir.exists() { - std::fs::create_dir_all(&log_dir)?; - } - let log_path = log_dir.join("panic.log"); - - let mut file = std::fs::File::create(&log_path)?; - let payload = info.payload(); - let payload_str = if let Some(s) = payload.downcast_ref::<&str>() { - *s - } else if let Some(s) = payload.downcast_ref::() { - s - } else { - "" - }; - - writeln!(file, "Panic Occurred: {}", payload_str)?; - - if let Some(location) = info.location() { - writeln!(file, "Panic Location: {}", location)?; - } - - writeln!(file, "{}", capture_backtrace().sanitize_path())?; - - // Add more contextual information - writeln!(file, "\n--- Additional Information ---")?; - - // Rust Version - if let Ok(rust_version) = rust_version() { - writeln!(file, "Rust Version: {}", rust_version)?; - } - - // Command-line Arguments - writeln!(file, "Command-line Arguments:")?; - for arg in env::args() { - writeln!(file, " {}", arg)?; - } - - // Environment Variables (consider filtering sensitive ones) - writeln!(file, "\nEnvironment Variables (selected):")?; - let interesting_env_vars = ["PATH", "RUST_VERSION", "CARGO_TARGET_DIR", "HOME", "USER"]; - for (key, value) in env::vars() { - if interesting_env_vars.contains(&key.as_str()) { - writeln!(file, " {}: {}", key, value)?; - } - } - - // Current Working Directory - if let Ok(cwd) = env::current_dir() { - writeln!(file, "\nCurrent Working Directory: {}", cwd.display())?; - } - - // Thread Information - if let Some(thread) = thread::current().name() { - writeln!(file, "\nThread Name: {}", thread)?; - } else { - writeln!(file, "\nThread ID: {:?}", thread::current().id())?; - } - - let panic_msg = format!( - r#"Zenyx had a problem and crashed. To help us diagnose the problem you can send us a crash report. - -We have generated a detailed report file at '{}'. Submit an issue or email with the subject of 'Zenyx Crash Report' and include the report as an attachment. - -To submit the crash report: -https://codeberg.org/Caznix/Zenyx/issues -We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports. - -Thank you kindly!"#, - log_path.display() - ); - - let final_msg = format!( - r#"{} - -For future reference, the error summary is as follows: -{} - -More details can be found in the crash report file."#, - panic_msg, payload_str - ); - - println!("{}", final_msg.red().bold()); - - if let Err(e) = MessageDialog::new() - .set_type(MessageType::Error) - .set_title("A fatal error in Zenyx has occurred") - .set_text(&final_msg) - .show_confirm() - { - error!("Failed to show message dialog: {e}") - } - - Ok(()) -} - -fn rust_version() -> Result> { - let version = env!("CARGO_PKG_RUST_VERSION"); - Ok(version.to_string()) -} - -fn capture_backtrace() -> String { - let mut backtrace = String::new(); - let sysinfo = SystemMetadata::current(); - backtrace.push_str(&format!( - "--- System Information ---\n{}\n", - sysinfo.verbose_summary() - )); - - let trace = std::backtrace::Backtrace::force_capture(); - let message = "\n--- Backtrace ---\n\n".to_string(); - backtrace.push_str(&message); - backtrace.push_str(&format!("{trace:#}")); - - backtrace -} - -trait Sanitize { - fn sanitize_path(&self) -> String; -} - -impl Sanitize for str { - fn sanitize_path(&self) -> String { - let prefixes = ["/home/", "/Users/", "\\Users\\", "/opt/home/"]; - let mut result = String::from(self); - - for prefix in prefixes { - if let Some(start_index) = result.find(prefix) { - let start_of_user = start_index + prefix.len(); - let mut end_of_user = result[start_of_user..] - .find(|c| c == '/' || c == '\\') - .map(|i| start_of_user + i) - .unwrap_or(result.len()); - if end_of_user == start_of_user && start_of_user < result.len() { - end_of_user = result.len(); - } - result.replace_range(start_of_user..end_of_user, ""); - break; - } - } - result - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct Memory { - bytes: u64, -} - -impl Memory { - pub const fn from_bytes(bytes: u64) -> Self { - Self { bytes } - } - - pub const fn from_kb(kb: u64) -> Self { - Self { bytes: kb * 1024 } - } - - pub const fn from_mb(mb: u64) -> Self { - Self { - bytes: mb * 1024 * 1024, - } - } - - pub const fn from_gb(gb: u64) -> Self { - Self { - bytes: gb * 1024 * 1024 * 1024, - } - } - - pub const fn as_bytes(&self) -> u64 { - self.bytes - } - - pub const fn as_kb(&self) -> u64 { - self.bytes / 1024 - } - - pub const fn as_mb(&self) -> u64 { - self.bytes / (1024 * 1024) - } - - pub const fn as_gb(&self) -> u64 { - self.bytes / (1024 * 1024 * 1024) - } - - pub fn format_human(&self) -> String { - const UNITS: [&str; 4] = ["B", "KB", "MB", "GB"]; - let mut size = self.bytes as f64; - let mut unit_index = 0; - - while size >= 1024.0 && unit_index < UNITS.len() - 1 { - size /= 1024.0; - unit_index += 1; - } - - format!("{:.2} {}", size, UNITS[unit_index]) - } - - pub fn verbose_info(&self) -> String { - format!( - "{} ({} bytes, {} KB, {} MB, {} GB)", - self.format_human(), - self.as_bytes(), - self.as_kb(), - self.as_mb(), - self.as_gb() - ) - } -} - -impl fmt::Display for Memory { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.format_human()) - } -} - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub enum CPUBrand { - Intel, - AMD, - SnapDragon, - Apple, - Other(String), -} - -impl From<&str> for CPUBrand { - fn from(s: &str) -> Self { - let sl = s.to_lowercase(); - if sl.contains("intel") { - Self::Intel - } else if sl.contains("amd") { - Self::AMD - } else if sl.contains("snapdragon") { - Self::SnapDragon - } else if sl.contains("apple") { - Self::Apple - } else { - Self::Other(s.to_string()) - } - } -} - -impl fmt::Display for CPUBrand { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Intel => write!(f, "Intel"), - Self::AMD => write!(f, "AMD"), - Self::SnapDragon => write!(f, "SnapDragon"), - Self::Apple => write!(f, "Apple"), - Self::Other(s) => write!(f, "{}", s), - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub enum CPUArch { - X86, - X86_64, - AArch64, - Other(String), -} - -impl FromStr for CPUArch { - type Err = (); - - fn from_str(s: &str) -> Result { - Ok(match s { - "x86" => Self::X86, - "x86_64" => Self::X86_64, - "arm" => Self::AArch64, - "aarch64" => Self::AArch64, - _ => Self::Other(s.to_string()), - }) - } -} - -impl fmt::Display for CPUArch { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::X86 => write!(f, "x86"), - Self::X86_64 => write!(f, "x86_64"), - Self::AArch64 => write!(f, "AArch64"), - Self::Other(s) => write!(f, "{}", s), - } - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct ClockSpeed(pub u32); - -impl ClockSpeed { - pub fn as_mhz(&self) -> u32 { - self.0 - } - - pub fn as_ghz(&self) -> f32 { - self.0 as f32 / 1000.0 - } -} - -impl fmt::Display for ClockSpeed { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:.2} GHz ({} MHz)", self.as_ghz(), self.as_mhz()) - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct CPU { - pub brand: CPUBrand, - pub arch: CPUArch, - pub name: String, - pub vendor_id: String, - pub physical_cores: Option, - pub logical_cores: Option, - pub max_clock_speed: ClockSpeed, - pub current_clock_speed: ClockSpeed, - pub l1_cache: Option, - pub l2_cache: Option, - pub l3_cache: Option, -} - -impl CPU { - pub fn current() -> Self { - let mut sys = System::new_with_specifics( - RefreshKind::default().with_cpu(CpuRefreshKind::everything()), - ); - sys.refresh_cpu_all(); - - let cpu_opt = sys.cpus().first(); - - let brand = cpu_opt - .map(|cpu| cpu.brand().into()) - .unwrap_or(CPUBrand::Other("unknown".into())); - let name = cpu_opt - .map(|cpu| cpu.name().to_string()) - .unwrap_or_else(|| "unknown".into()); - let vendor_id = cpu_opt - .map(|cpu| cpu.vendor_id().to_string()) - .unwrap_or_else(|| "unknown".into()); - let max_clock_speed = cpu_opt - .map(|cpu| ClockSpeed(cpu.frequency() as u32)) - .unwrap_or(ClockSpeed(0)); - let current_clock_speed = max_clock_speed; - - let logical_cores = cpu_opt.map(|_| sys.cpus().len() as u8); - let physical_cores = System::physical_core_count().map(|pc| pc as u8); - - let mut l1_cache = None; - let mut l2_cache = None; - let mut l3_cache = None; - - #[cfg(any( - all(target_arch = "x86", not(target_env = "sgx"), target_feature = "sse"), - all(target_arch = "x86_64", not(target_env = "sgx")) - ))] - { - let cpuid = CpuId::new(); - if let Some(iter) = cpuid.get_cache_parameters() { - for cache in iter { - match cache.level() { - 1 => { - let size = cache.physical_line_partitions() - * cache.coherency_line_size() - * cache.associativity(); - if size > 0 { - l1_cache = Some(Memory::from_bytes(size.try_into().unwrap())); - } - } - 2 => { - let size = cache.physical_line_partitions() - * cache.coherency_line_size() - * cache.associativity(); - if size > 0 { - l2_cache = Some(Memory::from_bytes(size.try_into().unwrap())); - } - } - 3 => { - let size = (cache.physical_line_partitions() as u64) - * (cache.coherency_line_size() as u64) - * (cache.associativity() as u64); - if size > 0 { - l3_cache = Some(Memory::from_bytes(size)); - } - } - _ => {} - } - } - } - } - - Self { - brand, - arch: env::consts::ARCH - .parse() - .unwrap_or(CPUArch::Other("unknown".into())), - name, - vendor_id, - physical_cores, - logical_cores, - max_clock_speed, - current_clock_speed, - l1_cache, - l2_cache, - l3_cache, - } - } - - pub fn is_intel(&self) -> bool { - matches!(self.brand, CPUBrand::Intel) - } - - pub fn is_amd(&self) -> bool { - matches!(self.brand, CPUBrand::AMD) - } - - pub fn is_arm(&self) -> bool { - matches!(self.brand, CPUBrand::Intel) - } - - pub fn is_high_clock(&self) -> bool { - self.max_clock_speed.0 > 3000 - } - - pub fn verbose_info(&self) -> String { - format!( - "CPU Information:\n\ - - Brand: {}\n\ - - Architecture: {}\n\ - - Name: {}\n\ - - Vendor ID: {}\n\ - - Cores: {} physical, {} logical\n\ - - Clock Speed: {} (max), {} (current)\n\ - - Cache: L1 {}, L2 {}, L3 {}", - self.brand, - self.arch, - self.name, - self.vendor_id, - self.physical_cores - .map(|c| c.to_string()) - .unwrap_or_else(|| "unknown".into()), - self.logical_cores - .map(|c| c.to_string()) - .unwrap_or_else(|| "unknown".into()), - self.max_clock_speed, - self.current_clock_speed, - self.l1_cache - .map(|c| c.format_human()) - .unwrap_or_else(|| "unknown".into()), - self.l2_cache - .map(|c| c.format_human()) - .unwrap_or_else(|| "unknown".into()), - self.l3_cache - .map(|c| c.format_human()) - .unwrap_or_else(|| "unknown".into()), - ) - } -} - -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub enum GPUBrand { - Nvidia, - AMD, - Intel, - Other(String), -} - -impl From<&str> for GPUBrand { - fn from(s: &str) -> Self { - let sl = s.to_lowercase(); - if sl.contains("nvidia") || sl.contains("geforce") { - Self::Nvidia - } else if sl.contains("amd") || sl.contains("radeon") { - Self::AMD - } else if sl.contains("intel") { - Self::Intel - } else { - Self::Other(s.to_string()) - } - } -} - -impl fmt::Display for GPUBrand { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Nvidia => write!(f, "NVIDIA"), - Self::AMD => write!(f, "AMD"), - Self::Intel => write!(f, "Intel"), - Self::Other(s) => write!(f, "{}", s), - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct GPU { - pub brand: GPUBrand, - pub name: String, - pub device_type: DeviceType, - pub vram: Memory, - pub driver_version: Option, -} - -impl GPU { - pub fn current() -> Vec { - let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor { - backends: wgpu::Backends::all(), - ..Default::default() - }); - - instance - .enumerate_adapters(wgpu::Backends::all()) - .iter() - .map(|adapter| { - let info = adapter.get_info(); - GPU { - brand: info.name.as_str().into(), - name: info.name.to_string(), - device_type: info.device_type, - vram: Memory::from_bytes(0), - driver_version: Some(info.driver.to_string()), - } - }) - .collect() - } - - pub fn is_integrated(&self) -> bool { - matches!(self.brand, GPUBrand::Intel) - } - - pub fn is_dedicated(&self) -> bool { - !self.is_integrated() - } - - pub fn is_mobile(&self) -> bool { - let lower_name = self.name.to_lowercase(); - lower_name.contains("adreno") - || lower_name.contains("mali") - || lower_name.contains("apple") - || lower_name.contains("mobile") - || lower_name.contains("snapdragon") - } - - pub fn verbose_info(&self) -> String { - format!( - "GPU Information:\n\ - - Brand: {}\n\ - - Name: {}\n\ - - VRAM: {}\n\ - - Driver: {}", - self.brand, - self.name, - self.vram.format_human(), - self.driver_version.as_deref().unwrap_or("Unknown") - ) - } - - fn unique_id(&self) -> String { - format!("{}-{:?}", self.name, self.device_type) - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SystemMemory { - pub total: Memory, - pub used: Memory, - pub free: Memory, - pub available: Memory, - pub swap_total: Memory, - pub swap_used: Memory, - pub swap_free: Memory, -} - -impl SystemMemory { - pub fn current() -> Self { - let mut system = System::new(); - system.refresh_memory(); - - Self { - total: Memory::from_bytes(system.total_memory()), - used: Memory::from_bytes(system.used_memory()), - free: Memory::from_bytes(system.free_memory()), - available: Memory::from_bytes(system.available_memory()), - swap_total: Memory::from_bytes(system.total_swap()), - swap_used: Memory::from_bytes(system.used_swap()), - swap_free: Memory::from_bytes(system.free_swap()), - } - } - - pub fn verbose_info(&self) -> String { - format!( - "Memory Information:\n\ - - RAM: {} total, {} used, {} free, {} available\n\ - - Swap: {} total, {} used, {} free", - self.total.format_human(), - self.used.format_human(), - self.free.format_human(), - self.available.format_human(), - self.swap_total.format_human(), - self.swap_used.format_human(), - self.swap_free.format_human() - ) - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct EngineInfo { - pub timestamp: String, - pub pkg_version: String, - pub pkg_name: String, - pub target_arch: String, - pub target_os: String, - pub target_env: String, - pub rustc_version: String, - pub wgpu_version: String, - pub winit_version: String, - pub commit_hash: String, -} - -impl EngineInfo { - pub fn current() -> Self { - Self { - timestamp: build_info::BUILT_TIME_UTC.to_string(), - pkg_version: build_info::PKG_VERSION.to_string(), - pkg_name: build_info::PKG_NAME.to_string(), - target_arch: build_info::CFG_TARGET_ARCH.to_string(), - target_os: build_info::CFG_OS.to_string(), - target_env: build_info::CFG_ENV.to_string(), - rustc_version: build_info::RUSTC_VERSION.to_string(), - wgpu_version: build_info::WGPU_VERSION.to_string(), - winit_version: build_info::WGPU_VERSION.to_string(), - commit_hash: build_info::GIT_COMMIT_HASH - .unwrap_or(&format!("UNKNOWN-{:?}", std::time::SystemTime::now())) - .to_string(), - } - } - - pub fn verbose_info(&self) -> String { - format!( - "Build Information:\n\ - - Timestamp: {}\n\ - - Package: {} v{}\n\ - - Target: {} {} {}\n\ - - Rustc version: {}\n\ - - Wgpu version: {}\n\ - - Winit version: {}\n\ - - commit_hash: {}\n\ - ", - self.timestamp, - self.pkg_name, - self.pkg_version, - self.target_arch, - self.target_os, - self.target_env, - self.rustc_version, - self.wgpu_version, - self.winit_version, - self.commit_hash - ) - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SystemMetadata { - pub cpu: CPU, - pub memory: SystemMemory, - pub gpus: Vec, - pub compile_info: EngineInfo, - pub os_info: OSInfo, -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct OSInfo { - pub name: String, - pub version: Option, - pub kernel_version: Option, -} - -impl OSInfo { - pub fn current() -> Self { - let mut system = System::new(); - system.refresh_all(); - Self { - name: System::name().unwrap_or_else(|| build_info::TARGET.to_string()), - version: System::os_version(), - kernel_version: System::kernel_version(), - } - } - - pub fn verbose_info(&self) -> String { - format!( - "Operating System Information:\n\ - - Name: {}\n\ - - Version: {}\n\ - - Kernel Version: {}", - self.name, - self.version.as_deref().unwrap_or("Unknown"), - self.kernel_version.as_deref().unwrap_or("Unknown") - ) - } -} - -impl SystemMetadata { - pub fn current() -> Self { - Self { - cpu: CPU::current(), - memory: SystemMemory::current(), - gpus: GPU::current(), - compile_info: EngineInfo::current(), - os_info: OSInfo::current(), - } - } - - pub fn main_gpu(&self) -> Option<&GPU> { - self.gpus - .iter() - .find(|g| g.is_dedicated()) - .or_else(|| self.gpus.iter().find(|g| g.is_integrated())) - .or_else(|| self.gpus.first()) - } - - pub fn verbose_summary(&self) -> String { - let main_gpu = self.main_gpu(); - let main_gpu_info = main_gpu - .map(|gpu| format!("Main GPU:\n{}", gpu.verbose_info())) - .unwrap_or_else(|| "No main GPU detected".to_string()); - - let mut seen_gpu_ids = HashSet::new(); - let mut other_gpus_info = Vec::new(); - - if let Some(gpu) = main_gpu { - seen_gpu_ids.insert(gpu.unique_id()); - } - - for gpu in &self.gpus { - let gpu_id = gpu.unique_id(); - if !seen_gpu_ids.contains(&gpu_id) { - other_gpus_info.push(format!("[{:?}] {}", gpu.device_type, gpu.verbose_info())); - seen_gpu_ids.insert(gpu_id); - } - } - - let other_gpu_list = if other_gpus_info.is_empty() { - String::new() - } else { - format!("Other GPUs:\n{}", other_gpus_info.join("\n\n")) - }; - - format!( - "System Information:\n\n{}\n\n{}\n\n{}\n\n{}\n\n{}\n\n{}", - self.os_info.verbose_info(), - self.cpu.verbose_info(), - main_gpu_info, - other_gpu_list, - self.memory.verbose_info(), - self.compile_info.verbose_info() - ) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_memory_conversions() { - let mem = Memory::from_gb(8); - assert_eq!(mem.as_bytes(), 8 * 1024 * 1024 * 1024); - assert_eq!(mem.as_mb(), 8 * 1024); - assert_eq!(mem.as_kb(), 8 * 1024 * 1024); - } - - #[test] - fn test_system_metadata() { - let metadata = SystemMetadata::current(); - assert!(!metadata.cpu.name.is_empty()); - assert!(metadata.memory.total.as_bytes() > 0); - assert!(!metadata.compile_info.pkg_version.is_empty()); - assert!(!metadata.os_info.name.is_empty()); - } -} diff --git a/engine/test.zensh b/engine/test.zensh deleted file mode 100644 index f53ba67..0000000 --- a/engine/test.zensh +++ /dev/null @@ -1 +0,0 @@ -exec ./test.zensh diff --git a/main.zensh b/main.zensh deleted file mode 100644 index 95eee35..0000000 --- a/main.zensh +++ /dev/null @@ -1 +0,0 @@ -exit "test" \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml index 2678f0b..c7302df 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -4,4 +4,4 @@ format_code_in_doc_comments = true trailing_comma = "Vertical" group_imports = "StdExternalCrate" reorder_impl_items = true -unstable_features = true \ No newline at end of file +unstable_features = true diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..d7f3678 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,6 @@ + + + +fn main() { + println!("Happy Halloween!") +} diff --git a/subcrates/zen_core/Cargo.toml b/subcrates/zen_core/Cargo.toml deleted file mode 100644 index d342c70..0000000 --- a/subcrates/zen_core/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "zen_core" -version = "0.1.0" -edition = "2024" - -[dependencies] -anyhow = "1.0.94" -thiserror = "2.0.8" -parking_lot.workspace = true - -[profile.dev] -debug-assertions = true - -[profile.release] -debug-assertions = false diff --git a/subcrates/zen_core/src/lib.rs b/subcrates/zen_core/src/lib.rs deleted file mode 100644 index 1f26fe7..0000000 --- a/subcrates/zen_core/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -use thiserror::Error; - -#[derive(Debug, Error)] -enum ZError { - #[error(transparent)] - Unknown(#[from] anyhow::Error), -} diff --git a/test.mtl b/test.mtl deleted file mode 100644 index 4704186..0000000 --- a/test.mtl +++ /dev/null @@ -1,2 +0,0 @@ -# Blender 4.2.3 LTS MTL File: 'None' -# www.blender.org diff --git a/zenyx.toml b/zenyx.toml deleted file mode 100644 index 9d63e88..0000000 --- a/zenyx.toml +++ /dev/null @@ -1,4 +0,0 @@ -[rendering] -force_vsync = true - -[settings]