From 82331c03deeb6edcccd5a5ae1cb85371933c1324 Mon Sep 17 00:00:00 2001 From: Riey Date: Wed, 18 Sep 2024 16:32:11 +0900 Subject: [PATCH] Introduce erars-iced --- Cargo.lock | 1803 ++++++++++++------ Cargo.toml | 5 +- crates/erars-egui/src/main.rs | 567 ------ crates/{erars-egui => erars-iced}/Cargo.toml | 30 +- crates/erars-iced/src/main.rs | 541 ++++++ crates/erars-proxy-system/Cargo.toml | 6 +- crates/erars-proxy-system/src/lib.rs | 1 + 7 files changed, 1841 insertions(+), 1112 deletions(-) delete mode 100644 crates/erars-egui/src/main.rs rename crates/{erars-egui => erars-iced}/Cargo.toml (52%) create mode 100644 crates/erars-iced/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 890964e..80b971f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,6 +40,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -62,12 +63,12 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "android-activity" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b801912a977c3fd52d80511fe1c0c8480c6f957f21ae2ce1b92ffe970cf4b9" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.4.2", + "bitflags 2.6.0", "cc", "cesu8", "jni", @@ -76,7 +77,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -172,28 +173,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] -name = "arboard" -version = "3.3.0" +name = "approx" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ - "clipboard-win", - "log", - "objc", - "objc-foundation", - "objc_id", - "parking_lot", - "thiserror", - "winapi", - "x11rb", + "num-traits", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ash" version = "0.37.3+1.3.251" @@ -276,9 +281,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -289,22 +294,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - [[package]] name = "block2" -version = "0.3.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "block-sys", "objc2", ] @@ -314,6 +309,12 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + [[package]] name = "bytemuck" version = "1.14.1" @@ -331,7 +332,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -342,9 +343,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "calloop" @@ -352,7 +353,21 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", + "log", + "polling", + "rustix", + "slab", + "thiserror", +] + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.6.0", "log", "polling", "rustix", @@ -366,7 +381,19 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop", + "calloop 0.12.4", + "rustix", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", "rustix", "wayland-backend", "wayland-client", @@ -406,6 +433,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.33" @@ -488,7 +521,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -508,43 +541,41 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "clipboard-win" -version = "4.5.0" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" dependencies = [ "error-code", - "str-buf", - "winapi", ] [[package]] -name = "cocoa" -version = "0.25.0" +name = "clipboard_macos" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +checksum = "9b7f4aaa047ba3c3630b080bb9860894732ff23e2aee290a418909aa6d5df38f" dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] -name = "cocoa-foundation" -version = "0.1.2" +name = "clipboard_wayland" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8" dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4274ea815e013e0f9f04a2633423e14194e408a0576c943ce3d14ca56c50031c" +dependencies = [ + "thiserror", + "x11rb", ] [[package]] @@ -566,12 +597,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "colorchoice" version = "1.0.0" @@ -590,10 +615,35 @@ dependencies = [ ] [[package]] -name = "com-rs" -version = "0.2.1" +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 = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "combine" @@ -654,6 +704,38 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +dependencies = [ + "libm", +] + +[[package]] +name = "cosmic-text" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" +dependencies = [ + "bitflags 2.6.0", + "fontdb 0.16.2", + "log", + "rangemap", + "rayon", + "rustc-hash 1.1.0", + "rustybuzz", + "self_cell", + "swash", + "sys-locale", + "ttf-parser 0.21.1", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", +] + [[package]] name = "cow-utils" version = "0.1.3" @@ -759,11 +841,11 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "d3d12" -version = "0.7.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libloading 0.8.1", "winapi", ] @@ -779,7 +861,7 @@ dependencies = [ "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.9", ] [[package]] @@ -831,86 +913,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] -name = "ecolor" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57539aabcdbb733b6806ef421b66dec158dc1582107ad6d51913db3600303354" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "eframe" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c00143a1d564cf27570234c9a199cbe75dc3d43a135510fb2b93406a87ee8e" -dependencies = [ - "bytemuck", - "cocoa", - "egui", - "egui-wgpu", - "egui-winit", - "image", - "js-sys", - "log", - "objc", - "parking_lot", - "percent-encoding", - "pollster", - "raw-window-handle", - "static_assertions", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu", - "winapi", - "winit", -] - -[[package]] -name = "egui" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0bf640ed7f3bf3d14ebf00d73bacc09c886443ee84ca6494bde37953012c9e3" -dependencies = [ - "ahash", - "epaint", - "log", - "nohash-hasher", -] - -[[package]] -name = "egui-wgpu" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c38c12e04316687dd1b74f3dfe83a885214dfe7f356118a2d3bee2b39740813" -dependencies = [ - "bytemuck", - "egui", - "epaint", - "log", - "thiserror", - "type-map", - "wgpu", - "winit", -] - -[[package]] -name = "egui-winit" -version = "0.25.0" +name = "dpi" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d95d9762056c541bd2724de02910d8bccf3af8e37689dc114b21730e64f80a0" -dependencies = [ - "arboard", - "egui", - "log", - "raw-window-handle", - "smithay-clipboard", - "web-time", - "webbrowser", - "winit", -] +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" [[package]] name = "either" @@ -918,15 +924,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "emath" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee58355767587db7ba3738930d93cad3052cd834c2b48b9ef6ef26fe4823b7e" -dependencies = [ - "bytemuck", -] - [[package]] name = "encoding_rs" version = "0.8.33" @@ -954,23 +951,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", -] - -[[package]] -name = "epaint" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e638cb066bff0903bbb6143116cfd134a42279c7d68f19c0352a94f15a402de7" -dependencies = [ - "ab_glyph", - "ahash", - "bytemuck", - "ecolor", - "emath", - "log", - "nohash-hasher", - "parking_lot", + "syn 2.0.77", ] [[package]] @@ -1008,7 +989,7 @@ name = "erars-ast" version = "0.5.0" dependencies = [ "anyhow", - "bitflags 2.4.2", + "bitflags 2.6.0", "enum-map", "hashbrown 0.13.2", "k9", @@ -1037,7 +1018,7 @@ name = "erars-compiler" version = "0.5.0" dependencies = [ "anyhow", - "bitflags 2.4.2", + "bitflags 2.6.0", "cow-utils", "derivative", "enum-map", @@ -1067,20 +1048,23 @@ dependencies = [ ] [[package]] -name = "erars-egui" +name = "erars-iced" version = "0.5.0" dependencies = [ "clap 4.4.18", - "eframe", - "egui", + "cosmic-text", "erars-ast", "erars-compiler", "erars-loader", "erars-proxy-system", "erars-ui", "erars-vm", - "flexi_logger 0.27.4", - "fontdb", + "flexi_logger 0.29.0", + "flume", + "fontdb 0.22.0", + "futures-util", + "iced", + "iced_futures", "log", "log-panics", "mimalloc", @@ -1090,7 +1074,7 @@ dependencies = [ name = "erars-lexer" version = "0.5.0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "bumpalo", "cow-utils", "erars-ast", @@ -1118,7 +1102,7 @@ dependencies = [ "erars-vm", "hashbrown 0.13.2", "log", - "parking_lot", + "parking_lot 0.12.1", "rayon", ] @@ -1140,7 +1124,7 @@ dependencies = [ "hashbrown 0.13.2", "log", "memmap2 0.5.10", - "parking_lot", + "parking_lot 0.12.1", "rayon", "rmp-serde", "serde_yaml", @@ -1155,7 +1139,7 @@ dependencies = [ "erars-compiler", "erars-ui", "erars-vm", - "flume 0.10.14", + "flume", ] [[package]] @@ -1195,14 +1179,14 @@ name = "erars-ui" version = "0.4.0" dependencies = [ "anyhow", - "bitflags 2.4.2", + "bitflags 2.6.0", "crossbeam-channel", "erars-ast", "k9", "log", "once_cell", "pad", - "parking_lot", + "parking_lot 0.12.1", "regex", "serde", "serde_iter", @@ -1260,23 +1244,35 @@ dependencies = [ [[package]] name = "error-code" -version = "2.3.1" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" + +[[package]] +name = "etagere" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +checksum = "0e2f1e3be19fb10f549be8c1bf013e8675b4066c445e36eb76d2ebb2f54ee495" dependencies = [ - "libc", - "str-buf", + "euclid", + "svg_fmt", ] [[package]] -name = "fdeflate" -version = "0.3.4" +name = "euclid" +version = "0.22.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" dependencies = [ - "simd-adler32", + "num-traits", ] +[[package]] +name = "fast-srgb8" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" + [[package]] name = "flate2" version = "1.0.28" @@ -1298,40 +1294,25 @@ dependencies = [ "is-terminal", "lazy_static", "log", - "nu-ansi-term", + "nu-ansi-term 0.49.0", "regex", "thiserror", ] [[package]] name = "flexi_logger" -version = "0.27.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469e584c031833564840fb0cdbce99bdfe946fd45480a188545e73a76f45461c" +checksum = "a250587a211932896a131f214a4f64c047b826ce072d2018764e5ff5141df8fa" dependencies = [ "chrono", "glob", - "is-terminal", - "lazy_static", "log", - "nu-ansi-term", + "nu-ansi-term 0.50.1", "regex", "thiserror", ] -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", - "spin", -] - [[package]] name = "flume" version = "0.11.0" @@ -1350,6 +1331,15 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "font-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0189ccb084f77c5523e08288d418cbaa09c451a08515678a0aa265df9a8b60" +dependencies = [ + "bytemuck", +] + [[package]] name = "fontconfig-parser" version = "0.5.6" @@ -1361,16 +1351,30 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.16.0" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2 0.9.4", + "slotmap", + "tinyvec", + "ttf-parser 0.20.0", +] + +[[package]] +name = "fontdb" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b88c54a38407f7352dd2c4238830115a6377741098ffd1f997c813d0e088a6" +checksum = "a3a6f9af55fb97ad673fb7a69533eb2f967648a06fa21f8c9bb2cd6d33975716" dependencies = [ "fontconfig-parser", "log", "memmap2 0.9.4", "slotmap", "tinyvec", - "ttf-parser", + "ttf-parser 0.24.1", ] [[package]] @@ -1391,7 +1395,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -1400,15 +1404,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - [[package]] name = "futf" version = "0.1.5" @@ -1420,25 +1415,103 @@ dependencies = [ ] [[package]] -name = "futures-core" +name = "futures" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] name = "futures-sink" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "gethostname" -version = "0.3.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -1471,6 +1544,12 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glam" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" + [[package]] name = "glob" version = "0.3.1" @@ -1504,7 +1583,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "gpu-alloc-types", ] @@ -1514,16 +1593,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", ] [[package]] name = "gpu-allocator" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ - "backtrace", "log", "presser", "thiserror", @@ -1537,7 +1615,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "gpu-descriptor-types", "hashbrown 0.14.3", ] @@ -1548,7 +1626,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", +] + +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", ] [[package]] @@ -1591,14 +1679,14 @@ dependencies = [ [[package]] name = "hassle-rs" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.6.0", + "com", "libc", - "libloading 0.7.4", + "libloading 0.8.1", "thiserror", "widestring", "winapi", @@ -1640,15 +1728,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "html5ever" version = "0.26.0" @@ -1687,37 +1766,163 @@ dependencies = [ ] [[package]] -name = "icrate" -version = "0.0.4" +name = "iced" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +checksum = "44ccdb0d1a25ff7581e75991229857c353c87d79c199d375af37d264f6fbd06d" dependencies = [ - "block2", - "dispatch", - "objc2", + "iced_core", + "iced_futures", + "iced_renderer", + "iced_widget", + "iced_winit", + "thiserror", ] [[package]] -name = "idna" -version = "0.5.0" +name = "iced_core" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "ce264c157ad3968928d93f9b244ad8ad63465b5a5c31c86c13199b333629f16f" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "bitflags 2.6.0", + "bytes", + "glam", + "log", + "num-traits", + "once_cell", + "palette", + "rustc-hash 2.0.0", + "smol_str", + "thiserror", + "web-time", +] + +[[package]] +name = "iced_futures" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47bd5c48706c57004c8a2d4cb127cb4535600843edb13aed10b09c7cd55eda4" +dependencies = [ + "futures", + "iced_core", + "log", + "rustc-hash 2.0.0", + "wasm-bindgen-futures", + "wasm-timer", +] + +[[package]] +name = "iced_glyphon" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" +dependencies = [ + "cosmic-text", + "etagere", + "lru", + "rustc-hash 2.0.0", + "wgpu", ] [[package]] -name = "image" -version = "0.24.8" +name = "iced_graphics" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" +checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" dependencies = [ + "bitflags 2.6.0", "bytemuck", - "byteorder", - "color_quant", + "cosmic-text", + "half", + "iced_core", + "iced_futures", + "log", + "once_cell", + "raw-window-handle", + "rustc-hash 2.0.0", + "thiserror", + "unicode-segmentation", +] + +[[package]] +name = "iced_renderer" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" +dependencies = [ + "iced_graphics", + "iced_wgpu", + "log", + "thiserror", +] + +[[package]] +name = "iced_runtime" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f72474ab379b1c53f4ec5e468c66f8e307f8db13c865c2714d2c4a4a5b38c9a1" +dependencies = [ + "bytes", + "iced_core", + "iced_futures", + "raw-window-handle", + "thiserror", +] + +[[package]] +name = "iced_wgpu" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8194d7666004b8e947f89ab7446d323ab0b882971226c1913ef98764c9e4bbc4" +dependencies = [ + "bitflags 2.6.0", + "bytemuck", + "futures", + "glam", + "guillotiere", + "iced_glyphon", + "iced_graphics", + "log", + "once_cell", + "rustc-hash 2.0.0", + "thiserror", + "wgpu", +] + +[[package]] +name = "iced_widget" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e88dd57d414cc44427c523534b80e52a42b6828f0e27ad7b8478f839865ee3c" +dependencies = [ + "iced_renderer", + "iced_runtime", "num-traits", - "png", + "once_cell", + "rustc-hash 2.0.0", + "thiserror", + "unicode-segmentation", +] + +[[package]] +name = "iced_winit" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" +dependencies = [ + "iced_futures", + "iced_graphics", + "iced_runtime", + "log", + "rustc-hash 2.0.0", + "thiserror", + "tracing", + "wasm-bindgen-futures", + "web-sys", + "winapi", + "window_clipboard", + "winit", ] [[package]] @@ -1746,6 +1951,15 @@ dependencies = [ "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 = "is-terminal" version = "0.4.10" @@ -1805,9 +2019,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1866,9 +2080,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -1890,6 +2104,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libmimalloc-sys" version = "0.1.35" @@ -1906,7 +2126,7 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", "redox_syscall 0.4.1", ] @@ -1963,7 +2183,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -1975,6 +2195,12 @@ dependencies = [ "logos-codegen", ] +[[package]] +name = "lru" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" + [[package]] name = "mac" version = "0.1.1" @@ -1997,7 +2223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ "log", - "phf", + "phf 0.10.1", "phf_codegen", "string_cache", "string_cache_codegen", @@ -2040,15 +2266,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-stats" version = "1.1.0" @@ -2065,7 +2282,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "block", "core-graphics-types", "foreign-types", @@ -2096,23 +2313,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", - "simd-adler32", ] [[package]] name = "naga" -version = "0.14.2" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e" +checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" dependencies = [ "bit-set", - "bitflags 2.4.2", + "bitflags 2.6.0", "codespan-reporting", "hexf-parse", "indexmap 2.1.0", "log", "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -2130,14 +2346,14 @@ dependencies = [ [[package]] name = "ndk" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", "thiserror", @@ -2158,6 +2374,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -2173,15 +2398,8 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", ] -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "7.1.3" @@ -2201,6 +2419,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "nu-ansi-term" +version = "0.50.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -2221,6 +2448,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.4", + "libc", +] + [[package]] name = "num_enum" version = "0.7.2" @@ -2239,7 +2476,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -2262,54 +2499,215 @@ dependencies = [ ] [[package]] -name = "objc-foundation" -version = "0.1.1" +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ - "block", - "objc", - "objc_id", + "objc-sys", + "objc2-encode", ] [[package]] -name = "objc-sys" -version = "0.3.2" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] [[package]] -name = "objc2" -version = "0.4.1" +name = "objc2-cloud-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "objc-sys", - "objc2-encode", + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", ] [[package]] name = "objc2-encode" -version = "3.0.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2-foundation" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "cc", + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", ] [[package]] -name = "objc_id" -version = "0.1.1" +name = "objc2-link-presentation" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "objc", + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", ] [[package]] @@ -2327,7 +2725,7 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" dependencies = [ - "parking_lot_core", + "parking_lot_core 0.9.9", ] [[package]] @@ -2378,7 +2776,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" dependencies = [ - "ttf-parser", + "ttf-parser 0.20.0", ] [[package]] @@ -2390,6 +2788,41 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "palette" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" +dependencies = [ + "approx", + "fast-srgb8", + "palette_derive", + "phf 0.11.2", +] + +[[package]] +name = "palette_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2397,7 +2830,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -2431,19 +2878,29 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.10.0", + "phf_shared 0.10.0", "proc-macro-hack", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros 0.11.2", + "phf_shared 0.11.2", +] + [[package]] name = "phf_codegen" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.10.0", + "phf_shared 0.10.0", ] [[package]] @@ -2452,7 +2909,17 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ - "phf_shared", + "phf_shared 0.10.0", + "rand", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", "rand", ] @@ -2462,14 +2929,27 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro-hack", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "phf_shared" version = "0.10.0" @@ -2479,6 +2959,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.4" @@ -2496,7 +2985,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -2505,6 +2994,12 @@ 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 = "pkg-config" version = "0.3.29" @@ -2539,19 +3034,6 @@ dependencies = [ "plotters-backend", ] -[[package]] -name = "png" -version = "0.17.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6c3c3e617595665b8ea2ff95a86066be38fb121ff920a9c0eb282abcd1da5a" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - [[package]] name = "polling" version = "3.3.2" @@ -2566,12 +3048,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "pollster" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" - [[package]] name = "powerfmt" version = "0.2.0" @@ -2613,9 +3089,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2628,18 +3104,18 @@ checksum = "d135ede8821cf6376eb7a64148901e1690b788c11ae94dc297ae917dbc91dc0e" [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2682,11 +3158,17 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" +[[package]] +name = "rangemap" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" + [[package]] name = "raw-window-handle" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "rayon" @@ -2708,11 +3190,21 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "read-fonts" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c141b9980e1150201b2a3a32879001c8f975fe313ec3df5471a9b5c79a880cd" +dependencies = [ + "bytemuck", + "font-types", +] + [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] @@ -2806,7 +3298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.2", + "bitflags 2.6.0", "serde", "serde_derive", ] @@ -2829,13 +3321,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustix" version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2848,6 +3346,23 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rustybuzz" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" +dependencies = [ + "bitflags 2.6.0", + "bytemuck", + "libm", + "smallvec", + "ttf-parser 0.21.1", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-properties", + "unicode-script", +] + [[package]] name = "ryu" version = "1.0.16" @@ -2867,32 +3382,51 @@ dependencies = [ name = "scoped-tls" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.9.4", + "smithay-client-toolkit 0.19.2", + "tiny-skia", +] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "self_cell" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -2928,18 +3462,22 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - [[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "skrifa" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abea4738067b1e628c6ce28b2c216c19e9ea95715cdb332680e821c3bec2ef23" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.9" @@ -2970,9 +3508,34 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f" dependencies = [ - "bitflags 2.4.2", - "calloop", - "calloop-wayland-source", + "bitflags 2.6.0", + "calloop 0.12.4", + "calloop-wayland-source 0.2.0", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.4", + "rustix", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr 0.2.0", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.6.0", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", @@ -2983,8 +3546,8 @@ dependencies = [ "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols", - "wayland-protocols-wlr", + "wayland-protocols 0.32.4", + "wayland-protocols-wlr 0.3.4", "wayland-scanner", "xkeysym", ] @@ -2996,7 +3559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb62b280ce5a5cba847669933a0948d00904cf83845c944eae96a4738cea1a6" dependencies = [ "libc", - "smithay-client-toolkit", + "smithay-client-toolkit 0.18.0", "wayland-backend", ] @@ -3020,12 +3583,11 @@ dependencies = [ [[package]] name = "spirv" -version = "0.2.0+1.5.4" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 1.3.2", - "num-traits", + "bitflags 2.6.0", ] [[package]] @@ -3035,10 +3597,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "str-buf" -version = "1.0.6" +name = "strict-num" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" [[package]] name = "string_cache" @@ -3048,8 +3610,8 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", - "phf_shared", + "parking_lot 0.12.1", + "phf_shared 0.10.0", "precomputed-hash", "serde", ] @@ -3060,8 +3622,8 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro2", "quote", ] @@ -3078,7 +3640,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "phf", + "phf 0.10.1", "strum_macros", ] @@ -3095,6 +3657,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "svg_fmt" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20e16a0f46cf5fd675563ef54f26e83e20f2366bcf027bcb3cc3ed2b98aaf2ca" + +[[package]] +name = "swash" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93cdc334a50fcc2aa3f04761af3b28196280a6aaadb1ef11215c478ae32615ac" +dependencies = [ + "skrifa", + "yazi", + "zeno", +] + [[package]] name = "syn" version = "1.0.109" @@ -3108,15 +3687,24 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sys-locale" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" +dependencies = [ + "libc", +] + [[package]] name = "tendril" version = "0.4.3" @@ -3170,7 +3758,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -3204,6 +3792,31 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -3253,14 +3866,29 @@ 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.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[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" @@ -3269,22 +3897,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] -name = "twoway" -version = "0.2.2" +name = "ttf-parser" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" +checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" + +[[package]] +name = "ttf-parser" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" dependencies = [ - "memchr", - "unchecked-index", + "core_maths", ] [[package]] -name = "type-map" -version = "0.5.0" +name = "twoway" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" +checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" dependencies = [ - "rustc-hash", + "memchr", + "unchecked-index", ] [[package]] @@ -3299,12 +3933,24 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" + [[package]] name = "unicode-bom" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63ec69f541d875b783ca40184d655f2927c95f0bffd486faa83cd3ac3529ec32" +[[package]] +name = "unicode-ccc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" + [[package]] name = "unicode-ident" version = "1.0.12" @@ -3312,13 +3958,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "unicode-linebreak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-properties" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" + +[[package]] +name = "unicode-script" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d71f5726e5f285a935e9fe8edfd53f0491eb6e9a5774097fdabee7cd8c9cd" [[package]] name = "unicode-segmentation" @@ -3350,17 +4005,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "utf-8" version = "0.7.6" @@ -3403,26 +4047,27 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -3440,9 +4085,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3450,32 +4095,47 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" + +[[package]] +name = "wasm-timer" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "wayland-backend" -version = "0.3.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "nix", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -3483,12 +4143,12 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.1" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ - "bitflags 2.4.2", - "nix", + "bitflags 2.6.0", + "rustix", "wayland-backend", "wayland-scanner", ] @@ -3499,7 +4159,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cursor-icon", "wayland-backend", ] @@ -3521,9 +4181,34 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" +dependencies = [ + "bitflags 2.6.0", "wayland-backend", "wayland-client", + "wayland-protocols 0.32.4", "wayland-scanner", ] @@ -3533,18 +4218,31 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.31.0", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" +dependencies = [ + "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.32.4", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", "quick-xml", @@ -3553,9 +4251,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.1" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -3565,9 +4263,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3575,44 +4273,27 @@ dependencies = [ [[package]] name = "web-time" -version = "0.2.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2391658b02c27719fc5a0a73d6e696285138e8b12fba9d4baa70451023c71" -dependencies = [ - "core-foundation", - "home", - "jni", - "log", - "ndk-context", - "objc", - "raw-window-handle", - "url", - "web-sys", -] - [[package]] name = "wgpu" -version = "0.18.0" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24" +checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" dependencies = [ "arrayvec", "cfg-if", - "flume 0.11.0", + "cfg_aliases 0.1.1", "js-sys", "log", "naga", - "parking_lot", + "parking_lot 0.12.1", "profiling", "raw-window-handle", "smallvec", @@ -3627,20 +4308,23 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.18.1" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef91c1d62d1e9e81c79e600131a258edf75c9531cbdbde09c44a011a47312726" +checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", "codespan-reporting", + "indexmap 2.1.0", "log", "naga", - "parking_lot", + "once_cell", + "parking_lot 0.12.1", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "web-sys", @@ -3650,16 +4334,17 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.18.1" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84ecc802da3eb67b4cf3dd9ea6fe45bbb47ef13e6c49c5c3240868a9cc6cdd9" +checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.4.2", + "bitflags 2.6.0", "block", + "cfg_aliases 0.1.1", "core-graphics-types", "d3d12", "glow", @@ -3675,14 +4360,15 @@ dependencies = [ "log", "metal", "naga", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -3693,11 +4379,11 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.18.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" +checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "js-sys", "web-sys", ] @@ -3733,21 +4419,26 @@ dependencies = [ "winapi", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "window_clipboard" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d692d46038c433f9daee7ad8757e002a4248c20b0a3fbc991d99521d3bcb6d" +dependencies = [ + "clipboard-win", + "clipboard_macos", + "clipboard_wayland", + "clipboard_x11", + "raw-window-handle", + "thiserror", +] + [[package]] name = "windows" version = "0.51.1" @@ -3976,37 +4667,53 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winit" -version = "0.29.10" +version = "0.30.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" +checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67" dependencies = [ + "ahash", "android-activity", "atomic-waker", - "bitflags 2.4.2", - "calloop", - "cfg_aliases", + "bitflags 2.6.0", + "block2", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation", "core-graphics", "cursor-icon", - "icrate", + "dpi", "js-sys", "libc", - "log", + "memmap2 0.9.4", "ndk", - "ndk-sys", "objc2", - "once_cell", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", + "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", + "sctk-adwaita", + "smithay-client-toolkit 0.19.2", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.32.4", + "wayland-protocols-plasma", "web-sys", "web-time", - "windows-sys 0.48.0", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", "xkbcommon-dl", ] @@ -4019,27 +4726,37 @@ dependencies = [ "memchr", ] +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + [[package]] name = "x11rb" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ + "as-raw-xcb-connection", "gethostname", - "nix", - "winapi", - "winapi-wsapoll", + "libc", + "libloading 0.8.1", + "once_cell", + "rustix", "x11rb-protocol", ] [[package]] name = "x11rb-protocol" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" -dependencies = [ - "nix", -] +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" @@ -4049,11 +4766,11 @@ checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" [[package]] name = "xkbcommon-dl" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "dlib", "log", "once_cell", @@ -4083,6 +4800,18 @@ dependencies = [ "markup5ever", ] +[[package]] +name = "yazi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" + +[[package]] +name = "zeno" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" + [[package]] name = "zerocopy" version = "0.7.32" @@ -4100,5 +4829,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index 8c26543..bdbcce3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ "./crates/erars-ast", "./crates/erars-bytecode", "./crates/erars-compiler", - "./crates/erars-egui", + "./crates/erars-iced", "./crates/erars-proxy-system", "./crates/erars-reader", "./crates/erars-lexer", @@ -20,6 +20,9 @@ members = [ "./crates/erars-vm", ] +[workspace.dependencies] +flume = "0.11.0" + [dev-dependencies] erars-ast = { path = "./crates/erars-ast" } erars-lexer = { path = "./crates/erars-lexer" } diff --git a/crates/erars-egui/src/main.rs b/crates/erars-egui/src/main.rs deleted file mode 100644 index e34cb95..0000000 --- a/crates/erars-egui/src/main.rs +++ /dev/null @@ -1,567 +0,0 @@ -#![windows_subsystem = "windows"] - -use std::{path::Path, sync::Arc}; - -use eframe::App; -use egui::{FontData, FontFamily, Widget}; -use erars_ast::{Alignment, Value}; -use erars_loader::{load_config, load_script, run_script}; -use erars_proxy_system::{ConsoleFrame, ProxyReceiver, SystemRequest, SystemResponse}; -use erars_ui::{ConsoleLinePart, InputRequest, InputRequestType}; - -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - -#[derive(clap::Parser)] -#[clap(author, version, about)] -struct Args { - #[clap( - value_parser, - default_value = ".", - help = "ERA game path default is current path" - )] - target_path: String, - - #[clap( - long, - default_value = "info", - help = "Log level (error, warn, info, debug, trace)" - )] - log_level: String, - - #[clap(long, help = "Don't print logs")] - quite: bool, - - #[clap(long, help = "Save bytecode")] - save: bool, - - #[clap(long, help = "Load bytecode")] - load: bool, - - #[clap(long, help = "Turn off ERB lint")] - lint_off: bool, -} - -fn load_font_data(source: fontdb::Source) -> egui::FontData { - match source { - fontdb::Source::Binary(bin) | fontdb::Source::SharedFile(_, bin) => { - FontData::from_owned(Vec::from((*bin).as_ref())) - } - fontdb::Source::File(file) => FontData::from_owned(std::fs::read(file).unwrap()), - } -} - -fn main() { - use flexi_logger::*; - - let args: Args = clap::Parser::parse(); - - let _handle = if args.quite { - None - } else { - Some( - Logger::try_with_str(format!("warn,erars={}", &args.log_level)) - .unwrap() - .rotate( - Criterion::AgeOrSize(Age::Day, 1024 * 1024), - Naming::Numbers, - Cleanup::KeepLogFiles(5), - ) - .log_to_file( - FileSpec::default() - .directory(Path::new(&args.target_path).join("logs")) - .basename("erars"), - ) - .write_mode(WriteMode::BufferAndFlush) - .create_symlink("last_log.log") - .use_utc() - .start() - .unwrap(), - ) - }; - - log_panics::init(); - - let config = load_config(&args.target_path); - - eframe::run_native( - "erars", - eframe::NativeOptions { - renderer: eframe::Renderer::Wgpu, - default_theme: eframe::Theme::Dark, - viewport: egui::ViewportBuilder::default() - .with_inner_size(egui::vec2( - config.window_width as _, - config.window_height as _, - )) - .with_drag_and_drop(true), - ..Default::default() - }, - Box::new(move |ctx| { - let egui_ctx = ctx.egui_ctx.clone(); - let (system, receiver) = - erars_proxy_system::new_proxy(Arc::new(move || egui_ctx.request_repaint())); - let font_size = config.font_size; - let line_height = config.line_height; - - let mut db = fontdb::Database::new(); - db.load_system_fonts(); - - let config_font = db - .query(&fontdb::Query { - families: &[ - fontdb::Family::Name(&config.font_family), - fontdb::Family::Name("GulimChe"), - fontdb::Family::Name("D2Coding"), - ], - ..Default::default() - }) - .unwrap(); - - let fallback = db.query(&fontdb::Query { - families: &[ - fontdb::Family::Name("GulimChe"), - fontdb::Family::Name("D2Coding"), - ], - ..Default::default() - }); - - let jp_fallback = db.query(&fontdb::Query { - families: &[fontdb::Family::Name("Meiryo")], - ..Default::default() - }); - - let emoji_font = db.query(&fontdb::Query { - families: &[ - fontdb::Family::Name("Noto Color Emoji"), - fontdb::Family::Name("Noto Emoji"), - fontdb::Family::Name("Segoe UI Emoji"), - ], - ..Default::default() - }); - - std::thread::Builder::new() - .stack_size(8 * 1024 * 1024) - .name("erars-runtime".into()) - .spawn(move || { - let system_back = system.clone(); - let system = Box::new(system); - let ret = if args.load { - unsafe { load_script(&args.target_path, system, config) } - } else { - run_script(&args.target_path, system, config, false, !args.lint_off) - }; - let normal = match ret { - Ok((vm, mut ctx, mut tx)) => vm.start(&mut tx, &mut ctx), - Err(err) => { - log::error!("Game loading failed: {err}"); - false - } - }; - - if normal { - system_back.send_quit(); - } - }) - .unwrap(); - let data = load_font_data(db.face_source(config_font).unwrap().0); - let fallback_data = - fallback.map(|fallback| load_font_data(db.face_source(fallback).unwrap().0)); - let jp_fallback_data = jp_fallback - .map(|jp_fallback| load_font_data(db.face_source(jp_fallback).unwrap().0)); - let emoji_data = - emoji_font.map(|emoji_font| load_font_data(db.face_source(emoji_font).unwrap().0)); - - let mut widgets = egui::style::Widgets::dark(); - widgets.noninteractive.bg_fill = egui::Color32::BLACK; - widgets.noninteractive.fg_stroke.color = egui::Color32::WHITE; - widgets.inactive.fg_stroke.color = egui::Color32::WHITE; - widgets.hovered.fg_stroke.color = egui::Color32::YELLOW; - - let mut style = egui::Style { - visuals: egui::Visuals { - button_frame: true, - extreme_bg_color: egui::Color32::BLACK, - faint_bg_color: egui::Color32::BLACK, - widgets, - panel_fill: egui::Color32::BLACK, - window_fill: egui::Color32::BLACK, - ..egui::Visuals::dark() - }, - ..(*ctx.egui_ctx.style()).clone() - }; - - style.spacing.item_spacing.x = 0.0; - style.spacing.item_spacing.y = (line_height.saturating_sub(font_size)) as f32; - - for font_id in style.text_styles.values_mut() { - font_id.family = FontFamily::Monospace; - font_id.size = font_size as f32; - } - - let mut font_def = egui::FontDefinitions::default(); - font_def.families.insert( - FontFamily::Monospace, - vec![ - "default".into(), - "fallback".into(), - "jp_fallback".into(), - "emoji".into(), - ], - ); - font_def.families.insert( - FontFamily::Proportional, - vec![ - "default".into(), - "fallback".into(), - "jp_fallback".into(), - "emoji".into(), - ], - ); - font_def.font_data.insert("default".into(), data); - if let Some(fallback_data) = fallback_data { - font_def.font_data.insert("fallback".into(), fallback_data); - } else { - log::warn!("Can't find fallback font"); - } - if let Some(jp_fallback_data) = jp_fallback_data { - font_def.font_data.insert("jp_fallback".into(), jp_fallback_data); - } else { - log::warn!("Can't find jp fallback font"); - } - if let Some(emoji_data) = emoji_data { - font_def.font_data.insert("emoji".into(), emoji_data); - } else { - log::warn!("Can't find emoji font"); - } - - ctx.egui_ctx.set_fonts(font_def); - ctx.egui_ctx.set_style(style); - - Box::new(EraApp::new(receiver, line_height)) - }), - ) - .unwrap(); -} - -struct EraApp { - current_req: Option, - need_scroll_down: bool, - skip: bool, - receiver: ProxyReceiver, - console_frame: ConsoleFrame, - input: String, - line_height: u32, -} - -impl EraApp { - pub fn new(receiver: ProxyReceiver, line_height: u32) -> Self { - Self { - current_req: None, - need_scroll_down: false, - skip: false, - receiver, - console_frame: ConsoleFrame::default(), - input: String::new(), - line_height, - } - } -} - -impl App for EraApp { - fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { - while let Ok(req) = self.receiver.req_rx.try_recv() { - match req { - SystemRequest::Quit => { - ctx.send_viewport_cmd(egui::ViewportCommand::Close); - } - SystemRequest::Input(req) => { - log::info!("Req <- {:?}", req.ty); - - match req.ty { - InputRequestType::AnyKey | InputRequestType::EnterKey if self.skip => { - self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); - } - _ => { - self.skip = false; - self.current_req = Some(req); - } - } - } - SystemRequest::Redraw(console_frame) => { - self.console_frame = console_frame; - self.need_scroll_down = true; - } - } - } - - self.draw_console(ctx, frame); - } - - fn clear_color(&self, _visuals: &egui::Visuals) -> [f32; 4] { - let [r, g, b] = self.console_frame.bg_color.0; - - [r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0, 1.0] - } -} - -impl EraApp { - fn draw_console(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - let current_input_gen = self.current_req.as_ref().map(|req| req.generation); - let receiver = &self.receiver; - - if ctx.input(|i| i.pointer.button_down(egui::PointerButton::Secondary)) - && self.current_req.as_ref().map_or(true, |req| { - matches!( - req.ty, - InputRequestType::AnyKey | InputRequestType::EnterKey - ) - }) - { - self.skip = true; - } - - egui::TopBottomPanel::top("setting").show(ctx, |ui| { - ui.menu_button("Setting", |ui| { - if ui.button("Exit").clicked() { - ctx.send_viewport_cmd(egui::ViewportCommand::Close); - } - }); - }); - - egui::TopBottomPanel::bottom("text_input_panel").show(ctx, |ui| { - let text_edit = ui.add_enabled( - self.current_req.is_some(), - egui::TextEdit::singleline(&mut self.input).desired_width(f32::INFINITY), - ); - - if self.current_req.is_some() && !text_edit.has_focus() { - text_edit.request_focus(); - } - }); - - egui::CentralPanel::default().show(ctx, |ui| { - let panel_size = ui.available_size(); - let console_show_lines = (panel_size.y / self.line_height as f32).floor() as usize; - let padding = console_show_lines.saturating_sub(self.console_frame.lines.len()); - - egui::ScrollArea::vertical() - .max_width(ui.available_width()) - .stick_to_bottom(true) - .auto_shrink([false, false]) - .show(ui, |ui| { - for _ in 0..padding { - ui.label(""); - } - for line in self.console_frame.lines.iter() { - match line.align { - Alignment::Left => { - ui.horizontal_wrapped(|ui| { - if ui.is_visible() { - for part in line.parts.iter() { - Self::draw_console_part( - ui, - &mut self.current_req, - current_input_gen, - part, - receiver, - ); - } - } - }); - } - Alignment::Center => { - ui.vertical_centered(|ui| { - if ui.is_visible() { - for part in line.parts.iter() { - Self::draw_console_part( - ui, - &mut self.current_req, - current_input_gen, - part, - receiver, - ); - } - } - }); - } - Alignment::Right => { - ui.with_layout( - egui::Layout::right_to_left(egui::Align::TOP), - |ui| { - if ui.is_visible() { - for part in line.parts.iter().rev() { - Self::draw_console_part( - ui, - &mut self.current_req, - current_input_gen, - part, - receiver, - ); - } - } - }, - ); - } - } - } - - if self.need_scroll_down { - ui.scroll_to_cursor(Some(egui::Align::BOTTOM)); - self.need_scroll_down = false; - } - }); - }); - - match self.current_req.as_ref() { - Some(req) => match req.ty { - InputRequestType::AnyKey => { - if ctx.input(|i| i.pointer.button_clicked(egui::PointerButton::Primary)) - || self.skip - || ctx.input(|i| { - i.events - .iter() - .any(|e| matches!(e, egui::Event::Key { pressed: true, .. })) - }) - { - self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); - self.input.clear(); - self.current_req = None; - log::info!("Res -> Empty"); - } - } - InputRequestType::EnterKey | InputRequestType::ForceEnterKey => { - if ctx.input(|i| i.pointer.button_clicked(egui::PointerButton::Primary)) - || self.skip - || ctx.input(|i| i.key_down(egui::Key::Enter)) - { - self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); - self.input.clear(); - self.current_req = None; - log::info!("Res -> Empty"); - } - } - InputRequestType::Int => { - if ctx.input(|i| i.key_down(egui::Key::Enter)) { - if let Ok(i) = self.input.parse() { - log::info!("Res -> {i}"); - self.receiver - .res_tx - .send(SystemResponse::Input(Value::Int(i))) - .unwrap(); - self.input.clear(); - self.current_req = None; - } - } - } - InputRequestType::Str => { - if ctx.input(|i| i.key_down(egui::Key::Enter)) { - log::info!("Res -> \"{}\"", self.input); - self.receiver - .res_tx - .send(SystemResponse::Input(Value::String(std::mem::take( - &mut self.input, - )))) - .unwrap(); - self.input.clear(); - self.current_req = None; - } - } - }, - None => {} - } - } - - fn draw_console_part( - ui: &mut egui::Ui, - current_input: &mut Option, - current_input_gen: Option, - part: &ConsoleLinePart, - receiver: &ProxyReceiver, - ) { - match part { - ConsoleLinePart::Button(btn_parts, input_gen, value) => { - for (text, style) in btn_parts.iter() { - let enabled = current_input_gen == Some(*input_gen); - let btn_res = EraButton::new(text.clone(), style, enabled).ui(ui); - if enabled && btn_res.on_hover_cursor(egui::CursorIcon::PointingHand).clicked() - { - log::info!("Res -> {value:?}"); - *current_input = None; - receiver.res_tx.send(SystemResponse::Input(value.clone())).unwrap(); - } - } - } - ConsoleLinePart::Text(s, color) => { - ui.colored_label(to_egui_color(color.color), s); - } - ConsoleLinePart::Line(text, color) => { - let width = ui.available_width(); - let font_id = &ui.style().text_styles[&egui::TextStyle::Monospace]; - let char_width = text - .chars() - .map(|c| ui.fonts(|f| f.glyph_width(font_id, c))) - .sum::(); - let s = text.repeat((width / char_width).floor() as usize); - ui.colored_label(to_egui_color(color.color), s); - } - } - } -} - -fn to_egui_color(c: erars_ui::Color) -> egui::Color32 { - let [r, g, b] = c.0; - egui::Color32::from_rgb(r, g, b) -} - -struct EraButton { - text: egui::WidgetText, - color: egui::Color32, - hl_color: egui::Color32, - enabled: bool, -} - -impl EraButton { - pub fn new(text: String, style: &erars_ui::TextStyle, enabled: bool) -> Self { - Self { - text: text.into(), - color: to_egui_color(style.color), - hl_color: egui::Color32::YELLOW, - enabled, - } - } -} - -impl Widget for EraButton { - fn ui(self, ui: &mut egui::Ui) -> egui::Response { - let text = self.text.into_galley( - ui, - Some(false), - ui.available_width(), - egui::TextStyle::Button, - ); - let (rect, response) = ui.allocate_exact_size( - text.size(), - if self.enabled { - egui::Sense::click() - } else { - egui::Sense::hover() - }, - ); - response.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, text.text())); - - if ui.is_rect_visible(rect) { - let text_pos = ui.layout().align_size_within_rect(text.size(), rect).min; - - let color = if self.enabled && response.hovered() { - self.hl_color - } else { - self.color - }; - - ui.painter().galley_with_override_text_color(text_pos, text, color); - } - - response - } -} diff --git a/crates/erars-egui/Cargo.toml b/crates/erars-iced/Cargo.toml similarity index 52% rename from crates/erars-egui/Cargo.toml rename to crates/erars-iced/Cargo.toml index df74798..cb82747 100644 --- a/crates/erars-egui/Cargo.toml +++ b/crates/erars-iced/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "erars-egui" +name = "erars-iced" version = "0.5.0" edition = "2021" license = "GPL-3.0-or-later" @@ -12,11 +12,31 @@ erars-vm = { path = "../erars-vm" } erars-loader = { path = "../erars-loader", features = ["multithread"] } erars-proxy-system = { path = "../erars-proxy-system" } -egui = "0.25.0" -eframe = { version = "0.25.0", default-features = false, features = ["wgpu"] } -fontdb = { version = "0.16.0", features = ["fontconfig"] } +flume.workspace = true + +futures-util = "0.3" +fontdb = { version = "0.22.0", features = ["fontconfig"] } clap = { version = "4", features = ["derive"] } -flexi_logger = "0.27.2" +flexi_logger = "0.29.0" log-panics = "2.1.0" log = "0.4.17" mimalloc = { version = "0.1.31", default-features = false } + +iced_futures = "0.13.0" + +[dependencies.iced] +version = "0.13.0" +default-features = false +features = ["wgpu"] + +[dependencies.cosmic-text] +version = "0.12.1" +features = ["monospace_fallback", "shape-run-cache"] + +[profile.dev.package.swash] +opt-level = 3 +debug = false + +[profile.dev.package.cosmic-text] +opt-level = 3 +debug = false diff --git a/crates/erars-iced/src/main.rs b/crates/erars-iced/src/main.rs new file mode 100644 index 0000000..d8ca541 --- /dev/null +++ b/crates/erars-iced/src/main.rs @@ -0,0 +1,541 @@ +#![windows_subsystem = "windows"] + +use std::{path::Path, sync::Arc}; + +use erars_ast::{get_interner, Alignment, Value}; +use erars_loader::{load_config, load_script, run_script}; +use erars_proxy_system::{ConsoleFrame, ProxyReceiver, SystemRequest, SystemResponse}; +use erars_ui::{ConsoleLinePart, InputRequest, InputRequestType}; +use futures_util::StreamExt; +use iced::{ + futures::channel::oneshot, + theme::Palette, + widget::{ + button, column, horizontal_rule, row, scrollable, slider, text, text::Shaping, text_input, + vertical_space, + }, + window, Element, Length, Subscription, Task, +}; + +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; + +#[derive(clap::Parser)] +#[clap(author, version, about)] +struct Args { + #[clap( + value_parser, + default_value = ".", + help = "ERA game path default is current path" + )] + target_path: String, + + #[clap( + long, + default_value = "info", + help = "Log level (error, warn, info, debug, trace)" + )] + log_level: String, + + #[clap(long, help = "Don't print logs")] + quite: bool, + + #[clap(long, help = "Save bytecode")] + save: bool, + + #[clap(long, help = "Load bytecode")] + load: bool, + + #[clap(long, help = "Turn off ERB lint")] + lint_off: bool, +} + +fn main() { + use flexi_logger::*; + + let args: Args = clap::Parser::parse(); + + let _handle = if args.quite { + None + } else { + Some( + Logger::try_with_str(format!( + "warn,wgpu_hal=off,erars={level},erars-iced={level},cosmic-text=trace", + level = &args.log_level + )) + .unwrap() + .rotate( + Criterion::AgeOrSize(Age::Day, 1024 * 1024), + Naming::Numbers, + Cleanup::KeepLogFiles(5), + ) + .log_to_file( + FileSpec::default() + .directory(Path::new(&args.target_path).join("logs")) + .basename("erars"), + ) + .write_mode(WriteMode::BufferAndFlush) + .create_symlink("last_log.log") + .use_utc() + .start() + .unwrap(), + ) + }; + + log_panics::init(); + + let config = load_config(&args.target_path); + let (system, receiver) = erars_proxy_system::new_proxy(Arc::new(move || {})); + let (interner_tx, interner_rx) = flume::bounded(0); + let font_family = config.font_family.clone(); + let font_size = config.font_size; + let line_height = config.line_height; + + std::thread::Builder::new() + .stack_size(8 * 1024 * 1024) + .name("erars-runtime".into()) + .spawn(move || { + let system_back = system.clone(); + let system = Box::new(system); + let ret = if args.load { + unsafe { load_script(&args.target_path, system, config) } + } else { + run_script(&args.target_path, system, config, false, !args.lint_off) + }; + interner_tx.send(get_interner()).unwrap(); + drop(interner_tx); + let normal = match ret { + Ok((vm, mut ctx, mut tx)) => vm.start(&mut tx, &mut ctx), + Err(err) => { + log::error!("Game loading failed: {err}"); + false + } + }; + + if normal { + system_back.send_quit(); + } + }) + .unwrap(); + + let interner = interner_rx.recv().unwrap(); + drop(interner_rx); + + let mut app = iced::application("erars", EraApp::update, EraApp::view) + .subscription(move |state| { + Subscription::run_with_id( + 0, + state + .receiver + .req_rx + .clone() + .into_stream() + .map(Message::SystemRequest), + ) + }) + .antialiasing(true) + .default_font(iced::Font::with_name( + interner.resolve(&interner.get_or_intern(font_family)), + )) + .theme(EraApp::theme); + + for font in [ + "C:\\Windows\\Fonts\\msgothic.ttc", + "C:\\Windows\\Fonts\\YuGothR.ttc", + "C:\\Windows\\Fonts\\malgun.ttf", + "C:\\Windows\\Fonts\\Gulim.ttc", + ] { + app = app.font(std::fs::read(font).unwrap()); + } + + app.run_with(move || (EraApp::new(interner, receiver, line_height), Task::none())) + .unwrap(); +} + +struct EraApp { + interner: &'static erars_ast::Interner, + current_req: Option, + need_scroll_down: bool, + skip: bool, + console_frame: ConsoleFrame, + input: String, + line_height: u32, + receiver: ProxyReceiver, + + current_scroll_offset: scrollable::RelativeOffset, +} + +impl EraApp { + pub fn new( + interner: &'static erars_ast::Interner, + receiver: ProxyReceiver, + line_height: u32, + ) -> Self { + Self { + interner, + receiver, + current_req: None, + need_scroll_down: false, + skip: false, + console_frame: ConsoleFrame::default(), + input: String::new(), + line_height, + + current_scroll_offset: scrollable::RelativeOffset::START, + } + } + + fn send_input(&mut self, input: Value) { + assert!(self.current_req.is_some()); + self.current_req = None; + self.receiver.res_tx.send(SystemResponse::Input(input)).unwrap(); + } + + fn update(&mut self, message: Message) -> Task { + log::info!("Message: {:?}", message); + match message { + Message::SystemRequest(req) => match req { + SystemRequest::Quit => window::get_latest().and_then(window::close), + SystemRequest::Input(req) => { + log::info!("Req <- {:?}", req.ty); + + match req.ty { + InputRequestType::AnyKey | InputRequestType::EnterKey if self.skip => { + self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); + } + _ => { + self.skip = false; + self.current_req = Some(req); + } + } + Task::none() + } + SystemRequest::Redraw(console_frame) => { + self.console_frame = console_frame; + self.need_scroll_down = true; + Task::none() + } + }, + Message::Scrolled(viewport) => { + self.current_scroll_offset = viewport.relative_offset(); + Task::none() + } + Message::InputEdited(input) => { + if let Some(req) = self.current_req.as_ref() { + match req.ty { + InputRequestType::Int => { + if input.chars().all(|c| c.is_ascii_digit()) { + self.input = input; + } + } + InputRequestType::AnyKey => { + self.send_input(Value::EMPTY); + } + _ => { + self.input = input; + } + } + } + Task::none() + } + Message::InputSubmitted => { + let Some(req) = self.current_req.as_ref() else { + unreachable!(); + }; + + let input = std::mem::take(&mut self.input); + + match req.ty { + InputRequestType::Int => { + let Ok(i) = input.parse() else { + unreachable!(); + }; + self.send_input(Value::Int(i)); + } + _ => { + self.send_input(Value::String(input)); + } + } + Task::none() + } + Message::ButtonClicked(value) => { + self.send_input(value); + Task::none() + } + } + + // self.draw_console(ctx, frame); + } + + fn view(&self) -> Element { + let current_input_gen = self.current_req.as_ref().map(|req| req.generation); + + // egui::TopBottomPanel::top("setting").show(ctx, |ui| { + // ui.menu_button("Setting", |ui| { + // if ui.button("Exit").clicked() { + // ctx.send_viewport_cmd(egui::ViewportCommand::Close); + // } + // }); + // }); + + let mut console_content = Vec::new(); + + for line in self.console_frame.lines.iter() { + let mut line_content = Vec::new(); + for part in line.parts.iter() { + line_content.push(self.draw_console_part(current_input_gen, part)); + } + console_content.push(row(line_content).height(self.line_height as f32).into()); + } + + let console = scrollable(column(console_content)) + .direction(scrollable::Direction::Vertical(scrollable::Scrollbar::new())) + .height(Length::Fill) + .width(Length::Fill) + .on_scroll(Message::Scrolled); + column![ + console, + text_input("", &self.input) + .on_input(Message::InputEdited) + .on_paste(Message::InputEdited) + .on_submit(Message::InputSubmitted) + .width(Length::Fill) + ] + .height(Length::Fill) + .into() + + // egui::CentralPanel::default().show(ctx, |ui| { + // let panel_size = ui.available_size(); + // let console_show_lines = (panel_size.y / self.line_height as f32).floor() as usize; + // let padding = console_show_lines.saturating_sub(self.console_frame.lines.len()); + + // egui::ScrollArea::vertical() + // .max_width(ui.available_width()) + // .stick_to_bottom(true) + // .auto_shrink([false, false]) + // .show(ui, |ui| { + // for _ in 0..padding { + // ui.label(""); + // } + // for line in self.console_frame.lines.iter() { + // match line.align { + // Alignment::Left => { + // ui.horizontal_wrapped(|ui| { + // if ui.is_visible() { + // for part in line.parts.iter() { + // Self::draw_console_part( + // ui, + // &mut self.current_req, + // current_input_gen, + // part, + // receiver, + // ); + // } + // } + // }); + // } + // Alignment::Center => { + // ui.vertical_centered(|ui| { + // if ui.is_visible() { + // for part in line.parts.iter() { + // Self::draw_console_part( + // ui, + // &mut self.current_req, + // current_input_gen, + // part, + // receiver, + // ); + // } + // } + // }); + // } + // Alignment::Right => { + // ui.with_layout( + // egui::Layout::right_to_left(egui::Align::TOP), + // |ui| { + // if ui.is_visible() { + // for part in line.parts.iter().rev() { + // Self::draw_console_part( + // ui, + // &mut self.current_req, + // current_input_gen, + // part, + // receiver, + // ); + // } + // } + // }, + // ); + // } + // } + // } + + // if self.need_scroll_down { + // ui.scroll_to_cursor(Some(egui::Align::BOTTOM)); + // self.need_scroll_down = false; + // } + // }); + // }); + + // match self.current_req.as_ref() { + // Some(req) => match req.ty { + // InputRequestType::AnyKey => { + // if ctx.input(|i| i.pointer.button_clicked(egui::PointerButton::Primary)) + // || self.skip + // || ctx.input(|i| { + // i.events + // .iter() + // .any(|e| matches!(e, egui::Event::Key { pressed: true, .. })) + // }) + // { + // self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); + // self.input.clear(); + // self.current_req = None; + // log::info!("Res -> Empty"); + // } + // } + // InputRequestType::EnterKey | InputRequestType::ForceEnterKey => { + // if ctx.input(|i| i.pointer.button_clicked(egui::PointerButton::Primary)) + // || self.skip + // || ctx.input(|i| i.key_down(egui::Key::Enter)) + // { + // self.receiver.res_tx.send(SystemResponse::Empty).unwrap(); + // self.input.clear(); + // self.current_req = None; + // log::info!("Res -> Empty"); + // } + // } + // InputRequestType::Int => { + // if ctx.input(|i| i.key_down(egui::Key::Enter)) { + // if let Ok(i) = self.input.parse() { + // log::info!("Res -> {i}"); + // self.receiver + // .res_tx + // .send(SystemResponse::Input(Value::Int(i))) + // .unwrap(); + // self.input.clear(); + // self.current_req = None; + // } + // } + // } + // InputRequestType::Str => { + // if ctx.input(|i| i.key_down(egui::Key::Enter)) { + // log::info!("Res -> \"{}\"", self.input); + // self.receiver + // .res_tx + // .send(SystemResponse::Input(Value::String(std::mem::take( + // &mut self.input, + // )))) + // .unwrap(); + // self.input.clear(); + // self.current_req = None; + // } + // } + // }, + // None => {} + // } + } + + fn make_font(&self, family: &str) -> iced::Font { + if family.is_empty() { + iced::Font::MONOSPACE + } else { + iced::Font::with_name(self.interner.resolve(&self.interner.get_or_intern(family))) + } + } + + fn draw_console_part<'a>( + &'a self, + current_input_gen: Option, + part: &'a ConsoleLinePart, + ) -> Element<'a, Message> { + log::info!("Draw part: {:?}", part); + match part { + ConsoleLinePart::Button(btn_parts, input_gen, value) => row(btn_parts + .iter() + .map(|(s, style)| { + let enabled = current_input_gen == Some(*input_gen); + button( + text(s.as_str()) + .line_height(1.0) + .shaping(Shaping::Advanced) + .font(self.make_font(&style.font_family)), + ) + .on_press_maybe(if enabled { + Some(Message::ButtonClicked(value.clone())) + } else { + None + }) + .height(self.line_height as f32) + .style(move |theme: &iced::Theme, status: button::Status| { + let mut text = to_iced_color(style.color); + + if enabled { + match status { + button::Status::Hovered => { + text = iced::Color::from_rgb8(0xff, 0xff, 0x00); + } + button::Status::Disabled => { + text = iced::Color::from_rgb8(0x2f, 0x2f, 0x2f) + } + _ => {} + } + } + button::Style { + text_color: text, + background: None, + ..Default::default() + } + }) + .into() + }) + .collect::>()) + .into(), + ConsoleLinePart::Text(s, color) => text(s.as_str()) + .color(to_iced_color(color.color)) + .font(self.make_font(&color.font_family)) + .line_height(1.0) + .shaping(Shaping::Advanced) + .into(), + ConsoleLinePart::Line(s, color) => { + text(s.repeat(4)) + .color(to_iced_color(color.color)) + .font(self.make_font(&color.font_family)) + .line_height(1.0) + .shaping(Shaping::Advanced) + .into() + // let width = ui.available_width(); + // let font_id = &ui.style().text_styles[&egui::TextStyle::Monospace]; + // let char_width = text + // .chars() + // .map(|c| ui.fonts(|f| f.glyph_width(font_id, c))) + // .sum::(); + // let s = text.repeat((width / char_width).floor() as usize); + // ui.colored_label(to_egui_color(color.color), s); + } + } + } + + fn theme(&self) -> iced::Theme { + iced::Theme::Dark + } +} + +#[inline] +fn to_iced_color(erars_ui::Color([r, g, b]): erars_ui::Color) -> iced::Color { + iced::Color::from_rgb8(r, g, b) +} + +// fn to_egui_color(c: erars_ui::Color) -> egui::Color32 { +// let [r, g, b] = c.0; +// egui::Color32::from_rgb(r, g, b) +// } + +#[derive(Clone, Debug)] +enum Message { + SystemRequest(SystemRequest), + Scrolled(scrollable::Viewport), + ButtonClicked(Value), + InputEdited(String), + InputSubmitted, +} diff --git a/crates/erars-proxy-system/Cargo.toml b/crates/erars-proxy-system/Cargo.toml index 6fe9e66..2ecd3e1 100644 --- a/crates/erars-proxy-system/Cargo.toml +++ b/crates/erars-proxy-system/Cargo.toml @@ -5,9 +5,11 @@ edition = "2021" license = "GPL-3.0-or-later" [dependencies] -anyhow = "1.0.66" erars-ast = { path = "../erars-ast" } erars-compiler = { path = "../erars-compiler" } erars-ui = { path = "../erars-ui" } erars-vm = { path = "../erars-vm" } -flume = "0.10.14" + +flume.workspace = true + +anyhow = "1.0.66" diff --git a/crates/erars-proxy-system/src/lib.rs b/crates/erars-proxy-system/src/lib.rs index 4055100..2b6a034 100644 --- a/crates/erars-proxy-system/src/lib.rs +++ b/crates/erars-proxy-system/src/lib.rs @@ -88,6 +88,7 @@ impl ConsoleFrame { } } +#[derive(Debug, Clone)] pub enum SystemRequest { Redraw(ConsoleFrame), Input(InputRequest),