From 66b8713e3a5d4b95b64d2c8f9cdbe0fac43f60cd Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Sat, 31 Oct 2026 17:50:46 +0100 Subject: [PATCH] dyn calling works + vibed dioxus ui components + some mo provision prototyping --- Cargo.lock | 5699 ++++++++++++++++- Cargo.toml | 6 + core/src/config.rs | 106 +- core/src/instance/mod.rs | 209 +- core/src/item.rs | 886 ++- core/src/lib.rs | 3 +- core/src/platform/os/logging.rs | 8 +- core/src/platform/os/mod.rs | 13 +- flake.nix | 3 - macros/src/lib.rs | 2 +- parts/cli/src/lib.rs | 31 +- parts/mize.dev/src/codegen.rs | 167 + parts/mize.dev/src/generated.rs | 12 +- parts/mize.dev/src/lib.rs | 86 +- parts/mize.ui/Cargo.toml | 6 + parts/mize.ui/dioxus-components/Cargo.toml | 17 + parts/mize.ui/dioxus-components/PLAN.md | 7 + .../dioxus-components/assets/theme.css | 44 + .../src/components/avatar/component.rs | 206 + .../src/components/avatar/mod.rs | 2 + .../src/components/avatar/style.css | 84 + .../src/components/badge/component.rs | 74 + .../src/components/badge/mod.rs | 2 + .../src/components/badge/style.css | 37 + .../src/components/button/component.rs | 108 + .../src/components/button/mod.rs | 2 + .../src/components/button/style.css | 195 + .../src/components/card/component.rs | 109 + .../src/components/card/mod.rs | 3 + .../src/components/card/style.css | 52 + .../src/components/checkbox/component.rs | 26 + .../src/components/checkbox/mod.rs | 2 + .../src/components/checkbox/style.css | 34 + .../src/components/dialog/component.rs | 62 + .../src/components/dialog/mod.rs | 2 + .../src/components/dialog/style.css | 100 + .../src/components/input/component.rs | 57 + .../src/components/input/mod.rs | 2 + .../src/components/input/style.css | 40 + .../src/components/label/component.rs | 16 + .../src/components/label/mod.rs | 2 + .../src/components/label/style.css | 9 + .../dioxus-components/src/components/mod.rs | 25 + .../src/components/scroll_area/component.rs | 7 + .../src/components/scroll_area/mod.rs | 2 + .../src/components/scroll_area/style.css | 1 + .../src/components/separator/component.rs | 23 + .../src/components/separator/mod.rs | 2 + .../src/components/separator/style.css | 13 + .../src/components/switch/component.rs | 23 + .../src/components/switch/mod.rs | 2 + .../src/components/switch/style.css | 41 + .../src/components/textarea/component.rs | 82 + .../src/components/textarea/mod.rs | 2 + .../src/components/textarea/style.css | 84 + parts/mize.ui/dioxus-components/src/lib.rs | 14 + parts/mize.ui/src/main.rs | 3 + parts/mos/disk_provision.py | 83 + parts/mos/partition_table.py | 313 + parts/mos/run_vm.py | 6 + 60 files changed, 9056 insertions(+), 201 deletions(-) create mode 100644 parts/mize.dev/src/codegen.rs create mode 100644 parts/mize.ui/Cargo.toml create mode 100644 parts/mize.ui/dioxus-components/Cargo.toml create mode 100644 parts/mize.ui/dioxus-components/PLAN.md create mode 100644 parts/mize.ui/dioxus-components/assets/theme.css create mode 100644 parts/mize.ui/dioxus-components/src/components/avatar/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/avatar/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/avatar/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/badge/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/badge/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/badge/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/button/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/button/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/button/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/card/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/card/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/card/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/checkbox/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/checkbox/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/checkbox/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/dialog/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/dialog/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/dialog/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/input/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/input/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/input/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/label/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/label/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/label/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/scroll_area/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/scroll_area/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/scroll_area/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/separator/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/separator/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/separator/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/switch/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/switch/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/switch/style.css create mode 100644 parts/mize.ui/dioxus-components/src/components/textarea/component.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/textarea/mod.rs create mode 100644 parts/mize.ui/dioxus-components/src/components/textarea/style.css create mode 100644 parts/mize.ui/dioxus-components/src/lib.rs create mode 100644 parts/mize.ui/src/main.rs create mode 100644 parts/mos/disk_provision.py create mode 100644 parts/mos/partition_table.py create mode 100644 parts/mos/run_vm.py diff --git a/Cargo.lock b/Cargo.lock index da7eb12..96c05de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + [[package]] name = "anstream" version = "1.0.0" @@ -67,6 +85,152 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" + +[[package]] +name = "arborium" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230e826fe3204178030e420751396c99431e4611fc67af63baf7767b4317bd75" +dependencies = [ + "arborium-css", + "arborium-highlight", + "arborium-rust", + "arborium-theme", + "arborium-tree-sitter", + "dlmalloc", +] + +[[package]] +name = "arborium-css" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3bf02fc773bafaac2cdc27862d6eb52e86927e740c69e0d87b4123f2589b9af" +dependencies = [ + "arborium-sysroot", + "cc", + "tree-sitter-language", +] + +[[package]] +name = "arborium-highlight" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee400d694bd935c513c50f9b1fda469b6d9cd192d80fede7bfa9e5851a54cb8" +dependencies = [ + "arborium-theme", + "arborium-tree-sitter", + "streaming-iterator", +] + +[[package]] +name = "arborium-rust" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8471397c67c4164b93d6a23ae80fb5b7af5dcc00fa9b143015efb1ea927ca8da" +dependencies = [ + "arborium-sysroot", + "cc", + "tree-sitter-language", +] + +[[package]] +name = "arborium-sysroot" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd9d120dd5df8b918cd96676a88f1233a66f10687d415b69f70b3396acddddf" +dependencies = [ + "cc", + "dlmalloc", +] + +[[package]] +name = "arborium-theme" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "042f9d025c80b2e625b4f0f10eda56a652444ef916025e855a292937bb8a949a" + +[[package]] +name = "arborium-tree-sitter" +version = "2.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd8de97695c76508ab780e03bd1db009f5db8567c985f5da5ae91a2ad57ef2bc" +dependencies = [ + "arborium-sysroot", + "cc", + "regex", + "regex-syntax", + "streaming-iterator", + "tree-sitter-language", +] + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "async-trait" version = "0.1.92" @@ -78,6 +242,100 @@ dependencies = [ "syn 3.0.5", ] +[[package]] +name = "async-tungstenite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee88b4c88ac8c9ea446ad43498955750a4bbe64c4392f21ccfe5d952865e318f" +dependencies = [ + "atomic-waker", + "futures-core", + "futures-io", + "futures-task", + "futures-util", + "log", + "pin-project-lite", + "tungstenite 0.27.0", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey", + "rayon", + "thiserror 2.0.20", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +dependencies = [ + "arrayvec", +] + [[package]] name = "aws-lc-rs" version = "1.18.1" @@ -101,6 +359,72 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "axum" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + [[package]] name = "bitflags" version = "1.3.2" @@ -112,6 +436,24 @@ name = "bitflags" version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] + +[[package]] +name = "bitstream-io" +version = "4.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" +dependencies = [ + "no_std_io2", +] + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" @@ -122,17 +464,84 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "built" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" + [[package]] name = "bumpalo" version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[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.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] [[package]] name = "cc" @@ -146,6 +555,33 @@ dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -158,6 +594,33 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + +[[package]] +name = "charset" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e" +dependencies = [ + "base64 0.22.1", + "encoding_rs", +] + [[package]] name = "ciborium" version = "0.2.2" @@ -245,6 +708,41 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "cocoa" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad36507aeb7e16159dfe68db81ccc27571c3ccd4b76fb2fb72fc59e7a4b1b64c" +dependencies = [ + "bitflags 2.13.1", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.24.0", + "foreign-types 0.5.0", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d" +dependencies = [ + "bitflags 2.13.1", + "block", + "core-foundation", + "core-graphics-types", + "objc", +] + +[[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.5" @@ -261,6 +759,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -271,12 +779,196 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-serialize" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad7154afa56de2f290e3c82c2c6dc4f5b282b6870903f56ef3509aba95866edc" +dependencies = [ + "const-serialize-macro 0.7.2", +] + +[[package]] +name = "const-serialize" +version = "0.8.0-alpha.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e42cd5aabba86f128b3763da1fec1491c0f728ce99245062cd49b6f9e6d235b" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize-macro 0.8.0-alpha.3", + "serde", +] + +[[package]] +name = "const-serialize-macro" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f160aad86b4343e8d4e261fee9965c3005b2fd6bc117d172ab65948779e4acf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "const-serialize-macro" +version = "0.8.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7d372d7ea4c50890f188c72a08782d5c98bc8c7cc9dc4343b61d8ba8e20c26b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "const-str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0664d2867b4a32697dfe655557f5c3b187e9b605b38612a748e5ec99811d160" + +[[package]] +name = "const_format" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3decb4d6965448659923544a634a0571ba44cede4e11ef15a5a317126840454" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941b570269a642506f08cb5b688c04bfa6cfd41a26f8bcdc49db8fd00c0ab659" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "content_disposition" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc14a88e1463ddd193906285abe5c360c7e8564e05ccc5d501755f7fbc9ca9c" +dependencies = [ + "charset", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b2c103cf610ec6cae3da84a766285b42fd16aad564758459e6ecf128c75206" +dependencies = [ + "cookie", + "document-features", + "idna", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "libc", +] + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + [[package]] name = "cpufeatures" version = "0.2.17" @@ -286,6 +978,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.1" @@ -295,6 +996,15 @@ dependencies = [ "cfg-if 1.0.4", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-deque" version = "0.8.8" @@ -336,6 +1046,33 @@ dependencies = [ "typenum", ] +[[package]] +name = "cssparser" +version = "0.29.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "matches", + "phf 0.10.1", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.119", +] + [[package]] name = "daemonize" version = "0.5.0" @@ -345,6 +1082,46 @@ dependencies = [ "libc", ] +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + [[package]] name = "defmt" version = "1.1.1" @@ -373,7 +1150,49 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" dependencies = [ - "thiserror", + "thiserror 2.0.20", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case 0.10.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", + "unicode-xid", ] [[package]] @@ -386,6 +1205,704 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dioxus" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9320593eda4f01858f046698b42441603d2af5fcb62a6c1f9046a0c2eebd6d9b" +dependencies = [ + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-config-macro", + "dioxus-config-macros", + "dioxus-core", + "dioxus-core-macro", + "dioxus-desktop", + "dioxus-devtools", + "dioxus-document", + "dioxus-fullstack", + "dioxus-history", + "dioxus-hooks", + "dioxus-html", + "dioxus-logger", + "dioxus-signals", + "dioxus-stores", + "dioxus-web", + "manganis", + "subsecond", + "warnings", +] + +[[package]] +name = "dioxus-asset-resolver" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84235ff0e272f15d4537603cdd50df6d45d50e51bb96326dbc0bdfd01d825226" +dependencies = [ + "dioxus-cli-config", + "http", + "infer", + "jni 0.21.1", + "js-sys", + "ndk", + "ndk-context", + "ndk-sys", + "percent-encoding", + "thiserror 2.0.20", + "tokio", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "dioxus-attributes" +version = "0.1.0" +source = "git+https://github.com/DioxusLabs/components#9a758255ea26e2b20c8cecf4c1c946feb9e71da7" +dependencies = [ + "dioxus-rsx", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-cli-config" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322d10f47effebd85ee0662a2cb083ff920d40dd6295a4afd8cfa4f9bc2e05c6" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "dioxus-code" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859cbf40e5da690df269d4d1ab01b4ec9921b408cec4cabce2dd1620cc15670e" +dependencies = [ + "arborium", + "arborium-theme", + "arborium-tree-sitter", + "dioxus", + "dioxus-code-macro", +] + +[[package]] +name = "dioxus-code-macro" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8654ef9b81bb051546b772cfd709401055a1460b3e8fb26d7847b040498354d0" +dependencies = [ + "arborium", + "arborium-theme", + "macro-string", + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-components" +version = "0.1.0" +dependencies = [ + "dioxus", + "dioxus-code", + "dioxus-icons", + "dioxus-primitives", +] + +[[package]] +name = "dioxus-config-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3a906c8219e94fa48189a793c760a4e3193cbb7791f799e9d37633fe41161d" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "dioxus-config-macros" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20de015bc89c20f4ffc7b4f849943420308365fa66f991250b5c075261990a21" + +[[package]] +name = "dioxus-core" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b232228ada232c0adc151e41ebd9ef70cc04683db097fa0dc6015979fa01722" +dependencies = [ + "anyhow", + "const_format", + "dioxus-core-types", + "futures-channel", + "futures-util", + "generational-box", + "longest-increasing-subsequence", + "rustc-hash 2.1.3", + "rustversion", + "serde", + "slab", + "slotmap", + "subsecond", + "tracing", +] + +[[package]] +name = "dioxus-core-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6256a68462222f0600f5fd7d9542cbd9f299bc19355d900f7827dd3fc9e09fdb" +dependencies = [ + "convert_case 0.8.0", + "dioxus-rsx", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-core-types" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96007ed6cbad951dfed82d83c581aabd95bc591f351f5666d454ddbe7845b324" + +[[package]] +name = "dioxus-desktop" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "236deb81f1a04de704fb80cf7838c65607441c76914de2e036709540c540a39d" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.22.1", + "bytes", + "cocoa", + "core-foundation", + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-core", + "dioxus-devtools", + "dioxus-document", + "dioxus-history", + "dioxus-hooks", + "dioxus-html", + "dioxus-interpreter-js", + "dioxus-signals", + "dunce", + "futures-channel", + "futures-util", + "generational-box", + "global-hotkey", + "image", + "infer", + "jni 0.21.1", + "lazy-js-bundle", + "libc", + "muda", + "ndk", + "ndk-context", + "ndk-sys", + "objc", + "objc_id", + "percent-encoding", + "rand 0.9.5", + "rfd", + "rustc-hash 2.1.3", + "serde", + "serde_json", + "signal-hook", + "slab", + "subtle", + "tao", + "thiserror 2.0.20", + "tokio", + "tracing", + "tray-icon", + "tungstenite 0.28.0", + "webbrowser", + "wry", +] + +[[package]] +name = "dioxus-devtools" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434cebb282b3f820a341582ebfd37dab907d5a25c3eeafd87802468afcd2a959" +dependencies = [ + "dioxus-cli-config", + "dioxus-core", + "dioxus-devtools-types", + "dioxus-signals", + "serde", + "serde_json", + "subsecond", + "thiserror 2.0.20", + "tracing", + "tungstenite 0.28.0", +] + +[[package]] +name = "dioxus-devtools-types" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfd6f3475e38c93be245a664a9ce11679a8f2b99832620705cf7837f42aa39ce" +dependencies = [ + "dioxus-core", + "serde", + "subsecond-types", +] + +[[package]] +name = "dioxus-document" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f6fadd5c6d886b48b762820abae1a08142a2159f8a1136c0466b4b4ed9f547e" +dependencies = [ + "dioxus-core", + "dioxus-core-macro", + "dioxus-core-types", + "dioxus-html", + "futures-channel", + "futures-util", + "generational-box", + "lazy-js-bundle", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "dioxus-fullstack" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91d5acabd1470145bcf164cab9fd2edcf2e4fba0fa6fb0fd6dca23079fcc169" +dependencies = [ + "anyhow", + "async-stream", + "async-tungstenite", + "axum", + "axum-core", + "base64 0.22.1", + "bytes", + "ciborium", + "const-str", + "const_format", + "content_disposition", + "derive_more 2.1.1", + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-core", + "dioxus-fullstack-core", + "dioxus-fullstack-macro", + "dioxus-hooks", + "dioxus-html", + "dioxus-signals", + "form_urlencoded", + "futures", + "futures-channel", + "futures-util", + "gloo-net", + "headers", + "http", + "http-body", + "http-body-util", + "js-sys", + "mime", + "pin-project", + "reqwest", + "rustversion", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "thiserror 2.0.20", + "tokio-util", + "tracing", + "tungstenite 0.27.0", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "dioxus-fullstack-core" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0011e9bca8da2ae6bf02ba9ef93ba6c5fa539e402de3aeb316ad86ca77c59079" +dependencies = [ + "anyhow", + "axum-core", + "base64 0.22.1", + "ciborium", + "dioxus-core", + "dioxus-document", + "dioxus-history", + "dioxus-hooks", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "http", + "inventory", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.20", + "tokio", + "tracing", +] + +[[package]] +name = "dioxus-fullstack-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681f39665de36af7bb724b1cc0ca9c2b7c36a2b93febf1b2911716479eac3db0" +dependencies = [ + "const_format", + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "xxhash-rust", +] + +[[package]] +name = "dioxus-history" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2404b77d4441e694a5e93afb5c9a729efb26a3f6920f769cfe6cfedf5c7ac210" +dependencies = [ + "dioxus-core", + "tracing", +] + +[[package]] +name = "dioxus-hooks" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3807a1bc039299cd37ad85f1c56ae7088210e8a38e3e877f01034d68c15fbb" +dependencies = [ + "dioxus-core", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "rustversion", + "slab", + "tracing", +] + +[[package]] +name = "dioxus-html" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b9a85679c4dfd8699407a9ad5041a6a4fe6be0ee386353951cd03b57a12030" +dependencies = [ + "async-trait", + "bytes", + "dioxus-core", + "dioxus-core-macro", + "dioxus-core-types", + "dioxus-hooks", + "dioxus-html-internal-macro", + "enumset", + "euclid", + "futures-channel", + "futures-util", + "generational-box", + "keyboard-types", + "lazy-js-bundle", + "rustversion", + "serde", + "serde_json", + "serde_repr", + "tracing", +] + +[[package]] +name = "dioxus-html-internal-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500282dad5b62e91f93e127cbf41c587bf1c457d52514a75f3ff2a55fd0ea9f6" +dependencies = [ + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-icons" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ae929a4cdde2e51fca98ccb8a8fe2ea11640e5026c57486b15dbd5618ba7e56" +dependencies = [ + "dioxus", + "dioxus-signals", + "lazy-js-bundle", +] + +[[package]] +name = "dioxus-interpreter-js" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa22cc3431e7efdbae28069542a1763c977d5edbe4d4fbfb0b7667b9c9966e9" +dependencies = [ + "dioxus-core", + "dioxus-core-types", + "dioxus-html", + "js-sys", + "lazy-js-bundle", + "rustc-hash 2.1.3", + "serde", + "sledgehammer_bindgen", + "sledgehammer_utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "dioxus-logger" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f36b2dac4df8c747431f77f2a6644dd033ea98e7f8ac80271ff47fd4ba8a548" +dependencies = [ + "dioxus-cli-config", + "tracing", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "dioxus-primitives" +version = "0.0.1" +source = "git+https://github.com/DioxusLabs/components#9a758255ea26e2b20c8cecf4c1c946feb9e71da7" +dependencies = [ + "dioxus", + "dioxus-attributes", + "dioxus-sdk-time", + "lazy-js-bundle", + "num-integer", + "palette", + "serde", + "time", + "tracing", +] + +[[package]] +name = "dioxus-rsx" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aea662c9e13a91279d8acbc0d02a80430c7081704c20e8c791e4c4a151268596" +dependencies = [ + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "rustversion", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-sdk-time" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80c25ae93a3f72e734873b97fbd09d9b1b6adff97205fb0ffd8543e3564fb78e" +dependencies = [ + "dioxus", + "futures", + "gloo-timers", + "tokio", +] + +[[package]] +name = "dioxus-signals" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d85e36fcaf7abdc986836801bf248776da7d5961f5fac65fdbf5ed491afb4f" +dependencies = [ + "dioxus-core", + "futures-channel", + "futures-util", + "generational-box", + "parking_lot", + "rustc-hash 2.1.3", + "tracing", + "warnings", +] + +[[package]] +name = "dioxus-stores" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15eaa9f2ccc5ce962d056515e61345c846a54b13a2b880cf7e8ac93faa53a178" +dependencies = [ + "dioxus-core", + "dioxus-signals", + "dioxus-stores-macro", + "generational-box", +] + +[[package]] +name = "dioxus-stores-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13bd8a693d7042544fa3ac79698a08783bbc698d1ed257e88c5d4059e9ac476" +dependencies = [ + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dioxus-web" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "481093233d789c5ffbdde66e7970e803b01a199a7ab0c0f8ef84c65d30b7384f" +dependencies = [ + "dioxus-cli-config", + "dioxus-core", + "dioxus-core-types", + "dioxus-devtools", + "dioxus-document", + "dioxus-history", + "dioxus-html", + "dioxus-interpreter-js", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "gloo-timers", + "js-sys", + "lazy-js-bundle", + "rustc-hash 2.1.3", + "send_wrapper", + "serde", + "serde-wasm-bindgen", + "serde_json", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "dlmalloc" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad5208a115eaba24916f7456929832e310a81518c641f93fee4f89aa93aa3675" +dependencies = [ + "cfg-if 1.0.4", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + [[package]] name = "dunce" version = "1.0.5" @@ -404,6 +1921,41 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" +[[package]] +name = "encoding_rs" +version = "0.8.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" +dependencies = [ + "cfg-if 1.0.4", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "enumset" +version = "1.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e6bd2d7c76d078cd7a460fa169f778c42c026fe16d90e37d7a45d37181bdce5" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60587c2044cabd91c4d4c73e3912e9f1ea7d76905f31c7eec51869305dae044" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "env_filter" version = "2.0.0" @@ -427,6 +1979,26 @@ dependencies = [ "log", ] +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -443,6 +2015,33 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "exr" +version = "1.74.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide 0.8.9", + "num-complex", + "pulp", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "faccess" version = "0.2.4" @@ -454,6 +2053,37 @@ dependencies = [ "winapi", ] +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + [[package]] name = "filetime" version = "0.2.29" @@ -477,7 +2107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.9.1", "zlib-rs", ] @@ -492,18 +2122,138 @@ dependencies = [ "spin", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + [[package]] name = "fs_extra" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + [[package]] name = "futures-core" version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + [[package]] name = "futures-sink" version = "0.3.34" @@ -522,12 +2272,121 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ + "futures-channel", "futures-core", + "futures-io", + "futures-macro", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generational-box" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b2dc9b873cd1a8adb80aa5dcef9a8205f781a8a313d5ffb867248cb3bcb764" +dependencies = [ + "parking_lot", + "tracing", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -538,6 +2397,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix", + "windows-link 0.2.1", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.4", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.17" @@ -545,8 +2425,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if 1.0.4", + "js-sys", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if 1.0.4", + "libc", + "r-efi 5.3.0", + "wasip2", ] [[package]] @@ -556,8 +2450,226 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if 1.0.4", + "js-sys", "libc", - "r-efi", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "global-hotkey" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9247516746aa8e53411a0db9b62b0e24efbcf6a76e0ba73e5a91b512ddabed7" +dependencies = [ + "crossbeam-channel", + "keyboard-types", + "objc2", + "objc2-app-kit", + "once_cell", + "thiserror 2.0.20", + "windows-sys 0.59.0", + "x11rb", + "xkeysym", +] + +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] @@ -577,6 +2689,42 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "headers" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2700e3fe555c3310aa7286cac6167449f2c87e0eb58769c9208a1c58a1d106" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "home" version = "0.5.12" @@ -586,6 +2734,51 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "html5ever" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" +dependencies = [ + "log", + "mac", + "markup5ever", + "match_token", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + [[package]] name = "http_req" version = "0.12.0" @@ -600,6 +2793,227 @@ dependencies = [ "webpki-roots 0.26.11", ] +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots 1.0.9", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png 0.18.1", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imgref" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" + [[package]] name = "indexmap" version = "2.14.2" @@ -610,23 +3024,90 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + [[package]] name = "interner" version = "0.2.1" source = "git+https://github.com/c2vi/interner#746e7586bb65e2e50ac02140c6414574efb2eb4e" +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + [[package]] name = "is_terminal_polyfill" version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "jiff" version = "0.2.35" @@ -663,6 +3144,80 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if 1.0.4", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if 1.0.4", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.20", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + [[package]] name = "jobserver" version = "0.1.35" @@ -684,18 +3239,112 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.13.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "kuchikiki" +version = "0.8.8-speedreader" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" +dependencies = [ + "cssparser", + "html5ever", + "indexmap", + "selectors", +] + +[[package]] +name = "lazy-js-bundle" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51cdaa5abc885e2d606e6985281ace220778bde190be20aab1ec2346ed8bd1fa" + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading 0.7.4", + "once_cell", +] + [[package]] name = "libc" version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.4", + "winapi", +] + [[package]] name = "libloading" version = "0.8.9" @@ -703,7 +3352,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if 1.0.4", - "windows-link", + "windows-link 0.2.1", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "libc", +] + +[[package]] +name = "libxdo" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db" +dependencies = [ + "libxdo-sys", +] + +[[package]] +name = "libxdo-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212" +dependencies = [ + "libc", + "x11", ] [[package]] @@ -712,6 +3395,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + [[package]] name = "lock_api" version = "0.4.14" @@ -727,6 +3422,122 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +[[package]] +name = "longest-increasing-subsequence" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "manganis" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ed2af894a724a0b6e521f9efe84f98cfdc74a4de6828efef77ffd3b1679fd52" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize 0.8.0-alpha.0", + "jni 0.21.1", + "manganis-core", + "manganis-macro", + "ndk-context", + "objc2", + "thiserror 2.0.20", +] + +[[package]] +name = "manganis-core" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e258c71b137bf48deaffb48b8a8a2f994af9e5c3ca201daa20d41e26b379da11" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize 0.8.0-alpha.0", + "dioxus-cli-config", + "dioxus-core-types", + "serde", + "winnow 0.7.15", +] + +[[package]] +name = "manganis-macro" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae8346bbf637e6d21ac3831863bd5a98657517f5cd2d69d651046b95e7ce9" +dependencies = [ + "dunce", + "macro-string", + "manganis-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "markup5ever" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" +dependencies = [ + "log", + "phf 0.11.3", + "phf_codegen 0.11.3", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "match_token" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "matchers" version = "0.2.0" @@ -736,18 +3547,93 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if 1.0.4", + "rayon", +] + [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memfd" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90" +dependencies = [ + "rustix", +] + +[[package]] +name = "memmap2" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "memory_units" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + [[package]] name = "miniz_oxide" version = "0.9.1" @@ -765,7 +3651,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" dependencies = [ "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.61.2", ] @@ -787,7 +3673,7 @@ dependencies = [ "home", "http_req", "interner", - "libloading", + "libloading 0.8.9", "mize_macros", "nix", "serde", @@ -868,6 +3754,113 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9fec5a4e89860383d778d10563a605838f8f0b2f9303868937e5ff32e86177" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "libxdo", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png 0.17.16", + "thiserror 2.0.20", + "windows-sys 0.60.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle 0.6.2", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nix" version = "0.27.1" @@ -879,6 +3872,36 @@ dependencies = [ "libc", ] +[[package]] +name = "no_std_io2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +dependencies = [ + "memchr", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "ntapi" version = "0.4.3" @@ -897,6 +3920,218 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num_threads" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabcc654086861f9e1bc5115258de62ef92c79b20f4615a1b0cc57c4e82027d4" +dependencies = [ + "libc", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.1", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -909,6 +4144,55 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "openssl" +version = "0.10.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" +dependencies = [ + "bitflags 2.13.1", + "cfg-if 1.0.4", + "foreign-types 0.3.2", + "libc", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "openssl-probe" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" + +[[package]] +name = "openssl-sys" +version = "0.9.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "os_pipe" version = "1.2.3" @@ -919,6 +4203,260 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "palette" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64" +dependencies = [ + "approx", + "palette_derive", + "palette_math", + "phf 0.13.1", +] + +[[package]] +name = "palette_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "palette_math" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if 1.0.4", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_shared 0.8.0", +] + +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_macros", + "phf_shared 0.10.0", + "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_shared 0.13.1", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.8", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared 0.11.3", + "rand 0.8.8", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.4", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher 1.0.4", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -931,6 +4469,38 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.1", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "portable-atomic" version = "1.15.0" @@ -946,6 +4516,94 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.17+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + [[package]] name = "proc-macro2" version = "1.0.107" @@ -955,6 +4613,153 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "version_check", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" +dependencies = [ + "idna", + "psl-types", +] + +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if 1.0.4", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.3", + "rustls", + "socket2", + "thiserror 2.0.20", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.3", + "rand_pcg 0.10.2", + "ring", + "rustc-hash 2.1.3", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.20", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + [[package]] name = "quote" version = "1.0.47" @@ -964,12 +4769,225 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "r-efi" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg 0.2.1", +] + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cfg-if 1.0.4", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand 0.9.5", + "rand_chacha 0.9.0", + "simd_helpers", + "thiserror 2.0.20", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + [[package]] name = "rayon" version = "1.12.0" @@ -990,6 +5008,31 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.20", +] + [[package]] name = "regex" version = "1.13.1" @@ -1019,6 +5062,80 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "cookie", + "cookie_store", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots 1.0.9", +] + +[[package]] +name = "rfd" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220" +dependencies = [ + "block2", + "dispatch2", + "js-sys", + "libc", + "log", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "percent-encoding", + "pollster", + "raw-window-handle 0.6.2", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" + [[package]] name = "ring" version = "0.17.14" @@ -1033,6 +5150,27 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "1.1.4" @@ -1055,6 +5193,7 @@ dependencies = [ "aws-lc-rs", "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -1076,6 +5215,7 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ + "web-time", "zeroize", ] @@ -1097,12 +5237,92 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "selectors" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +dependencies = [ + "bitflags 1.3.2", + "cssparser", + "derive_more 0.99.20", + "fxhash", + "log", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] + [[package]] name = "serde" version = "1.0.229" @@ -1157,6 +5377,39 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_qs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 2.0.20", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + [[package]] name = "serde_spanned" version = "0.6.9" @@ -1166,6 +5419,39 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "servo_arc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures 0.2.17", + "digest", +] + [[package]] name = "sha2" version = "0.10.9" @@ -1173,7 +5459,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if 1.0.4", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -1192,18 +5478,114 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + [[package]] name = "slab" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "sledgehammer_bindgen" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e83e178d176459c92bc129cfd0958afac3ced925471b889b3a75546cfc4133" +dependencies = [ + "sledgehammer_bindgen_macro", + "wasm-bindgen", +] + +[[package]] +name = "sledgehammer_bindgen_macro" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb251b407f50028476a600541542b605bb864d35d9ee1de4f6cab45d88475e6d" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "sledgehammer_utils" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debdd4b83524961983cea3c55383b3910fd2f24fd13a188f5b091d2d504a61ae" +dependencies = [ + "rustc-hash 1.1.0", +] + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "serde", + "version_check", +] + [[package]] name = "smallvec" version = "1.16.0" @@ -1220,6 +5602,32 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "spin" version = "0.9.9" @@ -1229,18 +5637,94 @@ dependencies = [ "lock_api", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.11.3", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", +] + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subsecond" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d350d5788fa94d560d92269266a50efc77b036bfca6675e420b64df7b3211f37" +dependencies = [ + "js-sys", + "libc", + "libloading 0.8.9", + "memfd", + "memmap2", + "serde", + "subsecond-types", + "thiserror 2.0.20", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "subsecond-types" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf32d66269b5fbb8558334e8d22b657b2f7af0dd2ef56c231541099a862e464" +dependencies = [ + "serde", +] + [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.119" @@ -1263,6 +5747,26 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + [[package]] name = "sysinfo" version = "0.30.13" @@ -1275,7 +5779,70 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "windows", + "windows 0.52.0", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.34.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9103edf55f2da3c82aea4c7fab7c4241032bfeea0e71fa557d98e00e7ce7cc20" +dependencies = [ + "bitflags 2.13.1", + "block2", + "core-foundation", + "core-graphics 0.25.0", + "crossbeam-channel", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni 0.21.1", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "once_cell", + "parking_lot", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", + "tao-macros", + "unicode-segmentation", + "url", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] @@ -1289,13 +5856,63 @@ dependencies = [ "xattr", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.20", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", ] [[package]] @@ -1318,6 +5935,69 @@ dependencies = [ "cfg-if 1.0.4", ] +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "js-sys", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + [[package]] name = "tokio" version = "1.53.1" @@ -1329,9 +6009,47 @@ dependencies = [ "mio", "pin-project-lite", "socket2", + "tokio-macros", "windows-sys 0.61.2", ] +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "futures-util", + "libc", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.23" @@ -1340,8 +6058,8 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] @@ -1353,6 +6071,37 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.27" @@ -1362,9 +6111,30 @@ dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime", + "toml_datetime 0.6.11", "toml_write", - "winnow", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.17+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +dependencies = [ + "indexmap", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow 1.0.4", ] [[package]] @@ -1373,6 +6143,51 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + [[package]] name = "tracing" version = "0.1.44" @@ -1434,6 +6249,86 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", +] + +[[package]] +name = "tray-icon" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e85aa143ceb072062fc4d6356c1b520a51d636e7bc8e77ec94be3608e5e80c" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.17.16", + "thiserror 2.0.20", + "windows-sys 0.60.2", +] + +[[package]] +name = "tree-sitter-language" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0af592be68c579aa78a16846bd19422978c3c52e438523d45ff5d1bff1f9d4a" + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.5", + "sha1", + "thiserror 2.0.20", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "native-tls", + "rand 0.9.5", + "rustls", + "sha1", + "thiserror 2.0.20", + "utf-8", +] + [[package]] name = "typenum" version = "1.20.1" @@ -1452,18 +6347,63 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + [[package]] name = "uuid" version = "1.26.0" @@ -1474,24 +6414,103 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "warnings" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f68998838dab65727c9b30465595c6f7c953313559371ca8bf31759b3680ad" +dependencies = [ + "pin-project", + "tracing", + "warnings-macro", +] + +[[package]] +name = "warnings-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" version = "0.2.128" @@ -1547,6 +6566,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.105" @@ -1557,6 +6589,76 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe8d20d0214027baf11b8b0cc307c1da7657d8f4db9aa956f7de27a6fb1acbd5" +dependencies = [ + "jni 0.22.4", + "log", + "ndk-context", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "url", + "web-sys", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + [[package]] name = "webpki" version = "0.22.4" @@ -1585,6 +6687,42 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.20", + "windows 0.61.3", + "windows-core 0.61.2", +] + [[package]] name = "wee_alloc" version = "0.4.5" @@ -1597,6 +6735,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + [[package]] name = "winapi" version = "0.3.9" @@ -1613,6 +6757,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1625,8 +6778,30 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-core", - "windows-targets", + "windows-core 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", ] [[package]] @@ -1635,22 +6810,111 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1659,7 +6923,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -1668,7 +6941,22 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1677,64 +6965,198 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "0.7.15" @@ -1744,6 +7166,108 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wry" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728b7d4c8ec8d81cab295e0b5b8a4c263c0d41a785fb8f8c4df284e5411140a2" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dpi", + "dunce", + "gtk", + "html5ever", + "http", + "javascriptcore-rs", + "jni 0.21.1", + "kuchikiki", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle 0.6.2", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.20", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-version", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "gethostname", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + [[package]] name = "xattr" version = "1.6.1" @@ -1754,6 +7278,47 @@ dependencies = [ "rustix", ] +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xxhash-rust" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7" + +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.8.56" @@ -1774,12 +7339,66 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", + "synstructure", +] + [[package]] name = "zeroize" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + [[package]] name = "zlib-rs" version = "0.6.7" @@ -1791,3 +7410,27 @@ name = "zmij" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zune-core" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index 547ea99..5a7291f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,12 @@ members = [ "apps/os", "apps/obsidian-plugin", "parts/*", + "parts/mize.ui/dioxus-components", +] +exclude = [ + "parts/mize.ui", + "parts/mize.ui/upstream", + "parts/mize.ui/fluxer", ] default-members = [ "apps/obsidian-plugin", diff --git a/core/src/config.rs b/core/src/config.rs index 1ce835a..9ab4c71 100644 --- a/core/src/config.rs +++ b/core/src/config.rs @@ -1,4 +1,5 @@ use std::any::Any; +use std::fmt::Debug; use crate::MizeResult; @@ -7,7 +8,8 @@ use crate::id::MizeId; use crate::item::{IntoItemData, ItemData}; use crate::Mize; -type ConfigFun = Box MizeResult + Send + Sync + 'static>; +pub type ConfigFun = Box MizeResult + Send + Sync + 'static>; +pub type MizeFun = Box MizeResult + Send + Sync + 'static>; pub struct ConfigOpt { pub name: String, @@ -16,6 +18,16 @@ pub struct ConfigOpt { pub deps: Vec, } +pub trait FromItemData { + fn from_itemdata(data: ItemData) -> MizeResult where Self: Sized; +} + +impl Debug for ConfigOpt { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "({}: {})", self.name, self.val.clone().unwrap_or(ItemData::new())) + } +} + #[derive(Clone)] #[repr(C)] pub struct ConfigOptId { @@ -25,6 +37,11 @@ pub struct ConfigOptId { impl ConfigOptId { pub fn default_val(self, val: ItemData) -> Self { let mize = get_global_mize().unwrap(); + // in generate mode: record the default value as metadata, skip normal op + if mize.is_generate_mode().unwrap_or(false) { + mize.record_opt("_default_val", self.id.clone(), Some(val)).ok(); + return self.clone(); + } let mut config_opts = mize.config_opts.lock().unwrap(); let opt = config_opts.get_mut(&self.id).unwrap(); opt.val = Some(val); @@ -32,13 +49,35 @@ impl ConfigOptId { } pub fn fun(self, fun: ConfigFun) -> Self { let mize = get_global_mize().unwrap(); + // in generate mode: record as an opt with a fun, skip normal op + if mize.is_generate_mode().unwrap_or(false) { + mize.record_opt("_fun", self.id.clone(), None).ok(); + return self.clone(); + } let mut config_opts = mize.config_opts.lock().unwrap(); - println!("get_mut: {}", self.id); let opt = config_opts.get_mut(&self.id).unwrap(); opt.fun = Some(fun); self.clone() } - pub fn method MizeResult>(self, _name: &str, _fun: F) -> ConfigOptId { + pub fn method MizeResult + Send + Sync + 'static>(self, name: &str, fun: F) -> ConfigOptId { + let mize = get_global_mize().unwrap(); + let mut cur_part = self.id.clone(); + let id = cur_part.join(name).unwrap(); + // in generate mode: record method metadata, skip normal registration + if mize.is_generate_mode().unwrap_or(false) { + mize.record_method(name, id.clone(), "method").ok(); + return self.clone(); + } + let mut opts = mize.config_opts.lock().unwrap(); + let opt = ConfigOpt { + name: id.dot(), + val: None, + fun: None, + deps: Vec::new(), + }; + let mut fun_values = mize.fun_values.lock().unwrap(); + fun_values.insert(id.clone(), Box::new(fun)); + opts.insert(id.clone(), opt); self.clone() } @@ -48,13 +87,27 @@ impl ConfigOptId { //fn into_item_data(self) -> ItemData; //} +pub trait MizeAny { + fn as_raw_ptr(&self) -> *const (); +} + +impl MizeAny for T { + fn as_raw_ptr(&self) -> *const () { + self as *const Self as *const () + } +} pub fn opt(name: &str) -> crate::config::ConfigOptId { let mize = get_global_mize().unwrap(); let mut cur_part = mize.cur_eval_part.lock().unwrap().clone().unwrap(); - let mut opts = mize.config_opts.lock().unwrap(); let id = cur_part.join(name).unwrap(); + // in generate mode: record opt metadata, skip normal registration + if mize.is_generate_mode().unwrap_or(false) { + mize.record_opt(name, id.clone(), None).ok(); + return ConfigOptId { id }; + } + let mut opts = mize.config_opts.lock().unwrap(); let opt = ConfigOpt { name: id.dot(), val: None, @@ -65,47 +118,68 @@ pub fn opt(name: &str) -> crate::config::ConfigOptId { ConfigOptId { id } } -pub fn method MizeResult>(name: &str, fun: F) -> ConfigOptId { +pub fn method MizeResult + Send + Sync + 'static>(name: &str, fun: F) -> ConfigOptId { let mize = get_global_mize().unwrap(); let mut cur_part = mize.cur_eval_part.lock().unwrap().clone().unwrap(); - let mut opts = mize.config_opts.lock().unwrap(); let id = cur_part.join(name).unwrap(); + // in generate mode: record method metadata, skip normal registration + if mize.is_generate_mode().unwrap_or(false) { + mize.record_method(name, id.clone(), "method").ok(); + return ConfigOptId { id }; + } + let mut opts = mize.config_opts.lock().unwrap(); let opt = ConfigOpt { name: id.dot(), - val: Some(ItemData::from_native(fun)?), + val: None, fun: None, deps: Vec::new(), }; + let mut fun_values = mize.fun_values.lock().unwrap(); + fun_values.insert(id.clone(), Box::new(fun)); opts.insert(id.clone(), opt); ConfigOptId { id } } -pub fn effect MizeResult>(_name: &str, _fun: F) -> ConfigOptId { +pub fn effect MizeResult + Send + Sync + 'static>(name: &str, fun: F) -> ConfigOptId { let mize = get_global_mize().unwrap(); let mut cur_part = mize.cur_eval_part.lock().unwrap().clone().unwrap(); - let mut opts = mize.config_opts.lock().unwrap(); let id = cur_part.join(name).unwrap(); + // in generate mode: record effect metadata, skip normal registration + if mize.is_generate_mode().unwrap_or(false) { + mize.record_method(name, id.clone(), "effect").ok(); + return ConfigOptId { id }; + } + let mut opts = mize.config_opts.lock().unwrap(); let opt = ConfigOpt { name: id.dot(), - val: Some(ItemData::from_native(fun)?), + val: None, fun: None, deps: Vec::new(), }; + let mut fun_values = mize.fun_values.lock().unwrap(); + fun_values.insert(id.clone(), Box::new(fun)); opts.insert(id.clone(), opt); ConfigOptId { id } } -pub fn thread MizeResult>(_name: &str, _fun: F) -> ConfigOptId { +pub fn thread MizeResult + Send + Sync + 'static>(name: &str, fun: F) -> ConfigOptId { let mize = get_global_mize().unwrap(); let mut cur_part = mize.cur_eval_part.lock().unwrap().clone().unwrap(); - let mut opts = mize.config_opts.lock().unwrap(); let id = cur_part.join(name).unwrap(); + // in generate mode: record thread metadata, skip normal registration + if mize.is_generate_mode().unwrap_or(false) { + mize.record_method(name, id.clone(), "thread").ok(); + return ConfigOptId { id }; + } + let mut opts = mize.config_opts.lock().unwrap(); let opt = ConfigOpt { name: id.dot(), - val: Some(ItemData::from_native(fun)?), + val: None, fun: None, deps: Vec::new(), }; + let mut fun_values = mize.fun_values.lock().unwrap(); + fun_values.insert(id.clone(), Box::new(fun)); opts.insert(id.clone(), opt); ConfigOptId { id } } @@ -125,7 +199,7 @@ pub mod c_api { super::opt(&string) } } - pub extern "C" fn method(name: *const c_char, c_fun: CFun) { + pub extern "C" fn method(name: *const c_char, c_fun: CFun) -> ConfigOptId { unsafe { let c_str = CStr::from_ptr(name); let string = c_str.to_string_lossy(); @@ -137,7 +211,7 @@ pub mod c_api { }) } } - pub extern "C" fn effect(name: *const c_char, c_fun: CFun) { + pub extern "C" fn effect(name: *const c_char, c_fun: CFun) -> ConfigOptId { unsafe { let c_str = CStr::from_ptr(name); let string = c_str.to_string_lossy(); @@ -149,7 +223,7 @@ pub mod c_api { }) } } - pub extern "C" fn thread(name: *const c_char, c_fun: CFun) { + pub extern "C" fn thread(name: *const c_char, c_fun: CFun) -> ConfigOptId { unsafe { let c_str = CStr::from_ptr(name); let string = c_str.to_string_lossy(); diff --git a/core/src/instance/mod.rs b/core/src/instance/mod.rs index f93f440..e0b7567 100644 --- a/core/src/instance/mod.rs +++ b/core/src/instance/mod.rs @@ -7,12 +7,12 @@ use interner::shared::{StringPool, VecStringPool}; use std::any::Any; use std::collections::HashMap; use std::ops::{Deref, DerefMut}; -use std::sync::{Arc, Mutex}; +use std::sync::{Arc, Mutex, RwLock}; use std::{thread, vec}; use tracing::{debug, info, trace}; use crate::set_global_mize; -use crate::config::{ConfigOpt, ConfigOptId}; +use crate::config::{ConfigOpt, ConfigOptId, MizeFun}; use crate::error::{MizeError, MizeResult}; use crate::id::{IntoMizeId, MizeId, Namespace}; use crate::instance::store::Store; @@ -86,11 +86,51 @@ pub struct Mize { pub native_values: Arc>>>, pub next_native_value_id: Arc>, + pub fun_values: Arc>>, + pub next_fun_values_id: Arc>, + + // generate mode: when true, part_smth functions record metadata instead of executing + pub generate_mode: Arc>, + // recorded metadata per part (keyed by part id) while in generate mode + pub part_metadata: Arc>>, #[cfg(feature = "async")] pub runtime: Arc>, } +/// Metadata recorded about a part while in generate mode +#[derive(Clone, Debug, Default)] +pub struct PartMetadata { + pub part_name: String, + pub opts: Vec, + pub methods: Vec, + pub effects: Vec, + pub threads: Vec, + pub natives: Vec, +} + +#[derive(Clone, Debug)] +pub struct OptMetadata { + pub name: String, + pub id: MizeId, + pub default_val: Option, +} + +#[derive(Clone, Debug)] +pub struct MethodMetadata { + pub name: String, + pub id: MizeId, + pub kind: String, // "method", "effect", "thread" +} + +#[derive(Clone, Debug)] +pub struct NativeMetadata { + pub name: String, + pub type_name: String, + pub associated: Vec, + pub methods: Vec, +} + pub struct InstanceRef { inner: Arc>, } @@ -160,6 +200,10 @@ impl Mize { cur_eval_part: Arc::new(Mutex::new(None)), native_values: Arc::new(Mutex::new(HashMap::new())), next_native_value_id: Arc::new(Mutex::new(0)), + fun_values: Arc::new(Mutex::new(HashMap::new())), + next_fun_values_id: Arc::new(Mutex::new(0)), + generate_mode: Arc::new(RwLock::new(false)), + part_metadata: Arc::new(Mutex::new(HashMap::new())), #[cfg(feature = "async")] runtime: Arc::new(Mutex::new( @@ -242,7 +286,6 @@ impl Mize { name: &str, handler: Box MizeResult<()> + Send + Sync>, ) -> MizeResult<()> { - println!("adding listener: {}", name); let name = name.to_owned(); let mut listeners = self.listeners.lock().unwrap(); listeners.insert(name, Arc::new(handler)); @@ -260,7 +303,7 @@ impl Mize { // end of platform specific init code - // load the modules, as specified in the parts config + // load the parts, as specified in the parts config match self .get_config("parts") { @@ -274,7 +317,6 @@ impl Mize { } } Err(_err) => { - println!("hooooo"); // no parts to load } } @@ -286,7 +328,6 @@ impl Mize { pub fn with_config(config: ItemData) -> MizeResult { trace!("[ {} ] Instance::with_config()", "CALL".yellow()); trace!("config: {}", config); - println!("here ...."); let mut mize = Mize::empty()?; @@ -354,7 +395,6 @@ impl Mize { drop(msg_wait_inner); let id = rx.recv()?; - println!("new_item namespace: {:?}", id.namespace()); return Ok(Item::new(id, self)); } @@ -463,7 +503,7 @@ impl Mize { } pub fn fetch_part(&mut self, name: &str) -> MizeResult { - // platform specific way to fetch a module + // platform specific way to fetch a part crate::platform::fetch_part(self, name) } @@ -472,6 +512,98 @@ impl Mize { crate::platform::load_part(self, name, Some(path)) } + // ===== generate mode accessors ===== + + /// Enable or disable generate mode. When enabled, part_smth functions record + /// metadata (methods, opts, natives) instead of performing their normal operations. + pub fn set_generate_mode(&self, enabled: bool) -> MizeResult<()> { + let mut mode = self.generate_mode.write().map_err(|_| mize_err!("generate_mode lock poisoned"))?; + *mode = enabled; + Ok(()) + } + + /// Check if generate mode is currently enabled. + pub fn is_generate_mode(&self) -> MizeResult { + let mode = self.generate_mode.read().map_err(|_| mize_err!("generate_mode lock poisoned"))?; + Ok(*mode) + } + + /// Record an opt declaration while in generate mode. + pub fn record_opt(&self, name: &str, id: MizeId, default_val: Option) -> MizeResult<()> { + let cur_part = self.cur_eval_part.lock()?.clone() + .ok_or_else(|| mize_err!("no cur_eval_part set"))?; + let mut metadata_map = self.part_metadata.lock()?; + let metadata = metadata_map.entry(cur_part.clone()).or_insert_with(|| PartMetadata { + part_name: cur_part.dot(), + ..Default::default() + }); + metadata.opts.push(OptMetadata { + name: name.to_string(), + id, + default_val, + }); + Ok(()) + } + + /// Record a method/effect/thread declaration while in generate mode. + pub fn record_method(&self, name: &str, id: MizeId, kind: &str) -> MizeResult<()> { + let cur_part = self.cur_eval_part.lock()?.clone() + .ok_or_else(|| mize_err!("no cur_eval_part set"))?; + let mut metadata_map = self.part_metadata.lock()?; + let metadata = metadata_map.entry(cur_part.clone()).or_insert_with(|| PartMetadata { + part_name: cur_part.dot(), + ..Default::default() + }); + let m = MethodMetadata { + name: name.to_string(), + id, + kind: kind.to_string(), + }; + match kind { + "effect" => metadata.effects.push(m), + "thread" => metadata.threads.push(m), + _ => metadata.methods.push(m), + } + Ok(()) + } + + /// Record a native type inclusion while in generate mode. + pub fn record_native(&self, name: &str, type_name: &str, associated: Vec, methods: Vec) -> MizeResult<()> { + let cur_part = self.cur_eval_part.lock()?.clone() + .ok_or_else(|| mize_err!("no cur_eval_part set"))?; + let mut metadata_map = self.part_metadata.lock()?; + let metadata = metadata_map.entry(cur_part.clone()).or_insert_with(|| PartMetadata { + part_name: cur_part.dot(), + ..Default::default() + }); + metadata.natives.push(NativeMetadata { + name: name.to_string(), + type_name: type_name.to_string(), + associated, + methods, + }); + Ok(()) + } + + /// Get recorded metadata for a specific part. + pub fn get_metadata(&self, part_id: &MizeId) -> MizeResult> { + let metadata_map = self.part_metadata.lock()?; + Ok(metadata_map.get(part_id).cloned()) + } + + /// Get all recorded metadata (for all parts). + pub fn get_all_metadata(&self) -> MizeResult> { + let metadata_map = self.part_metadata.lock()?; + Ok(metadata_map.values().cloned().collect()) + } + + /// Clear all recorded metadata. + pub fn clear_metadata(&self) -> MizeResult<()> { + let mut metadata_map = self.part_metadata.lock()?; + metadata_map.clear(); + Ok(()) + } + pub fn namespace_from_string(&self, ns_str: String) -> MizeResult { let namespace_pool_inner = self.namespace_pool.lock()?; let namespace = Namespace(namespace_pool_inner.get(ns_str)); @@ -812,32 +944,65 @@ impl Mize { pub fn get_config(&mut self, name: &str) -> MizeResult { let mut config_opts = self.config_opts.lock().unwrap(); - let opt = config_opts - .get_mut(&self.clone().id_new_dots(name)?) - .ok_or_else(|| mize_err!("Config opt for {name} not in config_opts"))?; - - // Evaluate the fun if present - if let Some(fun) = &opt.fun { - let result = fun()?; - return Ok(ItemData::from(result)); + let mut id; + let mut split = name.split("."); + if split.nth(0).unwrap() == "self" { + let cur_part = self.cur_eval_part.lock()?.clone().ok_or(mize_err!("get_config called but no curr eval part set"))?; + id = cur_part.clone(); + for el in split { + id = id.join(el)?; + } + } else { + id = self.clone().id_new_dots(name)?; } - // Return cached value + let mut opt = config_opts + .get_mut(&id) + .ok_or_else(|| mize_err!("Config opt for {name} not in config_opts"))?; + if let Some(val) = opt.val.clone() { return Ok(val); } + // in case it is not cached run the fun if it exists + if let Some(fun) = &opt.fun { + let res = fun()?; + opt.val = Some(res.clone()); + return Ok(res); + } + Err(mize_err!("ConfigOpt {name} has no fun and no cached value")) } pub fn dyn_call(&mut self, part_id: MizeId, method: &str, args: ItemData) -> MizeResult { - let mut opts = self.config_opts.lock()?; - let part = opts.get_mut(&part_id).ok_or(mize_err!("part {} is not loaded", part_id.dot()))?; - let fun = part.val.ok_or(mize_err!("fun has no val"))?.native:: MizeResult>()?; - println!("dyn_call ing from part, {:?}, {method}, {:?}", part_id, args); - fun(args) + debug!("dyn call {}.{} with args: {}", part_id, method, args); + let mut fun_values = self.fun_values.lock()?; + + let id = part_id.clone().join(method)?; + //let part = opts.get_mut(&id).ok_or(mize_err!("part {} is not loaded", part_id.dot()))?; + let fun = fun_values.remove(&id).ok_or(mize_err!("fun value for {id} not found"))?; + drop(fun_values); + + let calling_part = self.clone().cur_eval_part()?; + self.clone().set_cur_eval_part(Some(part_id)); + let res = fun(args); + self.clone().set_cur_eval_part(calling_part); + let mut fun_values = self.fun_values.lock()?; + fun_values.insert(id, fun); + + return res; } + pub fn cur_eval_part(&mut self) -> MizeResult> { + Ok(self.cur_eval_part.lock()?.clone()) + } + + pub fn set_cur_eval_part(&mut self, part: Option) -> MizeResult<()> { + let mut guard = self.cur_eval_part.lock()?; + *guard = part; + Ok(()) + } + pub fn get_part_gen( &mut self, name: &str, diff --git a/core/src/item.rs b/core/src/item.rs index 45b7b49..12dfa35 100644 --- a/core/src/item.rs +++ b/core/src/item.rs @@ -1,21 +1,21 @@ -use crate::get_global_mize; -use crate::config::{ConfigOpt}; +use crate::{config, get_global_mize}; +use crate::config::{ConfigOpt, FromItemData, MizeFun}; use ciborium::into_writer; use colored::Colorize; use serde_json::from_reader; use core::fmt; use serde::Deserialize; use serde::Serialize; -use std::any::Any; +use std::any::{Any, TypeId}; use std::collections::HashMap; use std::fmt::Debug; use std::sync::MutexGuard; -use std::io; +use std::{boxed, io}; use std::fmt::Display; use std::i128; use tracing::{debug, instrument, trace, warn}; -use crate::error::{IntoMizeResult, MizeError, MizeResult}; +use crate::error::{IntoMizeResult, MizeError, MizeErrorWhichImplementsError, MizeResult}; use crate::id::MizeId; use crate::instance::connection::value_raw_con_by_id; use crate::instance::Mize; @@ -56,6 +56,7 @@ impl Item<'_> { .mres_msg(format!("failed to convert raw value from item '{}' into a utf-8 string. raw value was: '{:02X?}'", self.id(), raw)) } + pub fn as_data_full(&self) -> MizeResult { let id = self.id(); @@ -228,7 +229,7 @@ impl ItemData { *next_id += 1; native_values.insert(id, Box::new(val)); let mut data = ItemData::new(); - data.set_path("_native", id.to_string())?; + data.set_path("_native", id)?; Ok(data) } @@ -238,6 +239,43 @@ impl ItemData { _ => Err(mize_err!("this ItemData has no string value")), } } + + //pub fn value_fun(&self) -> MizeResult { + pub fn value_fun(&self) -> MizeResult<()> { + let mut mize = get_global_mize()?; + let mut fun_values = mize.fun_values.lock()?; + let fun_id = self.get_path("_func")?.value_u32()?; + //let fun = fun_values.remove(fun_id).ok_or(mize_err!("fun with id {fun_id} not in fun_values"))?; + // TODO: finish + Ok(()) + } + + pub fn call(&self, args: ItemData) -> MizeResult { + let mut mize = get_global_mize()?; + let mut fun_values = mize.fun_values.lock()?; + let fun_num = self.get_path("_fun_num")?.value_u32()?; + let fun_id = mize.clone().id_new_dots("mize.fun")?.join(format!("{fun_num}").as_str())?; + let fun = fun_values.remove(&fun_id).ok_or(mize_err!("fun with id {fun_id} not in fun_values"))?; + let res = fun(args)?; + return Ok(res); + } + + pub fn fun(fun: MizeFun) -> MizeResult { + let mut mize = get_global_mize()?; + let mut fun_values = mize.fun_values.lock()?; + let mut next_fun_values_id = mize.next_fun_values_id.lock()?; + let fun_num = next_fun_values_id.clone(); + *next_fun_values_id = *next_fun_values_id +1; + let fun_id = mize.clone().id_new_dots("mize.fun")?.join(format!("{fun_num}").as_str())?; + fun_values.insert(fun_id, fun); + let mut ret = ItemData::new(); + ret.set_path("_fun_num", fun_num)?; + Ok(ret) + } + + pub fn value_u32(&self) -> MizeResult { + Ok(u32::try_from(self.cbor().as_integer().ok_or("value_u32 but data wos not a cbor Integer")?)?) + } pub fn value_bool(self) -> MizeResult { match self.cbor() { @@ -352,132 +390,503 @@ impl ItemData { Ok(ItemData::from_cbor(value.clone())) } + /// Try to get the native id from the `_native` field. + /// Returns `Some(id)` if the field exists and is a valid u32 string. + /// Returns `None` if the field doesn't exist or is not a valid id. + fn try_get_native_id(&self) -> Option { + let id_data = self.get_path("_native").ok()?; + if id_data.cbor().is_null() { + return None; + } + if let Some(integer) = id_data.cbor().as_integer() { + if let Ok(val) = u32::try_from(integer) { + return Some(val) + } + } + return None; + } + /// Get an immutable reference to the native value stored in this ItemData. - /// The native value must have been stored via from_native(). - /// Returns a guard that holds the lock on the native_values registry. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`), returns a guard + /// that takes the value out of the global registry and provides an immutable reference to it. + /// + /// Otherwise, for supported hardcoded types (String, bool, Vec, Vec, + /// integer types, float types), constructs the value directly from the CBOR content, + /// stores it in the registry, and returns a guard to it. + /// + /// The guard temporarily removes the value from the registry to allow the mutex lock to be + /// dropped, improving concurrency. The value is automatically reinserted when the guard is dropped. pub fn native(&self) -> MizeResult> { let mize = get_global_mize()?; - let native_values = mize.native_values.lock().map_err(|_| mize_err!("Failed to lock native_values"))?; - - let id_data = self.get_path("_native") - .map_err(|_| mize_err!("No _native field in ItemData"))?; - let id_str = id_data.value_string() - .map_err(|_| mize_err!("_native field is not a string"))?; - let id: u32 = id_str.parse() - .map_err(|_| mize_err!("_native field is not a valid u32: {}", id_str))?; - - let boxed = native_values.get(&id) + let mut native_values = mize.native_values.lock().map_err(|_| mize_err!("Failed to lock native_values"))?; + + let id = match self.try_get_native_id() { + Some(id) => id, + None => { + // No _native field, try to construct from CBOR + let value = try_construct_native::(self.cbor())? + .ok_or_else(|| mize_err!( + "ItemData has no _native field and type {} is not supported for direct construction from CBOR. Value: {}", + std::any::type_name::(), + self + ))?; + + // Store in registry and use the new id + let mut next_id = mize.next_native_value_id.lock() + .map_err(|_| mize_err!("Failed to lock next_native_value_id"))?; + let new_id = *next_id; + *next_id += 1; + native_values.insert(new_id, Box::new(value)); + new_id + } + }; + + let boxed = native_values.remove(&id) .ok_or(mize_err!("No native value with id {}", id))?; - - // SAFETY: The reference is valid as long as the guard exists. - // The guard holds the MutexGuard which keeps the lock on native_values. - // The data in the HashMap is owned by the global Mize instance. - // We extract the raw pointer first, then move the guard. - let ref_t_ptr = boxed.downcast_ref::() - .ok_or(mize_err!("Failed to downcast native value to {}", std::any::type_name::()))? as *const T; - - let guard = std::mem::ManuallyDrop::new(native_values); - + + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + + // Drop the mutex guard before returning - the value is now owned by the guard + drop(native_values); + Ok(NativeRefGuard { - _guard: unsafe { std::mem::transmute(guard) }, - value: unsafe { &*ref_t_ptr }, + value: std::mem::ManuallyDrop::new(*typed), + id, + needs_reinsert: true, }) } - + + /// Get an immutable reference to a native value of type `T`, using [`FromItemData`] + /// to construct it when it is not already stored in the registry as a `T`. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`) and the registry + /// value is a `T`, returns a guard to it (the value is temporarily removed from the + /// registry and reinserted when the guard is dropped). + /// + /// Otherwise, constructs the value via `T::from_itemdata(self)`, stores it in the + /// registry, and returns a guard to it. + pub fn native_from(&self) -> MizeResult> { + // Fast path: the registry already holds a T for this ItemData + if let Some(id) = self.try_get_native_id() { + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + if native_values.get(&id).map(|b| b.downcast_ref::().is_some()).unwrap_or(false) { + let boxed = native_values.remove(&id) + .ok_or(mize_err!("No native value with id {}", id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + drop(native_values); + return Ok(NativeRefGuard { + value: std::mem::ManuallyDrop::new(*typed), + id, + needs_reinsert: true, + }); + } + } + + // Fallback: let T construct itself from this ItemData (without holding the registry lock) + let value = T::from_itemdata(self.clone())?; + + // Store in registry and hand out a guard to it + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + let new_id = { + let mut next_id = mize.next_native_value_id.lock() + .map_err(|_| mize_err!("Failed to lock next_native_value_id"))?; + let new_id = *next_id; + *next_id += 1; + new_id + }; + native_values.insert(new_id, Box::new(value)); + let boxed = native_values.remove(&new_id) + .ok_or(mize_err!("No native value with id {}", new_id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + drop(native_values); + Ok(NativeRefGuard { + value: std::mem::ManuallyDrop::new(*typed), + id: new_id, + needs_reinsert: true, + }) + } + /// Get a mutable reference to the native value stored in this ItemData. - /// The native value must have been stored via from_native(). - /// Returns a guard that holds the lock on the native_values registry. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`), returns a guard + /// that takes the value out of the global registry and provides a mutable reference to it. + /// + /// Otherwise, for supported hardcoded types (String, bool, Vec, Vec, + /// integer types, float types), constructs the value directly from the CBOR content, + /// stores it in the registry, and returns a mutable guard to it. + /// + /// The guard temporarily removes the value from the registry to allow the mutex lock to be + /// dropped, improving concurrency. The value is automatically reinserted when the guard is dropped. pub fn native_mut(&self) -> MizeResult> { let mize = get_global_mize()?; let mut native_values = mize.native_values.lock().map_err(|_| mize_err!("Failed to lock native_values"))?; - - let id_data = self.get_path("_native") - .map_err(|_| mize_err!("No _native field in ItemData"))?; - let id_str = id_data.value_string() - .map_err(|_| mize_err!("_native field is not a string"))?; - let id: u32 = id_str.parse() - .map_err(|_| mize_err!("_native field is not a valid u32: {}", id_str))?; - - let boxed = native_values.get_mut(&id) - .ok_or(mize_err!("No native value with id {}", id))?; - - // SAFETY: The reference is valid as long as the guard exists. - // The guard holds the MutexGuard which keeps the lock on native_values. - // The data in the HashMap is owned by the global Mize instance. - // We extract the raw pointer first, then move the guard. - let ref_mut_t_ptr = boxed.downcast_mut::() - .ok_or(mize_err!("Failed to downcast native value to {}", std::any::type_name::()))? as *mut T; - - let guard = std::mem::ManuallyDrop::new(native_values); - - Ok(NativeMutRefGuard { - _guard: unsafe { std::mem::transmute(guard) }, - value: unsafe { &mut *ref_mut_t_ptr }, - }) - } - - /// Get a clone of the native value stored in this ItemData. - /// The native value must have been stored via from_native(). - /// This is useful when you need to pass the value by ownership (e.g., as a function argument). - pub fn native_clone(&self) -> MizeResult { - let guard = self.native::()?; - Ok(guard.clone()) - } - - /// Take the native value from this ItemData, removing it from the registry. - /// The native value must have been stored via from_native(). - pub fn native_take(&self) -> MizeResult { - let mize = get_global_mize()?; - let mut native_values = mize.native_values.lock().map_err(|_| mize_err!("Failed to lock native_values"))?; - - let id_data = self.get_path("_native") - .map_err(|_| mize_err!("No _native field in ItemData"))?; - let id_str = id_data.value_string() - .map_err(|_| mize_err!("_native field is not a string"))?; - let id: u32 = id_str.parse() - .map_err(|_| mize_err!("_native field is not a valid u32: {}", id_str))?; - + + let id = match self.try_get_native_id() { + Some(id) => id, + None => { + // No _native field, try to construct from CBOR + let value = try_construct_native::(self.cbor())? + .ok_or_else(|| mize_err!( + "ItemData has no _native field and type {} is not supported for direct construction from CBOR. Value: {}", + std::any::type_name::(), + self + ))?; + + // Store in registry and use the new id + let mut next_id = mize.next_native_value_id.lock() + .map_err(|_| mize_err!("Failed to lock next_native_value_id"))?; + let new_id = *next_id; + *next_id += 1; + native_values.insert(new_id, Box::new(value)); + new_id + } + }; + let boxed = native_values.remove(&id) .ok_or(mize_err!("No native value with id {}", id))?; - + let typed = boxed.downcast::() .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; - - Ok(*typed) + + // Drop the mutex guard before returning - the value is now owned by the guard + drop(native_values); + + Ok(NativeMutRefGuard { + value: std::mem::ManuallyDrop::new(*typed), + id, + needs_reinsert: true, + }) + } + + /// Get a mutable reference to a native value of type `T`, using [`FromItemData`] + /// to construct it when it is not already stored in the registry as a `T`. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`) and the registry + /// value is a `T`, returns a mutable guard to it (the value is temporarily removed + /// from the registry and reinserted when the guard is dropped). + /// + /// Otherwise, constructs the value via `T::from_itemdata(self)`, stores it in the + /// registry, and returns a mutable guard to it. + pub fn native_mut_from(&self) -> MizeResult> { + // Fast path: the registry already holds a T for this ItemData + if let Some(id) = self.try_get_native_id() { + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + if native_values.get(&id).map(|b| b.downcast_ref::().is_some()).unwrap_or(false) { + let boxed = native_values.remove(&id) + .ok_or(mize_err!("No native value with id {}", id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + drop(native_values); + return Ok(NativeMutRefGuard { + value: std::mem::ManuallyDrop::new(*typed), + id, + needs_reinsert: true, + }); + } + } + + // Fallback: let T construct itself from this ItemData (without holding the registry lock) + let value = T::from_itemdata(self.clone())?; + + // Store in registry and hand out a mutable guard to it + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + let new_id = { + let mut next_id = mize.next_native_value_id.lock() + .map_err(|_| mize_err!("Failed to lock next_native_value_id"))?; + let new_id = *next_id; + *next_id += 1; + new_id + }; + native_values.insert(new_id, Box::new(value)); + let boxed = native_values.remove(&new_id) + .ok_or(mize_err!("No native value with id {}", new_id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + drop(native_values); + Ok(NativeMutRefGuard { + value: std::mem::ManuallyDrop::new(*typed), + id: new_id, + needs_reinsert: true, + }) + } + + /// Get a clone of the native value stored in this ItemData. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`), clones the value + /// from the global registry. + /// + /// Otherwise, for supported hardcoded types (String, bool, Vec, Vec, + /// integer types, float types), constructs the value directly from the CBOR content. + /// + /// This is useful when you need to pass the value by ownership (e.g., as a function argument). + pub fn native_clone(&self) -> MizeResult { + // Try registry first + if let Some(id) = self.try_get_native_id() { + let mize = get_global_mize()?; + let native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + let boxed = native_values.get(&id) + .ok_or(mize_err!("No native value with id {}", id))?; + let val = boxed.downcast_ref::() + .ok_or(mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + return Ok(val.clone()); + } + + // Fallback: construct directly from CBOR + try_construct_native::(self.cbor())? + .ok_or_else(|| mize_err!( + "ItemData has no _native field and type {} is not supported for direct construction from CBOR. Value: {}", + std::any::type_name::(), + self + )) + } + + /// Take the native value from this ItemData, removing it from the registry. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`), removes and + /// returns the value from the global registry. + /// + /// Otherwise, for supported hardcoded types (String, bool, Vec, Vec, + /// integer types, float types), constructs the value directly from the CBOR content. + pub fn native_take(&self) -> MizeResult { + // Try registry first + if let Some(id) = self.try_get_native_id() { + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + let boxed = native_values.remove(&id) + .ok_or(mize_err!("No native value with id {}", id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + return Ok(*typed); + } + + // Fallback: construct directly from CBOR + try_construct_native::(self.cbor())? + .ok_or_else(|| mize_err!( + "ItemData has no _native field and type {} is not supported for direct construction from CBOR. Value: {}", + std::any::type_name::(), + self + )) + } + + /// Take a native value of type `T` from this ItemData, using [`FromItemData`] as fallback. + /// + /// If the ItemData has a `_native` field (stored via `from_native()`) and the registry + /// value is a `T`, removes and returns it from the global registry. + /// + /// Otherwise, constructs and returns the value via `T::from_itemdata(self)`. + pub fn native_take_from(&self) -> MizeResult { + // Try registry first: only take the value out if it actually is a T + if let Some(id) = self.try_get_native_id() { + let mize = get_global_mize()?; + let mut native_values = mize.native_values.lock() + .map_err(|_| mize_err!("Failed to lock native_values"))?; + if native_values.get(&id).map(|b| b.downcast_ref::().is_some()).unwrap_or(false) { + let boxed = native_values.remove(&id) + .ok_or(mize_err!("No native value with id {}", id))?; + let typed = boxed.downcast::() + .map_err(|_| mize_err!("Failed to downcast native value to {}", std::any::type_name::()))?; + return Ok(*typed); + } + } + + // Fallback: let T construct itself from this ItemData + T::from_itemdata(self.clone()) } } -/// Guard that holds a lock on the native_values registry and provides an immutable reference to a native value. +/// Try to construct a native value of type `T` from a `CborValue`. +/// +/// Supports hardcoded types: +/// - `String` from `CborValue::Text` +/// - `bool` from `CborValue::Bool` +/// - `Vec` from `CborValue::Bytes` +/// - `Vec` from `CborValue::Array` of `Text` +/// - Integer types (`i8`, `i16`, `i32`, `i64`, `i128`, `isize`, +/// `u8`, `u16`, `u32`, `u64`, `u128`, `usize`) from `CborValue::Integer` +/// - Float types (`f32`, `f64`) from `CborValue::Float` or `CborValue::Integer` +/// +/// Returns `Ok(Some(value))` if `T` is a supported type and conversion succeeds. +/// Returns `Ok(None)` if `T` is not a supported hardcoded type. +/// Returns `Err` if `T` is supported but the CBOR value cannot be converted. +fn try_construct_native(cbor: &CborValue) -> MizeResult> { + let tid = TypeId::of::(); + + macro_rules! try_convert { + ($target:ty, $conv:expr) => { + if tid == TypeId::of::<$target>() { + let val: $target = $conv?; + // SAFETY: TypeId verified that $target == T, so the transmute is sound. + return Ok(Some(*unsafe { + std::mem::transmute::, Box>(Box::new(val)) + })); + } + }; + } + + // String from Text + try_convert!(String, + cbor.as_text() + .map(|s| s.to_owned()) + .ok_or_else(|| mize_err!("ItemData is not a Text value, cannot construct String")) + ); + + // bool from Bool + try_convert!(bool, + cbor.as_bool() + .ok_or_else(|| mize_err!("ItemData is not a Bool value, cannot construct bool")) + ); + + // Vec from Bytes + try_convert!(Vec, + cbor.as_bytes() + .map(|b| b.clone()) + .ok_or_else(|| mize_err!("ItemData is not a Bytes value, cannot construct Vec")) + ); + + // Vec from Array of Text + try_convert!(Vec, { + let arr = cbor.as_array() + .ok_or_else(|| mize_err!("ItemData is not an Array value, cannot construct Vec"))?; + arr.iter() + .map(|v| { + v.as_text() + .map(|s| s.to_owned()) + .ok_or_else(|| mize_err!("Array element is not a Text value, cannot construct Vec")) + }) + .collect::>>() + }); + + // Integer types from Integer + macro_rules! try_int { + ($target:ty) => { + try_convert!($target, { + let int = cbor.as_integer() + .ok_or_else(|| mize_err!("ItemData is not an Integer value, cannot construct {}", std::any::type_name::<$target>()))?; + let i128_val: i128 = int.into(); + <$target>::try_from(i128_val) + .map_err(|_| mize_err!("Integer value {} does not fit in {}", i128_val, std::any::type_name::<$target>())) + }); + }; + } + + try_int!(i8); + try_int!(i16); + try_int!(i32); + try_int!(i64); + try_int!(i128); + try_int!(isize); + try_int!(u8); + try_int!(u16); + try_int!(u32); + try_int!(u64); + try_int!(u128); + try_int!(usize); + + // Float types from Float or Integer + macro_rules! try_float { + ($target:ty) => { + try_convert!($target, { + match cbor { + CborValue::Float(f) => Ok(*f as $target), + CborValue::Integer(i) => { + let i128_val: i128 = (*i).into(); + Ok(i128_val as $target) + } + _ => Err(mize_err!( + "ItemData is neither Float nor Integer, cannot construct {}", + std::any::type_name::<$target>() + )), + } + }); + }; + } + + try_float!(f32); + try_float!(f64); + + // Type not supported for direct construction + Ok(None) +} + +/// Guard that holds a native value taken from the registry. +/// +/// The value is temporarily removed from the registry to allow the mutex lock to be dropped. +/// When the guard is dropped, the value is automatically reinserted into the registry. pub struct NativeRefGuard { - _guard: MutexGuard<'static, HashMap>>, - value: &'static T, + value: std::mem::ManuallyDrop, + id: u32, + needs_reinsert: bool, } impl std::ops::Deref for NativeRefGuard { type Target = T; fn deref(&self) -> &Self::Target { - self.value + &*self.value } } -/// Guard that holds a lock on the native_values registry and provides a mutable reference to a native value. +impl Drop for NativeRefGuard { + fn drop(&mut self) { + if self.needs_reinsert { + let mize = get_global_mize().expect("Failed to get global mize in NativeRefGuard drop"); + let mut native_values = mize.native_values.lock().expect("Failed to lock native_values in NativeRefGuard drop"); + let value = unsafe { std::mem::ManuallyDrop::take(&mut self.value) }; + native_values.insert(self.id, Box::new(value)); + } else { + unsafe { std::mem::ManuallyDrop::drop(&mut self.value) }; + } + } +} + +/// Guard that holds a mutable native value taken from the registry. +/// +/// The value is temporarily removed from the registry to allow the mutex lock to be dropped. +/// When the guard is dropped, the value is automatically reinserted into the registry. pub struct NativeMutRefGuard { - _guard: MutexGuard<'static, HashMap>>, - value: &'static mut T, + value: std::mem::ManuallyDrop, + id: u32, + needs_reinsert: bool, } impl std::ops::Deref for NativeMutRefGuard { type Target = T; fn deref(&self) -> &Self::Target { - self.value + &*self.value } } impl std::ops::DerefMut for NativeMutRefGuard { fn deref_mut(&mut self) -> &mut Self::Target { - self.value + &mut *self.value + } +} + +impl Drop for NativeMutRefGuard { + fn drop(&mut self) { + if self.needs_reinsert { + let mize = get_global_mize().expect("Failed to get global mize in NativeMutRefGuard drop"); + let mut native_values = mize.native_values.lock().expect("Failed to lock native_values in NativeMutRefGuard drop"); + let value = unsafe { std::mem::ManuallyDrop::take(&mut self.value) }; + native_values.insert(self.id, Box::new(value)); + } else { + unsafe { std::mem::ManuallyDrop::drop(&mut self.value) }; + } } } @@ -561,8 +970,6 @@ pub fn data_from_string(data_string: String) -> MizeResult { pub fn item_data_get_path(data: &CborValue, path: Vec) -> MizeResult<&CborValue> { let mut path_iter = path.clone().into_iter(); - //println!("data: {:?}", data); - //println!("path: {:?}", path); let path_el = match path_iter.nth(0) { Some(val) => val, @@ -573,8 +980,6 @@ pub fn item_data_get_path(data: &CborValue, path: Vec) -> MizeResult<&Cb match data { CborValue::Map(map) => { for (key, val) in map { - //println!("key: {:?}", key); - //println!("path_el: {}", path_el); if let CborValue::Text(key_str) = key { if key_str == &path_el { sub_data = val; @@ -635,12 +1040,6 @@ pub fn item_data_set_path( //trace!("[ {} ] path: {:?}", "ARG".yellow(), path); //trace!("[ {} ] data_to_set: {}", "ARG".yellow(), data_to_set.clone().into_item_data()); - //test_println!("item_data_set_path ###########################"); - //test_println!("data: {}", ItemData::from_cbor(data.clone())); - //test_println!("path: {:?}", path); - //test_println!("data_to_set: {}", ItemData::from_cbor(data_to_set.clone())); - //test_println!("###########################"); - let mut path_iter = path.clone().into_iter(); let path_el = match path_iter.nth(0) { Some(val) => val, @@ -850,6 +1249,11 @@ impl IntoPath for &str { self.to_owned().split("/").map(|v| v.to_owned()).collect() } } +impl IntoPath for usize { + fn into_path(self) -> Vec { + vec![format!("{}", self)] + } +} impl IntoPath for &[&str] { fn into_path(self) -> Vec { @@ -984,3 +1388,281 @@ pub fn set_config_from_data(mize: &mut Mize, mut data: ItemData) -> MizeResult<( } Ok(()) } + +#[cfg(test)] +mod tests { + use super::*; + use crate::set_global_mize; + use crate::instance::Mize; + use std::sync::{Mutex, MutexGuard}; + + /// Mutex to serialize tests that use the global Mize instance. + static TEST_MUTEX: Mutex<()> = Mutex::new(()); + + fn setup() -> MizeResult> { + let guard = TEST_MUTEX.lock().map_err(|_| mize_err!("Failed to lock test mutex"))?; + let mize = Mize::empty()?; + set_global_mize(mize)?; + Ok(guard) + } + + #[test] + fn test_native_clone_string_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_string("hello world"); + let s: String = data.native_clone()?; + assert_eq!(s, "hello world"); + Ok(()) + } + + #[test] + fn test_native_take_string_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_string("take me"); + let s: String = data.native_take()?; + assert_eq!(s, "take me"); + Ok(()) + } + + #[test] + fn test_native_string_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_string("guard test"); + let guard = data.native::()?; + assert_eq!(&*guard, "guard test"); + Ok(()) + } + + #[test] + fn test_native_mut_string_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_string("mutable"); + { + let mut guard = data.native_mut::()?; + guard.push_str(" updated"); + assert_eq!(&*guard, "mutable updated"); + } + // Note: each call to native/native_mut on an ItemData without _native + // constructs a fresh value from the CBOR content. The ItemData itself + // is not modified, so the original CBOR value is used each time. + let guard2 = data.native::()?; + assert_eq!(&*guard2, "mutable"); + Ok(()) + } + + #[test] + fn test_native_clone_bool_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Bool(true)); + let b: bool = data.native_clone()?; + assert_eq!(b, true); + Ok(()) + } + + #[test] + fn test_native_clone_i32_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Integer(42.into())); + let i: i32 = data.native_clone()?; + assert_eq!(i, 42); + Ok(()) + } + + #[test] + fn test_native_clone_u64_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Integer(123456789u64.into())); + let u: u64 = data.native_clone()?; + assert_eq!(u, 123456789); + Ok(()) + } + + #[test] + fn test_native_clone_i128_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::from(9999999999i128)); + let i: i128 = data.native_clone()?; + assert_eq!(i, 9999999999); + Ok(()) + } + + #[test] + fn test_native_clone_f64_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Float(3.14159)); + let f: f64 = data.native_clone()?; + assert!((f - 3.14159).abs() < 0.00001); + Ok(()) + } + + #[test] + fn test_native_clone_f64_from_integer() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Integer(42.into())); + let f: f64 = data.native_clone()?; + assert_eq!(f, 42.0); + Ok(()) + } + + #[test] + fn test_native_clone_vec_string_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Array(vec![ + CborValue::Text("a".to_string()), + CborValue::Text("b".to_string()), + CborValue::Text("c".to_string()), + ])); + let v: Vec = data.native_clone()?; + assert_eq!(v, vec!["a".to_string(), "b".to_string(), "c".to_string()]); + Ok(()) + } + + #[test] + fn test_native_clone_vec_u8_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Bytes(vec![1, 2, 3, 4, 5])); + let v: Vec = data.native_clone()?; + assert_eq!(v, vec![1, 2, 3, 4, 5]); + Ok(()) + } + + #[test] + fn test_native_clone_usize_from_cbor() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_cbor(CborValue::Integer(99.into())); + let u: usize = data.native_clone()?; + assert_eq!(u, 99); + Ok(()) + } + + #[test] + fn test_native_registry_still_works() -> MizeResult<()> { + let _guard = setup()?; + // Store a custom type in the registry + let data = ItemData::from_native("registry value".to_string())?; + let s: String = data.native_clone()?; + assert_eq!(s, "registry value"); + Ok(()) + } + + #[test] + fn test_native_take_registry() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_native(777i32)?; + let i: i32 = data.native_take()?; + assert_eq!(i, 777); + // Second take should fail (already removed from registry) + let result: MizeResult = data.native_take(); + assert!(result.is_err()); + Ok(()) + } + + struct TestNative { + value: i32, + } + + impl FromItemData for TestNative { + fn from_itemdata(data: ItemData) -> MizeResult { + let value = data.get_path("value")?.value_u32()? as i32; + Ok(TestNative { value }) + } + } + + struct IdWrapper { + native_id: u32, + } + + impl FromItemData for IdWrapper { + fn from_itemdata(data: ItemData) -> MizeResult { + Ok(IdWrapper { native_id: data.get_path("_native")?.value_u32()? }) + } + } + + #[test] + fn test_native_take_from_registry() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_native(TestNative { value: 5 })?; + let v: TestNative = data.native_take_from()?; + assert_eq!(v.value, 5); + Ok(()) + } + + #[test] + fn test_native_take_from_itemdata() -> MizeResult<()> { + let _guard = setup()?; + let mut data = ItemData::new(); + data.set_path("value", 42u32)?; + let v: TestNative = data.native_take_from()?; + assert_eq!(v.value, 42); + Ok(()) + } + + #[test] + fn test_native_take_from_wrapper_keeps_registry_value() -> MizeResult<()> { + let _guard = setup()?; + // registry holds a u32, but we take an IdWrapper which builds itself from the _native field + let data = ItemData::from_native(777u32)?; + let expected_id = data.get_path("_native")?.value_u32()?; + let w: IdWrapper = data.native_take_from()?; + assert_eq!(w.native_id, expected_id); + // the u32 was not consumed and can still be taken + let v: u32 = data.native_take()?; + assert_eq!(v, 777); + Ok(()) + } + + #[test] + fn test_native_from_registry() -> MizeResult<()> { + let _guard = setup()?; + let data = ItemData::from_native(TestNative { value: 9 })?; + let guard = data.native_from::()?; + assert_eq!((*guard).value, 9); + Ok(()) + } + + #[test] + fn test_native_mut_from_itemdata() -> MizeResult<()> { + let _guard = setup()?; + let mut data = ItemData::new(); + data.set_path("value", 1u32)?; + { + let mut guard = data.native_mut_from::()?; + (*guard).value += 10; + assert_eq!((*guard).value, 11); + } + // a fresh guard is constructed from the CBOR content again + let guard2 = data.native_from::()?; + assert_eq!((*guard2).value, 1); + Ok(()) + } + + #[test] + fn test_native_clone_unsupported_type_fails() -> MizeResult<()> { + let _guard = setup()?; + // HashMap is not a supported hardcoded type + let data = ItemData::from_string("test"); + let result: MizeResult> = data.native_clone(); + assert!(result.is_err()); + Ok(()) + } + + #[test] + fn test_native_clone_wrong_type_fails() -> MizeResult<()> { + let _guard = setup()?; + // ItemData has Text, but we ask for bool + let data = ItemData::from_string("not a bool"); + let result: MizeResult = data.native_clone(); + assert!(result.is_err()); + Ok(()) + } + + #[test] + fn test_native_clone_integer_overflow_fails() -> MizeResult<()> { + let _guard = setup()?; + // i128 value too large for u8 + let data = ItemData::from_cbor(CborValue::Integer(300.into())); + let result: MizeResult = data.native_clone(); + assert!(result.is_err()); + Ok(()) + } +} diff --git a/core/src/lib.rs b/core/src/lib.rs index 2d7f387..cacbc57 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -79,6 +79,7 @@ pub mod prelude { pub use error::MizeError; pub use crate::mize_err; pub use error::MizeResult; + pub use error::IntoMizeResult; pub use item::{Item, ItemData, IntoItemData}; pub use config::*; pub use api::*; @@ -107,7 +108,7 @@ pub use error::MizeError; pub use error::MizeResult; pub use instance::Mize; pub use instance::{ - MizePart, + MizePart, PartMetadata, OptMetadata, MethodMetadata, NativeMetadata, }; pub use mize_macros::*; use std::path::PathBuf; diff --git a/core/src/platform/os/logging.rs b/core/src/platform/os/logging.rs index a862318..9609889 100644 --- a/core/src/platform/os/logging.rs +++ b/core/src/platform/os/logging.rs @@ -33,7 +33,7 @@ use crate::MizeResult; static DEFAULT_LOG_LEVEL: LevelFilter = LevelFilter::WARN; pub fn init_logger(cli_matches: &ArgMatches) { - println!("init_logger called"); + trace!("init_logger called"); // to save log messages, before the logger is setup let mut log_messages: Vec<(Level, String)> = Vec::new(); @@ -69,7 +69,7 @@ pub fn init_logger(cli_matches: &ArgMatches) { // check env LOG let mut val_mize_log = level_from_env("LOG", log_level); if let Some(level_mize_log) = val_mize_log.0 { - println!("set log level from the Variable LOG to {}", level_mize_log); + debug!("set log level from the Variable LOG to {}", level_mize_log); log_level = level_mize_log; log_messages.push(( Level::TRACE, @@ -172,7 +172,7 @@ pub fn init_logger(cli_matches: &ArgMatches) { //MinimalTracer::register(); - println!("log_level: {}", log_level); + debug!("log_level: {}", log_level); let field_formatter = tracing_subscriber::fmt::format::debug_fn(|writer, field, value| { if field.name() == "message" { write!(writer, "{:?}", value)?; @@ -207,7 +207,7 @@ fn level_from_env( ) -> (Option, Vec<(Level, String)>) { let mut log_messages: Vec<(Level, String)> = Vec::new(); let var_value = env::var(var_name); - println!("checking env var: {}={:?}", var_name, var_value); + debug!("checking env var: {}={:?}", var_name, var_value); match var_value { Ok(val) => { diff --git a/core/src/platform/os/mod.rs b/core/src/platform/os/mod.rs index 677da10..df6388f 100644 --- a/core/src/platform/os/mod.rs +++ b/core/src/platform/os/mod.rs @@ -173,8 +173,8 @@ pub fn get_part_hash( ) -> MizeResult<(String, String)> { let mut selector_data = mize.get("self/config/selector")?.as_data_full()?; - // handle the case, when we want a module for not the system we are running on... - println!("get_module_hash: name: {}", name); + // handle the case, when we want a part for not the system we are running on... + debug!("get_part_hash: name: {}", name); let mut name_parts = name.split("."); if name_parts .next() @@ -185,7 +185,7 @@ pub fn get_part_hash( .next() .ok_or(mize_err!("no 1th element in the modName"))?; let mod_name: String = name_parts.collect(); - println!("get_module_hash: mod_name: {}", mod_name); + println!("get_part_hash: mod_name: {}", mod_name); if mod_name == "" { return Err(mize_err!("no 2nd element in the modName")); } @@ -317,12 +317,9 @@ pub fn load_part(mize: &mut Mize, part_name: &str, path: Option) -> Mize unsafe extern "C" fn() -> MizeResult<()>, > = unsafe { lib.get(format!("part_{}", part_name).as_bytes())? }; - let mut cur_eval_part = mize.cur_eval_part.lock()?; - *cur_eval_part = Some(mize.clone().id_new_dots(part_name)?); - println!("running part: {}", cur_eval_part.clone().unwrap()); - drop(cur_eval_part); - + mize.clone().set_cur_eval_part(Some(mize.clone().id_new_dots(part_name)?))?; unsafe { func()? }; + mize.clone().set_cur_eval_part(None)?; let mut cur_eval_part = mize.cur_eval_part.lock()?; *cur_eval_part = None; diff --git a/flake.nix b/flake.nix index c75d4a3..648c57c 100644 --- a/flake.nix +++ b/flake.nix @@ -175,10 +175,7 @@ in { pkgs.pkg-config pkgs.gobject-introspection pkgs.gobject-introspection.dev - pkgs.systemd - pkgs.rsync pkgs.deno - pkgs.openssh # thanks to: https://github.com/NixOS/nixpkgs/pull/496279/changes (pkgs.buildWasmBindgenCli rec { diff --git a/macros/src/lib.rs b/macros/src/lib.rs index cfa5c20..0bfb552 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -215,7 +215,7 @@ pub fn include_native(input: TokenStream) -> TokenStream { fn generate_arg_extraction(args: &[(Ident, Type)]) -> Vec { args.iter().enumerate().map(|(i, (arg_name, arg_type))| { quote! { - let #arg_name = args.arr_nth(#i)?.native_clone::<#arg_type>()?; + let #arg_name = args.get_path(#i)?.native_clone::<#arg_type>()?; } }).collect() } diff --git a/parts/cli/src/lib.rs b/parts/cli/src/lib.rs index 189d048..8d229c6 100644 --- a/parts/cli/src/lib.rs +++ b/parts/cli/src/lib.rs @@ -1,6 +1,6 @@ use clap::{ArgMatches, Command}; use mize::item::ItemData; -use std::collections::HashMap; +use std::{collections::HashMap, ffi::OsString}; use mize::prelude::*; #[unsafe(no_mangle)] @@ -13,7 +13,6 @@ pub extern "C" fn part_cli() -> MizeResult<()> { opt("state") .fun(Box::new(|| { - println!("hiiiiii"); let mize = get_global_mize().unwrap(); let state = CliPartState { cmds: HashMap::new(), @@ -22,15 +21,13 @@ pub extern "C" fn part_cli() -> MizeResult<()> { parsers: Some(Vec::new()), mize: mize.clone(), }; - println!("hooooo"); Ok(ItemData::from_native(state)?) })); method("set_command", |args| { - println!("in set command"); let mut state = get_config("self.state")?.native_mut::()?; - let cmd = args.arr_nth(0)?.native::()?; + let cmd = args.get_path("0")?.native::()?; state.current_cmd_name = cmd.to_owned(); if !state.cmds.contains_key(&*cmd) { state.cmds @@ -40,10 +37,9 @@ pub extern "C" fn part_cli() -> MizeResult<()> { }); method("subcommand", |args| { - println!("in subcommand"); let mut state = get_config("self.state")?.native_mut::()?; - let subcmd = args.arr_nth(0)?.native_take::()?; - let action = args.arr_nth(1)?.native_take:: MizeResult<()> + Send + Sync>>()?; + let subcmd = args.get_path("0")?.native_take::()?; + let action = args.get_path("1")?; let name = subcmd.get_name().to_string(); let cur_cmd_name = state.current_cmd_name.clone(); let cmd = state @@ -56,6 +52,23 @@ pub extern "C" fn part_cli() -> MizeResult<()> { Ok(ItemData::new()) }); + method("run", |args| { + let cmdline = args.get_path("0")?.native_take::>()?; + let mut state = get_config("self.state")?.native_mut::()?; + let cmd_name = cmdline.iter().nth(0).ok_or(mize_err!("empty cmdline"))?; + let cmd = state.cmds.remove(cmd_name).ok_or(mize_err!("cmd {} not found in CliPart", cmd_name))?; + + let matches = cmd.get_matches_from(cmdline); + let sub_name = matches.subcommand_name().ok_or(mize_err!("subcommand not found"))?; + let sub_matches = matches.subcommand_matches(sub_name).ok_or(mize_err!("subcommand matches not found"))?; + let action = state.actions.remove(sub_name).ok_or(mize_err!("action for subcommand not found"))?; + let mut args = ItemData::new(); + args.set_path("0", ItemData::from_native(sub_matches.clone())?); + action.call(args)?; + + Ok(ItemData::new()) + }); + // TODO in future.... // Register methods from the impl block //CliPartState::methods_from_impl()?; @@ -67,7 +80,7 @@ pub struct CliPartState { cmds: HashMap, current_cmd_name: String, actions: - HashMap MizeResult<()> + Send + Sync + 'static>>, + HashMap, parsers: Option) -> MizeResult<()> + Send + Sync + 'static>>>, mize: Mize, } diff --git a/parts/mize.dev/src/codegen.rs b/parts/mize.dev/src/codegen.rs new file mode 100644 index 0000000..a930855 --- /dev/null +++ b/parts/mize.dev/src/codegen.rs @@ -0,0 +1,167 @@ +//! Code generation for mize bindings. +//! +//! Takes recorded PartMetadata (collected while in generate mode) and produces +//! a Rust source file that looks like the hand-written `generated.rs`. + +use mize::prelude::*; +use mize::instance::{PartMetadata, MethodMetadata, OptMetadata, NativeMetadata}; +use std::fmt::Write as _; + +/// Convert a part name like "cli" into a PascalCase struct name like "CliPart". +fn part_name_to_struct(part_name: &str) -> String { + let mut out = String::new(); + let mut upper_next = true; + for c in part_name.chars() { + if c == '.' || c == '-' || c == '_' || c == ' ' { + upper_next = true; + continue; + } + if upper_next { + out.extend(c.to_uppercase()); + upper_next = false; + } else { + out.push(c); + } + } + out.push_str("Part"); + out +} + +/// Generate the full `src/lib.rs` content for the generated bindings package. +pub fn generate_lib_rs(all_metadata: &[PartMetadata]) -> String { + let mut out = String::new(); + out.push_str("// AUTO-GENERATED by mize dev gen -- do not edit manually\n"); + out.push_str("use mize::prelude::*;\n\n\n"); + + for meta in all_metadata { + generate_part_struct(&mut out, meta); + } + + out +} + +fn generate_part_struct(out: &mut String, meta: &PartMetadata) { + let struct_name = part_name_to_struct(&meta.part_name); + let part_id_str = meta.part_name.replace('.', "."); + + // struct definition + let _ = writeln!(out, "pub struct {struct_name} {{"); + let _ = writeln!(out, " id: MizeId"); + let _ = writeln!(out, "}}"); + let _ = writeln!(out); + + // MizePart impl + let _ = writeln!(out, "impl MizePart for {struct_name} {{"); + let _ = writeln!(out, " fn id(&self) -> MizeId {{"); + let _ = writeln!(out, " self.id.clone()"); + let _ = writeln!(out, " }}"); + let _ = writeln!(out, "}}"); + let _ = writeln!(out); + + // inherent impl + let _ = writeln!(out, "impl {struct_name} {{"); + + // get() constructor + let _ = writeln!(out, " pub fn get(name: &str) -> MizeResult<{struct_name}> {{"); + let _ = writeln!(out, " let mut mize = get_global_mize()?;"); + let _ = writeln!(out, " let part = mize.get_part(name)?;"); + let _ = writeln!(out, " Ok({struct_name} {{ id: part.id() }})"); + let _ = writeln!(out, " }}"); + + // one method per recorded method/effect/thread + for m in meta.methods.iter().chain(meta.effects.iter()).chain(meta.threads.iter()) { + generate_method_fn(out, &struct_name, m); + } + + // one getter-ish fn per recorded opt (opts are config values; expose a dyn_call getter) + for o in &meta.opts { + generate_opt_fn(out, &struct_name, o); + } + + let _ = writeln!(out, "}}"); + let _ = writeln!(out); + + // native type wrappers + for n in &meta.natives { + generate_native_struct(out, n); + } + + let _ = writeln!(out, "// part id string: {part_id_str}"); + let _ = writeln!(out); +} + +fn generate_method_fn(out: &mut String, _struct_name: &str, m: &MethodMetadata) { + let fn_name = &m.name; + let _ = writeln!( + out, + " pub fn {fn_name}(&self, args: ItemData) -> MizeResult {{" + ); + let _ = writeln!(out, " dyn_call(self.id.clone(), \"{fn_name}\", args)?;"); + // note: dyn_call returns ItemData already, so wrap: + let _ = writeln!(out, " dyn_call(self.id.clone(), \"{fn_name}\", args)"); + let _ = writeln!(out, " }}"); + let _ = writeln!(out); +} + +fn generate_opt_fn(out: &mut String, _struct_name: &str, o: &OptMetadata) { + let fn_name = &o.name; + let _ = writeln!( + out, + " pub fn opt_{fn_name}(&self) -> MizeResult {{" + ); + let _ = writeln!(out, " get_config(&format!(\"{{}}/{fn_name}\", self.id.dot()))"); + let _ = writeln!(out, " }}"); + let _ = writeln!(out); +} + +fn generate_native_struct(out: &mut String, n: &NativeMetadata) { + let struct_name = &n.name; + let _ = writeln!(out, "// native type: {} ({})", n.name, n.type_name); + let _ = writeln!(out, "pub struct {struct_name} {{"); + let _ = writeln!(out, " native_id: u32"); + let _ = writeln!(out, "}}"); + let _ = writeln!(out); + let _ = writeln!(out, "impl {struct_name} {{"); + for assoc in &n.associated { + let _ = writeln!( + out, + " pub fn {assoc}(args: ItemData) -> MizeResult {{" + ); + let _ = writeln!(out, " let mut mize = get_global_mize()?;"); + let _ = writeln!(out, " let id = mize.id_new_dots(\"{}.{assoc}\")?;", n.name); + let _ = writeln!(out, " dyn_call(id, \"{assoc}\", args)"); + let _ = writeln!(out, " }}"); + } + for meth in &n.methods { + let _ = writeln!( + out, + " pub fn {meth}(&self, args: ItemData) -> MizeResult {{" + ); + let _ = writeln!(out, " let mut mize = get_global_mize()?;"); + let _ = writeln!(out, " let id = mize.id_new_dots(\"{}.{meth}\")?;", n.name); + let _ = writeln!(out, " dyn_call(id, \"{meth}\", args)"); + let _ = writeln!(out, " }}"); + } + let _ = writeln!(out, "}}"); + let _ = writeln!(out); +} + +/// Generate the `Cargo.toml` content for the generated package. +pub fn generate_cargo_toml(package_name: &str) -> String { + format!( + r#"[package] +name = "{package_name}" +version = "0.1.0" +edition = "2024" + +[lib] +name = "{lib_name}" +path = "src/lib.rs" + +[dependencies] +mize = {{ path = "../../core" }} +"#, + package_name = package_name, + lib_name = package_name.replace('-', "_"), + ) +} diff --git a/parts/mize.dev/src/generated.rs b/parts/mize.dev/src/generated.rs index f36c1e0..2ae1a88 100644 --- a/parts/mize.dev/src/generated.rs +++ b/parts/mize.dev/src/generated.rs @@ -34,7 +34,11 @@ impl CliPart { pub fn subcommand MizeResult<()> + Send + Sync + 'static>(&self, subcmd: Command, action: T) -> MizeResult<()> { let mut subcmd_arg = ItemData::new(); subcmd_arg.set_path("_native", subcmd.native_id)?; - let mut action_arg = ItemData::from_native(action)?; + let mut action_arg = ItemData::fun(Box::new(move |args: ItemData| { + let matches = args.clone().get_path("0")?.native_take_from::()?; + action(matches)?; + Ok(ItemData::new()) + }))?; let mut args = ItemData::new(); args.set_path("0", subcmd_arg)?; args.set_path("1", action_arg)?; @@ -52,6 +56,12 @@ pub struct ArgMatches { native_id: u32 } +impl FromItemData for ArgMatches { + fn from_itemdata(data: ItemData) -> MizeResult { + Ok(ArgMatches { native_id: data.get_path("_native")?.value_u32()? }) + } +} + pub struct Action { native_id: u32 } diff --git a/parts/mize.dev/src/lib.rs b/parts/mize.dev/src/lib.rs index 45c5cb4..0f7527f 100644 --- a/parts/mize.dev/src/lib.rs +++ b/parts/mize.dev/src/lib.rs @@ -1,4 +1,4 @@ -use std::fs::create_dir_all; +use std::fs::{create_dir_all, write}; use mize::prelude::*; use cmd_lib::run_cmd as sh; use mize::tracing::info; @@ -6,6 +6,7 @@ use mize::tracing::info; // a static version of what would be generated. // as we need mize.dev to generate anything. mod generated; +mod codegen; use generated::*; // spacetime gen command: sh!(RUST_LOG=error RUST_BACKTRACE=0 spacetime generate --build-options="--lint-dir=" -p $SRC/mize/marts/spacetime -o $SRC/mize/marts/generated/src/spacetime --lang rust)?; @@ -17,13 +18,16 @@ extern "C" fn part_dev() -> MizeResult<()> { cli.set_command("dev"); cli.subcommand(Command::new("test")?, |_| {println!("hello from test command"); Ok(())})?; - //cli.subcommand(Command::new("publish").alias("p"), publish_mize)?; - //cli.subcommand(Command::new("genBindings").alias("b"), gen_bindings)?; + cli.subcommand(Command::new("generate")?, gen_bindings)?; + cli.subcommand(Command::new("gen")?, gen_bindings)?; // alias for generate + cli.subcommand(Command::new("publish")?, publish_mize)?; + cli.subcommand(Command::new("p")?, publish_mize)?; Ok(()) } -pub fn publish_mize(_ : &ArgMatches, mut mize: Mize) -> MizeResult<()> { +pub fn publish_mize(_ : ArgMatches) -> MizeResult<()> { + let mut mize = get_global_mize()?; let mize_src = mize.get_config("mize.src")?.value_string()?; let cargo_dir = std::env::home_dir().unwrap().join(".cargo"); @@ -57,7 +61,77 @@ pub fn publish_mize(_ : &ArgMatches, mut mize: Mize) -> MizeResult<()> { Ok(()) } -pub fn gen_bindings(_ : &ArgMatches, mize: Mize) -> MizeResult<()> { - +/// The `dev generate` command (alias `gen` to be added once bindings support it). +/// +/// Reads a `part` TOML file from the current directory, loads the parts listed +/// in `gen = [...]` in generate mode (recording metadata instead of executing), +/// then writes a full Cargo package with Rust bindings to `/generated/`. +pub fn gen_bindings(_ : ArgMatches) -> MizeResult<()> { + let mut mize = get_global_mize()?; + + // 1. read the "part" file from the current directory + let cwd = std::env::current_dir().map_err(|e| mize_err!("could not get current dir: {e}"))?; + let part_file = cwd.join("part"); + info!("reading part description file: {}", part_file.display()); + let part_toml = std::fs::read_to_string(&part_file) + .map_err(|e| mize_err!("could not read part file {}: {e}", part_file.display()))?; + let part_data = ItemData::from_toml(&part_toml)?; + + // 2. parse the part name and the gen = [...] list + let part_name: String = part_data + .get_path("name") + .ok() + .and_then(|v| v.value_string().ok()) + .ok_or_else(|| mize_err!("part file must have a 'name' field"))?; + info!("part name: {part_name}"); + + let gen_data = part_data + .get_path("gen") + .map_err(|_| mize_err!("part file must have a 'gen' array, eg: gen = [\"cli\", \"auth\"]"))?; + let gen_arr = gen_data + .cbor() + .as_array() + .ok_or_else(|| mize_err!("'gen' is not an array"))?; + let mut gen_parts: Vec = Vec::new(); + for v in gen_arr.iter() { + let s = v.as_text().ok_or_else(|| mize_err!("'gen' array must contain only strings"))?; + gen_parts.push(s.to_owned()); + } + info!("parts to generate bindings for: {:?}", gen_parts); + + // 3. enable generate mode and clear any old metadata + mize.set_generate_mode(true)?; + mize.clear_metadata()?; + + // 4. load each part — in generate mode their part_smth funcs only record metadata + for p in &gen_parts { + info!("loading part in generate mode: {p}"); + mize.load_part(p)?; + } + + // 5. disable generate mode again + mize.set_generate_mode(false)?; + + // 6. collect all recorded metadata + let all_metadata = mize.get_all_metadata()?; + info!("recorded metadata for {} part(s)", all_metadata.len()); + + // 7. generate the bindings package at /generated + let gen_dir = cwd.join("generated"); + let src_dir = gen_dir.join("src"); + create_dir_all(&src_dir).map_err(|e| mize_err!("could not create generated/src dir: {e}"))?; + + let package_name = format!("mize-generated-{part_name}"); + let cargo_toml = codegen::generate_cargo_toml(&package_name); + write(gen_dir.join("Cargo.toml"), cargo_toml) + .map_err(|e| mize_err!("could not write generated/Cargo.toml: {e}"))?; + + let lib_rs = codegen::generate_lib_rs(&all_metadata); + write(src_dir.join("lib.rs"), lib_rs) + .map_err(|e| mize_err!("could not write generated/src/lib.rs: {e}"))?; + + info!("bindings written to {}", gen_dir.display()); + println!("generated bindings package: {}", gen_dir.display()); + Ok(()) } diff --git a/parts/mize.ui/Cargo.toml b/parts/mize.ui/Cargo.toml new file mode 100644 index 0000000..240f51a --- /dev/null +++ b/parts/mize.ui/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "mize-part-mize-ui" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/parts/mize.ui/dioxus-components/Cargo.toml b/parts/mize.ui/dioxus-components/Cargo.toml new file mode 100644 index 0000000..80dfebc --- /dev/null +++ b/parts/mize.ui/dioxus-components/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "dioxus-components" +version = "0.1.0" +edition = "2021" +description = "Styled Dioxus UI components (mize palette)" +license = "MIT OR Apache-2.0" + +[dependencies] +dioxus = { version = "0.7", default-features = false } +dioxus-primitives = { git = "https://github.com/DioxusLabs/components", default-features = false } +dioxus-code = { version = "0.1.0", default-features = false, features = ["macro", "lang-css"] } +dioxus-icons = "0.1.0" + +[features] +default = [] +web = ["dioxus/web", "dioxus-primitives/web"] +desktop = ["dioxus/desktop"] diff --git a/parts/mize.ui/dioxus-components/PLAN.md b/parts/mize.ui/dioxus-components/PLAN.md new file mode 100644 index 0000000..bb6e720 --- /dev/null +++ b/parts/mize.ui/dioxus-components/PLAN.md @@ -0,0 +1,7 @@ +# dioxus-components MVP plan (approved) + +Library of styled Dioxus components copied from upstream preview, restyled with the mize palette (light + dark). + +- MVP: button, input, textarea, label, checkbox, switch, dialog, separator, avatar, badge, card, scroll_area +- dioxus-primitives via git (DioxusLabs/components) — crates.io is a stub +- Plain Rust lib; consumers include theme.css and set `html[data-theme]` diff --git a/parts/mize.ui/dioxus-components/assets/theme.css b/parts/mize.ui/dioxus-components/assets/theme.css new file mode 100644 index 0000000..ef666aa --- /dev/null +++ b/parts/mize.ui/dioxus-components/assets/theme.css @@ -0,0 +1,44 @@ +/* mize UI theme — include once; toggle via html[data-theme="light"|"dark"] */ + +html[data-theme="dark"] { + --dark: initial; + --light: ; +} + +html[data-theme="light"] { + --dark: ; + --light: initial; +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme]) { + --dark: initial; + --light: ; + } +} + +@media (prefers-color-scheme: light) { + :root:not([data-theme]) { + --dark: ; + --light: initial; + } +} + +:root { + --bg: var(--dark, #171d18) var(--light, #f7f8f4); + --surface: var(--dark, #242d25) var(--light, #ffffff); + --surface-2: var(--dark, #2c362d) var(--light, #eff2ea); + --text: var(--dark, #f2f4ea) var(--light, #20251c); + --text-2: var(--dark, #aab5a4) var(--light, #66705e); + --border: var(--dark, #3a463a) var(--light, #dfe4d9); + --accent: var(--dark, #d7e47d) var(--light, #fec251); + --accent-text: var(--dark, #d7e47d) var(--light, #79500f); + --success: var(--dark, #b9d987) var(--light, #526f32); + --info: var(--dark, #b9e4eb) var(--light, #376777); + --warning: var(--dark, #ffd77f) var(--light, #a66b13); + --danger: var(--dark, #ff9b8e) var(--light, #b94d42); + + /* On-accent fill text: dark ink on light accent, dark surface on dark accent */ + --on-accent: var(--dark, #171d18) var(--light, #79500f); + --focus-ring: var(--accent); +} diff --git a/parts/mize.ui/dioxus-components/src/components/avatar/component.rs b/parts/mize.ui/dioxus-components/src/components/avatar/component.rs new file mode 100644 index 0000000..dea6692 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/avatar/component.rs @@ -0,0 +1,206 @@ +use dioxus::prelude::*; +use dioxus_primitives::dioxus_attributes::attributes; +use dioxus_primitives::avatar::{self, AvatarState}; +use dioxus_primitives::merge_attributes; + +#[css_module("/src/components/avatar/style.css")] +struct Styles; + +#[derive(Clone, Copy, PartialEq, Default)] +pub enum AvatarImageSize { + #[default] + Small, + Medium, + Large, +} + +impl AvatarImageSize { + fn to_class(self) -> &'static str { + match self { + AvatarImageSize::Small => Styles::dx_avatar_sm.inner, + AvatarImageSize::Medium => Styles::dx_avatar_md.inner, + AvatarImageSize::Large => Styles::dx_avatar_lg.inner, + } + } +} + +#[derive(Clone, Copy, PartialEq, Default)] +pub enum AvatarShape { + #[default] + Circle, + Rounded, +} + +impl AvatarShape { + fn to_class(self) -> &'static str { + match self { + AvatarShape::Circle => Styles::dx_avatar_circle.inner, + AvatarShape::Rounded => Styles::dx_avatar_rounded.inner, + } + } +} + +/// The props for the [`Avatar`] root component. +#[derive(Props, Clone, PartialEq)] +pub struct AvatarProps { + /// Callback when image loads successfully. + #[props(default)] + pub on_load: Option>, + + /// Callback when image fails to load. + #[props(default)] + pub on_error: Option>, + + /// Callback when the avatar state changes. + #[props(default)] + pub on_state_change: Option>, + + #[props(default)] + pub size: AvatarImageSize, + + #[props(default)] + pub shape: AvatarShape, + + /// Additional attributes for the avatar element. + #[props(extends = GlobalAttributes)] + pub attributes: Vec, + + /// The fallback content shown while the image is loading or if it fails to load. + pub children: Element, +} + +#[component] +pub fn Avatar(props: AvatarProps) -> Element { + let class = format!( + "{} {} {}", + Styles::dx_avatar, + props.size.to_class(), + props.shape.to_class() + ); + let base = attributes!(span { + class + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + avatar::Avatar { + on_load: props.on_load, + on_error: props.on_error, + on_state_change: props.on_state_change, + attributes: merged, + {props.children} + } + } +} + +#[derive(Props, Clone, PartialEq)] +pub struct AvatarImageProps { + #[props(default)] + pub id: ReadSignal>, + + pub src: String, + + #[props(default)] + pub alt: String, + + #[props(extends = GlobalAttributes)] + pub attributes: Vec, +} + +#[component] +pub fn AvatarImage(props: AvatarImageProps) -> Element { + let base = attributes!(img { + class: Styles::dx_avatar_image, + draggable: "false", + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + avatar::AvatarImage { + id: props.id, + src: props.src, + alt: props.alt, + attributes: merged, + } + } +} + +#[derive(Props, Clone, PartialEq)] +pub struct AvatarFallbackProps { + #[props(extends = GlobalAttributes)] + pub attributes: Vec, + + pub children: Element, +} + +#[component] +pub fn AvatarFallback(props: AvatarFallbackProps) -> Element { + let base = attributes!(span { + class: Styles::dx_avatar_fallback, + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + avatar::AvatarFallback { + attributes: merged, + {props.children} + } + } +} + +/// The props for the [`ImageAvatar`] convenience component. +#[derive(Props, Clone, PartialEq)] +pub struct ImageAvatarProps { + /// The image source URL. + pub src: String, + + /// The image alt text. + #[props(default)] + pub alt: String, + + /// Callback when image loads successfully. + #[props(default)] + pub on_load: Option>, + + /// Callback when image fails to load. + #[props(default)] + pub on_error: Option>, + + /// Callback when the avatar state changes. + #[props(default)] + pub on_state_change: Option>, + + #[props(default)] + pub size: AvatarImageSize, + + #[props(default)] + pub shape: AvatarShape, + + /// Additional attributes for the avatar element. + #[props(extends = GlobalAttributes)] + pub attributes: Vec, + + /// The fallback content shown while the image is loading or if it fails to load. + pub children: Element, +} + +#[component] +pub fn ImageAvatar(props: ImageAvatarProps) -> Element { + rsx! { + Avatar { + on_load: props.on_load, + on_error: props.on_error, + on_state_change: props.on_state_change, + size: props.size, + shape: props.shape, + attributes: props.attributes, + AvatarImage { + src: props.src, + alt: props.alt, + } + AvatarFallback { + {props.children} + } + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/avatar/mod.rs b/parts/mize.ui/dioxus-components/src/components/avatar/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/avatar/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/avatar/style.css b/parts/mize.ui/dioxus-components/src/components/avatar/style.css new file mode 100644 index 0000000..6448c01 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/avatar/style.css @@ -0,0 +1,84 @@ +.dx-avatar { + position: relative; + display: inline-flex; + overflow: hidden; + width: 64px; + height: 64px; + flex-shrink: 0; + align-items: center; + justify-content: center; + color: var(--text); + font-weight: 500; +} + +.dx-avatar-image { + width: 100%; + height: 100%; + aspect-ratio: 1; + object-fit: cover; +} + +.dx-avatar-sm { + width: 2rem; + height: 2rem; + font-size: 0.875rem; +} + +.dx-avatar-md { + width: 2.5rem; + height: 2.5rem; + font-size: 1rem; +} + +.dx-avatar-lg { + width: 3.5rem; + height: 3.5rem; + font-size: 1.5rem; +} + +.dx-avatar-circle { + border-radius: 50%; +} + +.dx-avatar-rounded { + border-radius: 0.375rem; +} + +.dx-avatar[data-state="loading"] { + animation: dx-pulse 1.5s infinite ease-in-out; + background: var(--surface-2); +} + +.dx-avatar[data-state="empty"] { + background: var(--surface-2); +} + +@keyframes dx-pulse { + 0% { + opacity: 1; + } + + 50% { + opacity: 0.7; + } + + 100% { + opacity: 1; + } +} + +.dx-avatar-fallback { + display: flex; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; + background: var(--surface-2); + color: var(--text-2); + font-size: inherit; +} + +.dx-avatar[data-state="error"] .dx-avatar-fallback { + background: var(--surface-2); + color: var(--text-2); +} diff --git a/parts/mize.ui/dioxus-components/src/components/badge/component.rs b/parts/mize.ui/dioxus-components/src/components/badge/component.rs new file mode 100644 index 0000000..533555a --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/badge/component.rs @@ -0,0 +1,74 @@ +use dioxus::prelude::*; +use dioxus_icons::lucide::BadgeCheck; + +#[css_module("/src/components/badge/style.css")] +struct Styles; + +#[derive(Copy, Clone, PartialEq, Default)] +#[non_exhaustive] +pub enum BadgeVariant { + #[default] + Primary, + Secondary, + Destructive, + Outline, +} + +impl BadgeVariant { + pub fn class(&self) -> &'static str { + match self { + BadgeVariant::Primary => "primary", + BadgeVariant::Secondary => "secondary", + BadgeVariant::Destructive => "destructive", + BadgeVariant::Outline => "outline", + } + } +} + +/// The props for the [`Badge`] component. +#[derive(Props, Clone, PartialEq)] +pub struct BadgeProps { + #[props(default)] + pub variant: BadgeVariant, + + /// Additional attributes to extend the badge element + #[props(extends = GlobalAttributes)] + pub attributes: Vec, + + /// The children of the badge element + pub children: Element, +} + +#[component] +pub fn Badge(props: BadgeProps) -> Element { + rsx! { + BadgeElement { + "padding": true, + variant: props.variant, + attributes: props.attributes, + {props.children} + } + } +} + +#[component] +fn BadgeElement(props: BadgeProps) -> Element { + rsx! { + span { + class: Styles::dx_badge, + "data-style": props.variant.class(), + ..props.attributes, + {props.children} + } + } +} + +#[component] +pub fn VerifiedIcon() -> Element { + rsx! { + BadgeCheck { + size: "12px", + stroke: "var(--text)", + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/badge/mod.rs b/parts/mize.ui/dioxus-components/src/components/badge/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/badge/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/badge/style.css b/parts/mize.ui/dioxus-components/src/components/badge/style.css new file mode 100644 index 0000000..1ec9c0b --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/badge/style.css @@ -0,0 +1,37 @@ +.dx-badge { + display: inline-flex; + min-width: 20px; + height: 20px; + align-items: center; + justify-content: center; + border-radius: 9999px; + font-size: 11px; + font-weight: 600; + gap: 4px; + line-height: 1; +} + +.dx-badge[padding="true"] { + padding: 0 8px; +} + +.dx-badge[data-style="primary"] { + background-color: var(--accent); + color: var(--on-accent); +} + +.dx-badge[data-style="secondary"] { + background-color: var(--surface-2); + color: var(--text); +} + +.dx-badge[data-style="outline"] { + border: 1px solid var(--border); + background-color: var(--surface); + color: var(--text-2); +} + +.dx-badge[data-style="destructive"] { + background-color: var(--danger); + color: var(--dark, #171d18) var(--light, #ffffff); +} diff --git a/parts/mize.ui/dioxus-components/src/components/button/component.rs b/parts/mize.ui/dioxus-components/src/components/button/component.rs new file mode 100644 index 0000000..bbf3b9c --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/button/component.rs @@ -0,0 +1,108 @@ +use dioxus::prelude::*; +use dioxus_primitives::dioxus_attributes::attributes; +use dioxus_primitives::merge_attributes; + +#[css_module("/src/components/button/style.css")] +struct Styles; + +#[derive(Copy, Clone, PartialEq, Default)] +#[non_exhaustive] +pub enum ButtonVariant { + #[default] + Primary, + Secondary, + Destructive, + Outline, + Ghost, + Link, +} + +impl ButtonVariant { + pub fn class(&self) -> &'static str { + match self { + ButtonVariant::Primary => "primary", + ButtonVariant::Secondary => "secondary", + ButtonVariant::Destructive => "destructive", + ButtonVariant::Outline => "outline", + ButtonVariant::Ghost => "ghost", + ButtonVariant::Link => "link", + } + } +} + +#[derive(Copy, Clone, PartialEq, Default)] +#[non_exhaustive] +pub enum ButtonSize { + Xs, + Sm, + #[default] + Default, + Lg, + Icon, + IconXs, + IconSm, + IconLg, +} + +impl ButtonSize { + pub fn class(&self) -> &'static str { + match self { + ButtonSize::Xs => "xs", + ButtonSize::Sm => "sm", + ButtonSize::Default => "default", + ButtonSize::Lg => "lg", + ButtonSize::Icon => "icon", + ButtonSize::IconXs => "icon-xs", + ButtonSize::IconSm => "icon-sm", + ButtonSize::IconLg => "icon-lg", + } + } +} + +#[component] +pub fn Button( + #[props(default)] variant: ButtonVariant, + #[props(default)] size: ButtonSize, + #[props(extends=GlobalAttributes)] + #[props(extends=button)] + attributes: Vec, + onclick: Option>, + onmousedown: Option>, + onmouseup: Option>, + onkeydown: Option>, + children: Element, +) -> Element { + let base = attributes!(button { + class: Styles::dx_button, + "data-style": variant.class(), + "data-size": size.class(), + }); + let merged = merge_attributes(vec![base, attributes]); + + rsx! { + button { + onclick: move |event| { + if let Some(f) = &onclick { + f.call(event); + } + }, + onmousedown: move |event| { + if let Some(f) = &onmousedown { + f.call(event); + } + }, + onmouseup: move |event| { + if let Some(f) = &onmouseup { + f.call(event); + } + }, + onkeydown: move |event| { + if let Some(f) = &onkeydown { + f.call(event); + } + }, + ..merged, + {children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/button/mod.rs b/parts/mize.ui/dioxus-components/src/components/button/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/button/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/button/style.css b/parts/mize.ui/dioxus-components/src/components/button/style.css new file mode 100644 index 0000000..e55021d --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/button/style.css @@ -0,0 +1,195 @@ +.dx-button { + display: inline-flex; + box-sizing: border-box; + flex-shrink: 0; + align-items: center; + justify-content: center; + padding: 0; + border: none; + border-radius: 0.375rem; + cursor: pointer; + font-family: inherit; + font-size: 0.875rem; + font-weight: 500; + gap: 0.5rem; + line-height: 1.25rem; + outline: none; + transition-duration: 150ms; + transition-property: background-color, color, box-shadow, border-color, opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + white-space: nowrap; +} + +.dx-button svg { + flex-shrink: 0; + pointer-events: none; +} + +.dx-button svg:not([class*="size-"]) { + width: 1rem; + height: 1rem; +} + +.dx-button[data-size="xs"] { + height: 1.5rem; + padding: 0 0.5rem; + font-size: 0.75rem; + gap: 0.25rem; + line-height: 1rem; +} + +.dx-button[data-size="xs"]:has(> svg) { + padding-inline: 0.375rem; +} + +.dx-button[data-size="xs"] svg:not([class*="size-"]) { + width: 0.75rem; + height: 0.75rem; +} + +.dx-button[data-size="sm"] { + height: 1.875rem; + padding: 0 0.625rem; + gap: 0.375rem; +} + +.dx-button[data-size="sm"]:has(> svg) { + padding-inline: 0.5rem; +} + +.dx-button[data-size="default"] { + height: 2rem; + padding: 0.375rem 1rem; +} + +.dx-button[data-size="default"]:has(> svg) { + padding-inline: 0.75rem; +} + +.dx-button[data-size="lg"] { + height: 2.375rem; + padding: 0 1.25rem; +} + +.dx-button[data-size="lg"]:has(> svg) { + padding-inline: 1rem; +} + +.dx-button[data-size="icon"] { + width: 2rem; + height: 2rem; +} + +.dx-button[data-size="icon"] svg:not([class*="size-"]) { + width: 1rem; + height: 1rem; +} + +.dx-button[data-size="icon-xs"] { + width: 1.5rem; + height: 1.5rem; +} + +.dx-button[data-size="icon-xs"] svg:not([class*="size-"]) { + width: 0.75rem; + height: 0.75rem; +} + +.dx-button[data-size="icon-sm"] { + width: 1.875rem; + height: 1.875rem; +} + +.dx-button[data-size="icon-sm"] svg:not([class*="size-"]) { + width: 1rem; + height: 1rem; +} + +.dx-button[data-size="icon-lg"] { + width: 2.375rem; + height: 2.375rem; +} + +.dx-button[data-size="icon-lg"] svg:not([class*="size-"]) { + width: 1rem; + height: 1rem; +} + +.dx-button:disabled { + opacity: 0.5; + pointer-events: none; +} + +.dx-button[data-style="primary"] { + background-color: var(--accent); + color: var(--on-accent); +} + +.dx-button[data-style="primary"]:not(:disabled):hover { + background-color: color-mix(in oklab, var(--accent) 88%, var(--text)); +} + +.dx-button[data-style="secondary"] { + background-color: var(--surface-2); + color: var(--text); +} + +.dx-button[data-style="secondary"]:not(:disabled):hover { + background-color: color-mix(in oklab, var(--surface-2) 85%, var(--text)); +} + +.dx-button[data-style="ghost"] { + background-color: transparent; + color: var(--text-2); +} + +.dx-button[data-style="ghost"]:not(:disabled):hover { + background-color: var(--surface-2); + color: var(--text); +} + +.dx-button[data-style="outline"] { + border: 1px solid var(--border); + background-color: var(--surface); + color: var(--text); +} + +.dx-button[data-style="outline"]:not(:disabled):hover { + background-color: var(--surface-2); +} + +.dx-button[data-style="destructive"] { + background-color: var(--danger); + color: var(--dark, #171d18) var(--light, #ffffff); +} + +.dx-button[data-style="destructive"]:not(:disabled):hover { + background-color: color-mix(in oklab, var(--danger) 88%, var(--text)); +} + +.dx-button[data-style="destructive"]:focus-visible { + box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 40%, transparent); +} + +.dx-button[data-style="link"] { + background-color: transparent; + color: var(--accent-text); + text-decoration: none; + text-underline-offset: 0.25rem; +} + +.dx-button[data-style="link"]:not(:disabled):hover { + text-decoration: underline; +} + +.dx-button:focus-visible { + box-shadow: 0 0 0 3px color-mix(in oklab, var(--focus-ring) 45%, transparent); +} + +.dx-button[aria-invalid="true"] { + border-color: var(--danger); +} + +.dx-button[aria-invalid="true"]:focus-visible { + box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 40%, transparent); +} diff --git a/parts/mize.ui/dioxus-components/src/components/card/component.rs b/parts/mize.ui/dioxus-components/src/components/card/component.rs new file mode 100644 index 0000000..499e87d --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/card/component.rs @@ -0,0 +1,109 @@ +use dioxus::prelude::*; + +#[css_module("/src/components/card/style.css")] +struct Styles; + +#[component] +pub fn Card( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card, + "data-slot": "card", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardHeader( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_header, + "data-slot": "card-header", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardTitle( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_title, + "data-slot": "card-title", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardDescription( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_description, + "data-slot": "card-description", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardAction( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_action, + "data-slot": "card-action", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardContent( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_content, + "data-slot": "card-content", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CardFooter( + #[props(extends=GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + class: Styles::dx_card_footer, + "data-slot": "card-footer", + ..attributes, + {children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/card/mod.rs b/parts/mize.ui/dioxus-components/src/components/card/mod.rs new file mode 100644 index 0000000..a3527a1 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/card/mod.rs @@ -0,0 +1,3 @@ +mod component; +pub use component::*; + diff --git a/parts/mize.ui/dioxus-components/src/components/card/style.css b/parts/mize.ui/dioxus-components/src/components/card/style.css new file mode 100644 index 0000000..03b3ea3 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/card/style.css @@ -0,0 +1,52 @@ +.dx-card { + display: flex; + flex-direction: column; + padding: 1rem 0; + border: 1px solid var(--border); + border-radius: 0.5rem; + background-color: var(--surface); + box-shadow: 0 1px 0 rgb(0 0 0 / 8%); + color: var(--text); + gap: 1rem; +} + +.dx-card-header { + display: grid; + align-items: start; + padding: 0 1rem; + gap: 0.375rem; + grid-auto-rows: min-content; + grid-template-rows: auto auto; +} + +.dx-card-header:has([data-slot="card-action"]) { + grid-template-columns: 1fr auto; +} + +.dx-card-title { + font-size: 1rem; + font-weight: 600; + line-height: 1.25; +} + +.dx-card-description { + color: var(--text-2); + font-size: 0.875rem; + line-height: 1.25rem; +} + +.dx-card-action { + grid-column-start: 2; + grid-row: 1 / span 2; + place-self: start end; +} + +.dx-card-content { + padding: 0 1rem; +} + +.dx-card-footer { + display: flex; + align-items: center; + padding: 0 1rem; +} diff --git a/parts/mize.ui/dioxus-components/src/components/checkbox/component.rs b/parts/mize.ui/dioxus-components/src/components/checkbox/component.rs new file mode 100644 index 0000000..c6ddb90 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/checkbox/component.rs @@ -0,0 +1,26 @@ +use dioxus::prelude::*; +use dioxus_icons::lucide::Check; +use dioxus_primitives::checkbox::{self, CheckboxProps}; + +#[css_module("/src/components/checkbox/style.css")] +struct Styles; + +#[component] +pub fn Checkbox(props: CheckboxProps) -> Element { + rsx! { + checkbox::Checkbox { + class: Styles::dx_checkbox, + checked: props.checked, + default_checked: props.default_checked, + required: props.required, + disabled: props.disabled, + name: props.name, + value: props.value, + on_checked_change: props.on_checked_change, + attributes: props.attributes, + checkbox::CheckboxIndicator { class: Styles::dx_checkbox_indicator, + Check { size: "1rem" } + } + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/checkbox/mod.rs b/parts/mize.ui/dioxus-components/src/components/checkbox/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/checkbox/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/checkbox/style.css b/parts/mize.ui/dioxus-components/src/components/checkbox/style.css new file mode 100644 index 0000000..6665d57 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/checkbox/style.css @@ -0,0 +1,34 @@ +.dx-checkbox { + width: 1.125rem; + height: 1.125rem; + box-sizing: border-box; + padding: 0; + border: none; + border-radius: 0.25rem; + margin: 0; + background-color: var(--surface-2); + box-shadow: inset 0 0 0 1px var(--border); + color: var(--on-accent); + cursor: pointer; +} + +.dx-checkbox-indicator { + display: flex; + align-items: center; + justify-content: center; +} + +.dx-checkbox[data-state="checked"] { + background-color: var(--accent); + box-shadow: none; + color: var(--on-accent); +} + +.dx-checkbox:focus-visible { + box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 45%, transparent); +} + +.dx-checkbox[data-disabled="true"] { + cursor: not-allowed; + opacity: 0.5; +} diff --git a/parts/mize.ui/dioxus-components/src/components/dialog/component.rs b/parts/mize.ui/dioxus-components/src/components/dialog/component.rs new file mode 100644 index 0000000..af64ef4 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/dialog/component.rs @@ -0,0 +1,62 @@ +use dioxus::prelude::*; +use dioxus_primitives::dialog::{self, DialogDescriptionProps, DialogRootProps, DialogTitleProps}; +use dioxus_primitives::{dioxus_attributes::attributes, merge_attributes}; + +#[css_module("/src/components/dialog/style.css")] +struct Styles; + +#[component] +pub fn Dialog(props: DialogRootProps) -> Element { + let base = attributes!(div { + class: Styles::dx_dialog, + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + dialog::DialogRoot { + class: Styles::dx_dialog_backdrop, + id: props.id, + is_modal: props.is_modal, + open: props.open, + default_open: props.default_open, + on_open_change: props.on_open_change, + dialog::DialogContent { + class: None, + attributes: merged, + {props.children} + } + } + } +} + +#[component] +pub fn DialogTitle(props: DialogTitleProps) -> Element { + let base = attributes!(h2 { + class: Styles::dx_dialog_title, + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + dialog::DialogTitle { + id: props.id, + attributes: merged, + {props.children} + } + } +} + +#[component] +pub fn DialogDescription(props: DialogDescriptionProps) -> Element { + let base = attributes!(p { + class: Styles::dx_dialog_description, + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + dialog::DialogDescription { + id: props.id, + attributes: merged, + {props.children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/dialog/mod.rs b/parts/mize.ui/dioxus-components/src/components/dialog/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/dialog/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/dialog/style.css b/parts/mize.ui/dioxus-components/src/components/dialog/style.css new file mode 100644 index 0000000..f4006f5 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/dialog/style.css @@ -0,0 +1,100 @@ +.dx-dialog-backdrop { + position: fixed; + z-index: 1000; + background: rgb(23 29 24 / 55%); + inset: 0; + opacity: 0; + will-change: opacity; +} + +.dx-dialog-backdrop[data-state="closed"] { + animation: dx-dialog-backdrop-animate-out 150ms ease-in forwards; + pointer-events: none; +} + +@keyframes dx-dialog-backdrop-animate-out { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.dx-dialog-backdrop[data-state="open"] { + animation: dx-dialog-backdrop-animate-in 150ms ease-out forwards; +} + +@keyframes dx-dialog-backdrop-animate-in { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.dx-dialog { + position: fixed; + z-index: 1001; + top: 50%; + left: 50%; + display: flex; + width: 100%; + max-width: calc(100% - 2rem); + box-sizing: border-box; + flex-direction: column; + padding: 1.5rem 1.25rem 1.25rem; + border: 1px solid var(--border); + border-radius: 0.5rem; + margin: 0; + background: var(--surface); + box-shadow: 0 8px 24px rgb(0 0 0 / 35%); + color: var(--text); + font-family: inherit; + gap: 0.75rem; + text-align: center; + transform: translate(-50%, -50%); +} + +.dx-dialog-title { + margin: 0; + color: var(--text); + font-size: 1.125rem; + font-weight: 600; +} + +.dx-dialog-description { + margin: 0; + color: var(--text-2); + font-size: 0.875rem; + line-height: 1.4; +} + +@media (width >= 40rem) { + .dx-dialog { + max-width: 28rem; + text-align: left; + } +} + +.dx-dialog-close { + position: absolute; + top: 0.75rem; + right: 0.75rem; + align-self: flex-start; + padding: 0; + border: none; + margin: 0; + background: none; + color: var(--text-2); + cursor: pointer; + font-size: 18px; + line-height: 1; +} + +.dx-dialog-close:hover { + color: var(--text); +} diff --git a/parts/mize.ui/dioxus-components/src/components/input/component.rs b/parts/mize.ui/dioxus-components/src/components/input/component.rs new file mode 100644 index 0000000..541c307 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/input/component.rs @@ -0,0 +1,57 @@ +use dioxus::prelude::*; +#[css_module("/src/components/input/style.css")] +struct Styles; + +#[component] +pub fn Input( + oninput: Option>, + onchange: Option>, + oninvalid: Option>, + onselect: Option>, + onselectionchange: Option>, + onfocus: Option>, + onblur: Option>, + onfocusin: Option>, + onfocusout: Option>, + onkeydown: Option>, + onkeypress: Option>, + onkeyup: Option>, + onwheel: Option>, + oncompositionstart: Option>, + oncompositionupdate: Option>, + oncompositionend: Option>, + oncopy: Option>, + oncut: Option>, + onpaste: Option>, + #[props(extends=GlobalAttributes)] + #[props(extends=input)] + attributes: Vec, + children: Element, +) -> Element { + rsx! { + input { + class: Styles::dx_input, + oninput: move |e| _ = oninput.map(|callback| callback(e)), + onchange: move |e| _ = onchange.map(|callback| callback(e)), + oninvalid: move |e| _ = oninvalid.map(|callback| callback(e)), + onselect: move |e| _ = onselect.map(|callback| callback(e)), + onselectionchange: move |e| _ = onselectionchange.map(|callback| callback(e)), + onfocus: move |e| _ = onfocus.map(|callback| callback(e)), + onblur: move |e| _ = onblur.map(|callback| callback(e)), + onfocusin: move |e| _ = onfocusin.map(|callback| callback(e)), + onfocusout: move |e| _ = onfocusout.map(|callback| callback(e)), + onkeydown: move |e| _ = onkeydown.map(|callback| callback(e)), + onkeypress: move |e| _ = onkeypress.map(|callback| callback(e)), + onkeyup: move |e| _ = onkeyup.map(|callback| callback(e)), + onwheel: move |e| _ = onwheel.map(|callback| callback(e)), + oncompositionstart: move |e| _ = oncompositionstart.map(|callback| callback(e)), + oncompositionupdate: move |e| _ = oncompositionupdate.map(|callback| callback(e)), + oncompositionend: move |e| _ = oncompositionend.map(|callback| callback(e)), + oncopy: move |e| _ = oncopy.map(|callback| callback(e)), + oncut: move |e| _ = oncut.map(|callback| callback(e)), + onpaste: move |e| _ = onpaste.map(|callback| callback(e)), + ..attributes, + {children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/input/mod.rs b/parts/mize.ui/dioxus-components/src/components/input/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/input/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/input/style.css b/parts/mize.ui/dioxus-components/src/components/input/style.css new file mode 100644 index 0000000..dc902ab --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/input/style.css @@ -0,0 +1,40 @@ +.dx-input { + position: relative; + display: flex; + box-sizing: border-box; + flex-direction: row; + align-items: center; + justify-content: space-between; + padding: 8px 12px; + border: none; + border-radius: 0.375rem; + background-color: var(--surface-2); + box-shadow: inset 0 0 0 1px var(--border); + color: var(--text); + font-family: inherit; + font-size: 0.875rem; + gap: 0.25rem; + outline: none; + transition: background-color 100ms ease-out, box-shadow 100ms ease-out; +} + +.dx-input::placeholder { + color: var(--text-2); +} + +.dx-input:disabled { + color: var(--text-2); + cursor: not-allowed; + opacity: 0.6; +} + +.dx-input:hover:not(:disabled) { + background-color: color-mix(in oklab, var(--surface-2) 90%, var(--text)); +} + +.dx-input:focus-visible { + background-color: var(--surface); + box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); + color: var(--text); + outline: none; +} diff --git a/parts/mize.ui/dioxus-components/src/components/label/component.rs b/parts/mize.ui/dioxus-components/src/components/label/component.rs new file mode 100644 index 0000000..b3e89b9 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/label/component.rs @@ -0,0 +1,16 @@ +use dioxus::prelude::*; +use dioxus_primitives::label::{self, LabelProps}; +#[css_module("/src/components/label/style.css")] +struct Styles; + +#[component] +pub fn Label(props: LabelProps) -> Element { + rsx! { + label::Label { + class: Styles::dx_label, + html_for: props.html_for, + attributes: props.attributes, + {props.children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/label/mod.rs b/parts/mize.ui/dioxus-components/src/components/label/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/label/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/label/style.css b/parts/mize.ui/dioxus-components/src/components/label/style.css new file mode 100644 index 0000000..8452dde --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/label/style.css @@ -0,0 +1,9 @@ +.dx-label { + display: flex; + align-items: center; + color: var(--text-2); + font-size: 0.75rem; + font-weight: 500; + letter-spacing: 0.01em; + line-height: 1.2; +} diff --git a/parts/mize.ui/dioxus-components/src/components/mod.rs b/parts/mize.ui/dioxus-components/src/components/mod.rs new file mode 100644 index 0000000..224a2e0 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/mod.rs @@ -0,0 +1,25 @@ +pub mod avatar; +pub mod badge; +pub mod button; +pub mod card; +pub mod checkbox; +pub mod dialog; +pub mod input; +pub mod label; +pub mod scroll_area; +pub mod separator; +pub mod switch; +pub mod textarea; + +pub use avatar::*; +pub use badge::*; +pub use button::*; +pub use card::*; +pub use checkbox::*; +pub use dialog::*; +pub use input::*; +pub use label::*; +pub use scroll_area::*; +pub use separator::*; +pub use switch::*; +pub use textarea::*; diff --git a/parts/mize.ui/dioxus-components/src/components/scroll_area/component.rs b/parts/mize.ui/dioxus-components/src/components/scroll_area/component.rs new file mode 100644 index 0000000..5e3c37d --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/scroll_area/component.rs @@ -0,0 +1,7 @@ +use dioxus::prelude::*; +use dioxus_primitives::scroll_area::{self, ScrollAreaProps}; + +#[component] +pub fn ScrollArea(props: ScrollAreaProps) -> Element { + scroll_area::ScrollArea(props) +} diff --git a/parts/mize.ui/dioxus-components/src/components/scroll_area/mod.rs b/parts/mize.ui/dioxus-components/src/components/scroll_area/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/scroll_area/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/scroll_area/style.css b/parts/mize.ui/dioxus-components/src/components/scroll_area/style.css new file mode 100644 index 0000000..cc50e55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/scroll_area/style.css @@ -0,0 +1 @@ +/* Scroll area uses unstyled dioxus-primitives; no extra styles for MVP. */ diff --git a/parts/mize.ui/dioxus-components/src/components/separator/component.rs b/parts/mize.ui/dioxus-components/src/components/separator/component.rs new file mode 100644 index 0000000..3944479 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/separator/component.rs @@ -0,0 +1,23 @@ +use dioxus::prelude::*; +use dioxus_primitives::separator::{self, SeparatorProps}; +use dioxus_primitives::{dioxus_attributes::attributes, merge_attributes}; + +#[css_module("/src/components/separator/style.css")] +struct Styles; + +#[component] +pub fn Separator(props: SeparatorProps) -> Element { + let base = attributes!(div { + class: Styles::dx_separator, + }); + let merged = merge_attributes(vec![base, props.attributes]); + + rsx! { + separator::Separator { + horizontal: props.horizontal, + decorative: props.decorative, + attributes: merged, + {props.children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/separator/mod.rs b/parts/mize.ui/dioxus-components/src/components/separator/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/separator/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/separator/style.css b/parts/mize.ui/dioxus-components/src/components/separator/style.css new file mode 100644 index 0000000..9d59198 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/separator/style.css @@ -0,0 +1,13 @@ +.dx-separator { + background-color: var(--border); +} + +.dx-separator[data-orientation="horizontal"] { + width: 100%; + height: 1px; +} + +.dx-separator[data-orientation="vertical"] { + width: 1px; + height: 100%; +} diff --git a/parts/mize.ui/dioxus-components/src/components/switch/component.rs b/parts/mize.ui/dioxus-components/src/components/switch/component.rs new file mode 100644 index 0000000..fe74182 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/switch/component.rs @@ -0,0 +1,23 @@ +use dioxus::prelude::*; +use dioxus_primitives::switch::{self, SwitchProps}; + +#[css_module("/src/components/switch/style.css")] +struct Styles; + +#[component] +pub fn Switch(props: SwitchProps) -> Element { + rsx! { + switch::Switch { + class: Styles::dx_switch, + checked: props.checked, + default_checked: props.default_checked, + disabled: props.disabled, + required: props.required, + name: props.name, + value: props.value, + on_checked_change: props.on_checked_change, + attributes: props.attributes, + switch::SwitchThumb { class: Styles::dx_switch_thumb } + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/switch/mod.rs b/parts/mize.ui/dioxus-components/src/components/switch/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/switch/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/parts/mize.ui/dioxus-components/src/components/switch/style.css b/parts/mize.ui/dioxus-components/src/components/switch/style.css new file mode 100644 index 0000000..cbec778 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/switch/style.css @@ -0,0 +1,41 @@ +.dx-switch { + all: unset; + position: relative; + width: 2rem; + height: 1.15rem; + border-radius: 9999px; + background-color: var(--surface-2); + box-shadow: inset 0 0 0 1px var(--border); + cursor: pointer; + transition: background-color 150ms, box-shadow 150ms; +} + +.dx-switch[data-state="checked"] { + background-color: var(--accent); + box-shadow: none; +} + +.dx-switch:focus-visible { + box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 45%, transparent); +} + +.dx-switch-thumb { + display: block; + width: calc(1.15rem - 2px); + height: calc(1.15rem - 2px); + border-radius: 9999px; + background-color: var(--text); + transform: translateX(1px); + transition: transform 150ms, background-color 150ms; + will-change: transform; +} + +.dx-switch[data-state="checked"] .dx-switch-thumb { + background-color: var(--on-accent); + transform: translateX(calc(2rem - 1px - (1.15rem - 2px))); +} + +.dx-switch[data-disabled="true"] { + cursor: not-allowed; + opacity: 0.5; +} diff --git a/parts/mize.ui/dioxus-components/src/components/textarea/component.rs b/parts/mize.ui/dioxus-components/src/components/textarea/component.rs new file mode 100644 index 0000000..56021b0 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/textarea/component.rs @@ -0,0 +1,82 @@ +use dioxus::prelude::*; + +#[css_module("/src/components/textarea/style.css")] +struct Styles; + +#[derive(Copy, Clone, PartialEq, Default)] +#[non_exhaustive] +pub enum TextareaVariant { + #[default] + Default, + Fade, + Outline, + Ghost, +} + +impl TextareaVariant { + pub fn class(&self) -> &'static str { + match self { + TextareaVariant::Default => "default", + TextareaVariant::Fade => "fade", + TextareaVariant::Outline => "outline", + TextareaVariant::Ghost => "ghost", + } + } +} + +#[component] +pub fn Textarea( + oninput: Option>, + onchange: Option>, + oninvalid: Option>, + onselect: Option>, + onselectionchange: Option>, + onfocus: Option>, + onblur: Option>, + onfocusin: Option>, + onfocusout: Option>, + onkeydown: Option>, + onkeypress: Option>, + onkeyup: Option>, + oncompositionstart: Option>, + oncompositionupdate: Option>, + oncompositionend: Option>, + oncopy: Option>, + oncut: Option>, + onpaste: Option>, + onmounted: Option>, + #[props(default)] variant: TextareaVariant, + #[props(extends=GlobalAttributes)] + #[props(extends=textarea)] + attributes: Vec, + children: Element, +) -> Element { + rsx! { + textarea { + class: Styles::dx_textarea, + "data-slot": "textarea", + "data-style": variant.class(), + oninput: move |e| _ = oninput.map(|callback| callback(e)), + onchange: move |e| _ = onchange.map(|callback| callback(e)), + oninvalid: move |e| _ = oninvalid.map(|callback| callback(e)), + onselect: move |e| _ = onselect.map(|callback| callback(e)), + onselectionchange: move |e| _ = onselectionchange.map(|callback| callback(e)), + onfocus: move |e| _ = onfocus.map(|callback| callback(e)), + onblur: move |e| _ = onblur.map(|callback| callback(e)), + onfocusin: move |e| _ = onfocusin.map(|callback| callback(e)), + onfocusout: move |e| _ = onfocusout.map(|callback| callback(e)), + onkeydown: move |e| _ = onkeydown.map(|callback| callback(e)), + onkeypress: move |e| _ = onkeypress.map(|callback| callback(e)), + onkeyup: move |e| _ = onkeyup.map(|callback| callback(e)), + oncompositionstart: move |e| _ = oncompositionstart.map(|callback| callback(e)), + oncompositionupdate: move |e| _ = oncompositionupdate.map(|callback| callback(e)), + oncompositionend: move |e| _ = oncompositionend.map(|callback| callback(e)), + oncopy: move |e| _ = oncopy.map(|callback| callback(e)), + oncut: move |e| _ = oncut.map(|callback| callback(e)), + onpaste: move |e| _ = onpaste.map(|callback| callback(e)), + onmounted: move |e| _ = onmounted.map(|callback| callback(e)), + ..attributes, + {children} + } + } +} diff --git a/parts/mize.ui/dioxus-components/src/components/textarea/mod.rs b/parts/mize.ui/dioxus-components/src/components/textarea/mod.rs new file mode 100644 index 0000000..2590c01 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/textarea/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; diff --git a/parts/mize.ui/dioxus-components/src/components/textarea/style.css b/parts/mize.ui/dioxus-components/src/components/textarea/style.css new file mode 100644 index 0000000..665ea36 --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/components/textarea/style.css @@ -0,0 +1,84 @@ +.dx-textarea { + width: 100%; + min-height: 4rem; + box-sizing: border-box; + padding: 8px 12px; + border: none; + border-radius: 0.375rem; + margin: 0; + appearance: none; + background: none; + color: var(--text); + font-family: inherit; + font-size: 0.875rem; + line-height: 1.5; + outline: none; + resize: vertical; + transition: background-color 100ms ease-out, border-color 100ms ease-out, box-shadow 100ms ease-out; +} + +.dx-textarea:disabled { + color: var(--text-2); + cursor: not-allowed; + opacity: 0.6; +} + +.dx-textarea::placeholder { + color: var(--text-2); +} + +.dx-textarea[data-style="default"] { + background: var(--surface-2); + box-shadow: inset 0 0 0 1px var(--border); +} + +.dx-textarea[data-style="default"]:hover:not(:disabled), +.dx-textarea[data-style="default"]:focus { + background: var(--surface); + color: var(--text); +} + +.dx-textarea[data-style="default"]:focus { + box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); +} + +.dx-textarea[data-style="fade"] { + background: var(--surface-2); +} + +.dx-textarea[data-style="fade"]:hover:not(:disabled), +.dx-textarea[data-style="fade"]:focus { + background: var(--surface); + color: var(--text); +} + +.dx-textarea[data-style="outline"] { + border: 1px solid var(--border); + background-color: var(--surface); +} + +.dx-textarea[data-style="outline"]:hover:not(:disabled, :focus) { + border-color: color-mix(in oklab, var(--border) 70%, var(--text)); +} + +.dx-textarea[data-style="outline"]:focus { + border-color: var(--accent); +} + +.dx-textarea[data-style="outline"]:invalid, +.dx-textarea[data-style="outline"][aria-invalid="true"] { + border-color: var(--danger); +} + +.dx-textarea[data-style="ghost"] { + background-color: transparent; +} + +.dx-textarea[data-style="ghost"]:hover:not(:disabled) { + background-color: var(--surface-2); + color: var(--text); +} + +.dx-textarea[data-style="ghost"]:focus { + box-shadow: inset 0 0 0 1px var(--accent); +} diff --git a/parts/mize.ui/dioxus-components/src/lib.rs b/parts/mize.ui/dioxus-components/src/lib.rs new file mode 100644 index 0000000..b40cb0b --- /dev/null +++ b/parts/mize.ui/dioxus-components/src/lib.rs @@ -0,0 +1,14 @@ +//! Styled Dioxus UI components using the mize color palette. +//! +//! Include [`THEME`] once at the app root (e.g. a stylesheet link), and set +//! `html[data-theme="light"]` or `html[data-theme="dark"]` to switch themes. + +#![allow(non_snake_case)] + +use dioxus::prelude::*; + +pub mod components; +pub use components::*; + +/// Global theme stylesheet (`assets/theme.css`). Link this once in your app. +pub const THEME: Asset = asset!("/assets/theme.css"); diff --git a/parts/mize.ui/src/main.rs b/parts/mize.ui/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/parts/mize.ui/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/parts/mos/disk_provision.py b/parts/mos/disk_provision.py new file mode 100644 index 0000000..a711a49 --- /dev/null +++ b/parts/mos/disk_provision.py @@ -0,0 +1,83 @@ +import subprocess + +config = { + "qcow_disk": "/home/me/work/config/mize/parts/mos/build/stick.qcow2", + "root_dir": "/home/me/work/config/mize/parts/mos/build/root", + "target": "/dev/nbd0", + "partitions": [ + { + "type": "fat32" , + "size": "200M", + "flags": [ "esp" ] + }, + { + "type": "ext4" , + "size": "100%", + }, + ], + "isofs": { + "volid": "archiso-project", + }, +} + +def set_config(path, val): + config[path] = val + + +def get_config(path): + return config[path] + + +def connect_qemu_nbd(): + disk = get_config("qcow_disk") + sh(f"sudo qemu-nbd --connect=/dev/nbd0 -f qcow2 {disk}") + + +def disconnect_qemu_nbd(): + sh(f"sudo qemu-nbd --disconnect=/dev/nbd0") + +def make_busybod_root_from_nixpkgs(): + path = sub + pass + +def flash_isofs(): + volid = get_config("isofs.volid") + isolinux = get_config("isofs.linux") + boot_cat = get_config("isofs.boot_cat") + isohybrid_mbr = get_config("isofs.hybrid_mbr") # /usr/lib/syslinux/bios/isohdpfx.bin" + efiboot_img = get_config("isofs.efiboot.img") + output = get_config("target") + root_fs = get_config("root_dir") + subprocess.run([ + "xorriso", "as", "mkisofs", + "-iso-level", "3", "-full-iso9660-filenames", + "-volid", volid, + "-eltorito-boot", isolinux, + "-eltorito-catalog", boot_cat, + "-no-emul-boot", "-boot-load-size", "4", "-boot-info-table", + "-isohybrid-mbr", isohybrid_mbr, + "-eltorito-alt-boot", + "-e", efiboot_img, + "-no-emul-boot", + "-isohybrid-gpt-basdat", + "-output", output, + root_fs, + ]) + +def sh(cmd): + subprocess.run(["sh", "-c", cmd]) + +def provision(): + try: + connect_qemu_nbd() + + + finally: + disconnect_qemu_nbd() + +def main(): + provision() + + +if __name__ == "__main__": + main() diff --git a/parts/mos/partition_table.py b/parts/mos/partition_table.py new file mode 100644 index 0000000..38abfa0 --- /dev/null +++ b/parts/mos/partition_table.py @@ -0,0 +1,313 @@ +import json +import os +import re +import subprocess +from pathlib import Path + + +FILESYSTEMS = { + "fat32": { + "mkfs": ["mkfs.fat", "-F", "32"], + "parted_type": "fat32", + "parted_flags": {"esp": "esp"}, + }, + "ext4": { + "mkfs": ["mkfs.ext4", "-F"], + "parted_type": "ext4", + "parted_flags": {}, + }, +} + + +def run(*args, check=True): + """Run a system command and return stdout.""" + result = subprocess.run( + [str(arg) for arg in args], + check=check, + text=True, + capture_output=True, + ) + return result.stdout.strip() + + +def partition_device(disk, number): + """Return the correct partition path for common Linux devices.""" + disk = str(disk) + suffix = "p" if re.search(r"\d$", disk) else "" + return f"{disk}{suffix}{number}" + + +def parse_size(size, disk_bytes): + """Convert a size such as 200M or 100% into bytes.""" + if size == "100%": + return disk_bytes + + match = re.fullmatch( + r"\s*(\d+(?:\.\d+)?)\s*([KMGT]?)B?\s*", + size.upper(), + ) + if not match: + raise ValueError(f"Invalid partition size: {size!r}") + + value = float(match.group(1)) + unit = match.group(2) + multiplier = { + "": 1, + "K": 1024, + "M": 1024**2, + "G": 1024**3, + "T": 1024**4, + }[unit] + + return int(value * multiplier) + + +def get_table(disk): + """Read the partition table and return its partitions.""" + try: + data = json.loads(run("sfdisk", "--json", disk)) + except subprocess.CalledProcessError: + return None + + table = data.get("partitiontable") + if not table: + return None + + return table + + +def get_filesystem(device): + """Return the detected filesystem type, or None.""" + result = run( + "blkid", "-p", "-s", "TYPE", "-o", "value", + device, check=False, + ) + return result.lower() if result else None + + +def apply_partition_config( + disk, + config, + *, + dry_run=True, + format_mismatches=False, +): + """ + Apply a partition configuration to a disk. + + Safety behavior: + - Dry-run by default. + - Creates GPT only if no partition table exists. + - Does not automatically resize, delete, or reorder partitions. + - Refuses to format filesystems unless format_mismatches=True. + - Verifies the expected partition count and filesystem types. + + Requires root privileges and: parted, sfdisk, blkid, blockdev, + mkfs.fat, mkfs.ext4, and partprobe. + """ + disk = str(Path(disk)) + + if os.geteuid() != 0: + raise PermissionError("Run this function as root.") + + if not os.path.exists(disk): + raise FileNotFoundError(disk) + + if run("lsblk", "-dn", "-o", "TYPE", disk) != "disk": + raise ValueError(f"{disk} is not a whole-disk device") + + partitions = config["partitions"] + if not partitions: + raise ValueError("At least one partition is required") + + for p in partitions: + fs = p["type"].lower() + if fs not in FILESYSTEMS: + raise ValueError(f"Unsupported filesystem: {fs}") + if not isinstance(p.get("flags", []), list): + raise ValueError("'flags' must be a list") + + disk_bytes = int(run("blockdev", "--getsize64", disk)) + sector_size = int(run("blockdev", "--getss", disk)) + alignment = 1024 * 1024 # 1 MiB + + def align_up(n): + return ((n + alignment - 1) // alignment) * alignment + + # Calculate partition boundaries. Reserve 1 MiB at the start. + layout = [] + start = alignment + + for i, p in enumerate(partitions): + requested = p["size"] + if requested == "100%": + end = disk_bytes - alignment + else: + size_bytes = parse_size(requested, disk_bytes) + end = align_up(start + size_bytes) + + if i == len(partitions) - 1 and requested == "100%": + end = disk_bytes - alignment + + if end <= start: + raise ValueError(f"Invalid size for partition {i + 1}") + + if end > disk_bytes - alignment: + raise ValueError( + f"Partition {i + 1} exceeds disk capacity" + ) + + layout.append({ + "number": i + 1, + "start": start, + "end": end, + "type": p["type"].lower(), + "flags": p.get("flags", []), + }) + start = end + + def parted(*args): + if dry_run: + print("+ parted", "-s", disk, *args) + else: + run("parted", "-s", disk, *args) + + table = get_table(disk) + + # Create GPT only when the disk has no partition table. + if table is None: + print(f"No readable partition table found on {disk}.") + parted("mklabel", "gpt") + table = None + + elif table.get("label") != "gpt": + raise RuntimeError( + f"{disk} has a {table.get('label')} table, not GPT. " + "Refusing to overwrite it." + ) + + existing = table.get("partitions", []) if table else [] + + # Never guess how to repair an incomplete or mismatched layout. + if existing and len(existing) != len(layout): + raise RuntimeError( + f"Found {len(existing)} partitions; " + f"configuration requires {len(layout)}. " + "Automatic resizing/deletion is disabled." + ) + + if not existing: + for item in layout: + fs = item["type"] + start_mib = item["start"] / (1024**2) + end_mib = item["end"] / (1024**2) + + # parted accepts MiB boundaries. + parted( + "mkpart", + "primary", + FILESYSTEMS[fs]["parted_type"], + f"{start_mib:.6f}MiB", + f"{end_mib:.6f}MiB", + ) + + for flag in item["flags"]: + if flag not in FILESYSTEMS[fs]["parted_flags"]: + raise ValueError( + f"Unsupported flag {flag!r} for {fs}" + ) + parted( + "set", + str(item["number"]), + FILESYSTEMS[fs]["parted_flags"][flag], + "on", + ) + + elif not dry_run: + # Re-read the on-disk table before inspecting filesystems. + table = get_table(disk) + existing = table.get("partitions", []) + + # Validate the existing boundaries. Do not modify them. + for expected, actual in zip(layout, existing): + actual_start = int(actual["start"]) * sector_size + actual_end = ( + int(actual["start"]) + int(actual["size"]) + ) * sector_size + + if ( + abs(actual_start - expected["start"]) > alignment + or abs(actual_end - expected["end"]) > alignment + ): + raise RuntimeError( + f"Partition {expected['number']} has incorrect " + "boundaries. Automatic resizing is disabled." + ) + + # Ask the kernel to re-read the partition table. + if not dry_run: + run("partprobe", disk) + run("udevadm", "settle") + + results = [] + + for item in layout: + device = partition_device(disk, item["number"]) + expected_fs = item["type"] + + if dry_run: + print( + f"Would inspect {device}; expected filesystem " + f"{expected_fs}" + ) + if format_mismatches: + print(f"Would format {device} if needed") + results.append({ + "device": device, + "expected": expected_fs, + "status": "dry-run", + }) + continue + + if not os.path.exists(device): + raise RuntimeError( + f"Partition device {device} did not appear" + ) + + actual_fs = get_filesystem(device) + + if actual_fs != expected_fs: + if not format_mismatches: + raise RuntimeError( + f"{device}: expected {expected_fs}, " + f"found {actual_fs!r}. " + "Set format_mismatches=True to format it." + ) + + # Avoid accidentally formatting a mounted filesystem. + mounts = run( + "lsblk", "-n", "-o", "MOUNTPOINTS", device + ) + if mounts.strip(): + raise RuntimeError( + f"{device} appears to be mounted; refusing " + "to format it." + ) + + fs = FILESYSTEMS[expected_fs] + run(*fs["mkfs"], device) + + actual_fs = get_filesystem(device) + if actual_fs != expected_fs: + raise RuntimeError( + f"Filesystem verification failed for {device}" + ) + + results.append({ + "device": device, + "expected": expected_fs, + "actual": actual_fs, + "status": "ok", + }) + + return results \ No newline at end of file diff --git a/parts/mos/run_vm.py b/parts/mos/run_vm.py new file mode 100644 index 0000000..7e0cfe0 --- /dev/null +++ b/parts/mos/run_vm.py @@ -0,0 +1,6 @@ + +def runVm(): + sh("qemu-system-x86_64 -drive file=disk.img,format=raw -enable-kvm") + +if __name__ == "__main__": + runVm() \ No newline at end of file