diff --git a/Cargo.lock b/Cargo.lock index 09592a28b..4bccbdd69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,315 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[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.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "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 = "cc" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + [[package]] name = "cfg-if" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "codespan-reporting" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +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.5.2" @@ -23,6 +320,101 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[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.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + [[package]] name = "flate2" version = "1.1.10" @@ -30,7 +422,171 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.5", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" + +[[package]] +name = "gpu-allocator" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +dependencies = [ + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.21", + "windows", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "horizon-client" +version = "0.1.0" +dependencies = [ + "bytemuck", + "glam", + "horizon-core", + "horizon-world", + "png", + "pollster", + "serde_json", + "wgpu", + "winit", ] [[package]] @@ -48,12 +604,168 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + [[package]] name = "itoa" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.4", +] + +[[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.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + [[package]] name = "lz4_flex" version = "0.14.0" @@ -66,6 +778,25 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + [[package]] name = "miniz_oxide" version = "0.9.1" @@ -76,6 +807,553 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash", + "spirv", + "thiserror 2.0.21", + "unicode-ident", +] + +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash", + "thiserror 2.0.21", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "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.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "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.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[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.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "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 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + [[package]] name = "proc-macro2" version = "1.0.107" @@ -85,6 +1363,21 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.47" @@ -94,6 +1387,162 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "737970939a87c6fa31e7acad13307bccbb017a073b695b6089a2c484f929e20e" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" version = "1.0.229" @@ -120,7 +1569,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.6", ] [[package]] @@ -136,12 +1585,112 @@ dependencies = [ "zmij", ] +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "simd-adler32" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "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.4.0+sdk-1.4.341.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "3.0.6" @@ -153,22 +1702,883 @@ dependencies = [ "unicode-ident", ] +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[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 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tokio" +version = "1.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.15+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + [[package]] name = "unicode-ident" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "voxel-kernels" version = "0.1.0" +[[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 = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.6", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.5", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.5", + "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.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.5", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +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 = "wgpu" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" +dependencies = [ + "arrayvec", + "bitflags 2.13.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "js-sys", + "log", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.2", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "indexmap", + "log", + "naga", + "naga-types", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash", + "smallvec", + "thiserror 2.0.21", + "wgpu-core-deps-apple", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-naga-bridge", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "gpu-allocator", + "hashbrown 0.17.1", + "libc", + "libloading", + "log", + "naga", + "naga-types", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "once_cell", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "raw-window-metal", + "renderdoc-sys", + "smallvec", + "static_assertions", + "thiserror 2.0.21", + "wgpu-naga-bridge", + "wgpu-types", + "windows", + "windows-core", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "js-sys", + "log", + "naga-types", + "raw-window-handle", + "static_assertions", + "web-sys", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[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.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.5", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "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 = "xxhash-rust" version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7" +[[package]] +name = "zerocopy" +version = "0.8.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6400fc4bb7426f6faac3fb07566122bb18622e3022bd2c36426a92ed489b1dbe" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c27cc7525bad4df59a45e073c45b2c2aa820efb588234cc23a547ec69a34db" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + [[package]] name = "zmij" version = "1.0.23" diff --git a/Cargo.toml b/Cargo.toml index 5cc45265c..eceb96075 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["crates/horizon-core", "crates/horizon-world", "crates/voxel-kernels"] +members = ["crates/horizon-core", "crates/horizon-world", "crates/voxel-kernels", "crates/horizon-client"] resolver = "2" [workspace.package] diff --git a/README.md b/README.md index 9f846323b..c66931de9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Horizon -Horizon is a Rust rewrite effort targeting one-to-one vanilla gameplay parity with Minecraft Java **26.3**, alongside client performance research. The Rust implementation has core primitives and world-data storage verified against pinned vanilla classes. It does not yet run a playable game. Existing playable downloads use Java performance packs. Not affiliated with Mojang or Microsoft. +Horizon is a Rust rewrite effort targeting one-to-one vanilla gameplay parity with Minecraft Java **26.3**, alongside client performance research. The Rust implementation has core primitives and world-data storage verified against pinned vanilla classes, plus a [native development client](docs/native-client.md) for inspecting a controlled block scene. It does not yet run a playable game. Existing playable downloads use Java performance packs. Not affiliated with Mojang or Microsoft. **First playable release:** pinned Java performance packs, distant terrain, an original frame/tick recorder, and Mac/client/server starter downloads. The M2 Pro/16 GB Mac is the first testing target. A Rust rewrite or custom renderer has not been completed; no M2 FPS improvement has been measured yet. diff --git a/benchmarks/rust-native-client-2026-10-06/startup-smoke.json b/benchmarks/rust-native-client-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..9da1f902e --- /dev/null +++ b/benchmarks/rust-native-client-2026-10-06/startup-smoke.json @@ -0,0 +1,141 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "elapsed_seconds": 0.541997659, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ], + "executable_sha256": "4907a5678c323ab250934f3dfa32ba10e1554635f81d226ed2a88e7625737c5f", + "resource_manifest_sha256": "eda44ebee6904eab880c15458dbd1212dc2799d320a4419fc810e2ceb0e5d9d6", + "sources": { + "crates/horizon-client/src/assets.rs": "f35107193fc6d08be41891181da1803abf15bd373b62dd63758213809e2c5cbf", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "0cc250b695ba0d1e49107f581695edea1d24cdc2fb8ffa3a46368ef2c40430a7", + "crates/horizon-client/src/mesh.rs": "e2fa00435ec8239ba8a3c6539022bb50a10ff9c3850c6faab72f86aabea896ef", + "crates/horizon-client/src/render.rs": "4d58443465ea25769d73701d138db6a99c4f939a288e89e1f2b1ee3d017a2737", + "crates/horizon-client/src/world.rs": "901aa59c23ea084e926eec014589f4d511c41691a8dc1520534e039c28cfc76c", + "crates/horizon-client/src/world.wgsl": "dd7d579d0afb8a61da849171e444fa05a3e9d15bbfe6d019ff6653e8e0774c66", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-client/Cargo.toml": "3047995858c9cd103ce358dfd991cb81e7d0688a149f4874cc73c36b859bbff7", + "tools/prepare_native_client.py": "b16f62acfc6242552af14ff405e2169ebba3adab12b991fc011e78edb4ffa982", + "tools/test_native_client.py": "adb9aa87cc28b0980d811ce47c1b09878d2d72cef2e083b278ec41183d231f1b" + }, + "validation": { + "rust_workspace_tests": "passed", + "clippy_all_targets": "passed", + "python_tooling_tests": 149, + "mesh_tests": 2, + "manual_visual_checks": [ + "textured scene with 81 chunks and 382 merged quads", + "window resize from 1600x1000 to 1280x720" + ], + "input_checks": [ + "physical W movement", + "physical Right rotation", + "captured relative mouse delta (150,-50) changed yaw by -0.3 and pitch by +0.1 radians", + "Escape and Ctrl+Q" + ] + }, + "environment": { + "os": "Ubuntu 26.04.1 LTS", + "kernel": "7.0.0-31-generic", + "cpu": "Intel Core i7-7500U", + "display": "headless Sway Wayland", + "renderer": "Vulkan llvmpipe software rasterizer" + }, + "limits": [ + "Controlled development scene only; no gameplay simulation or vanilla pixel-parity claim", + "No hardware FPS or render-distance improvement demonstrated", + "macOS and Windows runtime checks and final playable packages remain pending", + "Private game resources and screenshots excluded from this report" + ], + "mouse_check": { + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.2839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.6561944901923447, + "elapsed_seconds": 8.654220098, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 532, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ] + }, + "physical_keyboard_check": { + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 18.943610750255, + 18.0, + 18.943610750255 + ], + "camera_yaw": -2.6478875051923443, + "elapsed_seconds": 17.488515374, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 1080, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ], + "source_note": "Same camera/input behavior; before subsequent diagnostic formatting and equivalent let-chain cleanup" + }, + "private_capture_sha256": { + "first-launch.png": "7e53fa26d3d55f943db41828e1c8dd5b65279f9a130854fff288c75a394ee5aa", + "moved-resized.png": "be5a0473ab505740d18ba8eecf1512c15ba93d53d046f49b8dfa96357b25bf22", + "mouse-look.png": "7103678309f06938de40ac294f2f9ca1f56b253bc463e792b121ba607cd7b0a3" + } +} diff --git a/crates/horizon-client/Cargo.toml b/crates/horizon-client/Cargo.toml new file mode 100644 index 000000000..a254ac79a --- /dev/null +++ b/crates/horizon-client/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "horizon-client" +version = "0.1.0" +edition.workspace = true +license.workspace = true +rust-version = "1.90" +description = "Horizon native development client" + +[dependencies] +horizon-core = { path = "../horizon-core" } +horizon-world = { path = "../horizon-world" } +wgpu = { version = "30.0.1", default-features = false, features = ["std", "parking_lot", "vulkan", "metal", "dx12", "wgsl"] } +winit = "0.30.13" +pollster = "0.4" +bytemuck = { version = "1.24", features = ["derive"] } +glam = "0.30" +png = "0.18" +serde_json = "1.0.151" diff --git a/crates/horizon-client/src/assets.rs b/crates/horizon-client/src/assets.rs new file mode 100644 index 000000000..62f83b8fe --- /dev/null +++ b/crates/horizon-client/src/assets.rs @@ -0,0 +1,223 @@ +use crate::Result; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapState, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{tags::TagDefinitions, terrain::TerrainBlockStates}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs::File, + io::{self, BufReader}, + path::Path, + sync::Arc, +}; + +pub const MATERIALS: [&str; 6] = ["bedrock", "dirt", "stone", "sand", "oak_planks", "bricks"]; +#[derive(Clone, Copy)] +pub struct StateFacts { + air: bool, + fluid: bool, + air_block: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for StateFacts { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +#[derive(Clone)] +pub struct Properties(Arc>); +impl TerrainBlockStates for Properties { + type State = StateFacts; + fn heightmap_state(&self, id: BlockStateId) -> StateFacts { + self.0[id.0 as usize] + } +} +pub struct Assets { + pub registry: BlockRegistry, + pub properties: Properties, + pub material_states: [BlockStateId; 6], + pub layers: Vec, + pub sprite_size: u32, + pub pixels: Vec, +} +fn invalid(message: &str) -> io::Error { + io::Error::new(io::ErrorKind::InvalidData, message) +} +fn tag(value: &Value) -> Result { + Ok(match value { + Value::String(value) => Tag::String(value.as_str().into()), + Value::Number(value) => Tag::Int(i32::try_from( + value + .as_i64() + .ok_or_else(|| invalid("invalid registry number"))?, + )?), + Value::Array(values) => Tag::List(values.iter().map(tag).collect::>()?), + Value::Object(values) => Tag::Compound( + values + .iter() + .map(|(name, value)| Ok((name.as_str().into(), tag(value)?))) + .collect::>()?, + ), + _ => return Err(invalid("unsupported registry value").into()), + }) +} +impl Assets { + pub fn load(root: &Path) -> Result { + let manifest: Value = serde_json::from_reader(BufReader::new(File::open( + root.join("horizon-resources.json"), + )?))?; + if manifest["data_version"].as_i64() != Some(i64::from(DATA_VERSION)) { + return Err(invalid("resources do not match Horizon's pinned data version").into()); + } + let facts: Value = + serde_json::from_reader(BufReader::new(File::open(root.join("facts.json"))?))?; + let states = facts["states"] + .as_array() + .ok_or_else(|| invalid("missing registry state facts"))?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + states + .iter() + .map(|state| tag(&state[4])) + .collect::>()?, + ), + ), + ("defaults", tag(&facts["defaults"])?), + ]))?; + let bundle: Value = + serde_json::from_reader(BufReader::new(File::open(root.join("block-tags.json"))?))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle + .as_object() + .ok_or_else(|| invalid("invalid block tag bundle"))? + { + definitions.apply_json( + name, + "vanilla", + text.as_str() + .ok_or_else(|| invalid("invalid block tag text"))?, + )?; + } + let built = + definitions.build(|name, _| facts["defaults"].get(name).map(|_| name.to_owned()))?; + if !built.missing.is_empty() { + return Err(invalid("unresolved block tags").into()); + } + let motion: BTreeSet<_> = built + .tags + .get("minecraft:blocks_motion_in_heightmap") + .ok_or_else(|| invalid("missing motion tag"))? + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built + .tags + .get("minecraft:blocks_motion_in_heightmap_no_leaves") + .ok_or_else(|| invalid("missing no-leaves motion tag"))? + .iter() + .map(String::as_str) + .collect(); + let properties = Properties(Arc::new( + states + .iter() + .map(|state| { + Ok(StateFacts { + air: state[1] + .as_bool() + .ok_or_else(|| invalid("missing air fact"))?, + fluid: state[2] + .as_bool() + .ok_or_else(|| invalid("missing fluid fact"))?, + air_block: state[0].as_str() == Some("minecraft:air"), + motion: motion.contains( + state[0] + .as_str() + .ok_or_else(|| invalid("missing state name"))?, + ), + no_leaves: no_leaves.contains( + state[0] + .as_str() + .ok_or_else(|| invalid("missing state name"))?, + ), + }) + }) + .collect::>()?, + )); + let mut layers: Vec<_> = properties + .0 + .iter() + .map(|state| if state.air { -1 } else { -2 }) + .collect(); + let mut material_states = [BlockStateId(0); 6]; + let mut pixels = Vec::new(); + let mut sprite_size = 0; + for (layer, name) in MATERIALS.iter().enumerate() { + let state = registry + .default_state(&format!("minecraft:{name}")) + .ok_or_else(|| invalid("missing test-scene material"))?; + material_states[layer] = state; + layers[state.0 as usize] = layer as i32; + let path = root.join(format!("assets/minecraft/textures/block/{name}.png")); + let mut decoder = png::Decoder::new(BufReader::new(File::open(path)?)); + decoder + .set_transformations(png::Transformations::EXPAND | png::Transformations::STRIP_16); + let mut reader = decoder.read_info()?; + let mut bytes = vec![ + 0; + reader + .output_buffer_size() + .ok_or_else(|| invalid("sprite exceeds decoder limits"))? + ]; + let info = reader.next_frame(&mut bytes)?; + if info.width != info.height + || info.width == 0 + || (sprite_size != 0 && sprite_size != info.width) + { + return Err(invalid( + "test-client sprites must be square and use matching dimensions", + ) + .into()); + } + sprite_size = info.width; + let channels = info.color_type.samples(); + for pixel in bytes[..info.buffer_size()].chunks_exact(channels) { + let rgba = match info.color_type { + png::ColorType::Rgba => [pixel[0], pixel[1], pixel[2], pixel[3]], + png::ColorType::Rgb => [pixel[0], pixel[1], pixel[2], 255], + png::ColorType::Grayscale => [pixel[0], pixel[0], pixel[0], 255], + png::ColorType::GrayscaleAlpha => [pixel[0], pixel[0], pixel[0], pixel[1]], + _ => return Err(invalid("unsupported expanded sprite format").into()), + }; + pixels.extend(rgba); + } + } + Ok(Self { + registry, + properties, + material_states, + layers, + sprite_size, + pixels, + }) + } +} diff --git a/crates/horizon-client/src/camera.rs b/crates/horizon-client/src/camera.rs new file mode 100644 index 000000000..c0e28aae9 --- /dev/null +++ b/crates/horizon-client/src/camera.rs @@ -0,0 +1,55 @@ +//! Free inspection camera, deliberately separate from future player simulation. +use glam::{DVec3, Mat4, Vec3}; +use std::collections::HashSet; +use winit::keyboard::KeyCode; +pub struct Camera { + pub position: DVec3, + pub yaw: f64, + pub pitch: f64, +} +impl Default for Camera { + fn default() -> Self { + Self { + position: DVec3::new(25.0, 18.0, 25.0), + yaw: -135_f64.to_radians(), + pitch: -22_f64.to_radians(), + } + } +} +impl Camera { + pub fn look(&mut self, x: f64, y: f64) { + self.yaw -= x * 0.002; + self.pitch = (self.pitch - y * 0.002).clamp(-1.55, 1.55); + } + pub fn update(&mut self, keys: &HashSet, seconds: f64) { + let held = |key| f64::from(u8::from(keys.contains(&key))); + self.yaw += (held(KeyCode::ArrowLeft) - held(KeyCode::ArrowRight)) * seconds * 1.5; + self.pitch = (self.pitch + + (held(KeyCode::ArrowUp) - held(KeyCode::ArrowDown)) * seconds * 1.5) + .clamp(-1.55, 1.55); + let forward = DVec3::new(self.yaw.sin(), 0.0, self.yaw.cos()); + let right = DVec3::new(-self.yaw.cos(), 0.0, self.yaw.sin()); + let movement = forward * (held(KeyCode::KeyW) - held(KeyCode::KeyS)) + + right * (held(KeyCode::KeyD) - held(KeyCode::KeyA)) + + DVec3::Y + * (held(KeyCode::Space) - held(KeyCode::ShiftLeft) - held(KeyCode::ShiftRight)); + if movement.length_squared() > 0.0 { + self.position += movement.normalize() + * seconds + * if keys.contains(&KeyCode::ControlLeft) || keys.contains(&KeyCode::ControlRight) { + 40.0 + } else { + 12.0 + }; + } + } + pub fn matrix(&self, aspect: f32) -> Mat4 { + let forward = Vec3::new( + (self.yaw.sin() * self.pitch.cos()) as f32, + self.pitch.sin() as f32, + (self.yaw.cos() * self.pitch.cos()) as f32, + ); + Mat4::perspective_rh(70_f32.to_radians(), aspect, 0.05, 1024.0) + * Mat4::look_to_rh(self.position.as_vec3(), forward, Vec3::Y) + } +} diff --git a/crates/horizon-client/src/main.rs b/crates/horizon-client/src/main.rs new file mode 100644 index 000000000..2bcfe2a92 --- /dev/null +++ b/crates/horizon-client/src/main.rs @@ -0,0 +1,388 @@ +//! Native Horizon development client. The scene and free camera are rendering +//! tools; they do not replace the authoritative gameplay implementation. +#![forbid(unsafe_code)] +mod assets; +mod camera; +mod mesh; +mod render; +mod world; +use assets::Assets; +use camera::Camera; +use mesh::Quad; +use render::Renderer; +use std::{ + collections::HashSet, + fs, + path::PathBuf, + sync::Arc, + time::{Duration, Instant}, +}; +use winit::{ + application::ApplicationHandler, + event::{DeviceEvent, DeviceId, ElementState, MouseButton, WindowEvent}, + event_loop::{ActiveEventLoop, ControlFlow, EventLoop}, + keyboard::{KeyCode, PhysicalKey}, + window::{CursorGrabMode, Window, WindowId}, +}; +use world::TestWorld; +type Result = std::result::Result>; +struct Options { + resources: PathBuf, + radius: i32, + frames: Option, + report: Option, + timeout: Duration, + trace_input: bool, +} +impl Options { + fn read() -> Result> { + let sibling = std::env::current_exe()? + .parent() + .ok_or("missing executable directory")? + .join("resources"); + let mut options = Self { + resources: if sibling.join("horizon-resources.json").exists() { + sibling + } else { + PathBuf::from(".local/horizon-client/26.3") + }, + radius: 4, + frames: None, + report: None, + timeout: Duration::from_secs(90), + trace_input: false, + }; + let mut args = std::env::args().skip(1); + while let Some(argument) = args.next() { + if argument == "--trace-input" { + options.trace_input = true; + continue; + } + if argument == "--help" || argument == "-h" { + println!( + "Horizon native development client\n\n --resources PATH Prepared pinned resources\n --radius CHUNKS Controlled scene radius, 1..16 (default 4)\n --frames COUNT Exit after this many presented frames\n --smoke-report PATH Write a runtime report on exit\n --timeout-seconds N Deadline for a frame-limited run (default 90)\n --trace-input Log received keyboard, mouse-button and focus events\n\nControls: click to capture mouse; WASD move; Space/Shift rise/descend;\nCtrl boosts speed; arrow keys rotate; Esc releases mouse; Ctrl+Q quits; F3 shows diagnostics.\n\nThis is a controlled cube scene with a free inspection camera, not complete gameplay." + ); + return Ok(None); + } + let value = args + .next() + .ok_or_else(|| format!("missing value after {argument}"))?; + match argument.as_str() { + "--resources" => options.resources = value.into(), + "--radius" => { + options.radius = value.parse()?; + if !(1..=16).contains(&options.radius) { + return Err("radius must be 1..16 chunks".into()); + } + } + "--frames" => { + let frames = value.parse()?; + if frames == 0 { + return Err("frame count must be positive".into()); + } + options.frames = Some(frames); + } + "--smoke-report" => options.report = Some(value.into()), + "--timeout-seconds" => { + let seconds: u64 = value.parse()?; + if seconds == 0 { + return Err("timeout must be positive".into()); + } + options.timeout = Duration::from_secs(seconds); + } + _ => return Err(format!("unknown option {argument}").into()), + } + } + Ok(Some(options)) + } +} +struct App<'a> { + assets: &'a Assets, + world: TestWorld<'a>, + mesh: Vec, + options: Options, + window: Option>, + renderer: Option, + camera: Camera, + keys: HashSet, + captured: bool, + focused: bool, + diagnostics: bool, + started: Instant, + previous: Instant, + next_redraw: Instant, + title_at: Instant, + title_frames: u64, + frames: u64, + error: Option, +} +impl App<'_> { + fn fail(&mut self, event_loop: &ActiveEventLoop, error: impl ToString) { + self.error = Some(error.to_string()); + event_loop.exit(); + } + fn capture(&mut self, capture: bool) { + let Some(window) = &self.window else { + return; + }; + if capture { + self.captured = window + .set_cursor_grab(CursorGrabMode::Locked) + .or_else(|_| window.set_cursor_grab(CursorGrabMode::Confined)) + .is_ok(); + } else { + let _ = window.set_cursor_grab(CursorGrabMode::None); + self.captured = false; + } + window.set_cursor_visible(!self.captured); + } + fn write_report(&self) -> Result<()> { + let Some(path) = &self.options.report else { + return Ok(()); + }; + let renderer = self.renderer.as_ref(); + let adapter = renderer.map(|r| { + serde_json::json!({ + "name": r.info.name, + "backend": format!("{:?}", r.info.backend), + "device_type": format!("{:?}", r.info.device_type), + "vendor": r.info.vendor, + "device": r.info.device, + }) + }); + let size = self.window.as_ref().map(|window| { + let size = window.inner_size(); + [size.width, size.height] + }); + let report = serde_json::json!({ + "schema": 1, + "project": "Horizon", + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "os": std::env::consts::OS, + "arch": std::env::consts::ARCH, + "adapter": adapter, + "window_size": size, + "presented_frames": self.frames, + "elapsed_seconds": self.started.elapsed().as_secs_f64(), + "resident_chunks": self.world.chunks.len(), + "merged_quads": self.mesh.len(), + "camera_position": self.camera.position.to_array(), + "camera_yaw": self.camera.yaw, + "camera_pitch": self.camera.pitch, + "error": self.error, + }); + if let Some(parent) = path.parent().filter(|p| !p.as_os_str().is_empty()) { + fs::create_dir_all(parent)?; + } + fs::write(path, serde_json::to_vec_pretty(&report)?)?; + Ok(()) + } +} +impl ApplicationHandler for App<'_> { + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + if self.window.is_some() { + return; + } + let window = match event_loop.create_window( + Window::default_attributes() + .with_title("Horizon — Development Client") + .with_inner_size(winit::dpi::LogicalSize::new(1280.0, 800.0)), + ) { + Ok(window) => Arc::new(window), + Err(error) => { + self.fail(event_loop, error); + return; + } + }; + match pollster::block_on(Renderer::new( + window.clone(), + self.assets, + &self.mesh, + ((self.options.radius + 1) * 16) as f32, + )) { + Ok(renderer) => self.renderer = Some(renderer), + Err(error) => { + self.fail(event_loop, error); + return; + } + } + self.window = Some(window); + self.previous = Instant::now(); + self.next_redraw = self.previous; + self.title_at = self.previous; + } + fn window_event(&mut self, event_loop: &ActiveEventLoop, id: WindowId, event: WindowEvent) { + if self.options.trace_input + && matches!( + event, + WindowEvent::Focused(_) + | WindowEvent::KeyboardInput { .. } + | WindowEvent::MouseInput { .. } + ) + { + eprintln!("Horizon input: {event:?}"); + } + if self.window.as_ref().is_none_or(|window| window.id() != id) { + return; + } + match event { + WindowEvent::CloseRequested => event_loop.exit(), + WindowEvent::Resized(size) => { + if let Some(renderer) = &mut self.renderer { + renderer.resize(size.width, size.height); + } + self.next_redraw = Instant::now(); + } + WindowEvent::Focused(focused) => { + self.focused = focused; + if !focused { + self.keys.clear(); + self.capture(false); + } + self.previous = Instant::now(); + } + WindowEvent::MouseInput { + state: ElementState::Pressed, + button: MouseButton::Left, + .. + } => self.capture(true), + WindowEvent::KeyboardInput { event, .. } => { + if let PhysicalKey::Code(key) = event.physical_key { + if event.state == ElementState::Pressed { + self.keys.insert(key); + if key == KeyCode::Escape { + self.capture(false); + } + if key == KeyCode::F3 && !event.repeat { + self.diagnostics = !self.diagnostics; + if !self.diagnostics { + self.window + .as_ref() + .unwrap() + .set_title("Horizon — Development Client"); + } + } + if key == KeyCode::KeyQ + && (self.keys.contains(&KeyCode::ControlLeft) + || self.keys.contains(&KeyCode::ControlRight)) + { + event_loop.exit(); + } + } else { + self.keys.remove(&key); + } + } + } + WindowEvent::RedrawRequested => { + let now = Instant::now(); + let seconds = now.duration_since(self.previous).as_secs_f64().min(0.1); + self.previous = now; + if self.focused { + self.camera.update(&self.keys, seconds); + } + let result = self.renderer.as_mut().unwrap().render(&self.camera); + match result { + Ok(true) => { + self.frames += 1; + self.next_redraw = Instant::now(); + if self + .options + .frames + .is_some_and(|target| self.frames >= target) + { + event_loop.exit(); + } + if self.diagnostics && self.title_at.elapsed() >= Duration::from_secs(1) { + let fps = (self.frames - self.title_frames) as f64 + / self.title_at.elapsed().as_secs_f64(); + self.window.as_ref().unwrap().set_title(&format!( + "Horizon — Development | {fps:.0} FPS | {} chunks | {} quads", + self.world.chunks.len(), + self.mesh.len() + )); + self.title_at = Instant::now(); + self.title_frames = self.frames; + } + } + Ok(false) => self.next_redraw = Instant::now() + Duration::from_millis(100), + Err(error) => self.fail(event_loop, error), + } + } + _ => {} + } + } + fn device_event(&mut self, _: &ActiveEventLoop, _: DeviceId, event: DeviceEvent) { + if self.captured + && self.focused + && let DeviceEvent::MouseMotion { delta: (x, y) } = event + { + self.camera.look(x, y); + } + } + fn about_to_wait(&mut self, event_loop: &ActiveEventLoop) { + if self.options.frames.is_some() && self.started.elapsed() > self.options.timeout { + self.fail(event_loop, "frame-limited client run timed out"); + return; + } + if Instant::now() >= self.next_redraw { + if let Some(window) = &self.window { + window.request_redraw(); + } + event_loop.set_control_flow(if self.options.frames.is_some() { + ControlFlow::WaitUntil(self.started + self.options.timeout) + } else { + ControlFlow::Wait + }); + } else { + event_loop.set_control_flow(ControlFlow::WaitUntil(self.next_redraw)); + } + } +} +fn run() -> Result<()> { + let Some(options) = Options::read()? else { + return Ok(()); + }; + let assets = Assets::load(&options.resources).map_err(|error| { + format!("{error}\nPrepare pinned resources with: python3 tools/prepare_native_client.py") + })?; + let world = TestWorld::new(&assets, options.radius)?; + let mesh = mesh::build(&world)?; + eprintln!( + "Horizon development scene: {} resident chunks, {} merged cube faces.\nClick to capture mouse; WASD/Space/Shift move; arrows rotate; Esc releases; Ctrl+Q quits.", + world.chunks.len(), + mesh.len() + ); + let now = Instant::now(); + let mut app = App { + assets: &assets, + world, + mesh, + options, + window: None, + renderer: None, + camera: Camera::default(), + keys: HashSet::new(), + captured: false, + focused: true, + diagnostics: false, + started: now, + previous: now, + next_redraw: now, + title_at: now, + title_frames: 0, + frames: 0, + error: None, + }; + EventLoop::new()?.run_app(&mut app)?; + app.write_report()?; + if let Some(error) = app.error { + return Err(error.into()); + } + Ok(()) +} +fn main() { + if let Err(error) = run() { + eprintln!("Horizon: {error}"); + std::process::exit(1); + } +} diff --git a/crates/horizon-client/src/mesh.rs b/crates/horizon-client/src/mesh.rs new file mode 100644 index 000000000..4640d5f98 --- /dev/null +++ b/crates/horizon-client/src/mesh.rs @@ -0,0 +1,232 @@ +//! Greedy opaque-cube meshing for the controlled renderer scene. Model geometry, +//! weighted variants, tinting, transparency and lighting are separate work. +use crate::{Result, world::TestWorld}; +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +pub struct Quad { + pub origin: [f32; 3], + pub extent: [f32; 2], + pub face: u32, + pub layer: u32, +} +fn position(face: usize, plane: usize, u: usize, v: usize) -> [usize; 3] { + match face { + 0 | 1 => [u, plane, v], + 2 | 3 => [u, v, plane], + _ => [plane, v, u], + } +} +pub fn build(world: &TestWorld<'_>) -> Result> { + let mut quads = Vec::new(); + for &(cx, cz) in world.chunks.keys() { + let mut cells = [-1_i32; 18 * 18 * 18]; + for y in 0..18 { + for z in 0..18 { + for x in 0..18 { + cells[index(x, y, z)] = world.layer( + cx * 16 + x as i32 - 1, + y as i32 - 1, + cz * 16 + z as i32 - 1, + )?; + } + } + } + mesh_chunk(&cells, cx, cz, &mut quads); + } + Ok(quads) +} +fn index(x: usize, y: usize, z: usize) -> usize { + x + 18 * (z + 18 * y) +} +fn mesh_chunk(cells: &[i32; 18 * 18 * 18], cx: i32, cz: i32, quads: &mut Vec) { + for face in 0..6 { + for plane in 0..16 { + let mut mask = [-1_i32; 256]; + for v in 0..16 { + for u in 0..16 { + let p = position(face, plane + 1, u + 1, v + 1); + let layer = cells[index(p[0], p[1], p[2])]; + let mut adjacent = p; + let axis = match face { + 0 | 1 => 1, + 2 | 3 => 2, + _ => 0, + }; + if face % 2 == 0 { + adjacent[axis] -= 1; + } else { + adjacent[axis] += 1; + } + if layer >= 0 && cells[index(adjacent[0], adjacent[1], adjacent[2])] < 0 { + mask[u + v * 16] = layer; + } + } + } + for v in 0..16 { + let mut u = 0; + while u < 16 { + let layer = mask[u + v * 16]; + if layer < 0 { + u += 1; + continue; + } + let mut width = 1; + while u + width < 16 && mask[u + width + v * 16] == layer { + width += 1; + } + let mut height = 1; + while v + height < 16 + && (u..u + width).all(|x| mask[x + (v + height) * 16] == layer) + { + height += 1; + } + for y in v..v + height { + for x in u..u + width { + mask[x + y * 16] = -1; + } + } + let p = position(face, plane + usize::from(face % 2 == 1), u, v); + quads.push(Quad { + origin: [ + (cx * 16 + p[0] as i32) as f32, + p[1] as f32, + (cz * 16 + p[2] as i32) as f32, + ], + extent: [width as f32, height as f32], + face: face as u32, + layer: layer as u32, + }); + u += width; + } + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::collections::BTreeSet; + + // Compare rectangles expanded to unit faces against direct voxel adjacency. + // The reference does not use the mesher's plane masks or coordinate helper. + fn verify(cells: &[i32; 18 * 18 * 18], cx: i32, cz: i32) -> Vec { + let mut expected = BTreeSet::new(); + let directions = [ + [0, -1, 0], + [0, 1, 0], + [0, 0, -1], + [0, 0, 1], + [-1, 0, 0], + [1, 0, 0], + ]; + for y in 1..=16 { + for z in 1..=16 { + for x in 1..=16 { + let layer = cells[index(x, y, z)]; + if layer < 0 { + continue; + } + for (face, [dx, dy, dz]) in directions.iter().enumerate() { + let neighbor = [ + (x as i32 + dx) as usize, + (y as i32 + dy) as usize, + (z as i32 + dz) as usize, + ]; + if cells[index(neighbor[0], neighbor[1], neighbor[2])] < 0 { + expected.insert(( + x as i32 - 1 + cx * 16, + y as i32 - 1, + z as i32 - 1 + cz * 16, + face as u32, + layer as u32, + )); + } + } + } + } + } + let mut quads = Vec::new(); + mesh_chunk(cells, cx, cz, &mut quads); + let mut actual = BTreeSet::new(); + for quad in &quads { + assert!( + quad.extent + .iter() + .all(|&e| (1.0..=16.0).contains(&e) && e.fract() == 0.0) + ); + for v in 0..quad.extent[1] as i32 { + for u in 0..quad.extent[0] as i32 { + let [x, y, z] = quad.origin.map(|n| n as i32); + let (x, y, z) = match quad.face { + 0 => (x + u, y, z + v), + 1 => (x + u, y - 1, z + v), + 2 => (x + u, y + v, z), + 3 => (x + u, y + v, z - 1), + 4 => (x, y + v, z + u), + 5 => (x - 1, y + v, z + u), + _ => panic!("invalid face"), + }; + assert!( + actual.insert((x, y, z, quad.face, quad.layer)), + "overlapping faces" + ); + } + } + } + assert_eq!(actual, expected); + quads + } + + #[test] + fn empty_solid_and_neighbor_seams() { + let mut cells = [-1; 18 * 18 * 18]; + assert!(verify(&cells, 0, 0).is_empty()); + for y in 1..=16 { + for z in 1..=16 { + for x in 1..=16 { + cells[index(x, y, z)] = 3; + } + } + } + assert_eq!(verify(&cells, -3, 2).len(), 6); + // A solid neighbor removes only the shared boundary, including corners. + for y in 1..=16 { + for z in 1..=16 { + cells[index(17, y, z)] = 4; + } + } + assert_eq!(verify(&cells, -3, 2).len(), 5); + cells.fill(3); + assert!(verify(&cells, 1, -2).is_empty()); + } + + #[test] + fn cavities_material_boundaries_and_random_neighbors() { + let mut state = 0x183d_994e_058b_9432_u64; + for pattern in 0..12 { + let mut cells = [-1; 18 * 18 * 18]; + for y in 0..18 { + for z in 0..18 { + for x in 0..18 { + state ^= state << 13; + state ^= state >> 7; + state ^= state << 17; + cells[index(x, y, z)] = match pattern { + 0 => { + if x == 8 && y == 8 && z == 8 { + -1 + } else { + 0 + } + } + 1 => ((x + y + z) % 3) as i32, + _ => (state % 7) as i32 - 1, + }; + } + } + } + verify(&cells, pattern - 6, 3 - pattern); + } + } +} diff --git a/crates/horizon-client/src/render.rs b/crates/horizon-client/src/render.rs new file mode 100644 index 000000000..fb4a850f8 --- /dev/null +++ b/crates/horizon-client/src/render.rs @@ -0,0 +1,303 @@ +use crate::{Result, assets::Assets, camera::Camera, mesh::Quad}; +use std::sync::Arc; +use wgpu::util::DeviceExt; +use winit::window::Window; +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +struct Uniforms { + matrix: [[f32; 4]; 4], + position: [f32; 4], + fog: [f32; 4], +} +pub struct Renderer { + instance: wgpu::Instance, + surface: wgpu::Surface<'static>, + window: Arc, + device: wgpu::Device, + queue: wgpu::Queue, + config: wgpu::SurfaceConfiguration, + pipeline: wgpu::RenderPipeline, + group: wgpu::BindGroup, + uniform: wgpu::Buffer, + quads: wgpu::Buffer, + depth: wgpu::TextureView, + pub quad_count: u32, + pub info: wgpu::AdapterInfo, + pub suspended: bool, + fog_distance: f32, +} +impl Renderer { + pub async fn new( + window: Arc, + assets: &Assets, + quads: &[Quad], + fog_distance: f32, + ) -> Result { + let instance = + wgpu::Instance::new(wgpu::InstanceDescriptor::new_without_display_handle_from_env()); + let surface = instance.create_surface(window.clone())?; + let adapter = instance + .request_adapter(&wgpu::RequestAdapterOptions { + power_preference: wgpu::PowerPreference::HighPerformance, + compatible_surface: Some(&surface), + force_fallback_adapter: false, + ..Default::default() + }) + .await?; + let info = adapter.get_info(); + eprintln!( + "Horizon renderer: {} ({:?}, {:?})", + info.name, info.backend, info.device_type + ); + let (device, queue) = adapter + .request_device(&wgpu::DeviceDescriptor { + label: Some("Horizon device"), + ..Default::default() + }) + .await?; + let size = window.inner_size(); + let mut config = surface + .get_default_config(&adapter, size.width.max(1), size.height.max(1)) + .ok_or("surface has no supported configuration")?; + let caps = surface.get_capabilities(&adapter); + config.format = caps + .formats + .iter() + .copied() + .find(wgpu::TextureFormat::is_srgb) + .unwrap_or(config.format); + config.present_mode = wgpu::PresentMode::Fifo; + surface.configure(&device, &config); + let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { + label: Some("Horizon cube renderer"), + source: wgpu::ShaderSource::Wgsl(include_str!("world.wgsl").into()), + }); + let attributes = wgpu::vertex_attr_array![0=>Float32x3,1=>Float32x2,2=>Uint32,3=>Uint32]; + let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("Horizon opaque cubes"), + layout: None, + vertex: wgpu::VertexState { + module: &shader, + entry_point: Some("vs_main"), + compilation_options: Default::default(), + buffers: &[Some(wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::() as u64, + step_mode: wgpu::VertexStepMode::Instance, + attributes: &attributes, + })], + }, + primitive: wgpu::PrimitiveState { + cull_mode: Some(wgpu::Face::Back), + ..Default::default() + }, + depth_stencil: Some(wgpu::DepthStencilState { + format: wgpu::TextureFormat::Depth32Float, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::Less), + stencil: Default::default(), + bias: Default::default(), + }), + multisample: Default::default(), + fragment: Some(wgpu::FragmentState { + module: &shader, + entry_point: Some("fs_main"), + compilation_options: Default::default(), + targets: &[Some(wgpu::ColorTargetState { + format: config.format, + blend: None, + write_mask: wgpu::ColorWrites::ALL, + })], + }), + multiview_mask: None, + cache: None, + }); + let uniform = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Horizon camera"), + size: std::mem::size_of::() as u64, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let texture = device.create_texture_with_data( + &queue, + &wgpu::TextureDescriptor { + label: Some("Pinned cube sprites"), + size: wgpu::Extent3d { + width: assets.sprite_size, + height: assets.sprite_size, + depth_or_array_layers: assets.material_states.len() as u32, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8UnormSrgb, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }, + wgpu::util::TextureDataOrder::LayerMajor, + &assets.pixels, + ); + let view = texture.create_view(&wgpu::TextureViewDescriptor { + dimension: Some(wgpu::TextureViewDimension::D2Array), + ..Default::default() + }); + let sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("Repeating nearest cube sprites"), + address_mode_u: wgpu::AddressMode::Repeat, + address_mode_v: wgpu::AddressMode::Repeat, + mag_filter: wgpu::FilterMode::Nearest, + min_filter: wgpu::FilterMode::Nearest, + ..Default::default() + }); + let group = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("Horizon world resources"), + layout: &pipeline.get_bind_group_layout(0), + entries: &[ + wgpu::BindGroupEntry { + binding: 0, + resource: uniform.as_entire_binding(), + }, + wgpu::BindGroupEntry { + binding: 1, + resource: wgpu::BindingResource::TextureView(&view), + }, + wgpu::BindGroupEntry { + binding: 2, + resource: wgpu::BindingResource::Sampler(&sampler), + }, + ], + }); + let quad_count = u32::try_from(quads.len())?; + let quads = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("Greedy cube faces"), + contents: bytemuck::cast_slice(quads), + usage: wgpu::BufferUsages::VERTEX, + }); + let depth = Self::depth(&device, &config); + Ok(Self { + instance, + surface, + window, + device, + queue, + config, + pipeline, + group, + uniform, + quads, + depth, + quad_count, + info, + suspended: size.width == 0 || size.height == 0, + fog_distance, + }) + } + fn depth(device: &wgpu::Device, config: &wgpu::SurfaceConfiguration) -> wgpu::TextureView { + device + .create_texture(&wgpu::TextureDescriptor { + label: Some("Horizon depth"), + size: wgpu::Extent3d { + width: config.width, + height: config.height, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Depth32Float, + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + view_formats: &[], + }) + .create_view(&Default::default()) + } + pub fn resize(&mut self, width: u32, height: u32) { + self.suspended = width == 0 || height == 0; + if self.suspended { + return; + } + self.config.width = width; + self.config.height = height; + self.surface.configure(&self.device, &self.config); + self.depth = Self::depth(&self.device, &self.config); + } + pub fn render(&mut self, camera: &Camera) -> Result { + if self.suspended { + return Ok(false); + } + let (frame, reconfigure) = match self.surface.get_current_texture() { + wgpu::CurrentSurfaceTexture::Success(frame) => (frame, false), + wgpu::CurrentSurfaceTexture::Suboptimal(frame) => (frame, true), + wgpu::CurrentSurfaceTexture::Timeout | wgpu::CurrentSurfaceTexture::Occluded => { + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Outdated => { + self.surface.configure(&self.device, &self.config); + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Lost => { + self.surface = self.instance.create_surface(self.window.clone())?; + self.surface.configure(&self.device, &self.config); + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Validation => { + return Err("surface acquisition failed validation".into()); + } + }; + let fog = [0.35, 0.55, 0.80, 1.0]; + let p = camera.position.as_vec3(); + let uniforms = Uniforms { + matrix: camera + .matrix(self.config.width as f32 / self.config.height as f32) + .to_cols_array_2d(), + position: [p.x, p.y, p.z, self.fog_distance], + fog, + }; + self.queue + .write_buffer(&self.uniform, 0, bytemuck::bytes_of(&uniforms)); + let view = frame.texture.create_view(&Default::default()); + let mut encoder = self + .device + .create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("Horizon frame"), + }); + { + let attachments = [Some(wgpu::RenderPassColorAttachment { + view: &view, + resolve_target: None, + depth_slice: None, + ops: wgpu::Operations { + load: wgpu::LoadOp::Clear(wgpu::Color { + r: f64::from(fog[0]), + g: f64::from(fog[1]), + b: f64::from(fog[2]), + a: 1.0, + }), + store: wgpu::StoreOp::Store, + }, + })]; + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("Horizon world"), + color_attachments: &attachments, + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &self.depth, + depth_ops: Some(wgpu::Operations { + load: wgpu::LoadOp::Clear(1.0), + store: wgpu::StoreOp::Discard, + }), + stencil_ops: None, + }), + ..Default::default() + }); + pass.set_pipeline(&self.pipeline); + pass.set_bind_group(0, &self.group, &[]); + pass.set_vertex_buffer(0, self.quads.slice(..)); + pass.draw(0..6, 0..self.quad_count); + } + self.queue.submit([encoder.finish()]); + self.window.pre_present_notify(); + self.queue.present(frame); + if reconfigure { + self.surface.configure(&self.device, &self.config); + } + Ok(true) + } +} diff --git a/crates/horizon-client/src/world.rs b/crates/horizon-client/src/world.rs new file mode 100644 index 000000000..036251865 --- /dev/null +++ b/crates/horizon-client/src/world.rs @@ -0,0 +1,96 @@ +//! A controlled opaque-cube scene for exercising the native renderer. This is +//! not the vanilla world generator or an authoritative gameplay simulation. +use crate::{ + Result, + assets::{Assets, Properties}, +}; +use horizon_core::position::ChunkPos; +use horizon_world::{registry::BlockStateId, worldgen::terrain::TerrainChunk}; +use std::collections::BTreeMap; + +pub struct TestWorld<'a> { + pub chunks: BTreeMap<(i32, i32), TerrainChunk<'a, Properties>>, + assets: &'a Assets, + air: BlockStateId, +} +impl<'a> TestWorld<'a> { + pub fn new(assets: &'a Assets, radius: i32) -> Result { + let air = assets + .registry + .default_state("minecraft:air") + .ok_or("missing air state")?; + let mut world = Self { + chunks: BTreeMap::new(), + assets, + air, + }; + for cz in -radius..=radius { + for cx in -radius..=radius { + let mut chunk = TerrainChunk::new( + ChunkPos::new(cx, cz), + 0, + 16, + &assets.registry, + assets.properties.clone(), + )?; + for z in 0..16 { + for x in 0..16 { + for y in 0..4 { + let layer = match y { + 0 => 0, + 1 | 2 => 1, + _ => { + if (cx + cz) & 1 == 0 { + 2 + } else { + 3 + } + } + }; + chunk.set_block_worldgen( + cx * 16 + x, + y, + cz * 16 + z, + assets.material_states[layer], + )?; + } + } + } + world.chunks.insert((cx, cz), chunk); + } + } + for y in 4..11 { + for z in -10_i32..=10 { + for x in -10_i32..=10 { + if x.abs().max(z.abs()) <= 10 - (y - 4) { + world.set( + x, + y, + z, + assets.material_states[if y & 1 == 0 { 4 } else { 5 }], + )?; + } + } + } + } + Ok(world) + } + fn set(&mut self, x: i32, y: i32, z: i32, state: BlockStateId) -> Result<()> { + self.chunks + .get_mut(&(x >> 4, z >> 4)) + .ok_or("test scene exceeds resident chunks")? + .set_block_worldgen(x, y, z, state)?; + Ok(()) + } + pub fn layer(&self, x: i32, y: i32, z: i32) -> Result { + let state = self + .chunks + .get(&(x >> 4, z >> 4)) + .map_or(self.air, |chunk| chunk.block(x, y, z)); + let layer = self.assets.layers[state.0 as usize]; + if layer == -2 { + return Err("test scene contains an unsupported non-cube material".into()); + } + Ok(layer) + } +} diff --git a/crates/horizon-client/src/world.wgsl b/crates/horizon-client/src/world.wgsl new file mode 100644 index 000000000..4899d5a84 --- /dev/null +++ b/crates/horizon-client/src/world.wgsl @@ -0,0 +1,42 @@ +struct Camera { + view_projection: mat4x4, + position: vec4, + fog: vec4, +} +@group(0) @binding(0) var camera: Camera; +@group(0) @binding(1) var sprites: texture_2d_array; +@group(0) @binding(2) var sprite_sampler: sampler; +struct VertexOut { + @builtin(position) clip: vec4, + @location(0) uv: vec2, + @location(1) @interpolate(flat) layer: u32, + @location(2) shade: f32, + @location(3) world_position: vec3, +} +@vertex fn vs_main(@builtin(vertex_index) vertex: u32, + @location(0) origin: vec3, @location(1) extent: vec2, + @location(2) face: u32, @location(3) layer: u32) -> VertexOut { + let corners = array,4>(vec2(0.0,0.0),vec2(1.0,0.0),vec2(1.0,1.0),vec2(0.0,1.0)); + let normal_order = array(0u,1u,2u,0u,2u,3u); + let reversed_order = array(0u,2u,1u,0u,3u,2u); + let flipped = face==1u || face==2u || face==5u; + let corner = corners[select(normal_order[vertex],reversed_order[vertex],flipped)]; + let offset = corner*extent; + var position = origin; + if face<2u { position+=vec3(offset.x,0.0,offset.y); } + else if face<4u { position+=vec3(offset.x,offset.y,0.0); } + else { position+=vec3(0.0,offset.y,offset.x); } + var output: VertexOut; + output.clip=camera.view_projection*vec4(position,1.0); + output.uv=vec2(offset.x,extent.y-offset.y); + output.layer=layer; + output.shade=select(select(0.8,0.6,face>=4u),select(0.5,1.0,face==1u),face<2u); + output.world_position=position; + return output; +} +@fragment fn fs_main(input:VertexOut)->@location(0) vec4 { + let color=textureSample(sprites,sprite_sampler,input.uv,i32(input.layer)); + let distance=length(input.world_position-camera.position.xyz); + let fog_amount=smoothstep(camera.position.w*0.65,camera.position.w,distance); + return vec4(mix(color.rgb*input.shade,camera.fog.rgb,fog_amount),1.0); +} diff --git a/docs/native-client.md b/docs/native-client.md new file mode 100644 index 000000000..e33c222e2 --- /dev/null +++ b/docs/native-client.md @@ -0,0 +1,79 @@ +# Horizon native development client + +`horizon-client` opens a native Rust window and renders a controlled block scene +stored in Horizon's resident chunks. It loads six opaque cube textures and the +block registry from the pinned Java Edition 26.3 resources. A padded chunk mesh +culls hidden faces across chunk boundaries and merges adjacent matching faces; +the GPU draws the rectangles as instances. The camera is a free inspection tool. + +This checkpoint has no player simulation, vanilla world generation, block +interaction, inventory, sound, networking or world save/load. It does not meet +the [playable-build acceptance criteria](rust-parity.md#completion-criteria-and-playable-builds). +Full block models, weighted variants, texture orientation, transparency, tinting, +light, resource packs, chunk streaming and visual parity remain unfinished. + +## Run from a checkout + +Use current stable Rust (the locked client dependencies require Rust 1.90 or +newer), Python 3.10+ and JDK 25. A native desktop display and compatible graphics +driver are required. Resource preparation verifies the pinned game artifacts, +exports the registry using the reference server, and extracts selected client +resources into ignored `.local/horizon-client/26.3/`. + +```sh +python3 tools/prepare_native_client.py --prepare +cargo +stable run --locked -p horizon-client +``` + +Java is used during preparation. The native executable itself runs without a +JVM. Prepared resources stay private; do not commit or publish the extracted game +files. Final distributable builds still need resource provisioning and packaging. + +Use `--resources PATH` for a prepared resource directory. The executable also +looks for a sibling `resources/` directory before the checkout default. Use +`--radius N` to select 1–16 chunks around the origin; this is a finite test scene, +not a render-distance or world-streaming implementation. + +| Control | Action | +| --- | --- | +| WASD | Move horizontally | +| Space / either Shift | Rise / descend | +| Either Ctrl | Boost inspection speed | +| Arrow keys | Rotate camera | +| Left click | Capture mouse for camera rotation | +| Escape | Release mouse | +| F3 | Toggle FPS/chunk/mesh diagnostics in the window title | +| Ctrl+Q or window close | Exit | + +Controls bind physical keyboard positions. Losing focus clears held keys and +releases the mouse. `--trace-input` logs keyboard, mouse-button and focus events +for diagnosis. On headless Linux use `vscreen run ./target/debug/horizon-client`, +then `vscreen shot`. The `wtype` tool's default generated keymap does not preserve +physical key positions; typing the character W can report physical Escape. + +## Validation + +```sh +cargo +stable test -p horizon-client +cargo +stable clippy --workspace --all-targets -- -D warnings +python3 tools/test_native_client.py +# Headless Linux alternative: +python3 tools/test_native_client.py --vscreen +``` + +The mesh tests compare expanded rectangles against independently enumerated +exposed voxel faces, including solid neighbors, cavities, material boundaries, +negative chunk origins and random surroundings. The startup runner launches a +nine-chunk scene, requires 30 presented frames and a clean exit, and writes GPU, +platform, binary and source information to ignored +`.local/horizon-client/startup-smoke.json`. It has an external timeout as well as +the application's frame deadline. These checks do not establish gameplay or +pixel parity with Java. + +Initial local validation uses Linux x86_64, a headless Wayland compositor and +Vulkan llvmpipe software rendering. Textured geometry and resizing were visually +inspected; movement, arrow rotation and Ctrl+Q were exercised using virtual +physical key codes. Captured relative mouse movement and Escape release were +exercised through a virtual pointer. Native macOS/Metal and +Windows/Direct3D 12 runtime tests remain pending. Software-renderer frame rates +are not evidence of a hardware speedup. diff --git a/docs/rust-parity.md b/docs/rust-parity.md index a80fb59c6..fd3c58d77 100644 --- a/docs/rust-parity.md +++ b/docs/rust-parity.md @@ -2,7 +2,9 @@ The behavior target is the repository's pinned **Minecraft Java Edition 26.3**. One-to-one vanilla gameplay parity is the acceptance criterion. It has **not** -been reached: Horizon's Rust code does not yet run a client, server, or simulation. +been reached. Horizon now has a [native development client](native-client.md) +that renders a controlled block scene with a free camera. It does not run a +complete game server or gameplay simulation. The Rust workspace implements core arithmetic/random streams, world data and resident sections, scheduled tick ordering, geometry, contained fluid states, noise/density evaluation, biome and terrain generation kernels, material rules, @@ -78,7 +80,9 @@ Negative lengths and the complete Java object/API surface are not supported. ## Reproduce validation -Requires Rust 1.85 or newer, Python 3.10 or newer, and JDK 25. From the checkout: +The core/world libraries require Rust 1.85 or newer; the native client's locked +dependencies require Rust 1.90 or newer. Use current stable Rust, Python 3.10 or +newer, and JDK 25 for the complete workspace. From the checkout: ```sh cargo test --workspace diff --git a/tools/prepare_native_client.py b/tools/prepare_native_client.py new file mode 100644 index 000000000..c670ce65f --- /dev/null +++ b/tools/prepare_native_client.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Prepare private pinned resources for Horizon's native development client.""" +import argparse +import json +import os +from pathlib import Path +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare', action='store_true', help='Fetch pinned reference artifacts first') + args = parser.parse_args() + if args.prepare: + lab.prepare() + lock, jars, libraries = base.verify_artifacts() + root = lab.LOCAL / 'horizon-client' / lock['minecraft']['version'] + root.mkdir(parents=True, exist_ok=True) + facts = root / 'facts.json' + manifest = root / 'horizon-resources.json' + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java' + origin = {'minecraft': lock['minecraft']['version'], + 'client_sha256': lab.digest(jars['client'], 'sha256'), + 'server_sha256': lab.digest(jars['server'], 'sha256'), + 'exporter_sha256': lab.digest(oracle, 'sha256')} + previous = json.loads(manifest.read_text()) if manifest.exists() else {} + if not (all(previous.get(k) == v for k, v in origin.items()) and facts.exists() + and previous.get('facts_sha256') == lab.digest(facts, 'sha256')): + classes = root / 'classes' + classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(oracle)], check=True, + stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx512M', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaHeightmapOracle', 'export', str(facts)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']): + raise ValueError('Reference block tags disagree') + lab.write_json(root / 'block-tags.json', tags) + count = 0 + prefixes = ('assets/minecraft/blockstates/', 'assets/minecraft/models/block/', + 'assets/minecraft/textures/block/') + with zipfile.ZipFile(jars['client']) as archive: + version = json.loads(archive.read('version.json')) + for name in archive.namelist(): + if not name.startswith(prefixes) or name.endswith('/'): + continue + relative = Path(name) + if relative.is_absolute() or '..' in relative.parts: + raise ValueError('Invalid resource path') + target = root / relative + data = archive.read(name) + if not target.exists() or target.read_bytes() != data: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + count += 1 + lab.write_json(manifest, {'schema': 1, **origin, 'data_version': version['world_version'], + 'facts_sha256': lab.digest(facts, 'sha256'), + 'block_tags_sha256': lab.digest(root / 'block-tags.json', 'sha256'), 'resource_files': count}) + print(f'Prepared Horizon native-client resources: {root}') + + +if __name__ == '__main__': + main() diff --git a/tools/test_native_client.py b/tools/test_native_client.py new file mode 100644 index 000000000..c59b8e63c --- /dev/null +++ b/tools/test_native_client.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Launch the Rust development scene and check bounded GPU presentation. + +Requires prepared private resources and a desktop display (or --vscreen on +headless Linux). This is a renderer startup check, not a gameplay parity gate. +""" +import argparse +import json +import os +from pathlib import Path +import subprocess +import sys + +try: + from . import lab +except ImportError: + import lab + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--vscreen', action='store_true') + parser.add_argument('--prepare', action='store_true') + args = parser.parse_args() + if args.prepare: + subprocess.run([sys.executable, str(lab.ROOT / 'tools/prepare_native_client.py'), + '--prepare'], cwd=lab.ROOT, check=True) + root = lab.LOCAL / 'horizon-client' + root.mkdir(parents=True, exist_ok=True) + report = root / 'startup-smoke.json' + report.unlink(missing_ok=True) + environment = dict(os.environ, RUSTUP_TOOLCHAIN='stable') + subprocess.run(['cargo', 'build', '--locked', '-p', 'horizon-client'], + cwd=lab.ROOT, env=environment, check=True, timeout=3600) + metadata = json.loads(subprocess.check_output( + ['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], + cwd=lab.ROOT, env=environment)) + executable = Path(metadata['target_directory']) / 'debug' / ( + 'horizon-client.exe' if os.name == 'nt' else 'horizon-client') + command = (['vscreen', 'run'] if args.vscreen else []) + [ + str(executable), '--radius', '1', '--frames', '30', + '--smoke-report', str(report), '--timeout-seconds', '60'] + with (root / 'startup-smoke.log').open('w') as log: + subprocess.run(command, cwd=lab.ROOT, env=environment, check=True, + stdout=log, stderr=subprocess.STDOUT, timeout=120) + result = json.loads(report.read_text()) + if (result.get('error') is not None or result.get('presented_frames') != 30 + or result.get('resident_chunks') != 9 or result.get('merged_quads', 0) <= 0 + or not result.get('adapter') or min(result.get('window_size', [0])) <= 0): + raise RuntimeError('Incomplete native client presentation: ' + str(report)) + result['executable_sha256'] = lab.digest(executable, 'sha256') + result['resource_manifest_sha256'] = lab.digest( + root / '26.3/horizon-resources.json', 'sha256') + result['sources'] = { + str(path.relative_to(lab.ROOT)): lab.digest(path, 'sha256') + for path in sorted((lab.ROOT / 'crates/horizon-client/src').glob('*')) + if path.is_file() + } + lab.write_json(report, result) + print(f'Native renderer startup passed: {report}') + + +if __name__ == '__main__': + main()