diff --git a/Cargo.lock b/Cargo.lock index 28bb81d..da02d4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,22 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + [[package]] name = "addr2line" version = "0.21.0" @@ -24,6 +40,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -44,6 +61,33 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "android-activity" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052ad56e336bcc615a214bffbeca6c181ee9550acec193f0327e0b103b033a4d" +dependencies = [ + "android-properties", + "bitflags 2.4.1", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk 0.8.0", + "ndk-context", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.1", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -59,12 +103,6 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "approx" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08abcc3b4e9339e33a3d0a5ed15d84a687350c05689d825e0f6655eef9e76a94" - [[package]] name = "approx" version = "0.5.1" @@ -74,19 +112,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "arc" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4543528550ff5d3fa676742778c61387b2b6db24ab72628ff951a5b1b0f470fe" -dependencies = [ - "cocoa 0.15.0", - "failure", - "lazy_static", - "objc", - "palette", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -105,6 +130,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5f312b0a56c5cdf967c0aeb67f6289603354951683bc97ddc595ab974ba9aa" + [[package]] name = "ash" version = "0.37.3+1.3.251" @@ -115,13 +146,10 @@ dependencies = [ ] [[package]] -name = "autocfg" -version = "0.1.8" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.1.0", -] +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -177,6 +205,25 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd7cf50912cddc06dc5ea7c08c5e81c1b2c842a70d19def1848d54c586fed92" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys", + "objc2", +] + [[package]] name = "bumpalo" version = "3.14.0" @@ -188,26 +235,12 @@ name = "bytemuck" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" -dependencies = [ - "bytemuck_derive", -] [[package]] -name = "bytemuck_derive" +name = "bytes" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "calloop" @@ -223,15 +256,48 @@ dependencies = [ "vec_map", ] +[[package]] +name = "calloop" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" +dependencies = [ + "bitflags 2.4.1", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop 0.12.3", + "rustix", + "wayland-backend", + "wayland-client 0.31.1", +] + [[package]] name = "cc" version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.0" @@ -239,13 +305,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cloudabi" -version = "0.0.3" +name = "cfg_aliases" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chlorine" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75476fe966a8af7c0ceae2a3e514afa87d4451741fcdfab8bfaa07ad301842ec" [[package]] name = "cmake" @@ -256,19 +325,6 @@ dependencies = [ "cc", ] -[[package]] -name = "cocoa" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b44bd25bd275e9d74a5dff8ca55f2fb66c9ad5e12170d58697701df21a56e0e" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-graphics 0.14.0", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -278,7 +334,7 @@ dependencies = [ "bitflags 1.3.2", "block", "cocoa-foundation", - "core-foundation 0.9.3", + "core-foundation", "core-graphics 0.22.3", "foreign-types 0.3.2", "libc", @@ -293,7 +349,7 @@ checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "libc", "objc", @@ -309,12 +365,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "com-rs" version = "0.2.1" @@ -322,13 +372,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" [[package]] -name = "core-foundation" -version = "0.6.4" +name = "combine" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ - "core-foundation-sys 0.6.2", - "libc", + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +dependencies = [ + "crossbeam-utils", ] [[package]] @@ -337,16 +396,10 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys 0.8.4", + "core-foundation-sys", "libc", ] -[[package]] -name = "core-foundation-sys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" - [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -355,26 +408,27 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" -version = "0.14.0" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54c4ab33705fa1fc8af375bb7929d68e1c1546c1ecef408966d8c3e49a1d84a" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.6.4", + "core-foundation", + "core-graphics-types", "foreign-types 0.3.2", "libc", ] [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types 0.5.0", "libc", ] @@ -385,7 +439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.3", + "core-foundation", "libc", ] @@ -395,7 +449,7 @@ version = "19.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" dependencies = [ - "core-foundation 0.9.3", + "core-foundation", "core-graphics 0.22.3", "foreign-types 0.3.2", "libc", @@ -410,15 +464,24 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossfont" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" dependencies = [ - "cocoa 0.24.1", - "core-foundation 0.9.3", - "core-foundation-sys 0.8.4", + "cocoa", + "core-foundation", + "core-foundation-sys", "core-graphics 0.22.3", "core-text", "dwrote", @@ -440,15 +503,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] -name = "d3d12" -version = "0.6.0" +name = "cursor-icon" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f0de2f5a8e7bd4a9eec0e3c781992a4ce1724f68aec7d7a3715344de8b39da" -dependencies = [ - "bitflags 1.3.2", - "libloading 0.7.4", - "winapi", -] +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "d3d12" @@ -552,9 +610,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ "libc", "windows-sys 0.48.0", @@ -570,28 +628,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "fdeflate" version = "0.3.1" @@ -693,12 +729,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures-core" version = "0.3.29" @@ -711,6 +741,16 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +[[package]] +name = "gethostname" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.2.11" @@ -774,16 +814,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "gpu-alloc" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22beaafc29b38204457ea030f6fb7a84c9e4dd1b86e311ba0542533453d87f62" -dependencies = [ - "bitflags 1.3.2", - "gpu-alloc-types 0.2.0", -] - [[package]] name = "gpu-alloc" version = "0.6.0" @@ -791,16 +821,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ "bitflags 2.4.1", - "gpu-alloc-types 0.3.0", -] - -[[package]] -name = "gpu-alloc-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" -dependencies = [ - "bitflags 1.3.2", + "gpu-alloc-types", ] [[package]] @@ -890,6 +911,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.3.3" @@ -908,6 +935,17 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2", + "dispatch", + "objc2", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -915,18 +953,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "image" -version = "0.24.7" +name = "imgui" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "122d677d0efcd64ca15f12907beaf46b26bbd2cdc855ee5b227f29cf50f75bb5" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "imgui-sys", + "mint", + "parking_lot", +] + +[[package]] +name = "imgui-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d785272a57cb8058a53a1e6f376f48e2ec4f40fbc6a9bb197dabf7b6b59c03bf" +dependencies = [ + "cc", + "cfg-if", + "chlorine", + "mint", +] + +[[package]] +name = "imgui-wgpu" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c7cf3740fd216da2721676c0e5264821169211f557ac6baa99c644a3869b324" dependencies = [ "bytemuck", - "byteorder", - "color_quant", - "jpeg-decoder", - "num-rational", - "num-traits", - "png", + "imgui", + "log", + "smallvec", + "wgpu 0.17.1", +] + +[[package]] +name = "imgui-winit-support" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edae4bfce64634fa013aec131f5d5f1c80df8aa0bddc0e0a9845ad57036b6987" +dependencies = [ + "imgui", + "winit 0.27.5", ] [[package]] @@ -935,7 +1006,7 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg 1.1.0", + "autocfg", "hashbrown 0.12.3", ] @@ -949,6 +1020,12 @@ dependencies = [ "hashbrown 0.14.2", ] +[[package]] +name = "indoc" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" + [[package]] name = "instant" version = "0.1.12" @@ -972,6 +1049,22 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -979,10 +1072,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] -name = "jpeg-decoder" -version = "0.3.0" +name = "jobserver" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] [[package]] name = "js-sys" @@ -1053,6 +1149,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -1065,7 +1172,7 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ - "autocfg 1.1.0", + "autocfg", "scopeguard", ] @@ -1090,7 +1197,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ - "autocfg 1.1.0", + "autocfg", "rawpointer", ] @@ -1109,27 +1216,55 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.1.0", + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", ] [[package]] name = "metal" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "block", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types 0.5.0", "log", "objc", + "paste", ] [[package]] @@ -1163,6 +1298,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mint" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" + [[package]] name = "mio" version = "0.8.9" @@ -1177,12 +1318,12 @@ dependencies = [ [[package]] name = "naga" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcc2e0513220fd2b598e6068608d4462db20322c0e77e47f6f488dfcfc279cb" +checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" dependencies = [ "bit-set", - "bitflags 1.3.2", + "bitflags 2.4.1", "codespan-reporting", "hexf-parse", "indexmap 1.9.3", @@ -1197,9 +1338,9 @@ dependencies = [ [[package]] name = "naga" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071" +checksum = "6cd05939c491da968a42986204b7431678be21fdcd4b10cc84997ba130ada5a4" dependencies = [ "bit-set", "bitflags 2.4.1", @@ -1221,7 +1362,7 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ - "approx 0.5.1", + "approx", "matrixmultiply", "nalgebra-macros", "num-complex", @@ -1259,12 +1400,27 @@ checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", - "ndk-sys", - "num_enum", + "ndk-sys 0.4.1+23.1.7779620", + "num_enum 0.5.11", "raw-window-handle 0.5.2", "thiserror", ] +[[package]] +name = "ndk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +dependencies = [ + "bitflags 2.4.1", + "jni-sys", + "log", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum 0.7.1", + "raw-window-handle 0.6.0", + "thiserror", +] + [[package]] name = "ndk-context" version = "0.1.1" @@ -1279,10 +1435,10 @@ checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ "libc", "log", - "ndk", + "ndk 0.7.0", "ndk-context", "ndk-macro", - "ndk-sys", + "ndk-sys 0.4.1+23.1.7779620", "once_cell", "parking_lot", ] @@ -1294,7 +1450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ "darling", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -1309,6 +1465,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.24.3" @@ -1318,7 +1483,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] @@ -1327,11 +1492,23 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ - "autocfg 1.1.0", + "autocfg", "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", ] [[package]] @@ -1359,7 +1536,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-traits", ] @@ -1369,7 +1546,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-integer", "num-traits", ] @@ -1380,7 +1557,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -1389,7 +1566,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", ] [[package]] @@ -1398,12 +1584,24 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +dependencies = [ + "proc-macro-crate 2.0.0", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "objc" version = "0.2.7" @@ -1414,6 +1612,28 @@ dependencies = [ "objc_exception", ] +[[package]] +name = "objc-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e1d07c6eab1ce8b6382b8e3c7246fe117ff3f8b34be065f5ebace6749fe845" + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + [[package]] name = "objc_exception" version = "0.1.2" @@ -1439,15 +1659,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] -name = "palette" -version = "0.3.0" +name = "orbclient" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0514191b8ea7d7ee7e8982067929a6f0139d93584f82562d5e5e0e6ac738950" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "approx 0.1.1", - "num-traits", - "phf", - "phf_codegen", + "libredox", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" +dependencies = [ + "ttf-parser", ] [[package]] @@ -1468,7 +1694,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -1486,56 +1712,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] -name = "phf" -version = "0.7.24" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pixels" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba8189b31db4f12fbf0d4a8eab2d7d7343a504a8d8a7ea4b14ffb2e6129136a" -dependencies = [ - "bytemuck", - "pollster", - "raw-window-handle 0.5.2", - "thiserror", - "ultraviolet", - "wgpu 0.16.3", -] +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pkg-config" @@ -1556,6 +1736,20 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "pollster" version = "0.3.0" @@ -1575,7 +1769,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", ] [[package]] @@ -1593,6 +1796,76 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" +[[package]] +name = "pyo3" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset 0.9.0", + "parking_lot", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96fe70b176a89cff78f2fa7b3c930081e163d5379b4dcdf993e3ae29ca662e5" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "214929900fd25e6604661ed9cf349727c8920d47deff196c4e28165a6ef2a96b" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac53072f717aa1bfa4db832b39de8c875b7c7af4f4a6fe93cdbf9264cf8383b" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774b5a8282bd4f25f803b1f0d945120be959a36c72e08e7cd031c792fdfd424" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.33" @@ -1602,112 +1875,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha", - "rand_core 0.4.2", - "rand_hc", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "range-alloc" version = "0.1.3" @@ -1729,6 +1896,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + [[package]] name = "rawpointer" version = "0.2.1" @@ -1736,12 +1909,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] -name = "rdrand" -version = "0.4.0" +name = "redox_syscall" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "rand_core 0.3.1", + "bitflags 1.3.2", ] [[package]] @@ -1799,19 +1972,19 @@ name = "rust-opengl" version = "0.1.0" dependencies = [ "anyhow", - "arc", - "bytemuck", "cfg-if", "env_logger", - "image", - "lazy_static", + "imgui", + "imgui-wgpu", + "imgui-winit-support", "log", "nalgebra", - "pixels", "pollster", + "pyo3", "roots", "wgpu 0.18.0", - "winit", + "winit 0.29.3", + "winit_input_helper", ] [[package]] @@ -1828,9 +2001,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" dependencies = [ "bitflags 2.4.1", "errno", @@ -1857,6 +2030,15 @@ dependencies = [ "bytemuck", ] +[[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" @@ -1877,8 +2059,21 @@ checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", - "smithay-client-toolkit", - "tiny-skia", + "smithay-client-toolkit 0.16.1", + "tiny-skia 0.7.0", +] + +[[package]] +name = "sctk-adwaita" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729a30a469de249c6effc17ec8d039b0aa29b3af79b819b7f51cb6ab8046a90" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.9.0", + "smithay-client-toolkit 0.18.0", + "tiny-skia 0.11.2", ] [[package]] @@ -1928,7 +2123,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ - "approx 0.5.1", + "approx", "num-complex", "num-traits", "paste", @@ -1942,10 +2137,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] -name = "siphasher" -version = "0.2.3" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "slotmap" @@ -1969,16 +2167,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", - "calloop", + "calloop 0.10.6", "dlib", "lazy_static", "log", - "memmap2", + "memmap2 0.5.10", "nix 0.24.3", "pkg-config", - "wayland-client", - "wayland-cursor", - "wayland-protocols", + "wayland-client 0.29.5", + "wayland-cursor 0.29.5", + "wayland-protocols 0.29.5", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f" +dependencies = [ + "bitflags 2.4.1", + "calloop 0.12.3", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.0", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-csd-frame", + "wayland-cursor 0.31.0", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr", + "wayland-scanner 0.31.0", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +dependencies = [ + "serde", ] [[package]] @@ -2006,6 +2238,12 @@ 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 = "strsim" version = "0.10.0" @@ -2035,22 +2273,16 @@ dependencies = [ ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "target-lexicon" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -2087,7 +2319,21 @@ dependencies = [ "cfg-if", "png", "safe_arch 0.5.2", - "tiny-skia-path", + "tiny-skia-path 0.7.0", +] + +[[package]] +name = "tiny-skia" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path 0.11.2", ] [[package]] @@ -2100,6 +2346,17 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "tiny-skia-path" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "toml_datetime" version = "0.6.5" @@ -2117,27 +2374,57 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "ultraviolet" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a28554d13eb5daba527cc1b91b6c341372a0ae45ed277ffb2c6fbc04f319d7e" -dependencies = [ - "wide", -] - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + [[package]] name = "unicode-width" version = "0.1.11" @@ -2150,6 +2437,12 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + [[package]] name = "vec_map" version = "0.8.2" @@ -2162,6 +2455,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2234,6 +2537,20 @@ version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +[[package]] +name = "wayland-backend" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +dependencies = [ + "cc", + "downcast-rs", + "nix 0.26.4", + "scoped-tls", + "smallvec", + "wayland-sys 0.31.1", +] + [[package]] name = "wayland-client" version = "0.29.5" @@ -2246,8 +2563,20 @@ dependencies = [ "nix 0.24.3", "scoped-tls", "wayland-commons", - "wayland-scanner", - "wayland-sys", + "wayland-scanner 0.29.5", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-client" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +dependencies = [ + "bitflags 2.4.1", + "nix 0.26.4", + "wayland-backend", + "wayland-scanner 0.31.0", ] [[package]] @@ -2259,7 +2588,18 @@ dependencies = [ "nix 0.24.3", "once_cell", "smallvec", - "wayland-sys", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.1", + "cursor-icon", + "wayland-backend", ] [[package]] @@ -2269,7 +2609,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ "nix 0.24.3", - "wayland-client", + "wayland-client 0.29.5", + "xcursor", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" +dependencies = [ + "nix 0.26.4", + "wayland-client 0.31.1", "xcursor", ] @@ -2280,9 +2631,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags 1.3.2", - "wayland-client", + "wayland-client 0.29.5", "wayland-commons", - "wayland-scanner", + "wayland-scanner 0.29.5", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +dependencies = [ + "bitflags 2.4.1", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-scanner 0.31.0", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.4.1", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.4.1", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", ] [[package]] @@ -2296,6 +2685,17 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "wayland-scanner" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + [[package]] name = "wayland-sys" version = "0.29.5" @@ -2307,6 +2707,18 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.64" @@ -2318,16 +2730,26 @@ dependencies = [ ] [[package]] -name = "wgpu" -version = "0.16.3" +name = "web-time" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480c965c9306872eb6255fa55e4b4953be55a8b64d57e61d7ff840d3dcc051cd" +checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wgpu" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed547920565c56c7a29afb4538ac5ae5048865a5d2f05bff3ad4fbeb921a9a2c" dependencies = [ "arrayvec 0.7.4", "cfg-if", "js-sys", "log", - "naga 0.12.3", + "naga 0.13.0", "parking_lot", "profiling", "raw-window-handle 0.5.2", @@ -2336,9 +2758,9 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 0.16.1", - "wgpu-hal 0.16.2", - "wgpu-types 0.16.1", + "wgpu-core 0.17.1", + "wgpu-hal 0.17.2", + "wgpu-types 0.17.0", ] [[package]] @@ -2352,7 +2774,7 @@ dependencies = [ "flume", "js-sys", "log", - "naga 0.14.0", + "naga 0.14.1", "parking_lot", "profiling", "raw-window-handle 0.5.2", @@ -2361,23 +2783,23 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 0.18.0", + "wgpu-core 0.18.1", "wgpu-hal 0.18.0", "wgpu-types 0.18.0", ] [[package]] name = "wgpu-core" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" +checksum = "0f8a44dd301a30ceeed3c27d8c0090433d3da04d7b2a4042738095a424d12ae7" dependencies = [ "arrayvec 0.7.4", "bit-vec", "bitflags 2.4.1", "codespan-reporting", "log", - "naga 0.12.3", + "naga 0.13.0", "parking_lot", "profiling", "raw-window-handle 0.5.2", @@ -2385,22 +2807,22 @@ dependencies = [ "smallvec", "thiserror", "web-sys", - "wgpu-hal 0.16.2", - "wgpu-types 0.16.1", + "wgpu-hal 0.17.2", + "wgpu-types 0.17.0", ] [[package]] name = "wgpu-core" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "837e02ddcdc6d4a9b56ba4598f7fd4202a7699ab03f6ef4dcdebfad2c966aea6" +checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726" dependencies = [ "arrayvec 0.7.4", "bit-vec", "bitflags 2.4.1", "codespan-reporting", "log", - "naga 0.14.0", + "naga 0.14.1", "parking_lot", "profiling", "raw-window-handle 0.5.2", @@ -2414,9 +2836,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.16.2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecb3258078e936deee14fd4e0febe1cfe9bbb5ffef165cb60218d2ee5eb4448" +checksum = "9a80bf0e3c77399bb52850cb0830af9bad073d5cfcb9dd8253bef8125c42db17" dependencies = [ "android_system_properties", "arrayvec 0.7.4", @@ -2425,10 +2847,9 @@ dependencies = [ "bitflags 2.4.1", "block", "core-graphics-types", - "d3d12 0.6.0", - "foreign-types 0.3.2", + "d3d12", "glow 0.12.3", - "gpu-alloc 0.5.4", + "gpu-alloc", "gpu-allocator 0.22.0", "gpu-descriptor", "hassle-rs", @@ -2437,8 +2858,8 @@ dependencies = [ "libc", "libloading 0.8.1", "log", - "metal 0.24.0", - "naga 0.12.3", + "metal 0.26.0", + "naga 0.13.0", "objc", "parking_lot", "profiling", @@ -2450,7 +2871,7 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types 0.16.1", + "wgpu-types 0.17.0", "winapi", ] @@ -2467,10 +2888,10 @@ dependencies = [ "bitflags 2.4.1", "block", "core-graphics-types", - "d3d12 0.7.0", + "d3d12", "glow 0.13.0", "glutin_wgl_sys", - "gpu-alloc 0.6.0", + "gpu-alloc", "gpu-allocator 0.23.0", "gpu-descriptor", "hassle-rs", @@ -2480,7 +2901,7 @@ dependencies = [ "libloading 0.8.1", "log", "metal 0.27.0", - "naga 0.14.0", + "naga 0.14.1", "objc", "once_cell", "parking_lot", @@ -2499,9 +2920,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" +checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" dependencies = [ "bitflags 2.4.1", "js-sys", @@ -2560,6 +2981,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2607,6 +3037,15 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -2767,15 +3206,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ "bitflags 1.3.2", - "cocoa 0.24.1", - "core-foundation 0.9.3", + "cocoa", + "core-foundation", "core-graphics 0.22.3", "dispatch", "instant", "libc", "log", "mio", - "ndk", + "ndk 0.7.0", "ndk-glue", "objc", "once_cell", @@ -2783,16 +3222,73 @@ dependencies = [ "percent-encoding", "raw-window-handle 0.4.3", "raw-window-handle 0.5.2", - "sctk-adwaita", - "smithay-client-toolkit", + "sctk-adwaita 0.4.3", + "smithay-client-toolkit 0.16.1", "wasm-bindgen", - "wayland-client", - "wayland-protocols", + "wayland-client 0.29.5", + "wayland-protocols 0.29.5", "web-sys", "windows-sys 0.36.1", "x11-dl", ] +[[package]] +name = "winit" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161598019a9da35ab6c34dc46cd13546cba9dbf9816475d4dd9a639455016563" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.4.1", + "bytemuck", + "calloop 0.12.3", + "cfg_aliases", + "core-foundation", + "core-graphics 0.23.1", + "cursor-icon", + "icrate", + "js-sys", + "libc", + "log", + "memmap2 0.9.0", + "ndk 0.8.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc2", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.6.0", + "redox_syscall 0.3.5", + "rustix", + "sctk-adwaita 0.7.0", + "smithay-client-toolkit 0.18.0", + "smol_str", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.48.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winit_input_helper" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de23d6018b4ff6e9a6bd069109b3c891a44acc97a212e744598c6971a9ee0384" +dependencies = [ + "winit 0.27.5", +] + [[package]] name = "winnow" version = "0.5.19" @@ -2822,6 +3318,32 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.7.4", + "nix 0.26.4", + "once_cell", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" +dependencies = [ + "nix 0.26.4", +] + [[package]] name = "xcursor" version = "0.3.4" @@ -2831,6 +3353,25 @@ dependencies = [ "nom", ] +[[package]] +name = "xkbcommon-dl" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699" +dependencies = [ + "bitflags 2.4.1", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" + [[package]] name = "xml-rs" version = "0.8.19" @@ -2839,18 +3380,18 @@ checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "zerocopy" -version = "0.7.25" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.25" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 04fa042..99a9438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,25 +4,18 @@ version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies.image] -version = "0.24" -default-features = false -features = ["png", "jpeg"] - -[dependencies.winit] -version = "0.27" -features = ["x11"] - [dependencies] cfg-if = "1" env_logger = "0.10" log = "0.4" -wgpu = "0.18" pollster = "0.3" -bytemuck = { version = "1.12", features = [ "derive" ] } anyhow = "1.0" nalgebra = "0.32.3" roots = "0.0.8" -lazy_static = "1.4.0" -arc = "0.0.1" -pixels = "0.13.0" +pyo3 = "0.20.0" +imgui = "0.11" +imgui-wgpu = "0.24" +imgui-winit-support = "0.11" +winit_input_helper = "0.13" +winit = "0.29.3" +wgpu = "0.18.0" diff --git a/src/camera.rs b/src/camera.rs index 1c8a04d..0d92805 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -53,8 +53,9 @@ impl Camera { let view_proj = self.build_view_projection_matrix(); view_proj.try_inverse().expect("Cannot invert!") } - pub fn cast_rays(&self, width: usize, height: usize) -> Vec { + pub fn cast_rays(&self, width: u32, height: u32) -> Vec { let inverse_matrix = self.build_inverse_view_projection_matrix(); + let dx = 2.0 / width as f32; let dy = 2.0 / height as f32; diff --git a/src/display.rs b/src/display.rs deleted file mode 100644 index 4df2c8f..0000000 --- a/src/display.rs +++ /dev/null @@ -1,79 +0,0 @@ -use pixels::{Error, Pixels, SurfaceTexture}; - -use std::time::Instant; - -use winit::{ - event::{Event, WindowEvent}, - event_loop::{ControlFlow, EventLoop}, - window::WindowBuilder, -}; - -pub fn run() -> Result<(), Error> { - // Create an event loop and window using winit - let event_loop = EventLoop::new(); - let window = WindowBuilder::new().build(&event_loop).unwrap(); - - // Create a Pixels instance for drawing - let mut pixels = { - let window_size = window.inner_size(); - let surface_texture = SurfaceTexture::new(window_size.width, window_size.height, &window); - Pixels::new(800, 600, surface_texture).unwrap() - }; - - event_loop.run(move |event, _, control_flow| { - *control_flow = ControlFlow::Poll; - match event { - Event::WindowEvent { - ref event, - window_id, - } if window_id == window.id() => { - match event { - WindowEvent::CloseRequested => *control_flow = ControlFlow::Exit, - WindowEvent::Resized(physical_size) => { - //We want to change the size of the pixel display - pixels - .resize_surface(physical_size.width, physical_size.height) - .expect("Could not resize"); - pixels - .resize_buffer(physical_size.width, physical_size.height) - .expect("Could not resize"); - } - WindowEvent::ScaleFactorChanged { new_inner_size, .. } => { - //We want to change the size of the pixel display - // new_inner_size is &mut so w have to dereference it twice - pixels - .resize_surface(new_inner_size.width, new_inner_size.height) - .expect("Could not resize!"); - pixels - .resize_buffer(new_inner_size.width, new_inner_size.height) - .expect("Could not resize"); - } - WindowEvent::KeyboardInput { input, .. } => { - println!("Key input: {}", input.scancode); - } - _ => {} - } - } - Event::RedrawRequested(_) => { - // Draw a pixel at every coordinate - for (i, pixel) in pixels.frame_mut().chunks_exact_mut(4).enumerate() { - let r = (i as u8).wrapping_mul(50); - let g = 43; - let b = 3; - let a = 255; - pixel.copy_from_slice(&[r, g, b, a]); - } - // Render the frame - if pixels.render().is_err() { - eprintln!("Failed to render frame"); - } - } - Event::MainEventsCleared => { - // RedrawRequested will only trigger once, unless we manually - // request it. - window.request_redraw(); - } - _ => {} - } - }); -} diff --git a/src/main.rs b/src/main.rs index 279d3dd..16b377d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,16 +2,16 @@ #![allow(unused_imports)] #![allow(unused_variables)] //Use linear algebra module -use display::run; +use window::run; //Cameras mod camera; -mod display; mod light; mod primitive; mod ray; mod raytracer; mod scene; +mod window; // mod state; // mod texture; // mod vertex; @@ -20,5 +20,5 @@ const EPSILON: f32 = 1e-7; const INFINITY: f32 = 1e7; fn main() { - run().expect(""); + run().expect("YEY"); } diff --git a/src/primitive.rs b/src/primitive.rs index ef49b2f..6777250 100644 --- a/src/primitive.rs +++ b/src/primitive.rs @@ -5,12 +5,7 @@ use roots::{find_roots_quadratic, Roots}; use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::Path; - -use lazy_static::lazy_static; - -lazy_static! { - static ref MAGENTA_MATERIAL: Material = Material::magenta(); -} +use std::sync::Arc; // MATERIAL ----------------------------------------------------------------- pub struct Material { @@ -30,27 +25,27 @@ impl Material { } } // INTERSECTION ----------------------------------------------------------------- -pub struct Intersection<'a> { +pub struct Intersection { // Information about an intersection - pub primitive: &'a dyn Primitive<'a>, pub point: Point3, pub normal: Vector3, pub incidence: Vector3, + pub material: Arc, pub distance: f32, } -impl<'a> Intersection<'a> { +impl Intersection { pub fn new( - primitive: &'a dyn Primitive<'a>, point: Point3, normal: Vector3, incidence: Vector3, + material: Arc, t: f32, ) -> Self { Intersection { - primitive, point, normal, incidence, + material, distance: t, } } @@ -80,22 +75,22 @@ impl BoundingBox { } } // PRIMITIVE TRAIT ----------------------------------------------------------------- -pub trait Primitive<'a> { +pub trait Primitive { fn intersect_ray(&self, ray: &Ray) -> Option; fn intersect_bounding_box(&self, ray: &Ray) -> Option>; - fn get_material(&self) -> &'a Material; + fn get_material(&self) -> Arc; } // SPHERE ----------------------------------------------------------------- -struct Sphere<'a> { +struct Sphere { position: Point3, radius: f32, - material: &'a Material, bounding_box: BoundingBox, + material: Arc, } -impl<'a> Sphere<'a> { - fn new(position: Point3, radius: f32, material: &'a Material) -> Self { +impl Sphere { + fn new(position: Point3, radius: f32, material: Arc) -> Self { let radius_vec = Vector3::new(radius, radius, radius); let bln = position - radius_vec; let trf = position + radius_vec; @@ -103,17 +98,17 @@ impl<'a> Sphere<'a> { Sphere { position, radius, - material, bounding_box, + material, } } - fn unit() -> Self { - Sphere::new(Point3::new(0.0, 0.0, 0.0), 1.0, &MAGENTA_MATERIAL) + fn unit(material: Arc) -> Self { + Sphere::new(Point3::new(0.0, 0.0, 0.0), 1.0, material) } } -impl<'a> Primitive<'a> for Sphere<'a> { +impl Primitive for Sphere { fn intersect_ray(&self, ray: &Ray) -> Option { let pos = &ray.a; let dir = &ray.b; @@ -144,16 +139,16 @@ impl<'a> Primitive<'a> for Sphere<'a> { let intersect = ray.at_t(t); let normal = (intersect - self.position).normalize(); Some(Intersection { - primitive: self, point: intersect, normal, incidence: ray.b, + material: Arc::clone(&self.material), distance: t, }) } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { @@ -162,20 +157,20 @@ impl<'a> Primitive<'a> for Sphere<'a> { } // CIRCLE ----------------------------------------------------------------- -struct Circle<'a> { +struct Circle { position: Point3, radius: f32, normal: Vector3, - material: &'a Material, + material: Arc, bounding_box: BoundingBox, } -impl<'a> Circle<'a> { +impl Circle { fn new( position: Point3, radius: f32, normal: Vector3, - material: &'a Material, + material: Arc, ) -> Self { let radius_vec = Vector3::new(radius, radius, radius); let bln = position - radius_vec; @@ -190,11 +185,11 @@ impl<'a> Circle<'a> { } } - fn unit() -> Self { + fn unit(material: Arc) -> Self { let position = Point3::new(0.0, 0.0, 0.0); let normal = Vector3::new(0.0, 1.0, 0.0); let radius = 1.0; - let material = &MAGENTA_MATERIAL; + let material = material; let bln = Point3::new(-radius, 0.0, -EPSILON); let trf = Point3::new(radius, 0.0, EPSILON); @@ -210,7 +205,7 @@ impl<'a> Circle<'a> { } } -impl<'a> Primitive<'a> for Circle<'a> { +impl Primitive for Circle { fn intersect_ray(&self, ray: &Ray) -> Option { let constant = self.position.coords.dot(&self.normal); let denominator = ray.b.dot(&self.normal); @@ -224,18 +219,18 @@ impl<'a> Primitive<'a> for Circle<'a> { true => return None, false => { return Some(Intersection { - primitive: self, point: intersect, normal: self.normal, incidence: ray.b, + material: Arc::clone(&self.material), distance: t, }) } } } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { @@ -244,23 +239,23 @@ impl<'a> Primitive<'a> for Circle<'a> { } // CYLINDER ----------------------------------------------------------------- -struct Cylinder<'a> { +struct Cylinder { radius: f32, base: f32, height: f32, - base_circle: &'a Circle<'a>, - height_circle: &'a Circle<'a>, - material: &'a Material, + base_circle: Circle, + height_circle: Circle, + material: Arc, } -impl<'a> Cylinder<'a> {} +impl Cylinder {} -impl<'a> Primitive<'a> for Cylinder<'a> { +impl Primitive for Cylinder { fn intersect_ray(&self, ray: &Ray) -> Option { todo!() } - fn get_material(&self) -> &'a Material { + fn get_material(&self) -> Arc { todo!() } @@ -270,22 +265,22 @@ impl<'a> Primitive<'a> for Cylinder<'a> { } // CONE ----------------------------------------------------------------- -struct Cone<'a> { +pub struct Cone { radius: f32, base: f32, height: f32, - circle: Circle<'a>, - material: &'a Material, + circle: Circle, + material: Arc, bounding_box: BoundingBox, } -impl<'a> Cone<'a> { - fn new(radius: f32, height: f32, base: f32, material: &'a Material) -> Self { +impl Cone { + pub fn new(radius: f32, height: f32, base: f32, material: Arc) -> Self { let circle = Circle::new( Point3::new(0.0, base, 0.0), radius, Vector3::new(0.0, 1.0, 0.0), - &material, + Arc::clone(&material), ); let bln = Point3::new(-radius, base, -radius); let trf = Point3::new(radius, base + height, radius); @@ -298,11 +293,11 @@ impl<'a> Cone<'a> { bounding_box: BoundingBox { bln, trf }, } } - fn unit() -> Self { - Cone::new(1.0, 2.0, -1.0, &MAGENTA_MATERIAL) + pub fn unit(material: Arc) -> Self { + Cone::new(1.0, 2.0, -1.0, material) } - fn get_normal(&self, intersect: Point3) -> Vector3 { + pub fn get_normal(&self, intersect: Point3) -> Vector3 { let r = self.radius; let h = self.height; let (x, y, z) = (intersect.x, intersect.y, intersect.z); @@ -311,7 +306,7 @@ impl<'a> Cone<'a> { } } -impl<'a> Primitive<'a> for Cone<'a> { +impl Primitive for Cone { fn intersect_ray(&self, ray: &Ray) -> Option { let point = &ray.a; let dir = &ray.b; @@ -346,9 +341,9 @@ impl<'a> Primitive<'a> for Cone<'a> { let intersect = ray.at_t(t); match intersect.y >= self.base && intersect.y <= self.height { true => Some(Intersection { - primitive: self, point: intersect, normal: self.get_normal(intersect), + material: Arc::clone(&self.material), incidence: ray.b, distance: t, }), @@ -374,8 +369,8 @@ impl<'a> Primitive<'a> for Cone<'a> { } } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { @@ -384,24 +379,24 @@ impl<'a> Primitive<'a> for Cone<'a> { } // RECTANGLE ----------------------------------------------------------------- -struct Rectangle<'a> { +struct Rectangle { position: Point3, normal: Vector3, width_direction: Vector3, - material: &'a Material, + material: Arc, width: f32, height: f32, bounding_box: BoundingBox, } -impl<'a> Rectangle<'a> { +impl Rectangle { fn new( position: Point3, normal: Vector3, width_direction: Vector3, width: f32, height: f32, - material: &'a Material, + material: Arc, ) -> Self { let normal = normal.normalize(); let width_direction = width_direction.normalize(); @@ -418,19 +413,19 @@ impl<'a> Rectangle<'a> { bounding_box: BoundingBox { bln, trf }, } } - fn unit() -> Self { + fn unit(material: Arc) -> Self { Rectangle::new( Point3::new(0.0, 0.0, 0.0), Vector3::new(0.0, 1.0, 0.0), Vector3::new(1.0, 0.0, 0.0), 2.0, 2.0, - &MAGENTA_MATERIAL, + material, ) } } -impl<'a> Primitive<'a> for Rectangle<'a> { +impl Primitive for Rectangle { fn intersect_ray(&self, ray: &Ray) -> Option { let constant = self.position.coords.dot(&self.normal); let denominator = ray.b.dot(&self.normal); @@ -451,18 +446,18 @@ impl<'a> Primitive<'a> for Rectangle<'a> { if pi_dot_r1 >= -w2 && pi_dot_r1 <= w2 && pi_dot_r2 >= -h2 && pi_dot_r2 <= h2 { return Some(Intersection { - primitive: self, point: intersect, normal: self.normal, incidence: ray.b, + material: Arc::clone(&self.material), distance: t, }); } None } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { @@ -471,16 +466,16 @@ impl<'a> Primitive<'a> for Rectangle<'a> { } // BOX ----------------------------------------------------------------- -struct Box<'a> { +struct Box { width: f32, height: f32, depth: f32, - material: &'a Material, + material: Arc, bounding_box: BoundingBox, } -impl<'a> Box<'a> { - fn new(width: f32, height: f32, depth: f32, material: &'a Material) -> Self { +impl Box { + fn new(width: f32, height: f32, depth: f32, material: Arc) -> Self { let trf = Point3::new(width / 2.0, height / 2.0, depth / 2.0); let bln = Point3::new(-width / 2.0, -height / 2.0, -depth / 2.0); Box { @@ -491,12 +486,12 @@ impl<'a> Box<'a> { bounding_box: BoundingBox { bln, trf }, } } - fn unit() -> Self { - Box::new(2.0, 2.0, 2.0, &MAGENTA_MATERIAL) + fn unit(material: Arc) -> Self { + Box::new(2.0, 2.0, 2.0, material) } } -impl<'a> Primitive<'a> for Box<'a> { +impl Primitive for Box { fn intersect_ray(&self, ray: &Ray) -> Option { // Compute the minimum and maximum t-values for each axis of the bounding box let t1 = (self.bounding_box.bln - ray.a).component_div(&ray.b); @@ -538,10 +533,10 @@ impl<'a> Primitive<'a> for Box<'a> { }; Some(Intersection { - primitive: self, point: intersect, normal, incidence: ray.b, + material: Arc::clone(&self.material), distance: tmin, }) } else { @@ -553,23 +548,23 @@ impl<'a> Primitive<'a> for Box<'a> { self.bounding_box.intersect_bounding_box(ray) } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } } // TRIANGLE ----------------------------------------------------------------- -struct Triangle<'a> { +struct Triangle { u: Point3, v: Point3, w: Point3, normal: Vector3, - material: &'a Material, + material: Arc, bounding_box: BoundingBox, } -impl<'a> Triangle<'a> { - fn new(u: Point3, v: Point3, w: Point3, material: &'a Material) -> Self { +impl Triangle { + fn new(u: Point3, v: Point3, w: Point3, material: Arc) -> Self { let uv = v - u; let uw = w - u; let normal = uv.cross(&uw).normalize(); @@ -585,16 +580,16 @@ impl<'a> Triangle<'a> { bounding_box, } } - fn unit() -> Self { + fn unit(material: Arc) -> Self { let u = Point3::new(-1.0, 0.0, -1.0); let v = Point3::new(0.0, 0.0, 1.0); let w = Point3::new(1.0, 0.0, -1.0); - let material = &MAGENTA_MATERIAL; + let material = material; Triangle::new(u, v, w, material) } } -impl<'a> Primitive<'a> for Triangle<'a> { +impl Primitive for Triangle { fn intersect_ray(&self, ray: &Ray) -> Option { let constant = self.u.coords.dot(&self.normal); let denominator = ray.b.dot(&self.normal); @@ -623,10 +618,10 @@ impl<'a> Primitive<'a> for Triangle<'a> { if u_cross.dot(&normal) >= 0.0 && v_cross.dot(&normal) >= 0.0 && w_cross.dot(&normal) >= 0.0 { Some(Intersection { - primitive: self, point: intersect, normal, incidence: ray.b, + material: Arc::clone(&self.material), distance: t, }) } else { @@ -634,8 +629,8 @@ impl<'a> Primitive<'a> for Triangle<'a> { } } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { @@ -644,14 +639,14 @@ impl<'a> Primitive<'a> for Triangle<'a> { } // MESH ----------------------------------------------------------------- -struct Mesh<'a> { - triangles: Vec>, - material: &'a Material, +struct Mesh { + triangles: Vec, + material: Arc, bounding_box: BoundingBox, } -impl<'a> Mesh<'a> { - fn new(triangles: Vec>, material: &'a Material) -> Self { +impl Mesh { + fn new(triangles: Vec, material: Arc) -> Self { // Calculate the bounding box for the entire mesh based on the bounding boxes of individual triangles let bounding_box = Mesh::compute_bounding_box(&triangles); @@ -662,7 +657,7 @@ impl<'a> Mesh<'a> { } } - fn compute_bounding_box(triangles: &Vec>) -> BoundingBox { + fn compute_bounding_box(triangles: &Vec) -> BoundingBox { let mut bln = Point3::new(INFINITY, INFINITY, INFINITY); let mut trf = -bln; for triangle in triangles { @@ -677,7 +672,7 @@ impl<'a> Mesh<'a> { BoundingBox { bln, trf } } - fn from_file(filename: &str, material: &'a Material) -> Self { + fn from_file(filename: &str, material: Arc) -> Self { let mut triangles: Vec = Vec::new(); let mut vertices: Vec> = Vec::new(); @@ -715,7 +710,7 @@ impl<'a> Mesh<'a> { let a = vertices[v1 - 1]; let b = vertices[v2 - 1]; let c = vertices[v3 - 1]; - triangles.push(Triangle::new(a, b, c, material)); + triangles.push(Triangle::new(a, b, c, Arc::clone(&material))); } } _ => {} @@ -727,7 +722,7 @@ impl<'a> Mesh<'a> { } } -impl<'a> Primitive<'a> for Mesh<'a> { +impl Primitive for Mesh { fn intersect_ray(&self, ray: &Ray) -> Option { let mut closest_distance = INFINITY; let mut closest_intersect: Option = None; @@ -748,8 +743,8 @@ impl<'a> Primitive<'a> for Mesh<'a> { closest_intersect } - fn get_material(&self) -> &'a Material { - self.material + fn get_material(&self) -> Arc { + Arc::clone(&self.material) } fn intersect_bounding_box(&self, ray: &Ray) -> Option> { diff --git a/src/raytracer.rs b/src/raytracer.rs index 8910049..a40172f 100644 --- a/src/raytracer.rs +++ b/src/raytracer.rs @@ -5,20 +5,38 @@ use crate::{ scene::Scene, INFINITY, }; -use lazy_static::lazy_static; -lazy_static! { - static ref VEC3_ONE: Vector3 = Vector3::new(1.0, 1.0, 1.0); - static ref VEC3_ZERO: Vector3 = Vector3::new(1.0, 1.0, 1.0); -} +use std::sync::Arc; use nalgebra::{distance, Matrix4, Point3, Vector3, Vector4}; +pub fn shade_rays(scene: &Scene, rays: &Vec, width: u32, height: u32) -> Vec> { + let mut pixel_data = vec![]; + + for ray in rays { + let intersect = get_closest_intersection(scene, ray); + match intersect { + Some(interect) => { + let colour = phong_shade_point(scene, &interect); + pixel_data.push(colour); + } + None => { + let colour = Vector3::new(0, 0, 0); + pixel_data.push(colour); + } + } + } + + pixel_data +} + // Find the closest intersection, given a ray in world coordinates -fn get_closest_intersection<'a>(scene: &'a Scene, ray: &Ray) -> Option> { +pub fn get_closest_intersection(scene: &Scene, ray: &Ray) -> Option { let mut closest_distance = INFINITY; let mut closest_intersect: Option = None; - for primitive in &scene.primitives { - if primitive.intersect_bounding_box(ray) == None { + for arc_primitive in &scene.primitives { + let primitive = arc_primitive.clone(); + + if primitive.intersect_ray(ray).is_none() { continue; }; @@ -37,34 +55,36 @@ fn get_closest_intersection<'a>(scene: &'a Scene, ray: &Ray) -> Option Vector3 { +pub fn phong_shade_point(scene: &Scene, intersect: &Intersection) -> Vector3 { //Useful vectors !!!! CHECK IF WE CAN OPTIMISE let zero_vector = Vector3::new(0.0, 0.0, 0.0); let one_vector = Vector3::new(1.0, 1.0, 1.0); //Unpack the intersection data let Intersection { - primitive, point, normal, incidence, + material, .. } = intersect; - let ambient_light = scene.ambient_light; - let material = primitive.get_material(); + let binding = scene.ambient_light.clone(); + let ambient_light = binding.as_ref(); let kd = material.kd; let ks = material.ks; let shininess = material.shininess; // We should now have all the information for our ray-tracer // Let us first compute the ambient light component and set it as out base colour - let mut colour = kd.component_mul(&ambient_light); + let mut colour = kd.component_mul(ambient_light); + + for arc_light in &scene.lights { + let light = arc_light.clone(); - for light in &scene.lights { let Light { position: light_position, colour: light_colour, falloff: light_falloff, - } = light; + } = light.as_ref(); // Get light incidence vector let to_light = light_position - point; @@ -96,5 +116,9 @@ fn phong_shade_point(scene: &Scene, intersect: &Intersection) -> Vector3 { colour += light_colour.component_mul(&((diffuse + specular) * falloff)); } - nalgebra::clamp(colour, zero_vector, one_vector) + let r = nalgebra::clamp(colour.x * 255.0, 0.0, 255.0) as u8; + let g = nalgebra::clamp(colour.y * 255.0, 0.0, 255.0) as u8; + let b = nalgebra::clamp(colour.z * 255.0, 0.0, 255.0) as u8; + + Vector3::new(r, g, b) } diff --git a/src/scene.rs b/src/scene.rs index 492771c..bb2e784 100644 --- a/src/scene.rs +++ b/src/scene.rs @@ -2,12 +2,38 @@ use crate::camera::Camera; use crate::light::Light; use crate::primitive::Primitive; use nalgebra::Vector3; +use std::sync::Arc; -pub struct Scene<'a> { - pub primitives: Vec>>, - pub lights: Vec, - pub cameras: Vec, - pub ambient_light: Vector3, +pub struct Scene { + pub primitives: Vec>, + pub lights: Vec>, + pub cameras: Vec>, + pub ambient_light: Arc>, } -impl<'a> Scene<'a> {} +impl Scene { + // Creates a new Scene with given parameters + pub fn new( + primitives: Vec>, + lights: Vec>, + cameras: Vec>, + ambient_light: Arc>, + ) -> Self { + Scene { + primitives, + lights, + cameras, + ambient_light, + } + } + + // Creates an empty Scene with default values + pub fn empty() -> Self { + Scene { + primitives: Vec::new(), + lights: Vec::new(), + cameras: Vec::new(), + ambient_light: Arc::new(Vector3::new(0.0, 0.0, 0.0)), + } + } +}