diff --git a/Cargo.lock b/Cargo.lock index 28aa96f..c90c800 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,7 +452,7 @@ name = "backer" version = "0.11.1" dependencies = [ "eframe", - "egui", + "egui 0.31.1", "egui_extras", "insta", "macroquad", @@ -965,10 +965,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e6b451ff1143f6de0f33fc7f1b68fecfd2c7de06e104de96c4514de3f5396f8" dependencies = [ "bytemuck", - "emath", + "emath 0.28.1", "serde", ] +[[package]] +name = "ecolor" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc4feb366740ded31a004a0e4452fbf84e80ef432ecf8314c485210229672fd1" +dependencies = [ + "emath 0.31.1", +] + [[package]] name = "eframe" version = "0.28.1" @@ -978,7 +987,7 @@ dependencies = [ "ahash", "bytemuck", "document-features", - "egui", + "egui 0.28.1", "egui-wgpu", "egui-winit", "egui_glow", @@ -1012,13 +1021,27 @@ checksum = "20c97e70a2768de630f161bb5392cbd3874fcf72868f14df0e002e82e06cb798" dependencies = [ "accesskit", "ahash", - "emath", - "epaint", + "emath 0.28.1", + "epaint 0.28.1", "log", "nohash-hasher", "serde", ] +[[package]] +name = "egui" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd34cec49ab55d85ebf70139cb1ccd29c977ef6b6ba4fe85489d6877ee9ef3" +dependencies = [ + "ahash", + "bitflags 2.6.0", + "emath 0.31.1", + "epaint 0.31.1", + "nohash-hasher", + "profiling", +] + [[package]] name = "egui-wgpu" version = "0.28.1" @@ -1028,8 +1051,8 @@ dependencies = [ "ahash", "bytemuck", "document-features", - "egui", - "epaint", + "egui 0.28.1", + "epaint 0.28.1", "log", "thiserror 1.0.63", "type-map", @@ -1047,7 +1070,7 @@ dependencies = [ "accesskit_winit", "ahash", "arboard", - "egui", + "egui 0.28.1", "log", "raw-window-handle 0.6.2", "smithay-clipboard", @@ -1063,7 +1086,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bb783d9fa348f69ed5c340aa25af78b5472043090e8b809040e30960cc2a746" dependencies = [ "ahash", - "egui", + "egui 0.28.1", "enum-map", "image 0.25.2", "log", @@ -1079,7 +1102,7 @@ checksum = "4e2bdc8b38cfa17cc712c4ae079e30c71c00cd4c2763c9e16dc7860a02769103" dependencies = [ "ahash", "bytemuck", - "egui", + "egui 0.28.1", "glow", "log", "memoffset 0.9.1", @@ -1098,6 +1121,12 @@ dependencies = [ "serde", ] +[[package]] +name = "emath" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e4cadcff7a5353ba72b7fea76bf2122b5ebdbc68e8155aa56dfdea90083fe1b" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -1166,14 +1195,36 @@ dependencies = [ "ab_glyph", "ahash", "bytemuck", - "ecolor", - "emath", + "ecolor 0.28.1", + "emath 0.28.1", "log", "nohash-hasher", "parking_lot", "serde", ] +[[package]] +name = "epaint" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fcc0f5a7c613afd2dee5e4b30c3e6acafb8ad6f0edb06068811f708a67c562" +dependencies = [ + "ab_glyph", + "ahash", + "ecolor 0.31.1", + "emath 0.31.1", + "epaint_default_fonts", + "nohash-hasher", + "parking_lot", + "profiling", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7e7a64c02cf7a5b51e745a9e45f60660a286f151c238b9d397b3e923f5082f" + [[package]] name = "equivalent" version = "1.0.1" @@ -1268,14 +1319,20 @@ dependencies = [ "miniz_oxide 0.8.0", ] +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "fontdue" -version = "0.7.3" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0793f5137567643cf65ea42043a538804ff0fbf288649e2141442b602d81f9bc" +checksum = "2e57e16b3fe8ff4364c0661fdaac543fb38b29ea9bc9c2f45612d90adf931d2b" dependencies = [ - "hashbrown 0.13.2", - "ttf-parser 0.15.2", + "hashbrown 0.15.2", + "ttf-parser 0.21.1", ] [[package]] @@ -1567,21 +1624,23 @@ checksum = "98f494b2060b2a8f5e63379e1e487258e014cee1b1725a735816c0107a2e9d93" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "allocator-api2", ] [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -1863,9 +1922,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "macroquad" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fef16b2d4de22ac372b5d7d76273c0ead0a31f9de9bc649af8f816816db8a8" +checksum = "d2befbae373456143ef55aa93a73594d080adfb111dc32ec96a1123a3e4ff4ae" dependencies = [ "fontdue", "glam", @@ -1873,7 +1932,6 @@ dependencies = [ "macroquad_macro", "miniquad", "quad-rand", - "slotmap", ] [[package]] @@ -1957,13 +2015,13 @@ dependencies = [ [[package]] name = "miniquad" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2124e5e6bab86d96f263d78dc763c29e0da4c4f7ff0e1bb33f1d3905d1121262" +checksum = "2fb3e758e46dbc45716a8a49ca9edc54b15bcca826277e80b1f690708f67f9e3" dependencies = [ "libc", "ndk-sys 0.2.2", - "objc", + "objc-rs", "winapi", ] @@ -2101,6 +2159,15 @@ dependencies = [ "malloc_buf", ] +[[package]] +name = "objc-rs" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a1e7069a2525126bf12a9f1f7916835fafade384fb27cabf698e745e2a1eb8" +dependencies = [ + "malloc_buf", +] + [[package]] name = "objc-sys" version = "0.2.0-beta.2" @@ -2455,9 +2522,9 @@ dependencies = [ [[package]] name = "profiling" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" [[package]] name = "public-api" @@ -2474,9 +2541,9 @@ dependencies = [ [[package]] name = "quad-rand" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658fa1faf7a4cc5f057c9ee5ef560f717ad9d8dc66d975267f709624d6e1ab88" +checksum = "5a651516ddc9168ebd67b24afd085a718be02f8858fe406591b013d101ce2f40" [[package]] name = "quick-xml" @@ -3132,9 +3199,9 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.15.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" [[package]] name = "ttf-parser" diff --git a/Cargo.toml b/Cargo.toml index 54392b4..2341a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ crate-type = ["lib"] [features] default = [] test-api = [] +examples = ["macroquad-examples", "egui-examples"] macroquad-examples = ["macroquad"] egui-examples = ["egui", "eframe", "egui_extras"] @@ -43,8 +44,8 @@ rustup-toolchain = "0.1.9" [dependencies] # Example dependencies - dev dependencies can't currently be optional, # but examples are behind the examples features -macroquad = { version = "0.4.13", optional = true } -egui = { version = "0.28.1", optional = true } +macroquad = { version = "0.4.14", optional = true } +egui = { version = "0.31.1", optional = true } eframe = { version = "0.28.1", optional = true } egui_extras = { version = "0.28.1", features = [ "default", diff --git a/README.md b/README.md index 72c491b..50fef1f 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,6 @@ The crate is currently usable but new! Breaking changes may be relatively freque > If your PR changes the public API, one of the checks will fail by default. > If the changes to the public API were intentional you can update the snapshot by running: > -> `INSTA_UPDATE=always && cargo test --features test-api` +> `INSTA_UPDATE=always cargo test --features test-api` Contributions are always welcome 🤗 diff --git a/examples/demo-site/Cargo.lock b/examples/demo-site/Cargo.lock index 59f3722..f8c1050 100644 --- a/examples/demo-site/Cargo.lock +++ b/examples/demo-site/Cargo.lock @@ -28,71 +28,6 @@ dependencies = [ "serde", ] -[[package]] -name = "accesskit_consumer" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" -dependencies = [ - "accesskit", -] - -[[package]] -name = "accesskit_macos" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" -dependencies = [ - "accesskit", - "accesskit_consumer", - "objc2 0.3.0-beta.3.patch-leaks.3", - "once_cell", -] - -[[package]] -name = "accesskit_unix" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" -dependencies = [ - "accesskit", - "accesskit_consumer", - "async-channel", - "async-once-cell", - "atspi", - "futures-lite 1.13.0", - "once_cell", - "serde", - "zbus", -] - -[[package]] -name = "accesskit_windows" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" -dependencies = [ - "accesskit", - "accesskit_consumer", - "once_cell", - "paste", - "static_assertions", - "windows 0.48.0", -] - -[[package]] -name = "accesskit_winit" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" -dependencies = [ - "accesskit", - "accesskit_macos", - "accesskit_unix", - "accesskit_windows", - "winit", -] - [[package]] name = "adler" version = "1.0.2" @@ -149,15 +84,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "arboard" version = "3.3.0" @@ -193,244 +119,12 @@ 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 = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" -dependencies = [ - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.3.0", - "futures-lite 2.6.0", - "slab", -] - -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.28", - "slab", - "socket2", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" -dependencies = [ - "async-lock 3.4.0", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite 2.6.0", - "parking", - "polling 3.3.1", - "rustix 0.38.28", - "slab", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener 5.4.0", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-once-cell" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288f83726785267c6f2ef073a3d83dc3f9b81464e9f99898240cced85fce35a" - -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.28", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "async-signal" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" -dependencies = [ - "async-io 2.4.0", - "async-lock 3.4.0", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 0.38.28", - "signal-hook-registry", - "slab", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "async-trait" -version = "0.1.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atspi" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" -dependencies = [ - "atspi-common", - "atspi-connection", - "atspi-proxies", -] - -[[package]] -name = "atspi-common" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" -dependencies = [ - "enumflags2", - "serde", - "static_assertions", - "zbus", - "zbus_names", - "zvariant", -] - -[[package]] -name = "atspi-connection" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite 1.13.0", - "zbus", -] - -[[package]] -name = "atspi-proxies" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" -dependencies = [ - "atspi-common", - "serde", - "zbus", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -440,11 +134,6 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backer" version = "0.11.1" -dependencies = [ - "eframe", - "egui", - "egui_extras", -] [[package]] name = "base64" @@ -452,21 +141,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -485,41 +159,13 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[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 = "block-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" dependencies = [ - "objc-sys 0.3.5", -] - -[[package]] -name = "block2" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" -dependencies = [ - "block-sys 0.1.0-beta.1", - "objc2-encode 2.0.0-pre.2", + "objc-sys", ] [[package]] @@ -528,7 +174,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ - "block-sys 0.2.1", + "block-sys", "objc2 0.4.1", ] @@ -541,19 +187,6 @@ dependencies = [ "objc2 0.5.2", ] -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite 2.6.0", - "piper", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -577,7 +210,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -600,8 +233,8 @@ checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ "bitflags 2.6.0", "log", - "polling 3.3.1", - "rustix 0.38.28", + "polling", + "rustix", "slab", "thiserror", ] @@ -613,7 +246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop", - "rustix 0.38.28", + "rustix", "wayland-backend", "wayland-client", ] @@ -666,47 +299,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.6" @@ -766,15 +358,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.3.2" @@ -793,16 +376,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "cursor-icon" version = "1.1.0" @@ -829,27 +402,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -862,7 +414,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.1", + "libloading", ] [[package]] @@ -901,7 +453,6 @@ dependencies = [ "bytemuck", "document-features", "egui", - "egui-wgpu", "egui-winit", "egui_glow", "glow", @@ -941,32 +492,12 @@ dependencies = [ "serde", ] -[[package]] -name = "egui-wgpu" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c7a7c707877c3362a321ebb4f32be811c0b91f7aebf345fb162405c0218b4c" -dependencies = [ - "ahash", - "bytemuck", - "document-features", - "egui", - "epaint", - "log", - "thiserror", - "type-map", - "web-time", - "wgpu", - "winit", -] - [[package]] name = "egui-winit" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fac4e066af341bf92559f60dbdf2020b2a03c963415349af5f3f8d79ff7a4926" dependencies = [ - "accesskit_winit", "ahash", "arboard", "egui", @@ -1008,7 +539,6 @@ dependencies = [ "memoffset 0.9.1", "wasm-bindgen", "web-sys", - "winit", ] [[package]] @@ -1039,28 +569,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "enumflags2" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2f4b465f5318854c6f8dd686ede6c0a9dc67d4b1ac241cf0eb51521a309147" -dependencies = [ - "enumflags2_derive", - "serde", -] - -[[package]] -name = "enumflags2_derive" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -1071,7 +580,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -1130,59 +639,6 @@ dependencies = [ "str-buf", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" -dependencies = [ - "event-listener 5.4.0", - "pin-project-lite", -] - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - [[package]] name = "fdeflate" version = "0.3.3" @@ -1208,12 +664,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -[[package]] -name = "foldhash" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" - [[package]] name = "foreign-types" version = "0.5.0" @@ -1232,7 +682,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -1250,84 +700,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" -dependencies = [ - "fastrand 2.3.0", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - -[[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-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "gethostname" version = "0.3.0" @@ -1397,106 +769,54 @@ dependencies = [ "glutin_glx_sys", "glutin_wgl_sys", "icrate", - "libloading 0.8.1", + "libloading", "objc2 0.4.1", "once_cell", - "raw-window-handle 0.5.2", - "wayland-sys", - "windows-sys 0.48.0", - "x11-dl", -] - -[[package]] -name = "glutin-winit" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" -dependencies = [ - "cfg_aliases", - "glutin", - "raw-window-handle 0.5.2", - "winit", -] - -[[package]] -name = "glutin_egl_sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" -dependencies = [ - "gl_generator", - "windows-sys 0.48.0", -] - -[[package]] -name = "glutin_glx_sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" -dependencies = [ - "gl_generator", - "x11-dl", -] - -[[package]] -name = "glutin_wgl_sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "gpu-alloc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" -dependencies = [ - "bitflags 2.6.0", - "gpu-alloc-types", + "raw-window-handle 0.5.2", + "wayland-sys", + "windows-sys 0.48.0", + "x11-dl", ] [[package]] -name = "gpu-alloc-types" -version = "0.3.0" +name = "glutin-winit" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" dependencies = [ - "bitflags 2.6.0", + "cfg_aliases", + "glutin", + "raw-window-handle 0.5.2", + "winit", ] [[package]] -name = "gpu-allocator" -version = "0.25.0" +name = "glutin_egl_sys" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" dependencies = [ - "log", - "presser", - "thiserror", - "winapi", - "windows 0.52.0", + "gl_generator", + "windows-sys 0.48.0", ] [[package]] -name = "gpu-descriptor" -version = "0.3.1" +name = "glutin_glx_sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" +checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" dependencies = [ - "bitflags 2.6.0", - "gpu-descriptor-types", - "hashbrown 0.15.2", + "gl_generator", + "x11-dl", ] [[package]] -name = "gpu-descriptor-types" -version = "0.2.0" +name = "glutin_wgl_sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" dependencies = [ - "bitflags 2.6.0", + "gl_generator", ] [[package]] @@ -1505,48 +825,12 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -dependencies = [ - "foldhash", -] - -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.6.0", - "com", - "libc", - "libloading 0.8.1", - "thiserror", - "widestring", - "winapi", -] - [[package]] name = "hermit-abi" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - [[package]] name = "home" version = "0.5.9" @@ -1608,27 +892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", + "hashbrown", ] [[package]] @@ -1638,7 +902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.28", + "rustix", "windows-sys 0.52.0", ] @@ -1682,17 +946,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "khronos-egl" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" -dependencies = [ - "libc", - "libloading 0.8.1", - "pkg-config", -] - [[package]] name = "khronos_api" version = "3.1.0" @@ -1714,16 +967,6 @@ version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libloading" version = "0.8.1" @@ -1745,12 +988,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.12" @@ -1821,21 +1058,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" -dependencies = [ - "bitflags 2.6.0", - "block", - "core-graphics-types", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "mime" version = "0.3.17" @@ -1862,27 +1084,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "naga" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" -dependencies = [ - "arrayvec", - "bit-set", - "bitflags 2.6.0", - "codespan-reporting", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "rustc-hash", - "spirv", - "termcolor", - "thiserror", - "unicode-xid", -] - [[package]] name = "ndk" version = "0.8.0" @@ -1956,10 +1157,10 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 3.0.0", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -1982,36 +1183,19 @@ dependencies = [ "objc_id", ] -[[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.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "objc-sys 0.3.5", + "objc-sys", "objc2-encode 3.0.0", ] @@ -2021,7 +1205,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "objc-sys 0.3.5", + "objc-sys", "objc2-encode 4.0.3", ] @@ -2065,15 +1249,6 @@ dependencies = [ "objc2-metal", ] -[[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 = "3.0.0" @@ -2147,16 +1322,6 @@ dependencies = [ "libredox", ] -[[package]] -name = "ordered-stream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" -dependencies = [ - "futures-core", - "pin-project-lite", -] - [[package]] name = "owned_ttf_parser" version = "0.20.0" @@ -2166,12 +1331,6 @@ dependencies = [ "ttf-parser", ] -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.12.1" @@ -2195,12 +1354,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -2219,23 +1372,6 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand 2.3.0", - "futures-io", -] - [[package]] name = "pkg-config" version = "0.3.28" @@ -2255,22 +1391,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.3.1" @@ -2280,43 +1400,18 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.28", + "rustix", "tracing", "windows-sys 0.52.0", ] -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - -[[package]] -name = "proc-macro-crate" -version = "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.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" dependencies = [ - "toml_edit 0.21.0", + "toml_edit", ] [[package]] @@ -2328,12 +1423,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "profiling" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" - [[package]] name = "quick-xml" version = "0.30.0" @@ -2352,36 +1441,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - [[package]] name = "raw-window-handle" version = "0.5.2" @@ -2447,12 +1506,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "renderdoc-sys" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" - [[package]] name = "resvg" version = "0.37.0" @@ -2482,26 +1535,6 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.37.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.28" @@ -2511,7 +1544,7 @@ dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -2536,19 +1569,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sctk-adwaita" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" -dependencies = [ - "ab_glyph", - "log", - "memmap2", - "smithay-client-toolkit", - "tiny-skia", -] - [[package]] name = "serde" version = "1.0.195" @@ -2564,40 +1584,9 @@ version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_repr" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2658,7 +1647,7 @@ dependencies = [ "libc", "log", "memmap2", - "rustix 0.38.28", + "rustix", "thiserror", "wayland-backend", "wayland-client", @@ -2690,25 +1679,6 @@ dependencies = [ "serde", ] -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spirv" -version = "0.3.0+sdk-1.3.268.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" -dependencies = [ - "bitflags 2.6.0", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -2740,17 +1710,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.48" @@ -2762,19 +1721,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if", - "fastrand 2.3.0", - "redox_syscall 0.4.1", - "rustix 0.38.28", - "windows-sys 0.52.0", -] - [[package]] name = "termcolor" version = "1.4.1" @@ -2801,7 +1747,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", ] [[package]] @@ -2851,17 +1797,6 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.21.0" @@ -2880,29 +1815,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] [[package]] name = "ttf-parser" @@ -2910,32 +1830,6 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" -[[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 = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "uds_windows" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" -dependencies = [ - "memoffset 0.9.1", - "tempfile", - "winapi", -] - [[package]] name = "unicase" version = "2.7.0" @@ -2972,18 +1866,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "url" version = "2.5.0" @@ -3045,12 +1927,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.4.0" @@ -3089,7 +1965,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn", "wasm-bindgen-shared", ] @@ -3123,7 +1999,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3281,116 +2157,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wgpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" -dependencies = [ - "arrayvec", - "cfg-if", - "cfg_aliases", - "document-features", - "js-sys", - "log", - "parking_lot", - "profiling", - "raw-window-handle 0.6.0", - "smallvec", - "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-core" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" -dependencies = [ - "arrayvec", - "bit-vec", - "bitflags 2.6.0", - "cfg_aliases", - "codespan-reporting", - "document-features", - "indexmap", - "log", - "naga", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle 0.6.0", - "rustc-hash", - "smallvec", - "thiserror", - "web-sys", - "wgpu-hal", - "wgpu-types", -] - -[[package]] -name = "wgpu-hal" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" -dependencies = [ - "android_system_properties", - "arrayvec", - "ash", - "bitflags 2.6.0", - "cfg_aliases", - "core-graphics-types", - "glow", - "glutin_wgl_sys", - "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", - "hassle-rs", - "js-sys", - "khronos-egl", - "libc", - "libloading 0.8.1", - "log", - "metal", - "naga", - "ndk-sys", - "objc", - "once_cell", - "parking_lot", - "profiling", - "raw-window-handle 0.6.0", - "renderdoc-sys", - "rustc-hash", - "smallvec", - "thiserror", - "wasm-bindgen", - "web-sys", - "wgpu-types", - "winapi", -] - -[[package]] -name = "wgpu-types" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" -dependencies = [ - "bitflags 2.6.0", - "js-sys", - "web-sys", -] - -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - [[package]] name = "winapi" version = "0.3.9" @@ -3431,58 +2197,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.48.5", -] - -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-implement" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -3510,15 +2224,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-targets" version = "0.42.2" @@ -3727,8 +2432,7 @@ dependencies = [ "raw-window-handle 0.5.2", "raw-window-handle 0.6.0", "redox_syscall 0.3.5", - "rustix 0.38.28", - "sctk-adwaita", + "rustix", "smithay-client-toolkit", "smol_str", "unicode-segmentation", @@ -3788,9 +2492,9 @@ dependencies = [ "as-raw-xcb-connection", "gethostname 0.4.3", "libc", - "libloading 0.8.1", + "libloading", "once_cell", - "rustix 0.38.28", + "rustix", "x11rb-protocol 0.13.1", ] @@ -3815,16 +2519,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" -[[package]] -name = "xdg-home" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "xkbcommon-dl" version = "0.4.1" @@ -3856,79 +2550,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" -[[package]] -name = "zbus" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" -dependencies = [ - "async-broadcast", - "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", - "async-recursion", - "async-task", - "async-trait", - "blocking", - "byteorder", - "derivative", - "enumflags2", - "event-listener 2.5.3", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix", - "once_cell", - "ordered-stream", - "rand", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "winapi", - "xdg-home", - "zbus_macros", - "zbus_names", - "zvariant", -] - -[[package]] -name = "zbus_macros" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "zvariant_utils", -] - -[[package]] -name = "zbus_names" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" -dependencies = [ - "serde", - "static_assertions", - "zvariant", -] - [[package]] name = "zerocopy" version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ - "byteorder", "zerocopy-derive", ] @@ -3940,43 +2567,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "zvariant" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" -dependencies = [ - "byteorder", - "enumflags2", - "libc", - "serde", - "static_assertions", - "zvariant_derive", -] - -[[package]] -name = "zvariant_derive" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "zvariant_utils", -] - -[[package]] -name = "zvariant_utils" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "syn", ] diff --git a/examples/demo-site/src/app.rs b/examples/demo-site/src/app.rs index 41cbd6a..0f7f939 100644 --- a/examples/demo-site/src/app.rs +++ b/examples/demo-site/src/app.rs @@ -142,7 +142,9 @@ fn main_view<'a>(state: &mut State<'_>) -> Node<'a, State<'a>> { 12., DEMO_FG_SECONDARY, ), - icon(include_image!("../assets/copy.svg")).aspect(1.), + icon(include_image!("../assets/copy.svg")) + .aspect(1.) + .width(20.), ], ) .pad(5.), @@ -157,7 +159,8 @@ fn main_view<'a>(state: &mut State<'_>) -> Node<'a, State<'a>> { 10., vec![ icon(include_image!("../assets/share.svg")) - .aspect(1.), + .aspect(1.) + .width(20.), label_color( state, "Share", @@ -176,7 +179,8 @@ fn main_view<'a>(state: &mut State<'_>) -> Node<'a, State<'a>> { 10., vec![ icon(include_image!("../assets/map-pin.svg")) - .aspect(1.), + .aspect(1.) + .width(20.), label_color( state, "View location", @@ -356,12 +360,14 @@ fn header<'a>(state: &mut State<'_>) -> Node<'a, State<'a>> { rect(DEMO_FG, DEMO_HINT, 5.), icon(include_image!("../assets/bell.svg")).pad_y(8.5), ]) - .aspect(1.), + .aspect(1.) + .width(30.), stack(vec![ rect(DEMO_FG, DEMO_HINT, 5.), icon(include_image!("../assets/user.svg")).pad_y(8.5), ]) - .aspect(1.), + .aspect(1.) + .width(30.), ], ) .pad_top(35.) diff --git a/examples/egui-example/src/main.rs b/examples/egui-example/src/main.rs index 19c680e..9a25940 100644 --- a/examples/egui-example/src/main.rs +++ b/examples/egui-example/src/main.rs @@ -22,21 +22,56 @@ fn main() -> eframe::Result { } fn my_layout_fn<'n>() -> Node<'n, Ui> { - column_spaced( - 10., - vec![ - draw_a(ui), - row_spaced( - 10., - vec![ - draw_b(ui).width_range(200.0..), - column_spaced(10., vec![draw_a(ui), draw_b(ui), draw_c(ui)]), - ], - ), - draw_c(ui), - ], - ) - .pad(10.) + dynamic(|ui| { + // row(vec![ + // draw_a(ui).width(20.), + // draw_b(ui), + // column(vec![draw_c(ui), draw_b(ui).aspect(1., AspectMode::Fill)]), + // ]) + // .aspect(2., AspectMode::Fill) + // .height_range(..300.) + // .width_range(..300.) + // .attach_under(draw_c(ui)) + // column(vec![column(vec![ + // draw_a(ui), + // row(vec![draw_a(ui), draw_c(ui).aspect(1.)]), + // ]) + // .pad(50.)]) + // row(vec![draw_a(ui).aspect(1.), draw_b(ui).width(50.)]) + // .attach_under(draw_c(ui)) + // .height_range(..200.) + // stack(vec![row(vec![ + // //> + // draw_a(ui).width(20.).pad(10.), + // draw_a(ui).aspect(0.5), + // ]) + // .attach_under(draw_c(ui))]) + // .width_range(..100.) + // .height_range(..100.) + + // column(vec![draw_a(ui).aspect(0.5).align(Align::Trailing)]) + + // column(vec![draw_a(ui), draw_b(ui).aspect(1.)]) + // row(vec![ + // column(vec![ + // draw_c(ui), + // draw_b(ui).aspect(0.9), + // draw_a(ui), + // draw_b(ui).aspect(2.), + // ]), + // column(vec![ + // draw_b(ui).aspect(2.), + // draw_a(ui), + // draw_b(ui).aspect(0.9), + // draw_c(ui), + // ]), + // ]) + // .width_range(..500.0) + // .attach_under(draw_a(ui)) + + row(vec![draw_a(ui).aspect(1.), draw_b(ui).width(50.)]).attach_under(draw_c(ui)) + // column(vec![draw_a(ui).aspect(1.), draw_b(ui).aspect(1.)]) + }) } fn draw_a<'n>(ui: &mut Ui) -> Node<'n, Ui> { diff --git a/examples/macroquad-example/Cargo.toml b/examples/macroquad-example/Cargo.toml index 78156a5..3659239 100644 --- a/examples/macroquad-example/Cargo.toml +++ b/examples/macroquad-example/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -macroquad = "0.4.13" +macroquad = "0.4.14" backer = { path = "../../" } diff --git a/examples/macroquad-example/src/main.rs b/examples/macroquad-example/src/main.rs index c45f348..fc5a1a1 100644 --- a/examples/macroquad-example/src/main.rs +++ b/examples/macroquad-example/src/main.rs @@ -2,7 +2,6 @@ use backer::models::*; use backer::nodes::*; use backer::Layout; use backer::Node; -use backer::ScopeCtx; use macroquad::prelude::*; use macroquad::ui::root_ui; use macroquad::ui::widgets; @@ -50,9 +49,7 @@ fn layout_for_highlight<'n>() -> Node<'n, State> { || highlight == HighlightedCase::None { scope( - |ctx: ScopeCtx, state: &mut State| { - ctx.with_scoped(&mut state.highlight) - }, + |state: &mut State| &mut state.highlight, rel_abs_seq(highlight), ) } else { diff --git a/src/constraints.rs b/src/constraints.rs index 5ce7602..2cb490f 100644 --- a/src/constraints.rs +++ b/src/constraints.rs @@ -1,8 +1,4 @@ -use crate::{ - layout::NodeValue, - models::{Area, Size, XAlign, YAlign}, - node_cache::NodeCache, -}; +use crate::{layout::NodeValue, models::*, node_cache::NodeCache}; #[derive(Debug, Clone, Copy, PartialEq)] pub(crate) struct SizeConstraints { @@ -185,7 +181,6 @@ impl NodeValue<'_, State> { NodeValue::Dynamic { node, computed } => computed .get_or_insert(Box::new(NodeCache::new(node(state).inner))) .constraints(available_area, state), - NodeValue::Empty | NodeValue::Group(_) => unreachable!(), } } @@ -323,12 +318,14 @@ impl SizeConstraints { initial.width.set_lower(result); initial.width.set_upper(result); } + if let Some(aspect) = initial.aspect { let clamped_width = initial.width.clamp((area.height * aspect).min(area.width)); - initial.width.set_lower(Some(clamped_width)); + initial.width.set_upper(Some(clamped_width)); let clamped_height = initial.height.clamp((area.width / aspect).min(area.height)); - initial.height.set_lower(Some(clamped_height)); + initial.height.set_upper(Some(clamped_height)); } + initial } } diff --git a/src/layout.rs b/src/layout.rs index b7098e5..6fc8ff0 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -278,8 +278,8 @@ impl NodeValue<'_, State> { NodeValue::Draw(_) | NodeValue::Space | NodeValue::AreaReader { .. } - | NodeValue::Coupled { .. } | NodeValue::NodeTrait { .. } + | NodeValue::Coupled { .. } | NodeValue::Dynamic { .. } => { vec![available_area] } @@ -346,7 +346,18 @@ impl NodeValue<'_, State> { element, coupled, .. } => { element.layout(allocated[0], None, None, state); - coupled.layout(allocated[0], None, None, state); + coupled.layout( + available_area.constrained( + &element + .constraints(available_area, state) + .unwrap_or_default(), + contextual_x_align.unwrap_or(XAlign::Center), + contextual_y_align.unwrap_or(YAlign::Center), + ), + None, + None, + state, + ); } NodeValue::Visibility { element, .. } => { element.layout(allocated[0], None, None, state); @@ -474,19 +485,17 @@ pub(crate) fn layout_axis( Orientation::Vertical => size_constraint.height, }; let mut final_size = Option::::None; - let mut lower = constraint.get_lower(); + let lower = constraint.get_lower(); let mut upper = constraint.get_upper(); if let Some(aspect) = size_constraint.aspect { match orientation { Orientation::Horizontal => { let value = size_constraint.height.clamping(available_area.height) * aspect; - lower = Some(value); upper = Some(value); } Orientation::Vertical => { let value = size_constraint.width.clamping(available_area.width) / aspect; - lower = Some(value); upper = Some(value); } } diff --git a/src/lib.rs b/src/lib.rs index 395960f..1957ade 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,6 @@ mod node; pub use node::Node; mod node_cache; mod scoper; -pub use scoper::{ScopeCtx, ScopeCtxResult}; mod subtree; mod tests; diff --git a/src/modifiers.rs b/src/modifiers.rs index 47fc708..402a1e1 100644 --- a/src/modifiers.rs +++ b/src/modifiers.rs @@ -418,9 +418,9 @@ impl<'nodes, State> Node<'nodes, State> { options.height_min }, height_max: if height_update { - size.height_min + size.height_max } else { - options.height_min + options.height_max }, x_align: size.x_align.or(options.x_align), y_align: size.y_align.or(options.y_align), diff --git a/src/nodes.rs b/src/nodes.rs index 87b2a08..666ce74 100644 --- a/src/nodes.rs +++ b/src/nodes.rs @@ -3,7 +3,7 @@ use crate::{ layout::NodeValue, models::*, node_cache::NodeCache, - scoper::{ScopeCtx, ScopeCtxResult, Scoper}, + scoper::{OptionScoper, OwnedScoper, Scoper}, traits::Drawable, Node, }; @@ -25,10 +25,10 @@ or pushing against other unconstrained nodes with equal force. /// Creates a vertical sequence of elements /// #[doc = container_doc!()] -pub fn column(elements: Vec>) -> Node<'_, State> { +pub fn column<'n, State>(elements: Vec>>) -> Node<'n, State> { Node { inner: NodeValue::Column { - elements: filter_empty(ungroup(elements)), + elements: filter_empty(ungroup(convert_into(elements))), spacing: 0., align: None, off_axis_align: None, @@ -53,18 +53,21 @@ pub fn column(elements: Vec>) -> Node<'_, State> { /// ), /// ]); /// ``` -pub fn group(elements: Vec>) -> Node<'_, State> { +pub fn group<'n, State>(elements: Vec>>) -> Node<'n, State> { Node { - inner: NodeValue::Group(filter_empty(ungroup(elements))), + inner: NodeValue::Group(filter_empty(ungroup(convert_into(elements)))), } } /// Creates a vertical sequence of elements with the specified spacing between each element. /// #[doc = container_doc!()] -pub fn column_spaced(spacing: f32, elements: Vec>) -> Node<'_, State> { +pub fn column_spaced<'n, State>( + spacing: f32, + elements: Vec>>, +) -> Node<'n, State> { Node { inner: NodeValue::Column { - elements: filter_empty(ungroup(elements)), + elements: filter_empty(ungroup(convert_into(elements))), spacing, align: None, off_axis_align: None, @@ -74,10 +77,10 @@ pub fn column_spaced(spacing: f32, elements: Vec>) -> Node<'_ /// Creates a horizontal sequence of elements /// #[doc = container_doc!()] -pub fn row(elements: Vec>) -> Node<'_, State> { +pub fn row<'n, State>(elements: Vec>>) -> Node<'n, State> { Node { inner: NodeValue::Row { - elements: filter_empty(ungroup(elements)), + elements: filter_empty(ungroup(convert_into(elements))), spacing: 0., align: None, off_axis_align: None, @@ -87,10 +90,13 @@ pub fn row(elements: Vec>) -> Node<'_, State> { /// Creates a horizontal sequence of elements with the specified spacing between each element. /// #[doc = container_doc!()] -pub fn row_spaced(spacing: f32, elements: Vec>) -> Node<'_, State> { +pub fn row_spaced<'n, State>( + spacing: f32, + elements: Vec>>, +) -> Node<'n, State> { Node { inner: NodeValue::Row { - elements: filter_empty(ungroup(elements)), + elements: filter_empty(ungroup(convert_into(elements))), spacing, align: None, off_axis_align: None, @@ -100,10 +106,10 @@ pub fn row_spaced(spacing: f32, elements: Vec>) -> Node<'_, S /// Creates a sequence of elements to be laid out on top of each other. /// #[doc = container_doc!()] -pub fn stack(elements: Vec>) -> Node<'_, State> { +pub fn stack<'n, State>(elements: Vec>>) -> Node<'n, State> { Node { inner: NodeValue::Stack { - elements: filter_empty(ungroup(elements)), + elements: filter_empty(ungroup(convert_into(elements))), x_align: None, y_align: None, }, @@ -197,22 +203,13 @@ pub fn dynamic<'nodes, State>( /// use backer::nodes::*; /// /// struct A { -/// b: Option, +/// b: bool, /// } /// let layout = dynamic(|_: &mut A| { /// stack(vec![ /// scope( -/// // Explicit types are often necessary. -/// // bool is the type of the subset in this case -/// |ctx: ScopeCtx, a: &mut A| { -/// // This closure transforms state into the desired subset. -/// // The desired subset is passed to ctx.with_scoped(...) -/// // or the entire hierarchy can be skipped with ctx.empty() -/// let Some(ref mut b) = a.b else { -/// return ctx.empty(); -/// }; -/// ctx.with_scoped(b) -/// }, +/// // This closure selects which state to scope to +/// |a: &mut A| &mut a.b, /// // These nodes now have direct access to only the boolean /// draw(|_, b: &mut bool| *b = !*b), /// ), @@ -220,18 +217,57 @@ pub fn dynamic<'nodes, State>( /// }); ///``` pub fn scope<'nodes, State, Scoped: 'nodes>( - scope: impl Fn(ScopeCtx<'_, '_, Scoped>, &mut State) -> ScopeCtxResult + 'nodes, - node: Node<'nodes, Scoped>, + scope: impl Fn(&mut State) -> &mut Scoped + 'nodes, + node: impl Into>, ) -> Node<'nodes, State> { Node { inner: NodeValue::NodeTrait { node: Box::new(Scoper { - scope_fn: scope, - node, + scope, + node: node.into(), }), }, } } +/// Scopes state to some derived *optional* subset which is unwrapped for all children of this node +/// See `nodes::scope` +pub fn scope_unwrap<'nodes, State, Scoped: 'nodes>( + scope: impl Fn(&mut State) -> &mut Option + 'nodes, + node: impl Into>, +) -> Node<'nodes, State> { + Node { + inner: NodeValue::NodeTrait { + node: Box::new(OptionScoper { + scope, + node: node.into(), + }), + }, + } +} +/// Scopes state to some owned derivative for all children of this node +/// once the child nodes have operated on state, embed is then called. +/// +/// The scope & embed functions are generally called multiple times in a single `draw` call, use them sparingly +/// See `nodes::scope` +pub fn scope_owned<'nodes, State, Scoped: 'nodes>( + scope: impl Fn(&mut State) -> Scoped + 'nodes, + embed: impl Fn(&mut State, Scoped) + 'nodes, + node: impl Into>, +) -> Node<'nodes, State> { + Node { + inner: NodeValue::NodeTrait { + node: Box::new(OwnedScoper { + scope, + embed, + node: node.into(), + }), + }, + } +} + +fn convert_into<'n, State>(elements: Vec>>) -> Vec> { + elements.into_iter().map(|e| e.into()).collect() +} fn ungroup(elements: Vec>) -> Vec> { elements diff --git a/src/scoper.rs b/src/scoper.rs index 1f16d99..b3c52c8 100644 --- a/src/scoper.rs +++ b/src/scoper.rs @@ -1,109 +1,132 @@ -use std::fmt::Debug; - use crate::{ constraints::SizeConstraints, models::{Area, XAlign, YAlign}, traits::NodeTrait, Node, }; +use std::fmt::Debug; -pub(crate) struct Scoper<'n, SubState, ScopeStateFn> { - pub(crate) scope_fn: ScopeStateFn, - pub(crate) node: Node<'n, SubState>, +pub(crate) struct Scoper<'nodes, ScopedState, Scope> { + pub(crate) scope: Scope, + pub(crate) node: Node<'nodes, ScopedState>, +} + +impl Debug for Scoper<'_, ScopedState, Scope> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Scoper") + .field("scope", &"") + .field("node", &self.node) + .finish() + } } -/// Anonymous result to return from the closure passed to `nodes::scope` -/// See `nodes::scope` -pub struct ScopeCtxResult { - value: ResultValue, +impl NodeTrait for Scoper<'_, ScopedState, Scope> +where + Scope: Fn(&mut State) -> &mut ScopedState, +{ + fn constraints(&mut self, available_area: Area, state: &mut State) -> Option { + let substate = (self.scope)(state); + self.node.inner.constraints(available_area, substate) + } + + fn layout( + &mut self, + available_area: Area, + contextual_x_align: Option, + contextual_y_align: Option, + state: &mut State, + ) { + let substate = (self.scope)(state); + self.node.inner.layout( + available_area, + contextual_x_align, + contextual_y_align, + substate, + ); + } + + fn draw(&mut self, state: &mut State, contextual_visibility: bool) { + let substate = (self.scope)(state); + self.node.inner.draw(substate, contextual_visibility); + } } -enum ResultValue { - Void, - Constraints(Option), +pub(crate) struct OptionScoper<'nodes, ScopedState, Scope> { + pub(crate) scope: Scope, + pub(crate) node: Node<'nodes, ScopedState>, } -impl Debug for Scoper<'_, SubState, ScopeStateFn> { +impl Debug for OptionScoper<'_, ScopedState, Scope> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Scoper") - .field("scope_fn", &"") + f.debug_struct("OptionScoper") + .field("scope", &"") .field("node", &self.node) .finish() } } -type WithScopedFnPointer = fn( - area: Area, - contextual_x_align: Option, - contextual_y_align: Option, - contextual_visibility: bool, - &mut Node, - &mut SubState, -) -> ResultValue; - -/// Contextual state for scoping, see `nodes::scope` -pub struct ScopeCtx<'a, 'nodes, SubState> { - node: &'a mut Node<'nodes, SubState>, - area: Area, - contextual_x_align: Option, - contextual_y_align: Option, - contextual_visibility: bool, - with_scoped: WithScopedFnPointer, -} +impl NodeTrait for OptionScoper<'_, ScopedState, Scope> +where + Scope: Fn(&mut State) -> &mut Option, +{ + fn constraints(&mut self, available_area: Area, state: &mut State) -> Option { + if let Some(substate) = (self.scope)(state) { + self.node.inner.constraints(available_area, substate) + } else { + None + } + } -impl ScopeCtx<'_, '_, SubState> { - /// Takes the subset of state being scoped to, returns an anonymous result to be returned from the closure passed into `nodes::scope` - pub fn with_scoped(self, scoped: &mut SubState) -> ScopeCtxResult { - ScopeCtxResult { - value: (self.with_scoped)( - self.area, - self.contextual_x_align, - self.contextual_y_align, - self.contextual_visibility, - self.node, - scoped, - ), + fn layout( + &mut self, + available_area: Area, + contextual_x_align: Option, + contextual_y_align: Option, + state: &mut State, + ) { + if let Some(substate) = (self.scope)(state) { + self.node.inner.layout( + available_area, + contextual_x_align, + contextual_y_align, + substate, + ) } } - /// Used when scoping to a state that is potentially "invalid", such as when scoping to an `Option` in a way that will unwrap the state for the child nodes - /// Returns an anonymous result to be returned from the closure passed into `nodes::scope` - pub fn empty(self) -> ScopeCtxResult { - ScopeCtxResult { - value: ResultValue::Void, + + fn draw(&mut self, state: &mut State, contextual_visibility: bool) { + if let Some(substate) = (self.scope)(state) { + self.node.inner.draw(substate, contextual_visibility) } } } -impl<'nodes, State, SubState, ScopeStateFn> NodeTrait - for Scoper<'nodes, SubState, ScopeStateFn> +pub(crate) struct OwnedScoper<'nodes, ScopedState, Scope, Embed> { + pub(crate) scope: Scope, + pub(crate) embed: Embed, + pub(crate) node: Node<'nodes, ScopedState>, +} + +impl Debug for OwnedScoper<'_, ScopedState, Scope, Embed> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("OwnedScoper") + .field("scope", &"") + .field("node", &self.node) + .finish() + } +} + +impl NodeTrait + for OwnedScoper<'_, ScopedState, Scope, Embed> where - ScopeStateFn: Fn(ScopeCtx<'_, 'nodes, SubState>, &mut State) -> ScopeCtxResult, + Scope: Fn(&mut State) -> ScopedState, + Embed: Fn(&mut State, ScopedState), { fn constraints(&mut self, available_area: Area, state: &mut State) -> Option { - let ScopeCtxResult { - value: ResultValue::Constraints(constraints), - } = (self.scope_fn)( - ScopeCtx { - node: &mut self.node, - area: available_area, - contextual_x_align: None, - contextual_y_align: None, - contextual_visibility: false, - with_scoped: |area: Area, - _contextual_x_align: Option, - _contextual_y_align: Option, - _contextual_visibility: bool, - node: &mut Node, - sc: &mut SubState| { - ResultValue::Constraints(node.inner.constraints(area, sc)) - }, - }, - state, - ) - else { - return None; - }; - constraints + let mut substate = (self.scope)(state); + let result = self.node.inner.constraints(available_area, &mut substate); + (self.embed)(state, substate); + result } fn layout( @@ -113,57 +136,19 @@ where contextual_y_align: Option, state: &mut State, ) { - let ScopeCtxResult { - value: ResultValue::Void, - } = (self.scope_fn)( - ScopeCtx { - node: &mut self.node, - area: available_area, - contextual_x_align, - contextual_y_align, - contextual_visibility: false, - with_scoped: |available_area: Area, - contextual_x_align: Option, - contextual_y_align: Option, - _contextual_visibility: bool, - node: &mut Node, - sc: &mut SubState| { - node.inner - .layout(available_area, contextual_x_align, contextual_y_align, sc); - ResultValue::Void - }, - }, - state, - ) - else { - return; - }; + let mut substate = (self.scope)(state); + self.node.inner.layout( + available_area, + contextual_x_align, + contextual_y_align, + &mut substate, + ); + (self.embed)(state, substate); } fn draw(&mut self, state: &mut State, contextual_visibility: bool) { - let ScopeCtxResult { - value: ResultValue::Void, - } = (self.scope_fn)( - ScopeCtx { - node: &mut self.node, - area: Area::zero(), - contextual_x_align: None, - contextual_y_align: None, - contextual_visibility, - with_scoped: |_available_area: Area, - _contextual_x_align: Option, - _contextual_y_align: Option, - contextual_visibility: bool, - node: &mut Node, - sc: &mut SubState| { - node.inner.draw(sc, contextual_visibility); - ResultValue::Void - }, - }, - state, - ) - else { - return; - }; + let mut substate = (self.scope)(state); + self.node.inner.draw(&mut substate, contextual_visibility); + (self.embed)(state, substate); } } diff --git a/src/tests/layout_tests.rs b/src/tests/layout_tests.rs index a26e322..2e04b5d 100644 --- a/src/tests/layout_tests.rs +++ b/src/tests/layout_tests.rs @@ -1,5 +1,6 @@ #[cfg(test)] mod tests { + use crate::layout::*; use crate::models::*; use crate::nodes::*; @@ -443,7 +444,7 @@ mod tests { .draw(Area::new(0., 0., 100., 100.), &mut ()); Layout::new({ column(vec![draw(|a, _: &mut ()| { - assert_eq!(a, Area::new(0., -50., 100., 200.)); + assert_eq!(a, Area::new(0., 0., 50., 100.)); }) .aspect(0.5) .align(Align::Leading)]) @@ -460,6 +461,26 @@ mod tests { }) .draw(Area::new(0., 0., 100., 100.), &mut ()); } + // #[test] + // fn test_aspect_ratio_nested() { + // Layout::new({ + // column(vec![ + // draw(|a, _: &mut ()| { + // assert_eq!(a, Area::new(0., 0., 200., 50.)); + // }), + // row(vec![ + // draw(|a, _: &mut ()| { + // assert_eq!(a, Area::new(0., 50., 150., 50.)); + // }), + // draw(|a, _: &mut ()| { + // assert_eq!(a, Area::new(150., 50., 50., 50.)); + // }) + // .aspect(1.), + // ]), + // ]) + // }) + // .draw(Area::new(0., 0., 200., 100.), &mut ()); + // } #[test] fn test_pad() { Layout::new({ @@ -550,6 +571,59 @@ mod tests { .draw(Area::new(0., 0., 100., 100.), &mut ()); } #[test] + fn test_aspect_ratio_fit() { + Layout::new({ + column(vec![ + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(0., 0., 100., 50.)); + }), + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(25., 50., 50., 50.)); + }) + .aspect(1.), + ]) + }) + .draw(Area::new(0., 0., 100., 100.), &mut ()); + Layout::new({ + column(vec![ + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(25., 0., 50., 50.)); + }) + .aspect(1.), + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(25., 50., 50., 50.)); + }) + .aspect(1.), + ]) + }) + .draw(Area::new(0., 0., 100., 100.), &mut ()); + Layout::new({ + row(vec![ + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(0., 0., 50., 100.)); + }), + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(50., 25., 50., 50.)); + }) + .aspect(1.), + ]) + }) + .draw(Area::new(0., 0., 100., 100.), &mut ()); + Layout::new({ + row(vec![ + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(0., 25., 50., 50.)); + }) + .aspect(1.), + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(50., 25., 50., 50.)); + }) + .aspect(1.), + ]) + }) + .draw(Area::new(0., 0., 100., 100.), &mut ()); + } + #[test] fn test_space_expansion() { // The unconstrained space node should expand an unlimited amount Layout::new({ @@ -615,9 +689,12 @@ mod tests { .width_range(20.0..) .pad(0.) .attach_under(draw(|a, _: &mut ()| { - assert_eq!(a, Area::new(45., 0., 10., 100.)); + assert_eq!(a, Area::new(40., 0., 20., 100.)); })) .width_range(..10.) + .attach_under(draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(45., 0., 10., 100.)); + })) }) .draw(Area::new(0., 0., 100., 100.), &mut ()); } @@ -655,18 +732,36 @@ mod tests { Layout::new({ row(vec![ draw(|a, _: &mut ()| { - assert_eq!(a, Area::new(-25., 0., 100., 100.)); + assert_eq!(a, Area::new(0., 25., 50., 50.)); }) .aspect(1.), draw(|a, _: &mut ()| { - assert_eq!(a, Area::new(75., 0., 50., 100.)); + assert_eq!(a, Area::new(50., 0., 50., 100.)); }) .width(50.), ]) .attach_under(draw(|a, _: &mut ()| { - assert_eq!(a, Area::new(-25., 0., 150., 100.)); + assert_eq!(a, Area::new(0., 0., 100., 100.)); })) }) .draw(Area::new(0., 0., 100., 100.), &mut ()); } + #[test] + fn test_dynamic_attached() { + Layout::new({ + row(vec![ + space(), + draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(25., 25., 25., 50.)); + }) + .dynamic_height(|h, _| h * 2.) + .attach_under(draw(|a, _: &mut ()| { + assert_eq!(a, Area::new(25., 25., 25., 50.)); + })), + space(), + space(), + ]) + }) + .draw(Area::new(0., 0., 100., 100.), &mut ()); + } } diff --git a/src/tests/scope_tests.rs b/src/tests/scope_tests.rs index 4d428ef..6c137af 100644 --- a/src/tests/scope_tests.rs +++ b/src/tests/scope_tests.rs @@ -1,10 +1,8 @@ #[cfg(test)] mod tests { - use crate::layout::*; use crate::models::*; use crate::nodes::*; - use crate::scoper::ScopeCtx; #[test] fn test_scope() { @@ -37,7 +35,7 @@ mod tests { } }, scope( - |ctx: ScopeCtx, a: &mut A| ctx.with_scoped(&mut a.b), + |a: &mut A| &mut a.b, dynamic(|b: &mut B| { if b.test { draw(|area, b: &mut B| { @@ -73,19 +71,13 @@ mod tests { } Layout::new(stack(vec![ scope( - |ctx: ScopeCtx, a: &mut A| { - //> - ctx.with_scoped(&mut a.b) - }, + |a: &mut A| &mut a.b, draw(|area, _state: &mut B| { assert_eq!(area, Area::new(0., 0., 100., 100.)); }), ), scope( - |ctx: ScopeCtx, a: &mut A| { - //> - ctx.with_scoped(&mut a.c) - }, + |a: &mut A| &mut a.c, draw(|area, _state: &mut C| { assert_eq!(area, Area::new(0., 0., 100., 100.)); }), @@ -105,16 +97,7 @@ mod tests { let layout = dynamic(|_: &mut A| { stack(vec![ //> - scope( - |ctx: ScopeCtx, a: &mut A| { - //> - let Some(ref mut b) = a.b else { - return ctx.empty(); - }; - ctx.with_scoped(b) - }, - draw(|_, b: &mut B| b.test = !b.test), - ), + scope_unwrap(|a: &mut A| &mut a.b, draw(|_, b: &mut B| b.test = !b.test)), ]) }); let mut state = A { @@ -141,10 +124,10 @@ mod tests { // let mut oneone = A { b: B }; // Layout::new(stack(vec![ // //> - // scope( - // |ctx: ScopeCtx, a: &mut One| { + // scope_owned( + // |a: &mut One| { // //> - // ctx.with_scoped(&mut (&mut a.0.b, a.1)) + // (&mut a.0.b, a.1.borrow_mut()) // }, // space(), // ), diff --git a/src/tests/snapshots/backer__tests__public_api_test__api_full.snap b/src/tests/snapshots/backer__tests__public_api_test__api_full.snap index 72c1658..0db1135 100644 --- a/src/tests/snapshots/backer__tests__public_api_test__api_full.snap +++ b/src/tests/snapshots/backer__tests__public_api_test__api_full.snap @@ -100,20 +100,22 @@ impl core::convert::From for backer::models::Area pub fn backer::models::Area::from(t: T) -> T pub mod backer::nodes pub fn backer::nodes::area_reader<'nodes, State>(func: impl core::ops::function::Fn(backer::models::Area, &mut State) -> backer::Node<'nodes, State> + 'static) -> backer::Node<'nodes, State> -pub fn backer::nodes::column(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::column_spaced(spacing: f32, elements: alloc::vec::Vec>) -> backer::Node<'_, State> +pub fn backer::nodes::column<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::column_spaced<'n, State>(spacing: f32, elements: alloc::vec::Vec>>) -> backer::Node<'n, State> pub fn backer::nodes::draw<'nodes, State>(drawable_fn: impl core::ops::function::Fn(backer::models::Area, &mut State) + 'static) -> backer::Node<'nodes, State> -pub fn backer::nodes::draw_object<'nodes, State>(drawable: impl backer::traits::Drawable<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> -pub fn backer::nodes::dynamic<'nodes, State: 'nodes>(func: impl core::ops::function::Fn(&mut State) -> backer::Node<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> +pub fn backer::nodes::draw_object<'nodes, State>(drawable: impl backer::traits::Drawable + 'nodes) -> backer::Node<'nodes, State> +pub fn backer::nodes::dynamic<'nodes, State>(func: impl core::ops::function::Fn(&mut State) -> backer::Node<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> pub fn backer::nodes::empty<'nodes, State>() -> backer::Node<'nodes, State> -pub fn backer::nodes::group(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::row(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::row_spaced(spacing: f32, elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::scope<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(backer::ScopeCtx<'_, '_, Scoped>, &mut State) -> backer::ScopeCtxResult + 'nodes, node: backer::Node<'nodes, Scoped>) -> backer::Node<'nodes, State> +pub fn backer::nodes::group<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::row<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::row_spaced<'n, State>(spacing: f32, elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::scope<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> &mut Scoped + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> +pub fn backer::nodes::scope_owned<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> Scoped + 'nodes, embed: impl core::ops::function::Fn(&mut State, Scoped) + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> +pub fn backer::nodes::scope_unwrap<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> &mut core::option::Option + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> pub fn backer::nodes::space<'nodes, State>() -> backer::Node<'nodes, State> -pub fn backer::nodes::stack(elements: alloc::vec::Vec>) -> backer::Node<'_, State> +pub fn backer::nodes::stack<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> pub mod backer::traits -pub trait backer::traits::Drawable<'nodes, State> +pub trait backer::traits::Drawable pub fn backer::traits::Drawable::draw(&mut self, area: backer::models::Area, state: &mut State, visible: bool) pub struct backer::Layout<'nodes, State> impl<'nodes, State> backer::Layout<'nodes, State> @@ -194,52 +196,3 @@ impl core::borrow::BorrowMut for backer::Node<'nodes, State> where T: ?cor pub fn backer::Node<'nodes, State>::borrow_mut(&mut self) -> &mut T impl core::convert::From for backer::Node<'nodes, State> pub fn backer::Node<'nodes, State>::from(t: T) -> T -pub struct backer::ScopeCtx<'a, 'nodes, SubState> -impl backer::ScopeCtx<'_, '_, SubState> -pub fn backer::ScopeCtx<'_, '_, SubState>::empty(self) -> backer::ScopeCtxResult -pub fn backer::ScopeCtx<'_, '_, SubState>::with_scoped(self, scoped: &mut SubState) -> backer::ScopeCtxResult -impl<'a, 'nodes, SubState> core::marker::Freeze for backer::ScopeCtx<'a, 'nodes, SubState> -impl<'a, 'nodes, SubState> !core::marker::Send for backer::ScopeCtx<'a, 'nodes, SubState> -impl<'a, 'nodes, SubState> !core::marker::Sync for backer::ScopeCtx<'a, 'nodes, SubState> -impl<'a, 'nodes, SubState> core::marker::Unpin for backer::ScopeCtx<'a, 'nodes, SubState> -impl<'a, 'nodes, SubState> !core::panic::unwind_safe::RefUnwindSafe for backer::ScopeCtx<'a, 'nodes, SubState> -impl<'a, 'nodes, SubState> !core::panic::unwind_safe::UnwindSafe for backer::ScopeCtx<'a, 'nodes, SubState> -impl core::convert::Into for backer::ScopeCtx<'a, 'nodes, SubState> where U: core::convert::From -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::into(self) -> U -impl core::convert::TryFrom for backer::ScopeCtx<'a, 'nodes, SubState> where U: core::convert::Into -pub type backer::ScopeCtx<'a, 'nodes, SubState>::Error = core::convert::Infallible -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for backer::ScopeCtx<'a, 'nodes, SubState> where U: core::convert::TryFrom -pub type backer::ScopeCtx<'a, 'nodes, SubState>::Error = >::Error -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for backer::ScopeCtx<'a, 'nodes, SubState> where T: 'static + ?core::marker::Sized -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for backer::ScopeCtx<'a, 'nodes, SubState> where T: ?core::marker::Sized -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::borrow(&self) -> &T -impl core::borrow::BorrowMut for backer::ScopeCtx<'a, 'nodes, SubState> where T: ?core::marker::Sized -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::borrow_mut(&mut self) -> &mut T -impl core::convert::From for backer::ScopeCtx<'a, 'nodes, SubState> -pub fn backer::ScopeCtx<'a, 'nodes, SubState>::from(t: T) -> T -pub struct backer::ScopeCtxResult -impl core::marker::Freeze for backer::ScopeCtxResult -impl core::marker::Send for backer::ScopeCtxResult -impl core::marker::Sync for backer::ScopeCtxResult -impl core::marker::Unpin for backer::ScopeCtxResult -impl core::panic::unwind_safe::RefUnwindSafe for backer::ScopeCtxResult -impl core::panic::unwind_safe::UnwindSafe for backer::ScopeCtxResult -impl core::convert::Into for backer::ScopeCtxResult where U: core::convert::From -pub fn backer::ScopeCtxResult::into(self) -> U -impl core::convert::TryFrom for backer::ScopeCtxResult where U: core::convert::Into -pub type backer::ScopeCtxResult::Error = core::convert::Infallible -pub fn backer::ScopeCtxResult::try_from(value: U) -> core::result::Result>::Error> -impl core::convert::TryInto for backer::ScopeCtxResult where U: core::convert::TryFrom -pub type backer::ScopeCtxResult::Error = >::Error -pub fn backer::ScopeCtxResult::try_into(self) -> core::result::Result>::Error> -impl core::any::Any for backer::ScopeCtxResult where T: 'static + ?core::marker::Sized -pub fn backer::ScopeCtxResult::type_id(&self) -> core::any::TypeId -impl core::borrow::Borrow for backer::ScopeCtxResult where T: ?core::marker::Sized -pub fn backer::ScopeCtxResult::borrow(&self) -> &T -impl core::borrow::BorrowMut for backer::ScopeCtxResult where T: ?core::marker::Sized -pub fn backer::ScopeCtxResult::borrow_mut(&mut self) -> &mut T -impl core::convert::From for backer::ScopeCtxResult -pub fn backer::ScopeCtxResult::from(t: T) -> T diff --git a/src/tests/snapshots/backer__tests__public_api_test__api_simplified.snap b/src/tests/snapshots/backer__tests__public_api_test__api_simplified.snap index 23eb8a3..420cefa 100644 --- a/src/tests/snapshots/backer__tests__public_api_test__api_simplified.snap +++ b/src/tests/snapshots/backer__tests__public_api_test__api_simplified.snap @@ -29,19 +29,23 @@ impl backer::models::Area pub fn backer::models::Area::new(x: f32, y: f32, width: f32, height: f32) -> Self pub mod backer::nodes pub fn backer::nodes::area_reader<'nodes, State>(func: impl core::ops::function::Fn(backer::models::Area, &mut State) -> backer::Node<'nodes, State> + 'static) -> backer::Node<'nodes, State> -pub fn backer::nodes::column(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::column_spaced(spacing: f32, elements: alloc::vec::Vec>) -> backer::Node<'_, State> +pub fn backer::nodes::column<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::column_spaced<'n, State>(spacing: f32, elements: alloc::vec::Vec>>) -> backer::Node<'n, State> pub fn backer::nodes::draw<'nodes, State>(drawable_fn: impl core::ops::function::Fn(backer::models::Area, &mut State) + 'static) -> backer::Node<'nodes, State> -pub fn backer::nodes::draw_object<'nodes, State>(drawable: impl backer::traits::drawable::Drawable<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> -pub fn backer::nodes::dynamic<'nodes, State: 'nodes>(func: impl core::ops::function::Fn(&mut State) -> backer::Node<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> +pub fn backer::nodes::draw_object<'nodes, State>(drawable: impl backer::traits::Drawable + 'nodes) -> backer::Node<'nodes, State> +pub fn backer::nodes::dynamic<'nodes, State>(func: impl core::ops::function::Fn(&mut State) -> backer::Node<'nodes, State> + 'nodes) -> backer::Node<'nodes, State> pub fn backer::nodes::empty<'nodes, State>() -> backer::Node<'nodes, State> -pub fn backer::nodes::group(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::row(elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::row_spaced(spacing: f32, elements: alloc::vec::Vec>) -> backer::Node<'_, State> -pub fn backer::nodes::scope<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(backer::ScopeCtx<'_, '_, Scoped>, &mut State) -> backer::ScopeCtxResult + 'nodes, node: backer::Node<'nodes, Scoped>) -> backer::Node<'nodes, State> +pub fn backer::nodes::group<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::row<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::row_spaced<'n, State>(spacing: f32, elements: alloc::vec::Vec>>) -> backer::Node<'n, State> +pub fn backer::nodes::scope<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> &mut Scoped + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> +pub fn backer::nodes::scope_owned<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> Scoped + 'nodes, embed: impl core::ops::function::Fn(&mut State, Scoped) + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> +pub fn backer::nodes::scope_unwrap<'nodes, State, Scoped: 'nodes>(scope: impl core::ops::function::Fn(&mut State) -> &mut core::option::Option + 'nodes, node: impl core::convert::Into>) -> backer::Node<'nodes, State> pub fn backer::nodes::space<'nodes, State>() -> backer::Node<'nodes, State> -pub fn backer::nodes::stack(elements: alloc::vec::Vec>) -> backer::Node<'_, State> +pub fn backer::nodes::stack<'n, State>(elements: alloc::vec::Vec>>) -> backer::Node<'n, State> pub mod backer::traits +pub trait backer::traits::Drawable +pub fn backer::traits::Drawable::draw(&mut self, area: backer::models::Area, state: &mut State, visible: bool) pub struct backer::Layout<'nodes, State> impl<'nodes, State> backer::Layout<'nodes, State> pub fn backer::Layout<'nodes, State>::new(tree: backer::Node<'nodes, State>) -> Self @@ -77,8 +81,3 @@ pub fn backer::Node<'_, State>::dynamic_height(self, f: impl core::ops::function pub fn backer::Node<'_, State>::dynamic_width(self, f: impl core::ops::function::Fn(f32, &mut State) -> f32 + 'static) -> Self impl core::fmt::Debug for backer::Node<'_, State> pub fn backer::Node<'_, State>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result -pub struct backer::ScopeCtx<'a, 'nodes, SubState> -impl backer::ScopeCtx<'_, '_, SubState> -pub fn backer::ScopeCtx<'_, '_, SubState>::empty(self) -> backer::ScopeCtxResult -pub fn backer::ScopeCtx<'_, '_, SubState>::with_scoped(self, scoped: &mut SubState) -> backer::ScopeCtxResult -pub struct backer::ScopeCtxResult