From 32e1a986082091a28f04048b934899e69cc2ce03 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Thu, 10 Apr 2025 16:22:46 +0200 Subject: [PATCH] Render received tracks to a laser --- Cargo.lock | 1765 +++++++++++++++++++++++++--- Cargo.toml | 7 +- examples/laser_frame_stream_gui.rs | 581 +++++++++ src/main.rs | 42 +- src/trap/laser.rs | 4 + src/trap/zmqplugin.rs | 2 +- 6 files changed, 2209 insertions(+), 192 deletions(-) create mode 100644 examples/laser_frame_stream_gui.rs diff --git a/Cargo.lock b/Cargo.lock index 48263ed..bf91f40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ dependencies = [ "accesskit", "accesskit_consumer", "hashbrown 0.15.2", - "objc2", + "objc2 0.5.2", "objc2-app-kit", "objc2-foundation", ] @@ -73,16 +73,37 @@ dependencies = [ "accesskit", "accesskit_macos", "accesskit_windows", - "raw-window-handle", - "winit", + "raw-window-handle 0.6.2", + "winit 0.30.9", ] +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "adler2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + [[package]] name = "ahash" version = "0.8.11" @@ -134,6 +155,24 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "android-activity" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0" +dependencies = [ + "android-properties", + "bitflags 1.3.2", + "cc", + "jni-sys", + "libc", + "log", + "ndk 0.7.0", + "ndk-context", + "ndk-sys 0.4.1+23.1.7779620", + "num_enum 0.6.1", +] + [[package]] name = "android-activity" version = "0.6.0" @@ -151,7 +190,7 @@ dependencies = [ "ndk 0.9.0", "ndk-context", "ndk-sys 0.6.0+11769913", - "num_enum", + "num_enum 0.7.3", "thiserror", ] @@ -206,6 +245,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "arrayvec" version = "0.7.6" @@ -218,13 +263,22 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] + [[package]] name = "ash" version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading", + "libloading 0.8.6", ] [[package]] @@ -323,6 +377,21 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if 1.0.0", + "libc", + "miniz_oxide 0.8.7", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + [[package]] name = "base64" version = "0.21.7" @@ -488,7 +557,7 @@ dependencies = [ "derive_more", "encase", "serde", - "wgpu-types", + "wgpu-types 23.0.0", ] [[package]] @@ -565,7 +634,7 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1597106cc01e62e6217ccb662e0748b2ce330893f27c7dc17bac33e0bb99bca9" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "bevy_ecs_macros", "bevy_ptr", "bevy_reflect", @@ -717,11 +786,11 @@ dependencies = [ "bytemuck", "derive_more", "futures-lite", - "image", + "image 0.25.6", "ktx2", "ruzstd", "serde", - "wgpu", + "wgpu 23.0.1", ] [[package]] @@ -808,7 +877,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.100", - "toml_edit", + "toml_edit 0.22.24", ] [[package]] @@ -819,9 +888,9 @@ checksum = "1c2650169161b64f9a93e41f13253701fdf971dc95265ed667d17bea6d2a334f" dependencies = [ "bevy_reflect", "derive_more", - "glam", + "glam 0.29.3", "itertools", - "rand", + "rand 0.8.5", "rand_distr", "serde", "smallvec", @@ -847,7 +916,7 @@ dependencies = [ "derive_more", "hexasphere", "serde", - "wgpu", + "wgpu 23.0.1", ] [[package]] @@ -856,7 +925,7 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "226f663401069ded4352ed1472a85bb1f43e2b7305d6a50e53a4f6508168e380" dependencies = [ - "glam", + "glam 0.29.3", ] [[package]] @@ -885,8 +954,8 @@ source = "git+https://github.com/nannou-org/nannou?branch=bevy-refactor#03135771 dependencies = [ "bevy", "bitflags 2.9.0", - "lyon", - "nannou_core", + "lyon 1.0.1", + "nannou_core 0.19.0 (git+https://github.com/nannou-org/nannou?branch=bevy-refactor)", "rayon", "rusttype", "uuid", @@ -965,7 +1034,7 @@ dependencies = [ "disqualified", "downcast-rs", "erased-serde", - "glam", + "glam 0.29.3", "petgraph 0.6.5", "serde", "smallvec", @@ -1018,10 +1087,10 @@ dependencies = [ "downcast-rs", "encase", "futures-lite", - "image", + "image 0.25.6", "js-sys", "ktx2", - "naga", + "naga 23.1.0", "naga_oil", "nonmax", "offset-allocator", @@ -1030,7 +1099,7 @@ dependencies = [ "smallvec", "wasm-bindgen", "web-sys", - "wgpu", + "wgpu 23.0.1", ] [[package]] @@ -1256,7 +1325,7 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1e1e7c6713c04404a3e7cede48a9c47b76c30efc764664ec1246147f6fb9878" dependencies = [ - "android-activity", + "android-activity 0.6.0", "bevy_a11y", "bevy_app", "bevy_ecs", @@ -1264,7 +1333,7 @@ dependencies = [ "bevy_math", "bevy_reflect", "bevy_utils", - "raw-window-handle", + "raw-window-handle 0.6.2", "smol_str", ] @@ -1294,11 +1363,11 @@ dependencies = [ "bytemuck", "cfg-if 1.0.0", "crossbeam-channel", - "raw-window-handle", + "raw-window-handle 0.6.2", "wasm-bindgen", "web-sys", - "wgpu-types", - "winit", + "wgpu-types 23.0.0", + "winit 0.30.9", ] [[package]] @@ -1373,7 +1442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389a099b34312839e16420d499a9cad9650541715937ffbdd40d36f49e77eeb3" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.6", "cc", "cfg-if 1.0.0", "constant_time_eq", @@ -1385,13 +1454,32 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode 2.0.0-pre.2", +] + [[package]] name = "block2" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", ] [[package]] @@ -1451,6 +1539,20 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +[[package]] +name = "calloop" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" +dependencies = [ + "bitflags 1.3.2", + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + [[package]] name = "calloop" version = "0.13.0" @@ -1471,10 +1573,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "calloop", + "calloop 0.13.0", "rustix", "wayland-backend", - "wayland-client", + "wayland-client 0.31.8", ] [[package]] @@ -1557,7 +1659,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.8.6", ] [[package]] @@ -1570,6 +1672,18 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" + [[package]] name = "combine" version = "4.6.7" @@ -1678,6 +1792,19 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + [[package]] name = "core-graphics" version = "0.23.2" @@ -1687,7 +1814,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation 0.9.4", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -1831,7 +1958,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", "scopeguard", ] @@ -1882,7 +2009,7 @@ version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c" dependencies = [ - "nix", + "nix 0.29.0", "windows-sys 0.59.0", ] @@ -1892,6 +2019,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" +[[package]] +name = "d3d12" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" +dependencies = [ + "bitflags 2.9.0", + "libloading 0.8.6", + "winapi", +] + [[package]] name = "dasp_sample" version = "0.11.0" @@ -1904,6 +2042,16 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +[[package]] +name = "deflate" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" +dependencies = [ + "adler32", + "byteorder", +] + [[package]] name = "derive_more" version = "1.0.0" @@ -1954,7 +2102,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.8.6", ] [[package]] @@ -1978,12 +2126,55 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +[[package]] +name = "ecolor" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "egui" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7" +dependencies = [ + "ahash", + "epaint", + "nohash-hasher", +] + +[[package]] +name = "egui-wgpu" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d4c9ab93d9528c184ef1d695c8c99b2e6d50833696ec3f513063efeee0fe77" +dependencies = [ + "bytemuck", + "epaint", + "log", + "thiserror", + "type-map", + "wgpu 0.17.2", +] + [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "emath" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0" +dependencies = [ + "bytemuck", +] + [[package]] name = "encase" version = "0.10.0" @@ -1992,7 +2183,7 @@ checksum = "b0a05902cf601ed11d564128448097b98ebe3c6574bd7b6a653a3d56d54aa020" dependencies = [ "const_panic", "encase_derive", - "glam", + "glam 0.29.3", "thiserror", ] @@ -2016,6 +2207,21 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "epaint" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "nohash-hasher", + "parking_lot", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -2103,6 +2309,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "find_folder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f6d018fb95a0b59f854aed68ecd96ce2b80af7911b92b1fed3c4b1fa516b91b" + [[package]] name = "fixedbitset" version = "0.2.0" @@ -2128,7 +2340,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.7", +] + +[[package]] +name = "float_next_after" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" +dependencies = [ + "num-traits", ] [[package]] @@ -2175,12 +2396,21 @@ checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" dependencies = [ "fontconfig-parser", "log", - "memmap2", + "memmap2 0.9.5", "slotmap", "tinyvec", "ttf-parser 0.20.0", ] +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -2188,7 +2418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -2202,12 +2432,33 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -2215,6 +2466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -2223,6 +2475,17 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + [[package]] name = "futures-io" version = "0.3.31" @@ -2242,6 +2505,47 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "gethostname" version = "0.4.3" @@ -2252,6 +2556,17 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -2277,6 +2592,16 @@ dependencies = [ "wasi 0.14.2+wasi-0.2.4", ] +[[package]] +name = "gif" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +dependencies = [ + "color_quant", + "weezl", +] + [[package]] name = "gilrs" version = "0.11.0" @@ -2303,7 +2628,7 @@ dependencies = [ "libc", "libudev-sys", "log", - "nix", + "nix 0.29.0", "uuid", "vec_map", "wasm-bindgen", @@ -2311,6 +2636,12 @@ dependencies = [ "windows 0.61.1", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + [[package]] name = "gl_generator" version = "0.14.0" @@ -2322,6 +2653,17 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glam" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" +dependencies = [ + "num-traits", + "rand 0.8.5", + "serde", +] + [[package]] name = "glam" version = "0.29.3" @@ -2329,7 +2671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" dependencies = [ "bytemuck", - "rand", + "rand 0.8.5", "serde", ] @@ -2339,6 +2681,18 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +[[package]] +name = "glow" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "glow" version = "0.14.2" @@ -2415,6 +2769,19 @@ dependencies = [ "bitflags 2.9.0", ] +[[package]] +name = "gpu-allocator" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +dependencies = [ + "backtrace", + "log", + "thiserror", + "winapi", + "windows 0.44.0", +] + [[package]] name = "gpu-allocator" version = "0.27.0" @@ -2427,6 +2794,17 @@ dependencies = [ "windows 0.58.0", ] +[[package]] +name = "gpu-descriptor" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +dependencies = [ + "bitflags 2.9.0", + "gpu-descriptor-types 0.1.2", + "hashbrown 0.14.5", +] + [[package]] name = "gpu-descriptor" version = "0.3.1" @@ -2434,10 +2812,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ "bitflags 2.9.0", - "gpu-descriptor-types", + "gpu-descriptor-types 0.2.0", "hashbrown 0.15.2", ] +[[package]] +name = "gpu-descriptor-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +dependencies = [ + "bitflags 2.9.0", +] + [[package]] name = "gpu-descriptor-types" version = "0.2.0" @@ -2489,6 +2876,21 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hassle-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +dependencies = [ + "bitflags 1.3.2", + "com-rs", + "libc", + "libloading 0.7.4", + "thiserror", + "widestring", + "winapi", +] + [[package]] name = "heck" version = "0.5.0" @@ -2524,7 +2926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c9e718d32b6e6b2b32354e1b0367025efdd0b11d6a740b905ddf5db1074679" dependencies = [ "constgebra", - "glam", + "glam 0.29.3", "tinyvec", ] @@ -2558,6 +2960,25 @@ dependencies = [ "cc", ] +[[package]] +name = "image" +version = "0.23.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "gif", + "jpeg-decoder", + "num-iter", + "num-rational", + "num-traits", + "png 0.16.8", + "scoped_threadpool", + "tiff", +] + [[package]] name = "image" version = "0.25.6" @@ -2567,7 +2988,7 @@ dependencies = [ "bytemuck", "byteorder-lite", "num-traits", - "png", + "png 0.17.16", "zune-core", "zune-jpeg", ] @@ -2578,7 +2999,7 @@ version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", ] [[package]] @@ -2627,6 +3048,18 @@ dependencies = [ "libc", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "io-kit-sys" version = "0.4.1" @@ -2695,6 +3128,15 @@ dependencies = [ "libc", ] +[[package]] +name = "jpeg-decoder" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" +dependencies = [ + "rayon", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -2715,6 +3157,17 @@ dependencies = [ "rayon", ] +[[package]] +name = "khronos-egl" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +dependencies = [ + "libc", + "libloading 0.7.4", + "pkg-config", +] + [[package]] name = "khronos-egl" version = "6.0.0" @@ -2722,7 +3175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.6", "pkg-config", ] @@ -2773,6 +3226,16 @@ version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + [[package]] name = "libloading" version = "0.8.6" @@ -2856,14 +3319,34 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "lyon" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf0510ed5e3e2fb80f3db2061ef5ca92d87bfda1a624bb1eacf3bd50226e4cbb" +dependencies = [ + "lyon_algorithms 0.17.7", + "lyon_tessellation 0.17.10", +] + [[package]] name = "lyon" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e7f9cda98b5430809e63ca5197b06c7d191bf7e26dfc467d5a3f0290e2a74f" dependencies = [ - "lyon_algorithms", - "lyon_tessellation", + "lyon_algorithms 1.0.5", + "lyon_tessellation 1.0.15", +] + +[[package]] +name = "lyon_algorithms" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8037f716541ba0d84d3de05c0069f8068baf73990d55980558b84d944c8a244a" +dependencies = [ + "lyon_path 0.17.7", + "sid", ] [[package]] @@ -2872,7 +3355,18 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f13c9be19d257c7d37e70608ed858e8eab4b2afcea2e3c9a622e892acbf43c08" dependencies = [ - "lyon_path", + "lyon_path 1.0.7", + "num-traits", +] + +[[package]] +name = "lyon_geom" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d89ccbdafd83d259403e22061be27bccc3254bba65cdc5303250c4227c8c8e" +dependencies = [ + "arrayvec 0.5.2", + "euclid", "num-traits", ] @@ -2882,29 +3376,48 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8af69edc087272df438b3ee436c4bb6d7c04aa8af665cfd398feae627dbd8570" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "euclid", "num-traits", ] +[[package]] +name = "lyon_path" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0a59fdf767ca0d887aa61d1b48d4bbf6a124c1a45503593f7d38ab945bfbc0" +dependencies = [ + "lyon_geom 0.17.7", +] + [[package]] name = "lyon_path" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0047f508cd7a85ad6bad9518f68cce7b1bf6b943fb71f6da0ee3bc1e8cb75f25" dependencies = [ - "lyon_geom", + "lyon_geom 1.0.6", "num-traits", ] +[[package]] +name = "lyon_tessellation" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7230e08dd0638048e46f387f255dbe7a7344a3e6705beab53242b5af25635760" +dependencies = [ + "float_next_after 0.1.5", + "lyon_path 0.17.7", +] + [[package]] name = "lyon_tessellation" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579d42360a4b09846eff2feef28f538696c7d6c7439bfa65874ff3cbe0951b2c" dependencies = [ - "float_next_after", - "lyon_path", + "float_next_after 1.0.0", + "lyon_path 1.0.7", "num-traits", ] @@ -2947,6 +3460,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + [[package]] name = "memmap2" version = "0.9.5" @@ -2965,6 +3487,30 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" +dependencies = [ + "bitflags 2.9.0", + "block", + "core-graphics-types", + "foreign-types 0.5.0", + "log", + "objc", + "paste", +] + [[package]] name = "metal" version = "0.29.0" @@ -2974,7 +3520,7 @@ dependencies = [ "bitflags 2.9.0", "block", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "log", "objc", "paste", @@ -2986,6 +3532,25 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +dependencies = [ + "adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + [[package]] name = "miniz_oxide" version = "0.8.7" @@ -2996,13 +3561,56 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "naga" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" +dependencies = [ + "bit-set 0.5.3", + "bitflags 2.9.0", + "codespan-reporting", + "hexf-parse", + "indexmap 1.9.3", + "log", + "num-traits", + "rustc-hash", + "spirv 0.2.0+1.5.4", + "termcolor", + "thiserror", + "unicode-xid", +] + [[package]] name = "naga" version = "23.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "bit-set 0.8.0", "bitflags 2.9.0", "cfg_aliases 0.1.1", @@ -3012,7 +3620,7 @@ dependencies = [ "log", "pp-rs", "rustc-hash", - "spirv", + "spirv 0.3.0+sdk-1.3.268.0", "termcolor", "thiserror", "unicode-xid", @@ -3028,7 +3636,7 @@ dependencies = [ "codespan-reporting", "data-encoding", "indexmap 2.9.0", - "naga", + "naga 23.1.0", "once_cell", "regex", "regex-syntax 0.8.5", @@ -3038,14 +3646,68 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "nannou" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e0dfcffabc1b7dd81914a62b2cb467fe20927ee41f13f71e64c2e31b43bfc0" +dependencies = [ + "find_folder", + "futures", + "getrandom 0.2.15", + "image 0.23.14", + "instant", + "lyon 0.17.10", + "nannou_core 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nannou_mesh", + "nannou_wgpu", + "noise", + "notosans", + "num_cpus", + "pennereq", + "rusttype", + "serde", + "serde_derive", + "serde_json", + "tokio", + "toml 0.5.11", + "walkdir", + "wgpu 0.17.2", + "winit 0.28.7", +] + +[[package]] +name = "nannou_core" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00400c2e62775f1e0f08c9f333fd401dbf4231981be2f32214e1995c20658da9" +dependencies = [ + "glam 0.17.3", + "num-traits", + "palette", + "rand 0.8.5", +] + [[package]] name = "nannou_core" version = "0.19.0" source = "git+https://github.com/nannou-org/nannou?branch=bevy-refactor#03135771b41944347a64ef385f299d89dbea45c1" dependencies = [ - "glam", + "glam 0.29.3", "num-traits", - "rand", + "rand 0.8.5", +] + +[[package]] +name = "nannou_egui" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c099ea28367f5372b6d32c61dd7c4e4e6d6d4316146afd74c0318816d9749876" +dependencies = [ + "egui", + "egui-wgpu", + "nannou", + "winit 0.28.7", ] [[package]] @@ -3059,6 +3721,44 @@ dependencies = [ "thiserror", ] +[[package]] +name = "nannou_mesh" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec4e3bd7156bd646dd44f50e687671a1bf4dc970e9448f661bbeec3689ff922" +dependencies = [ + "nannou_core 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", +] + +[[package]] +name = "nannou_wgpu" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a844299c103075b965e869149a564d6e79b00a9cdb158c8b58dcaa79707543e" +dependencies = [ + "futures", + "image 0.23.14", + "instant", + "num_cpus", + "tokio", + "wgpu 0.17.2", +] + +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags 1.3.2", + "jni-sys", + "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" @@ -3069,7 +3769,7 @@ dependencies = [ "jni-sys", "log", "ndk-sys 0.5.0+25.2.9519653", - "num_enum", + "num_enum 0.7.3", "thiserror", ] @@ -3083,8 +3783,8 @@ dependencies = [ "jni-sys", "log", "ndk-sys 0.6.0+11769913", - "num_enum", - "raw-window-handle", + "num_enum 0.7.3", + "raw-window-handle 0.6.2", "thiserror", ] @@ -3094,6 +3794,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + [[package]] name = "ndk-sys" version = "0.5.0+25.2.9519653" @@ -3112,6 +3821,31 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if 1.0.0", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if 1.0.0", + "libc", + "memoffset 0.6.5", +] + [[package]] name = "nix" version = "0.29.0" @@ -3124,6 +3858,23 @@ dependencies = [ "libc", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "noise" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82051dd6745d5184c6efb7bc8be14892a7f6d4f3ad6dbf754d1c7d7d5fe24b43" +dependencies = [ + "image 0.23.14", + "rand 0.7.3", + "rand_xorshift", +] + [[package]] name = "nom" version = "7.1.3" @@ -3140,6 +3891,12 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" +[[package]] +name = "notosans" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "004d578bbfc8a6bdd4690576a8381af234ef051dd4cc358604e1784821e8205c" + [[package]] name = "ntapi" version = "0.4.1" @@ -3170,6 +3927,37 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -3190,13 +3978,55 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + [[package]] name = "num_enum" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.7.3", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] @@ -3205,7 +4035,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", "syn 2.0.100", @@ -3218,22 +4048,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + [[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.3.0-beta.3.patch-leaks.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +dependencies = [ + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", +] + [[package]] name = "objc2" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "objc-sys", - "objc2-encode", + "objc-sys 0.3.5", + "objc2-encode 4.1.0", ] [[package]] @@ -3243,9 +4091,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.9.0", - "block2", + "block2 0.5.1", "libc", - "objc2", + "objc2 0.5.2", "objc2-core-data", "objc2-core-image", "objc2-foundation", @@ -3259,8 +4107,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", "objc2-foundation", ] @@ -3271,8 +4119,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", ] @@ -3283,8 +4131,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", ] @@ -3294,8 +4142,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", "objc2-metal", ] @@ -3306,12 +4154,21 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-contacts", "objc2-foundation", ] +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys 0.2.0-beta.2", +] + [[package]] name = "objc2-encode" version = "4.1.0" @@ -3325,10 +4182,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.9.0", - "block2", + "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", ] [[package]] @@ -3337,8 +4194,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-app-kit", "objc2-foundation", ] @@ -3350,8 +4207,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", ] @@ -3362,8 +4219,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", "objc2-metal", ] @@ -3374,7 +4231,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" dependencies = [ - "objc2", + "objc2 0.5.2", "objc2-foundation", ] @@ -3385,8 +4242,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", "objc2-core-image", @@ -3405,8 +4262,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-foundation", ] @@ -3417,12 +4274,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.9.0", - "block2", - "objc2", + "block2 0.5.1", + "objc2 0.5.2", "objc2-core-location", "objc2-foundation", ] +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + [[package]] name = "oboe" version = "0.6.1" @@ -3504,6 +4379,29 @@ dependencies = [ "ttf-parser 0.25.1", ] +[[package]] +name = "palette" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a05c0334468e62a4dfbda34b29110aa7d70d58c7fdb2c9857b5874dd9827cc59" +dependencies = [ + "approx 0.3.2", + "num-traits", + "palette_derive", + "serde", +] + +[[package]] +name = "palette_derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b4b5f600e60dd3a147fb57b4547033d382d1979eb087af310e91cb45a63b1f4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking" version = "2.2.1" @@ -3539,6 +4437,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pennereq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2174a8f4566f0f8cdce1af08dc29d78fc93880f70962a1e49385831b9550dc8b" +dependencies = [ + "num-traits", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -3593,6 +4500,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "piper" version = "0.2.4" @@ -3610,6 +4523,18 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "png" +version = "0.16.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "deflate", + "miniz_oxide 0.3.7", +] + [[package]] name = "png" version = "0.17.16" @@ -3620,7 +4545,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.8.7", ] [[package]] @@ -3687,13 +4612,23 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + [[package]] name = "proc-macro-crate" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit", + "toml_edit 0.22.24", ] [[package]] @@ -3741,6 +4676,19 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -3748,8 +4696,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] @@ -3759,7 +4717,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -3778,7 +4745,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" +dependencies = [ + "rand_core 0.5.1", ] [[package]] @@ -3793,6 +4778,12 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + [[package]] name = "raw-window-handle" version = "0.6.2" @@ -3835,6 +4826,15 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d463f2884048e7153449a55166f91028d5b0ea53c79377099ce4e8cf0cf9bb" +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -3942,6 +4942,12 @@ dependencies = [ "libusb1-sys", ] +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + [[package]] name = "rustc-hash" version = "1.1.0" @@ -4030,12 +5036,31 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +[[package]] +name = "scoped_threadpool" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" + [[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.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.5.10", + "smithay-client-toolkit 0.16.1", + "tiny-skia 0.8.4", +] + [[package]] name = "sctk-adwaita" version = "0.10.1" @@ -4044,9 +5069,9 @@ checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", - "memmap2", - "smithay-client-toolkit", - "tiny-skia", + "memmap2 0.9.5", + "smithay-client-toolkit 0.19.2", + "tiny-skia 0.11.4", ] [[package]] @@ -4117,6 +5142,24 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "sid" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5ac56c121948b4879bba9e519852c211bcdd8f014efff766441deff0b91bdb" +dependencies = [ + "num-traits", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -4157,6 +5200,25 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +[[package]] +name = "smithay-client-toolkit" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" +dependencies = [ + "bitflags 1.3.2", + "calloop 0.10.6", + "dlib", + "lazy_static", + "log", + "memmap2 0.5.10", + "nix 0.24.3", + "pkg-config", + "wayland-client 0.29.5", + "wayland-cursor 0.29.5", + "wayland-protocols 0.29.5", +] + [[package]] name = "smithay-client-toolkit" version = "0.19.2" @@ -4164,21 +5226,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.9.0", - "calloop", + "calloop 0.13.0", "calloop-wayland-source", "cursor-icon", "libc", "log", - "memmap2", + "memmap2 0.9.5", "rustix", "thiserror", "wayland-backend", - "wayland-client", + "wayland-client 0.31.8", "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols", + "wayland-cursor 0.31.8", + "wayland-protocols 0.32.6", "wayland-protocols-wlr", - "wayland-scanner", + "wayland-scanner 0.31.6", "xkeysym", ] @@ -4191,6 +5253,26 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spirv" +version = "0.2.0+1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +dependencies = [ + "bitflags 1.3.2", + "num-traits", +] + [[package]] name = "spirv" version = "0.3.0+sdk-1.3.268.0" @@ -4297,7 +5379,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.20", "version-compare", ] @@ -4307,7 +5389,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cb893bff0f80ae17d3a57e030622a967b8dbc90e38284d9b4b1442e23873c94" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "grid", "num-traits", "serde", @@ -4359,6 +5441,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tiff" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" +dependencies = [ + "jpeg-decoder", + "miniz_oxide 0.4.4", + "weezl", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4368,6 +5461,20 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tiny-skia" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +dependencies = [ + "arrayref", + "arrayvec 0.7.6", + "bytemuck", + "cfg-if 1.0.0", + "png 0.17.16", + "tiny-skia-path 0.8.4", +] + [[package]] name = "tiny-skia" version = "0.11.4" @@ -4375,11 +5482,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.6", "bytemuck", "cfg-if 1.0.0", "log", - "tiny-skia-path", + "tiny-skia-path 0.11.4", +] + +[[package]] +name = "tiny-skia-path" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", ] [[package]] @@ -4408,6 +5526,44 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio 1.0.3", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml" version = "0.8.20" @@ -4417,7 +5573,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.22.24", ] [[package]] @@ -4429,6 +5585,17 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.9.0", + "toml_datetime", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.24" @@ -4439,7 +5606,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.7.6", ] [[package]] @@ -4536,6 +5703,8 @@ dependencies = [ "bevy", "bevy_nannou", "iyes_perf_ui", + "nannou", + "nannou_egui", "nannou_laser", "serde", "serde_json", @@ -4570,6 +5739,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "type-map" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" +dependencies = [ + "rustc-hash", +] + [[package]] name = "typeid" version = "1.0.3" @@ -4686,6 +5864,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4729,13 +5913,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if 1.0.0", "js-sys", - "once_cell", "wasm-bindgen", "web-sys", ] @@ -4783,7 +5966,23 @@ dependencies = [ "rustix", "scoped-tls", "smallvec", - "wayland-sys", + "wayland-sys 0.31.6", +] + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags 1.3.2", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner 0.29.5", + "wayland-sys 0.29.5", ] [[package]] @@ -4795,7 +5994,19 @@ dependencies = [ "bitflags 2.9.0", "rustix", "wayland-backend", - "wayland-scanner", + "wayland-scanner 0.31.6", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys 0.29.5", ] [[package]] @@ -4809,6 +6020,17 @@ dependencies = [ "wayland-backend", ] +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client 0.29.5", + "xcursor", +] + [[package]] name = "wayland-cursor" version = "0.31.8" @@ -4816,10 +6038,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a93029cbb6650748881a00e4922b076092a6a08c11e7fbdb923f064b23968c5d" dependencies = [ "rustix", - "wayland-client", + "wayland-client 0.31.8", "xcursor", ] +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags 1.3.2", + "wayland-client 0.29.5", + "wayland-commons", + "wayland-scanner 0.29.5", +] + [[package]] name = "wayland-protocols" version = "0.32.6" @@ -4828,8 +6062,8 @@ checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc" dependencies = [ "bitflags 2.9.0", "wayland-backend", - "wayland-client", - "wayland-scanner", + "wayland-client 0.31.8", + "wayland-scanner 0.31.6", ] [[package]] @@ -4840,9 +6074,9 @@ checksum = "7ccaacc76703fefd6763022ac565b590fcade92202492381c95b2edfdf7d46b3" dependencies = [ "bitflags 2.9.0", "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "wayland-client 0.31.8", + "wayland-protocols 0.32.6", + "wayland-scanner 0.31.6", ] [[package]] @@ -4853,9 +6087,20 @@ checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2" dependencies = [ "bitflags 2.9.0", "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-scanner", + "wayland-client 0.31.8", + "wayland-protocols 0.32.6", + "wayland-scanner 0.31.6", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", ] [[package]] @@ -4869,6 +6114,17 @@ dependencies = [ "quote", ] +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + [[package]] name = "wayland-sys" version = "0.31.6" @@ -4882,9 +6138,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4901,28 +6157,81 @@ dependencies = [ ] [[package]] -name = "wgpu" -version = "23.0.1" +name = "weezl" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + +[[package]] +name = "wgpu" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "752e44d3998ef35f71830dd1ad3da513e628e2e4d4aedb0ab580f850827a0b41" dependencies = [ - "arrayvec", - "cfg_aliases 0.1.1", - "document-features", + "arrayvec 0.7.6", + "cfg-if 1.0.0", "js-sys", "log", - "naga", + "naga 0.13.0", "parking_lot", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.2", "smallvec", "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "wgpu-core 0.17.1", + "wgpu-hal 0.17.2", + "wgpu-types 0.17.0", +] + +[[package]] +name = "wgpu" +version = "23.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +dependencies = [ + "arrayvec 0.7.6", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "naga 23.1.0", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 23.0.1", + "wgpu-hal 23.0.1", + "wgpu-types 23.0.0", +] + +[[package]] +name = "wgpu-core" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8a44dd301a30ceeed3c27d8c0090433d3da04d7b2a4042738095a424d12ae7" +dependencies = [ + "arrayvec 0.7.6", + "bit-vec 0.6.3", + "bitflags 2.9.0", + "codespan-reporting", + "log", + "naga 0.13.0", + "parking_lot", + "profiling", + "raw-window-handle 0.5.2", + "rustc-hash", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal 0.17.2", + "wgpu-types 0.17.0", ] [[package]] @@ -4931,23 +6240,64 @@ version = "23.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "bit-vec 0.8.0", "bitflags 2.9.0", "cfg_aliases 0.1.1", "document-features", "indexmap 2.9.0", "log", - "naga", + "naga 23.1.0", "once_cell", "parking_lot", "profiling", - "raw-window-handle", + "raw-window-handle 0.6.2", "rustc-hash", "smallvec", "thiserror", - "wgpu-hal", - "wgpu-types", + "wgpu-hal 23.0.1", + "wgpu-types 23.0.0", +] + +[[package]] +name = "wgpu-hal" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a80bf0e3c77399bb52850cb0830af9bad073d5cfcb9dd8253bef8125c42db17" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.6", + "ash 0.37.3+1.3.251", + "bit-set 0.5.3", + "bitflags 2.9.0", + "block", + "core-graphics-types", + "d3d12", + "glow 0.12.3", + "gpu-alloc", + "gpu-allocator 0.22.0", + "gpu-descriptor 0.2.4", + "hassle-rs", + "js-sys", + "khronos-egl 4.1.0", + "libc", + "libloading 0.8.6", + "log", + "metal 0.26.0", + "naga 0.13.0", + "objc", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.5.2", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 0.17.0", + "winapi", ] [[package]] @@ -4957,44 +6307,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" dependencies = [ "android_system_properties", - "arrayvec", - "ash", + "arrayvec 0.7.6", + "ash 0.38.0+1.3.281", "bit-set 0.8.0", "bitflags 2.9.0", "block", "bytemuck", "cfg_aliases 0.1.1", "core-graphics-types", - "glow", + "glow 0.14.2", "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", + "gpu-allocator 0.27.0", + "gpu-descriptor 0.3.1", "js-sys", - "khronos-egl", + "khronos-egl 6.0.0", "libc", - "libloading", + "libloading 0.8.6", "log", - "metal", - "naga", + "metal 0.29.0", + "naga 23.1.0", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.6.2", "renderdoc-sys", "rustc-hash", "smallvec", "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types", + "wgpu-types 23.0.0", "windows 0.58.0", "windows-core 0.58.0", ] +[[package]] +name = "wgpu-types" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" +dependencies = [ + "bitflags 2.9.0", + "js-sys", + "web-sys", +] + [[package]] name = "wgpu-types" version = "23.0.0" @@ -5006,6 +6367,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "widestring" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" + [[package]] name = "winapi" version = "0.3.9" @@ -5037,6 +6404,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows" version = "0.54.0" @@ -5284,6 +6660,15 @@ dependencies = [ "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -5480,6 +6865,41 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winit" +version = "0.28.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9596d90b45384f5281384ab204224876e8e8bf7d58366d9b795ad99aa9894b94" +dependencies = [ + "android-activity 0.4.3", + "bitflags 1.3.2", + "cfg_aliases 0.1.1", + "core-foundation 0.9.4", + "core-graphics 0.22.3", + "dispatch", + "instant", + "libc", + "log", + "mio 0.8.11", + "ndk 0.7.0", + "objc2 0.3.0-beta.3.patch-leaks.3", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.5.2", + "redox_syscall 0.3.5", + "sctk-adwaita 0.5.4", + "smithay-client-toolkit 0.16.1", + "wasm-bindgen", + "wayland-client 0.29.5", + "wayland-commons", + "wayland-protocols 0.29.5", + "wayland-scanner 0.29.5", + "web-sys", + "windows-sys 0.45.0", + "x11-dl", +] + [[package]] name = "winit" version = "0.30.9" @@ -5487,42 +6907,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a809eacf18c8eca8b6635091543f02a5a06ddf3dad846398795460e6e0ae3cc0" dependencies = [ "ahash", - "android-activity", + "android-activity 0.6.0", "atomic-waker", "bitflags 2.9.0", - "block2", + "block2 0.5.1", "bytemuck", - "calloop", + "calloop 0.13.0", "cfg_aliases 0.2.1", "concurrent-queue", "core-foundation 0.9.4", - "core-graphics", + "core-graphics 0.23.2", "cursor-icon", "dpi", "js-sys", "libc", - "memmap2", + "memmap2 0.9.5", "ndk 0.9.0", - "objc2", + "objc2 0.5.2", "objc2-app-kit", "objc2-foundation", "objc2-ui-kit", "orbclient", "percent-encoding", "pin-project", - "raw-window-handle", + "raw-window-handle 0.6.2", "redox_syscall 0.4.1", "rustix", - "sctk-adwaita", - "smithay-client-toolkit", + "sctk-adwaita 0.10.1", + "smithay-client-toolkit 0.19.2", "smol_str", "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", - "wayland-client", - "wayland-protocols", + "wayland-client 0.31.8", + "wayland-protocols 0.32.6", "wayland-protocols-plasma", "web-sys", "web-time", @@ -5532,6 +6952,15 @@ dependencies = [ "xkbcommon-dl", ] +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "0.7.6" @@ -5570,7 +6999,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading", + "libloading 0.8.6", "once_cell", "rustix", "x11rb-protocol", diff --git a/Cargo.toml b/Cargo.toml index 19b6810..ea9d5e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,12 +7,17 @@ edition = "2024" bevy = "0.15.3" bevy_nannou = { git = "https://github.com/nannou-org/nannou", branch = "bevy-refactor", version = "0.1.0", features = ["wayland"] } iyes_perf_ui = "0.4.0" + nannou_laser = { git = "https://github.com/seem-less/nannou", branch = "helios_laser_DAC" } serde = "1.0.219" serde_json = "1.0.140" zmq = "0.10.0" +[dev-dependencies] +nannou = "0.19.0" +nannou_egui = { version = "0.19.0", features = ["wayland"] } + # Enable max optimizations for dependencies, but not for our code: # (tip from bevy examples for fast compilation/performance trade-off) @@ -21,4 +26,4 @@ opt-level = 3 [[bin]] name="renderer" -path="src/main.rs" \ No newline at end of file +path="src/main.rs" diff --git a/examples/laser_frame_stream_gui.rs b/examples/laser_frame_stream_gui.rs new file mode 100644 index 0000000..8dcd35f --- /dev/null +++ b/examples/laser_frame_stream_gui.rs @@ -0,0 +1,581 @@ +//! From https://github.com/seem-less/nannou/blob/helios_laser_DAC/examples/laser/laser_frame_stream_gui.rs +//! A clone of the `laser_frame_stream.rs` example that allows for configuring laser settings via a +//! UI. + +use nannou::geom::Rect; +use nannou::prelude::*; +use nannou_egui::{self, egui, Egui}; +use nannou_laser as laser; +use std::sync::{mpsc, Arc}; + +fn main() { + nannou::app(model).update(update).run(); +} + +struct Model { + // A handle to the laser API used for spawning streams and detecting DACs. + laser_api: Arc, + // All of the live stream handles. + laser_streams: Vec>, + // A copy of the state that will live on the laser thread so we can present a GUI. + laser_model: Laser, + // A copy of the laser settings so that we can control them with the GUI. + laser_settings: LaserSettings, + // For receiving newly detected DACs. + dac_rx: mpsc::Receiver, + // The UI for control over laser parameters and settings. + egui: Egui, +} + +#[derive(Clone)] +struct Laser { + draw_mode: DrawMode, + scale: f32, + color_profile: RgbProfile, + point_weight: u32, + test_pattern: TestPattern, +} + +struct LaserSettings { + point_hz: u32, + latency_points: u32, + frame_hz: u32, + enable_optimisations: bool, + distance_per_point: f32, + blank_delay_points: u32, + radians_per_point: f32, +} + +#[derive(Clone, Copy)] +struct RgbProfile { + rgb: [f32; 3], +} + +#[derive(Clone, Copy, PartialEq)] +enum DrawMode { + Lines, + Points, +} + +// A collection of laser test patterns. We'll toggle between these with the numeric keys. +#[derive(Copy, Clone)] +pub enum TestPattern { + // A rectangle that outlines the laser's entire field of projection. + Rectangle, + // A triangle in the centre of the projection field. + Triangle, + // A crosshair in the centre of the projection field that reaches the edges. + Crosshair, + // Three vertical lines. One to the far left, one in the centre and one on the right. + ThreeVerticalLines, + // A circle whose diameter reaches the edges of the projection field. + Circle, + // A spiral that starts from the centre and revolves out towards the edge of the field. + Spiral, +} + +impl Default for Laser { + fn default() -> Self { + Laser { + draw_mode: DrawMode::Lines, + scale: 1.0, + point_weight: laser::Point::DEFAULT_LINE_POINT_WEIGHT, + test_pattern: TestPattern::Rectangle, + color_profile: Default::default(), + } + } +} + +impl Default for LaserSettings { + fn default() -> Self { + use laser::stream; + use laser::stream::frame::InterpolationConfig; + LaserSettings { + point_hz: stream::DEFAULT_POINT_HZ, + latency_points: stream::points_per_frame( + stream::DEFAULT_POINT_HZ, + stream::DEFAULT_FRAME_HZ, + ), + frame_hz: stream::DEFAULT_FRAME_HZ, + enable_optimisations: true, + distance_per_point: InterpolationConfig::DEFAULT_DISTANCE_PER_POINT, + blank_delay_points: InterpolationConfig::DEFAULT_BLANK_DELAY_POINTS, + radians_per_point: InterpolationConfig::DEFAULT_RADIANS_PER_POINT, + } + } +} + +impl Default for RgbProfile { + fn default() -> Self { + RgbProfile { rgb: [1.0; 3] } + } +} + +fn model(app: &App) -> Model { + // Create a window to receive keyboard events. + let w_id = app + .new_window() + .size(312, 530) + .key_pressed(key_pressed) + .raw_event(raw_window_event) + .view(view) + .build() + .unwrap(); + + // Initialise the state that we want to live on the laser thread and spawn the stream. + let laser_settings = LaserSettings::default(); + let laser_model = Laser::default(); + + // TODO Implement `Clone` for `Api` so that we don't have to `Arc` it. + let laser_api = Arc::new(laser::Api::new()); + + // A channel for receiving newly detected DACs. + let (dac_tx, dac_rx) = mpsc::channel(); + + // Spawn a thread for detecting the DACs. + let laser_api2 = laser_api.clone(); + std::thread::spawn(move || { + let mut detected = std::collections::HashSet::new(); + + // detect Helios DACs first since they can't be detected while simultaneously sending data to them + for res in laser_api2.detect_dacs(laser::DacVariant::DacVariantHelios) { + if let laser::DetectDacs::Helios { previous_dac } = res { + if !detected.insert(laser::DetectedDac::from(previous_dac).id()) { + break; + } + } + } + for detected_helios in &detected { + if let laser::dac_manager::Id::Helios { id } = *detected_helios { + let dac: laser::helios_dac::NativeHeliosDacParams = id.into(); + println!("{:#?}", dac); + if dac_tx.send(dac.into()).is_err() { + break; + } + } + } + + // for Etherdream DAC + for res in laser_api2 + .detect_dacs(laser::DacVariant::DacVariantEtherdream) + .expect("failed to start detecting Etherdream DACs") + { + let dac = res.expect("error occurred during DAC detection"); + if detected.insert(dac.id()) { + println!("{:#?}", dac); + if dac_tx.send(dac).is_err() { + break; + } + } + } + }); + + // We'll use a `Vec` to collect laser streams as they appear. + let laser_streams = vec![]; + + // A user-interface to tweak the settings. + let window = app.window(w_id).unwrap(); + let egui = Egui::from_window(&window); + // egui.ctx().set_fonts(fonts()); + egui.ctx().set_style(style()); + + Model { + laser_api, + laser_settings, + laser_model, + laser_streams, + dac_rx, + egui, + } +} + +// Draw lines or points based on the `DrawMode`. +fn add_points(points: I, mode: DrawMode, scale: f32, frame: &mut laser::Frame) +where + I: IntoIterator, + I::Item: AsRef, +{ + let points = points.into_iter().map(|p| { + let mut p = p.as_ref().clone(); + p.position[0] *= scale; + p.position[1] *= scale; + p + }); + match mode { + DrawMode::Lines => frame.add_lines(points), + DrawMode::Points => frame.add_points(points), + } +} + +fn laser(laser: &mut Laser, frame: &mut laser::Frame) { + // Simple constructor for a lit point. + let color = laser.color_profile.rgb; + let weight = laser.point_weight; + let lit_p = |position| laser::Point { + position, + color, + weight, + }; + + // Retrieve some points to draw based on the pattern. + match laser.test_pattern { + TestPattern::Rectangle => { + let tl = [-1.0, 1.0]; + let tr = [1.0, 1.0]; + let br = [1.0, -1.0]; + let bl = [-1.0, -1.0]; + let positions = [tl, tr, br, bl, tl]; + let points = positions.iter().cloned().map(lit_p); + add_points(points, laser.draw_mode, laser.scale, frame); + } + + TestPattern::Triangle => { + let a = [-0.75, -0.75]; + let b = [0.0, 0.75]; + let c = [0.75, -0.75]; + let positions = [a, b, c, a]; + let points = positions.iter().cloned().map(lit_p); + add_points(points, laser.draw_mode, laser.scale, frame); + } + + TestPattern::Crosshair => { + let xa = [-1.0, 0.0]; + let xb = [1.0, 0.0]; + let ya = [0.0, -1.0]; + let yb = [0.0, 1.0]; + let x = [lit_p(xa), lit_p(xb)]; + let y = [lit_p(ya), lit_p(yb)]; + add_points(&x, laser.draw_mode, laser.scale, frame); + add_points(&y, laser.draw_mode, laser.scale, frame); + } + + TestPattern::ThreeVerticalLines => { + let la = [-1.0, -0.5]; + let lb = [-1.0, 0.5]; + let ma = [0.0, 0.5]; + let mb = [0.0, -0.5]; + let ra = [1.0, -0.5]; + let rb = [1.0, 0.5]; + let l = [lit_p(la), lit_p(lb)]; + let m = [lit_p(ma), lit_p(mb)]; + let r = [lit_p(ra), lit_p(rb)]; + add_points(&l, laser.draw_mode, laser.scale, frame); + add_points(&m, laser.draw_mode, laser.scale, frame); + add_points(&r, laser.draw_mode, laser.scale, frame); + } + + TestPattern::Circle => { + let n_points = frame.points_per_frame() as usize / 4; + let rect = Rect::from_w_h(2.0, 2.0); + let ellipse: Vec<_> = geom::ellipse::Circumference::new(rect, n_points as f32) + .map(|[x, y]| lit_p([x, y])) + .collect(); + add_points(&ellipse, laser.draw_mode, laser.scale, frame); + } + + TestPattern::Spiral => { + let n_points = frame.points_per_frame() as usize / 2; + let radius = 1.0; + let rings = 5.0; + let points = (0..n_points) + .map(|i| { + let fract = i as f32 / n_points as f32; + let mag = fract * radius; + let phase = rings * fract * 2.0 * std::f32::consts::PI; + let y = mag * -phase.sin(); + let x = mag * phase.cos(); + [x, y] + }) + .map(lit_p) + .collect::>(); + add_points(&points, laser.draw_mode, laser.scale, frame); + } + } +} + +fn raw_window_event(_app: &App, model: &mut Model, event: &nannou::winit::event::WindowEvent) { + model.egui.handle_raw_event(event); +} + +fn update(_app: &App, model: &mut Model, update: Update) { + // First, check for new laser DACs. + for dac in model.dac_rx.try_recv() { + println!("Detected DAC {:?}!", dac.id()); + let stream = model + .laser_api + .new_frame_stream(model.laser_model.clone(), laser) + .detected_dac(dac) + .build() + .expect("failed to establish stream with newly detected DAC"); + model.laser_streams.push(stream); + } + + // Check if any streams have dropped out (e.g network issues, DAC turned off) and attempt to + // start them again. + let mut dropped = vec![]; + for (i, stream) in model.laser_streams.iter().enumerate() { + if stream.is_closed() { + dropped.push(i); + } + } + for i in dropped.into_iter().rev() { + let stream = model.laser_streams.remove(i); + let dac = stream + .dac() + .expect("`dac` returned `None` even though one was specified during stream creation"); + let res = stream + .close() + .expect("stream was unexpectedly already closed from another stream handle") + .expect("failed to join stream thread"); + if let Err(err) = res { + eprintln!("Stream closed due to an error: {}", err); + } + println!("attempting to restart stream with DAC {:?}", dac.id()); + match model + .laser_api + .new_frame_stream(model.laser_model.clone(), laser) + .detected_dac(dac) + .build() + { + Err(err) => eprintln!("failed to restart stream: {}", err), + Ok(stream) => model.laser_streams.push(stream), + } + } + + // Update the GUI. + let Model { + ref mut egui, + ref laser_streams, + ref mut laser_model, + ref mut laser_settings, + .. + } = *model; + + egui.set_elapsed_time(update.since_start); + let ctx = egui.begin_frame(); + + // The timeline area. + egui::containers::CentralPanel::default().show(&ctx, |ui| { + fn grid_min_col_width(ui: &egui::Ui, n_options: usize) -> f32 { + let gap_space = ui.spacing().item_spacing.x * (n_options as f32 - 1.0); + let grid_w = ui.available_width(); + (grid_w - gap_space) / n_options as f32 + } + + ui.heading("Laser Points"); + + let col_w = grid_min_col_width(ui, 2); + egui::Grid::new("Mode") + .min_col_width(col_w) + .max_col_width(col_w) + .show(ui, |ui| { + use DrawMode::{Lines, Points}; + let mut changed = false; + ui.vertical_centered_justified(|ui| { + changed |= ui + .selectable_value(&mut laser_model.draw_mode, Lines, "LINES") + .changed(); + }); + ui.vertical_centered_justified(|ui| { + changed |= ui + .selectable_value(&mut laser_model.draw_mode, Points, "POINTS") + .changed(); + }); + if changed { + let mode = laser_model.draw_mode; + for stream in laser_streams { + stream.send(move |laser| laser.draw_mode = mode).ok(); + } + } + }); + + if ui + .add(egui::Slider::new(&mut laser_model.scale, 0.0..=1.0).text("Scale")) + .changed() + { + let scale = laser_model.scale; + for stream in laser_streams { + stream.send(move |laser| laser.scale = scale).ok(); + } + } + if ui + .add(egui::Slider::new(&mut laser_model.point_weight, 0..=128).text("Point Weight")) + .changed() + { + let scale = laser_model.scale; + for stream in laser_streams { + stream.send(move |laser| laser.scale = scale).ok(); + } + } + + ui.separator(); + + ui.heading("Laser Settings"); + + if ui + .add(egui::Slider::new(&mut laser_settings.point_hz, 1_000..=10_000).text("DAC PPS")) + .changed() + { + let hz = laser_settings.point_hz; + for stream in laser_streams { + stream.set_point_hz(hz).ok(); + } + } + if ui + .add(egui::Slider::new(&mut laser_settings.latency_points, 10..=1_500).text("Latency")) + .changed() + { + let latency = laser_settings.latency_points; + for stream in laser_streams { + stream.set_latency_points(latency).ok(); + } + } + if ui + .add(egui::Slider::new(&mut laser_settings.frame_hz, 1..=120).text("Target FPS")) + .changed() + { + let hz = laser_settings.frame_hz; + for stream in laser_streams { + stream.set_frame_hz(hz).ok(); + } + } + + ui.separator(); + + ui.heading("Laser Path Interpolation"); + + if ui + .checkbox(&mut laser_settings.enable_optimisations, "Optimize Path") + .changed() + { + for stream in laser_streams { + stream + .enable_optimisations(laser_settings.enable_optimisations) + .ok(); + } + } + if ui + .add( + egui::Slider::new(&mut laser_settings.distance_per_point, 0.01..=1.0) + .text("Distance Per Point"), + ) + .changed() + { + let distance = laser_settings.distance_per_point; + for stream in laser_streams { + stream.set_distance_per_point(distance).ok(); + } + } + if ui + .add( + egui::Slider::new(&mut laser_settings.blank_delay_points, 0..=32) + .text("Blank Delay (Points)"), + ) + .changed() + { + let delay = laser_settings.blank_delay_points; + for stream in laser_streams { + stream.set_blank_delay_points(delay).ok(); + } + } + let mut degrees = rad_to_deg(laser_settings.radians_per_point); + if ui + .add(egui::Slider::new(&mut degrees, 1.0..=180.0).text("Degrees Per Point")) + .changed() + { + let radians = deg_to_rad(degrees); + laser_settings.radians_per_point = radians; + for stream in laser_streams { + stream.set_radians_per_point(radians).ok(); + } + } + + ui.separator(); + + ui.heading("Color Profile"); + + if ui + .color_edit_button_rgb(&mut laser_model.color_profile.rgb) + .changed() + { + let rgb = laser_model.color_profile.rgb; + for stream in laser_streams { + stream.send(move |model| model.color_profile.rgb = rgb).ok(); + } + } + }); +} + +fn key_pressed(_app: &App, model: &mut Model, key: Key) { + // Send a new pattern to the laser on keys 1, 2, 3 and 4. + let new_pattern = match key { + Key::Key1 => TestPattern::Rectangle, + Key::Key2 => TestPattern::Triangle, + Key::Key3 => TestPattern::Crosshair, + Key::Key4 => TestPattern::ThreeVerticalLines, + Key::Key5 => TestPattern::Circle, + Key::Key6 => TestPattern::Spiral, + _ => return, + }; + for stream in &model.laser_streams { + stream + .send(move |laser| laser.test_pattern = new_pattern) + .ok(); + } +} + +fn view(_app: &App, model: &Model, frame: Frame) { + model.egui.draw_to_frame(&frame).unwrap(); +} + +// The following functions are some custom styling preferences in an attempt to improve on the +// default egui theming. + +// fn fonts() -> egui::FontDefinitions { +// let mut fonts = egui::FontDefinitions::default(); +// let entries = [ +// ( +// egui::TextStyle::Small, +// (egui::FontFamily::Proportional, 13.0), +// ), +// ( +// egui::TextStyle::Body, +// (egui::FontFamily::Proportional, 16.0), +// ), +// ( +// egui::TextStyle::Button, +// (egui::FontFamily::Proportional, 16.0), +// ), +// ( +// egui::TextStyle::Heading, +// (egui::FontFamily::Proportional, 20.0), +// ), +// ( +// egui::TextStyle::Monospace, +// (egui::FontFamily::Monospace, 14.0), +// ), +// ]; +// fonts.families.extend(entries.iter().cloned()); +// fonts +// } + +fn style() -> egui::Style { + let mut style = egui::Style::default(); + style.spacing = egui::style::Spacing { + item_spacing: egui::Vec2::splat(8.0), + // window_margin: egui::Vec2::new(6.0, 6.0), + button_padding: egui::Vec2::new(4.0, 2.0), + interact_size: egui::Vec2::new(56.0, 24.0), + indent: 10.0, + icon_width: 20.0, + icon_spacing: 1.0, + ..style.spacing + }; + style.visuals.widgets.inactive.fg_stroke.color = egui::Color32::WHITE; + style.visuals.extreme_bg_color = egui::Color32::from_gray(12); + style.visuals.faint_bg_color = egui::Color32::from_gray(24); + style.visuals.widgets.noninteractive.bg_fill = egui::Color32::from_gray(36); + style.visuals.widgets.noninteractive.bg_stroke.color = egui::Color32::BLACK; + style.visuals.widgets.noninteractive.fg_stroke.color = egui::Color32::WHITE; + style +} diff --git a/src/main.rs b/src/main.rs index acd72c1..1f8e135 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,9 +7,12 @@ use bevy_nannou::prelude::*; use bevy_nannou::NannouPlugin; use iyes_perf_ui::prelude::*; use nannou_laser::point::Rgb; +use nannou_laser::DacVariant; +use nannou_laser::DetectedDacError; use trap::laser::apply_homography_matrix; use trap::laser::python_cv_h_into_mat3; use trap::laser::TMP_PYTHON_LASER_H; +use trap::laser::TMP_PYTHON_LASER_H_FOR_NANNOU; use trap::shapes::PositionAndIntensity; use trap::tracks::LaserPoints; use trap::tracks::RenderableLines; @@ -84,9 +87,17 @@ fn setup_laser(mut commands: Commands) { // Initialise the state that we want to live on the laser thread and spawn the stream. let laser_model = LaserModel::new(); let _laser_api = laser::Api::new(); - // dacs = _laser_api.detect_dacs() + // let detected_dacs = _laser_api.detect_dacs(DacVariant::DacVariantHelios); + + // while let Ok(res) = detected_dacs { + // if let laser::DetectDacs::Helios { previous_dac } = res { + // info!("DACS: {:?}", previous_dac); + // } + // } + let laser_stream = _laser_api .new_frame_stream(laser_model, laser_frame_producer) + // .detected_dac(dac) .build() .unwrap(); @@ -134,6 +145,7 @@ fn text2points(position_and_intensity: PositionAndIntensity) -> laser::Point{ // } const LASER_H: Mat3 = python_cv_h_into_mat3(TMP_PYTHON_LASER_H); +// const LASER_H: Mat3 = python_cv_h_into_mat3(TMP_PYTHON_LASER_H_FOR_NANNOU); fn laser_frame_producer(model: &mut LaserModel, frame: &mut laser::Frame){ @@ -145,21 +157,14 @@ fn laser_frame_producer(model: &mut LaserModel, frame: &mut laser::Frame){ // false => trap::shapes::ARE_YOU_SURE, // }; - // let points = positions.iter().cloned().map(text2points); let points = model.current_points.clone(); - // let laser_cv_h: [[f32;3]; 3] = [[ 2.47442963e+02, -7.01714050e+01, -9.71749119e+01], - // [ 1.02328119e+01, 1.47185254e+02, 1.96295638e+02], - // [-1.20921986e-03, -3.32735973e-02, 1.00000000e+00]]; - - let mut new_points = Vec::new(); for point in points.into_iter() { let p = point.position; let new_position = apply_homography_matrix(LASER_H, &p); - // let new_position = laser_h.mul_vec3(v); - // TODO: current matrix is shifted by 0xFFF/2 and scaled by 0xFFF/2 - let s = 0xFFF as f32; + // let s = 1.; // when using TMP_PYTHON_LASER_H_FOR_NANNOU -- doesn't work? + let s = 0xFFF as f32; // when using TMP_PYTHON_LASER_H let new_point = laser::Point { position: [new_position[0]/s, new_position[1]/s], @@ -168,11 +173,8 @@ fn laser_frame_producer(model: &mut LaserModel, frame: &mut laser::Frame){ new_points.push(new_point); } - // let mut src_points: Vector = Vector::new(); - // let mut dst_points: Vector = Vector::new(); - // let homography_transform_matrix = Mat::new(); - println!("Points {}", new_points.len()); - println!("{:?}", new_points); + info!("Points {}", new_points.len()); + // println!("{:?}", new_points); frame.add_lines(new_points); } @@ -197,7 +199,7 @@ struct LaserTimer { fn exit_system(keys: Res>, mut exit: EventWriter) { if keys.just_pressed(KeyCode::KeyQ) { - println!("Sending exit command"); + info!("Sending exit command"); exit.send(AppExit::Success); } } @@ -210,10 +212,9 @@ fn update( tracks: Query<(&Track, &SpawnedTime)>, time: Res