diff --git a/Cargo.lock b/Cargo.lock index bf54eee..9740bb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,7 +51,7 @@ dependencies = [ "ndk-context", "ndk-sys", "num_enum", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -69,15 +69,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" -[[package]] -name = "android_system_properties" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" -dependencies = [ - "libc", -] - [[package]] name = "anyhow" version = "1.0.104" @@ -137,15 +128,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "ash" -version = "0.38.0+1.3.281" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" -dependencies = [ - "libloading", -] - [[package]] name = "async-broadcast" version = "0.7.2" @@ -220,7 +202,7 @@ dependencies = [ "futures-lite 2.6.1", "parking", "polling", - "rustix 1.1.4", + "rustix 1.1.5", "slab", "windows-sys 0.61.2", ] @@ -271,7 +253,7 @@ dependencies = [ "cfg-if", "event-listener 5.4.2", "futures-lite 2.6.1", - "rustix 1.1.4", + "rustix 1.1.5", ] [[package]] @@ -297,7 +279,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.4", + "rustix 1.1.5", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -317,7 +299,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -347,7 +329,7 @@ dependencies = [ "num-traits", "pastey", "rayon", - "thiserror 2.0.20", + "thiserror 2.0.21", "v_frame", "y4m", ] @@ -423,12 +405,6 @@ 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 = "block2" version = "0.5.1" @@ -493,13 +469,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -536,9 +512,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.4.5" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80" +checksum = "f360145194ee8e21db5ee7f3fcd4fe52210864c75c985dae33218202c8bbe040" dependencies = [ "find-msvc-tools", "jobserver", @@ -548,9 +524,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" @@ -595,7 +571,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd63e33452ffdafd39924c4f05a5dd1e94db646c779c6bd59148a3d95fff5ad4" dependencies = [ - "thiserror 2.0.20", + "thiserror 2.0.21", "x11rb", ] @@ -605,8 +581,6 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ - "serde", - "termcolor", "unicode-width", ] @@ -645,16 +619,6 @@ dependencies = [ "libc", ] -[[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" @@ -668,8 +632,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", + "core-foundation", + "core-graphics-types", "foreign-types", "libc", ] @@ -681,18 +645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.4", - "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.2", - "core-foundation 0.10.1", + "core-foundation", "libc", ] @@ -740,9 +693,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8498c871161e1742aaa9d52551b2d6ebdd4c3d45a3be423e3728f33b955be550" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" dependencies = [ "cfg-if", ] @@ -1021,9 +974,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" [[package]] name = "flate2" @@ -1036,12 +989,6 @@ dependencies = [ "zlib-rs", ] -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foldhash" version = "0.2.0" @@ -1107,7 +1054,7 @@ checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -1200,7 +1147,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -1238,7 +1185,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.4", + "rustix 1.1.5", "windows-link", ] @@ -1286,17 +1233,6 @@ dependencies = [ "weezl", ] -[[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - [[package]] name = "glam" version = "0.25.0" @@ -1333,78 +1269,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "glow" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "glutin_wgl_sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "gpu-alloc" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45cf04b2726f02df5508c6de726acdc90cdf97ac771a9a0ffd8ba10a6e696bf9" -dependencies = [ - "bitflags 2.13.2", - "gpu-alloc-types", -] - -[[package]] -name = "gpu-alloc-types" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bbed164dd10ed526c2e4fe3e721ca4a71c61730e5aafac6844b417b3227058" -dependencies = [ - "bitflags 2.13.2", -] - -[[package]] -name = "gpu-allocator" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" -dependencies = [ - "log", - "presser", - "thiserror 1.0.69", - "windows 0.58.0", -] - -[[package]] -name = "gpu-descriptor" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" -dependencies = [ - "bitflags 2.13.2", - "gpu-descriptor-types", - "hashbrown 0.15.5", -] - -[[package]] -name = "gpu-descriptor-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" -dependencies = [ - "bitflags 2.13.2", -] - [[package]] name = "guillotiere" version = "0.6.2" @@ -1440,22 +1304,13 @@ dependencies = [ "smallvec", ] -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash 0.1.5", -] - [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "foldhash 0.2.0", + "foldhash", ] [[package]] @@ -1496,7 +1351,7 @@ dependencies = [ "iced_widget", "iced_winit", "image 0.25.10", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -1513,7 +1368,7 @@ dependencies = [ "num-traits", "rustc-hash 2.1.3", "smol_str", - "thiserror 2.0.20", + "thiserror 2.0.21", "web-time", ] @@ -1560,7 +1415,7 @@ dependencies = [ "log", "raw-window-handle", "rustc-hash 2.1.3", - "thiserror 2.0.20", + "thiserror 2.0.21", "unicode-segmentation", ] @@ -1598,7 +1453,7 @@ dependencies = [ "iced_tiny_skia", "iced_wgpu", "log", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -1611,7 +1466,7 @@ dependencies = [ "iced_core", "iced_futures", "raw-window-handle", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -1647,7 +1502,7 @@ dependencies = [ "iced_graphics", "log", "rustc-hash 2.1.3", - "thiserror 2.0.20", + "thiserror 2.0.21", "wgpu", ] @@ -1661,22 +1516,22 @@ dependencies = [ "log", "num-traits", "rustc-hash 2.1.3", - "thiserror 2.0.20", + "thiserror 2.0.21", "unicode-segmentation", ] [[package]] name = "iced_winit" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7dbedc47562d1de3b9707d939f678b88c382004b7ab5a18f7a7dd723162d75" +checksum = "7589888c8e951899cc688247a69933bb7a0511f0b4b2e122ac3fcd5dacb37f72" dependencies = [ "iced_debug", "iced_program", "log", "mundy", "rustc-hash 2.1.3", - "thiserror 2.0.20", + "thiserror 2.0.21", "tracing", "wasm-bindgen-futures", "web-sys", @@ -1824,7 +1679,7 @@ dependencies = [ "jni-sys 0.4.1", "log", "simd_cesu8", - "thiserror 2.0.20", + "thiserror 2.0.21", "walkdir", "windows-link", ] @@ -1891,9 +1746,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.105" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" dependencies = [ "cfg-if", "futures-util", @@ -1909,23 +1764,6 @@ dependencies = [ "mutate_once", ] -[[package]] -name = "khronos-egl" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" -dependencies = [ - "libc", - "libloading", - "pkg-config", -] - -[[package]] -name = "khronos_api" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" - [[package]] name = "kira-installer" version = "0.1.0" @@ -1934,12 +1772,11 @@ dependencies = [ "iced", "iced_moving_picture", "log", - "rand 0.10.2", + "rand 0.10.3", "rust-i18n", "serde", "serde_json", "time-format", - "toml 1.1.5+spec-1.1.0", ] [[package]] @@ -1998,9 +1835,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8f1ea3f21fd3405dcaf6c9b5c1630af9afc422d9073ea39c5f6d6c772e08ed" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ "bitflags 2.13.2", "libc", @@ -2071,15 +1908,6 @@ version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - [[package]] name = "maybe-rayon" version = "0.1.1" @@ -2114,21 +1942,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" -dependencies = [ - "bitflags 2.13.2", - "block", - "core-graphics-types 0.2.0", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -2180,7 +1993,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.62.2", + "windows", "zbus", ] @@ -2211,8 +2024,7 @@ dependencies = [ "num-traits", "once_cell", "rustc-hash 1.1.0", - "spirv", - "thiserror 2.0.20", + "thiserror 2.0.21", "unicode-ident", ] @@ -2278,9 +2090,9 @@ checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" [[package]] name = "normpath" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9985ef7269fa99f3b12437bb698381da2428743ab90f20393f399fa14cab21a" +checksum = "b11ce00d2594068e8a27c9146fdc5cf9f3ac38eb42c7cd34d05fea618873ac9f" dependencies = [ "windows-sys 0.61.2", ] @@ -2368,15 +2180,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - [[package]] name = "objc-sys" version = "0.3.5" @@ -2743,15 +2546,6 @@ dependencies = [ "libredox", ] -[[package]] -name = "ordered-float" -version = "5.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -2900,7 +2694,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.4", + "rustix 1.1.5", "windows-sys 0.61.2", ] @@ -2928,19 +2722,13 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - [[package]] name = "proc-macro-crate" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.13+spec-1.1.0", + "toml_edit 0.25.15+spec-1.1.0", ] [[package]] @@ -3048,9 +2836,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -3082,12 +2870,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" -[[package]] -name = "range-alloc" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" - [[package]] name = "rangemap" version = "1.8.0" @@ -3124,7 +2906,7 @@ dependencies = [ "rand 0.9.5", "rand_chacha", "simd_helpers", - "thiserror 2.0.20", + "thiserror 2.0.21", "v_frame", "wasm-bindgen", ] @@ -3331,7 +3113,7 @@ dependencies = [ "serde_json", "serde_yaml", "siphasher", - "toml 0.8.23", + "toml", "triomphe", ] @@ -3371,9 +3153,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" dependencies = [ "bitflags 2.13.2", "errno", @@ -3448,7 +3230,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -3472,7 +3254,7 @@ checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -3484,15 +3266,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" -dependencies = [ - "serde_core", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -3555,9 +3328,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" [[package]] name = "skrifa" @@ -3596,9 +3369,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.16.0" +version = "1.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9be42f50aa861c555654aa3a37f52f4b1074bacf4e48fe0ef7fa584e80f1f0f" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" [[package]] name = "smol" @@ -3644,7 +3417,7 @@ dependencies = [ "objc2-quartz-core 0.3.2", "raw-window-handle", "redox_syscall 0.5.18", - "rustix 1.1.4", + "rustix 1.1.5", "tiny-xlib", "tracing", "wasm-bindgen", @@ -3653,15 +3426,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "spirv" -version = "0.3.0+sdk-1.3.268.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" -dependencies = [ - "bitflags 2.13.2", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -3710,9 +3474,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.5" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" dependencies = [ "proc-macro2", "quote", @@ -3737,19 +3501,10 @@ dependencies = [ "fastrand 2.5.0", "getrandom 0.4.3", "once_cell", - "rustix 1.1.4", + "rustix 1.1.5", "windows-sys 0.61.2", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -3761,11 +3516,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "thiserror-impl 2.0.20", + "thiserror-impl 2.0.21", ] [[package]] @@ -3781,13 +3536,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", ] [[package]] @@ -3817,9 +3572,9 @@ dependencies = [ [[package]] name = "time-format" -version = "1.2.3" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb54c799611991d3d4a66fee3ff17b9f600c2a0f8c0d34e8209dbd153ff0a87b" +checksum = "c21b401b09485cb2403a336b3c6f9d53bd8a7273463f71b71d4f6325f7f74f6c" [[package]] name = "tiny-skia" @@ -3861,18 +3616,18 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf0ded5c4e56918d8f8a339e1bb67d038d3bc6d144ac407904015ba2e4cde9b" -dependencies = [ - "tinyvec_macros", -] +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" [[package]] -name = "tinyvec_macros" -version = "0.1.1" +name = "tokio" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "pin-project-lite", +] [[package]] name = "toml" @@ -3881,26 +3636,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned 0.6.9", + "serde_spanned", "toml_datetime 0.6.11", "toml_edit 0.22.27", ] -[[package]] -name = "toml" -version = "1.1.5+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12c0ba9680044b4ce98d391a62094047eada0d64860b80166c39f4a6b5640785" -dependencies = [ - "indexmap", - "serde_core", - "serde_spanned 1.1.1", - "toml_datetime 1.1.1+spec-1.1.0", - "toml_parser", - "toml_writer", - "winnow 1.0.4", -] - [[package]] name = "toml_datetime" version = "0.6.11" @@ -3927,7 +3667,7 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", - "serde_spanned 0.6.9", + "serde_spanned", "toml_datetime 0.6.11", "toml_write", "winnow 0.7.15", @@ -3935,9 +3675,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.13+spec-1.1.0" +version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ "indexmap", "toml_datetime 1.1.1+spec-1.1.0", @@ -3960,12 +3700,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" -[[package]] -name = "toml_writer" -version = "1.1.2+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" - [[package]] name = "tracing" version = "0.1.44" @@ -4036,9 +3770,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" [[package]] name = "unicode-linebreak" @@ -4125,9 +3859,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.128" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" dependencies = [ "cfg-if", "once_cell", @@ -4138,19 +3872,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.78" +version = "0.4.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" dependencies = [ "js-sys", + "tokio", "wasm-bindgen", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.128" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4158,22 +3893,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.128" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.128" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" dependencies = [ "unicode-ident", ] @@ -4194,9 +3929,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.105" +version = "0.3.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" dependencies = [ "js-sys", "wasm-bindgen", @@ -4230,18 +3965,12 @@ dependencies = [ "cfg_aliases", "document-features", "hashbrown 0.16.1", - "js-sys", "log", - "naga", - "parking_lot", "portable-atomic", "profiling", "raw-window-handle", "smallvec", "static_assertions", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", "wgpu-core", "wgpu-hal", "wgpu-types", @@ -4271,32 +4000,12 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror 2.0.20", - "wgpu-core-deps-apple", - "wgpu-core-deps-emscripten", + "thiserror 2.0.21", "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] -[[package]] -name = "wgpu-core-deps-apple" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" -dependencies = [ - "wgpu-hal", -] - -[[package]] -name = "wgpu-core-deps-emscripten" -version = "27.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" -dependencies = [ - "wgpu-hal", -] - [[package]] name = "wgpu-core-deps-windows-linux-android" version = "27.0.0" @@ -4312,47 +4021,18 @@ version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ - "android_system_properties", - "arrayvec", - "ash", - "bit-set", "bitflags 2.13.2", - "block", - "bytemuck", "cfg-if", "cfg_aliases", - "core-graphics-types 0.2.0", - "glow", - "glutin_wgl_sys", - "gpu-alloc", - "gpu-allocator", - "gpu-descriptor", - "hashbrown 0.16.1", - "js-sys", - "khronos-egl", - "libc", "libloading", "log", - "metal", "naga", - "ndk-sys", - "objc", - "once_cell", - "ordered-float", - "parking_lot", "portable-atomic", "portable-atomic-util", - "profiling", - "range-alloc", "raw-window-handle", "renderdoc-sys", - "smallvec", - "thiserror 2.0.20", - "wasm-bindgen", - "web-sys", + "thiserror 2.0.21", "wgpu-types", - "windows 0.58.0", - "windows-core 0.58.0", ] [[package]] @@ -4365,7 +4045,7 @@ dependencies = [ "bytemuck", "js-sys", "log", - "thiserror 2.0.20", + "thiserror 2.0.21", "web-sys", ] @@ -4388,17 +4068,7 @@ dependencies = [ "clipboard_macos", "clipboard_x11", "raw-window-handle", - "thiserror 2.0.20", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets", + "thiserror 2.0.21", ] [[package]] @@ -4408,7 +4078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ "windows-collections", - "windows-core 0.62.2", + "windows-core", "windows-future", "windows-numerics", ] @@ -4419,20 +4089,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-core 0.62.2", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets", + "windows-core", ] [[package]] @@ -4441,11 +4098,11 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link", - "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-result", + "windows-strings", ] [[package]] @@ -4454,22 +4111,11 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "windows-core 0.62.2", + "windows-core", "windows-link", "windows-threading", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "windows-implement" version = "0.60.2" @@ -4481,17 +4127,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -4515,19 +4150,10 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-core 0.62.2", + "windows-core", "windows-link", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-result" version = "0.4.1" @@ -4537,16 +4163,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets", -] - [[package]] name = "windows-strings" version = "0.5.1" @@ -4670,7 +4286,7 @@ dependencies = [ "calloop", "cfg_aliases", "concurrent-queue", - "core-foundation 0.9.4", + "core-foundation", "core-graphics", "cursor-icon", "dpi", @@ -4746,7 +4362,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.4", + "rustix 1.1.5", "x11rb-protocol", ] @@ -4775,12 +4391,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" -[[package]] -name = "xml-rs" -version = "0.8.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" - [[package]] name = "y4m" version = "0.8.0" @@ -4815,7 +4425,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.4", + "rustix 1.1.5", "serde", "serde_repr", "tracing", @@ -4837,7 +4447,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", "zbus_names", "zvariant", "zvariant_utils", @@ -4871,18 +4481,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.57" +version = "0.8.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873" +checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.57" +version = "0.8.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc" +checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82" dependencies = [ "proc-macro2", "quote", @@ -4891,9 +4501,9 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" [[package]] name = "zmij" @@ -4949,7 +4559,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.5", + "syn 3.0.6", "zvariant_utils", ] @@ -4962,6 +4572,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.5", + "syn 3.0.6", "winnow 1.0.4", ] diff --git a/Cargo.toml b/Cargo.toml index c044b92..927fee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ edition = "2024" [dependencies] blocking = "1.6" -iced = { version = "0.14", default-features = false, features = ["crisp", "linux-theme-detection", "tiny-skia", "wgpu", "x11", "smol", "image"] } +iced = { version = "0.14", default-features = false, features = ["crisp", "linux-theme-detection", "tiny-skia", "x11", "smol", "image"] } #iced = { git = "https://github.com/iced-rs/iced", branch = "vello_cpu", default-features = false, features = ["crisp", "linux-theme-detection", "vello-cpu", "x11", "smol", "image"]} iced_moving_picture = "0" log = "0.4" @@ -16,13 +16,12 @@ rust-i18n = "3" serde = { version = "1", features = ["derive"] } serde_json = "1" time-format = "1.2" -toml = "1" [dev-dependencies] rand = "0.10" [profile.dev] -opt-level = 2 +opt-level = 3 codegen-units = 16 [profile.release] @@ -31,7 +30,8 @@ debug = false incremental = false codegen-units = 1 # We need level 3 for tiny-skia otherwise render is lagging -opt-level = "s" +# opt-level = "s" +opt-level = 3 strip = true diff --git a/src/kira_disk_layout.rs b/src/kira_disk_layout.rs index 1f317cb..f6f48f2 100644 --- a/src/kira_disk_layout.rs +++ b/src/kira_disk_layout.rs @@ -283,9 +283,11 @@ fn get_dev_part_blocking(dev_name: &str) -> Result, String> { //"lsblk -o NAME,SIZE,FSTYPE -l -n /dev/nvme0n1" // lsblk -o NAME,SIZE,FSTYPE,TYPE,PARTLABEL,LABEL,PARTFLAGS -b -P - + // -x NAME - sorting by name match Command::new("lsblk") .args([ + "-x", + "NAME", "-o", "NAME,SIZE,FSTYPE,TYPE,PARTLABEL,LABEL,MOUNTPOINT,PARTFLAGS", "-b", @@ -383,9 +385,10 @@ pub struct PartLayout { } /// -/// GPT requires 33x512 sectors at the very end of the disk (16,896 bytes = 16.5 KiB): -/// 32 sectors — backup Partition Entry Array (128 entries × 128 bytes = 16,384 bytes) -/// 1 sector — backup GPT header +/// GPT requires 33x512 sectors at the very end of the disk (16896 bytes): +/// 32 sectors - backup Partition Entry Array +/// 1 sector - backup GPT header +/// impl PartLayout { pub fn new(dev: BlkDev) -> Self { // 16896 - reserved space at the dev end for gpt @@ -509,7 +512,7 @@ impl PartLayout { res = res.add_part( swap_size, FSType::SWAP, - Some("swap".into()), + Some("bee-swap".into()), None, Some("SWAP".into()), Some(PartRole::SWAP), diff --git a/src/kira_system.rs b/src/kira_system.rs index 63e60ec..12f951e 100644 --- a/src/kira_system.rs +++ b/src/kira_system.rs @@ -293,6 +293,16 @@ pub fn bcachefs_mount(dev_name: &str, mount_point: &str) -> Result<(), ExecComma exec_command("mount", &vec!["-t", "bcachefs", dev_name, mount_point]) } +pub fn mount_fs(dev_name: &str, mount_point: &str) -> Result<(), ExecCommandError> { + // sudo mount -t bcachefs /dev/loop0 /mnt/test + exec_command("mount", &vec![dev_name, mount_point]) +} + +pub fn swapon(dev_name: &str) -> Result<(), ExecCommandError> { + exec_command("swapon", &vec![dev_name]) +} + + pub fn fatlabel(dev: &str, label: &str) -> Result<(), ExecCommandError> { //fatlabel /dev/sda1 ESP exec_command("fatlabel", &vec![dev, label]) @@ -318,5 +328,5 @@ pub fn mkfs_esp(dev: &str) -> Result<(), ExecCommandError> { pub fn mkswap(dev: &str) -> Result<(), ExecCommandError> { //mkswap -L SWAP /dev/sda4 - exec_command("mkswap", &vec!["L", "SWAP", dev]) + exec_command("mkswap", &vec!["-L", "bee-swap", dev]) } diff --git a/src/main.rs b/src/main.rs index 1a1139b..c4a0079 100644 --- a/src/main.rs +++ b/src/main.rs @@ -245,9 +245,9 @@ fn update(k_state: &mut KiraState, message: Message) -> Task { if let Views::Keyboard(keyboard_view) = &mut k_state.current_view { match keyboard_view.update(keyboard_msg) { StageAction::Next(keyboard_res) => { + k_state.k_config = keyboard_res; match stages::partition::PartitionStage::new(k_state.k_config.clone()) { Ok(part_stage) => { - k_state.k_config = keyboard_res; let s_state = std::mem::replace( &mut k_state.current_view, Views::Partition(part_stage), diff --git a/src/media/icon.png b/src/media/icon.png index 4c06eaa..aef7fcb 100644 Binary files a/src/media/icon.png and b/src/media/icon.png differ diff --git a/src/media/logo.png b/src/media/logo.png index d7b9669..aef7fcb 100644 Binary files a/src/media/logo.png and b/src/media/logo.png differ diff --git a/src/stage.rs b/src/stage.rs index 7ca0705..c2d3e4a 100644 --- a/src/stage.rs +++ b/src/stage.rs @@ -18,106 +18,9 @@ This file contains basic enums and structs to be used with stages. */ -use iced::wgpu::naga::compact::KeepUnused::No; - use crate::stages; -// #[derive(Debug, Clone)] -// pub enum StageResult { -// WelcomeStageResult(stages::welcome::WelcomeStageResult), -// NetworkStageResult(stages::network::NetworkStageResult), -// LocaleStageResult(stages::locale::LocaleStageResult), -// TimeZoneStageResult(stages::timezone::TimeZoneStageResult), -// KeyboardStageResult(stages::keyboard::KeyboardStageResult), -// SecurityStageResult(stages::security::SecurityStageResult), -// PartitionStageResult(stages::partition::PartitionStageResult), -// None, -// } - -// impl StageResult { -// pub fn name(&self) -> String { -// match self { -// Self::LocaleStageResult(_) => "locale".into(), -// Self::WelcomeStageResult(_) => "welcome".into(), -// Self::NetworkStageResult(_) => "network".into(), -// Self::TimeZoneStageResult(_) => "timezone".into(), -// Self::KeyboardStageResult(_) => "keyboard".into(), -// Self::PartitionStageResult(_) => "partition".into(), -// Self::SecurityStageResult(_) => "security".into(), -// Self::None => "none".into(), -// } -// } -// } - -// impl StageResult { -// pub fn new(name: &str) -> Self { -// Self { -// name: name.into(), -// config: None, -// error: None, -// } -// } - -// pub fn add_error(mut self, ex: String) -> Self { -// self.error = Some(ex); -// self -// } - -// pub fn add_val(mut self, val_name: &str, conf_val: ConfigValue) -> Self { -// match &mut self.config { -// Some(c) => { -// c.insert(val_name.into(), conf_val); -// } -// None => { -// self.config = Some(HashMap::from([(val_name.into(), conf_val)])); -// } -// } -// self -// } - -// pub fn add_val_string(self, val_name: &str, v: String) -> Self { -// self.add_val(val_name, ConfigValue::String(v)) -// } - -// pub fn add_val_bool(self, val_name: &str, v: bool) -> Self { -// self.add_val(val_name, ConfigValue::Bool(v)) -// } - -// pub fn add_val_u64(self, val_name: &str, v: u64) -> Self { -// self.add_val(val_name, ConfigValue::U64(v)) -// } - -// pub fn get_val(&self, val_name: &str) -> Option { -// let v = self -// .config -// .as_ref() -// .and_then(|hm| hm.get(val_name).cloned()); -// return v; -// } - -// pub fn get_val_str(&self, val_name: &str) -> Option { -// match self.get_val(val_name) { -// Some(ConfigValue::String(v)) => Some(v), -// _ => None, -// } -// } - -// pub fn get_val_bool(&self, val_name: &str) -> Option { -// match self.get_val(val_name) { -// Some(ConfigValue::Bool(v)) => Some(v), -// _ => None, -// } -// } - -// pub fn get_val_part_layout(&self, val_name: &str) -> Option { -// match self.get_val(val_name) { -// Some(ConfigValue::PartLayout(v)) => Some(v), -// _ => None, -// } -// } -// } - #[derive(Debug, Clone)] pub struct KiraConfig { pub res_welcome: Option, @@ -128,7 +31,7 @@ pub struct KiraConfig { pub res_keyboard: Option, pub res_partition: Option, pub res_security: Option, - pub res_install: bool, + pub res_install: Option, } impl Default for KiraConfig { @@ -142,25 +45,11 @@ impl Default for KiraConfig { res_keyboard: None, res_partition: None, res_security: None, - res_install: false, + res_install: None, } } } -// impl KiraConfig { -// pub fn get_stage(&self, name: &str) -> Option { -// self.config_trail -// .iter() -// .find(|v| v.name() == name) -// .and_then(|v| Some(v.clone())) -// } -// pub fn pop_last(&mut self) -> Option { -// self.config_trail.pop() -// } -// pub fn push(&mut self, stage_result: StageResult) { -// self.config_trail.push(stage_result); -// } -// } #[derive(Debug, Clone)] pub enum StageAction { diff --git a/src/stages/install/mod.rs b/src/stages/install/mod.rs index 4d64896..7faa0ae 100644 --- a/src/stages/install/mod.rs +++ b/src/stages/install/mod.rs @@ -18,6 +18,8 @@ Actual installation script. */ +use std::path::Path; + use crate::{ kira_disk_layout::{self, BlkDev, FSType, PartLayout, PartRole}, kira_size::KiraSize, @@ -37,6 +39,8 @@ use log; use rust_i18n::t; const EFI_BOOT_MOUNT_POINT: &str = "/beefi"; +const MNT_DIR: &str = "/mnt/inst_root"; +const ROOT_PARTLABEL_DEV: &str = "/dev/disk/by-partlabel/bee-root"; /// Creates new GPT table and partitions from PartLayout pub fn create_partitions(part_layout: &PartLayout) -> Result<(), ExecCommandError> { @@ -59,11 +63,7 @@ pub fn bcachefs_init( dev_name: &str, mnt_dir: &str, password: Option, - comp_alg: Option, ) -> Result<(), ExecCommandError> { - // format device - kira_system::bcachefs_format(dev_name, comp_alg, password.clone())?; - // if encryption used - unlock drive if let Some(pass) = password { kira_system::bcachefs_unlock(dev_name, pass.as_str())?; @@ -88,6 +88,15 @@ pub fn bcachefs_init( } pub fn init_disk(part_layout: &PartLayout, mnt_dir: &str) -> Result<(), ExecCommandError> { + + + let mnt_path = Path::new(mnt_dir); + log::info!("Cheking is MNT path exists: {}", mnt_dir); + if !mnt_path.exists() { + log::info!("MNT path do not exist, creating it..."); + std::fs::create_dir_all(mnt_path)?; + } + // use parted to create partition gpt layout create_partitions(part_layout)?; @@ -102,12 +111,11 @@ pub fn init_disk(part_layout: &PartLayout, mnt_dir: &str) -> Result<(), ExecComm Some(PartRole::ROOT) => { if let Some(part_l) = part.partlabel_dev() { if let FSType::BCACHEFS(bc_par) = &part.fs_type { - bcachefs_init( - &part_l, - mnt_dir, - bc_par.password.clone(), - bc_par.comp_alg.clone(), - )?; + log::info!("Formating root pertition."); + kira_system::bcachefs_format(&part_l, bc_par.password.clone(), bc_par.password.clone())?; + // init root + log::info!("Mount and init root partition."); + bcachefs_init(ROOT_PARTLABEL_DEV, mnt_dir, bc_par.password.clone())?; } else { return Err(ExecCommandError::Other( "ROOT partition is not BCACHEFS type!".into(), @@ -135,12 +143,16 @@ enum InstallationState { Error, } +#[derive(Debug, Clone)] +pub struct InstallStageResult { + pub sucess: Result<(), String>, +} + #[derive(Debug, Clone)] pub struct InstallStage { state: InstallationState, progress: f32, progress_message: String, - part_config: PartitionStageResult, modal_backgroud: Color, k_config: KiraConfig, } @@ -167,95 +179,27 @@ async fn init_disk_async(part_layout: PartLayout, mnt_dir: String) -> Result<(), blocking::unblock(move || init_disk(&part_layout, &mnt_dir)).await } -fn partition_disk( - disk_layout: PartLayout, - password: Option, - compression: Option, - mnt_dir: String, +fn do_install( + k_config: KiraConfig, ) -> impl futures::Stream> { - use blocking; - iced::stream::channel( 100, |mut output: Sender>| async move { //sleep(Duration::from_millis(10)).await; - let disk_layout_cloned = disk_layout.clone(); + let disk_layout = k_config.res_partition.unwrap().part_layout.clone(); // creating gpt partition table - let res = init_disk_async(disk_layout_cloned, mnt_dir).await; + let res = init_disk_async(disk_layout, MNT_DIR.into()).await; + let res_err = res.is_err(); output .send(res.map(|_| (1.1f32, "Formatting bcachefs".into()))) .await .unwrap(); - if res.is_err() { + + if res_err { return; } - let res = init_disk_async(disk_layout_cloned).await; - output - .send(res.map(|_| (1.1f32, "Formatting bcachefs".into()))) - .await - .unwrap(); - if res.is_err() { - return; - } - - // creating partitions - let dev = disk_layout.dev.clone(); - let part_list = disk_layout.part_list.clone(); - match output - .send( - blocking::unblock(move || { - let mut res = Ok(()); - for part in part_list { - match kira_system::parted_mkpart(&dev, &part) { - Ok(_) => (), - Err(ex) => { - res = Err(ex); - break; - } - } - } - res - }) - .await - .and(Ok((5.0f32, "Creating partitions".into()))), - ) - .await - { - Err(ex) => { - log::error!("Error creating GPT partition table: {}", ex.to_string()); - return; - } - _ => (), - }; - - // creating bcachefs filesystem - // /dev/disk/by-partlabel/ - let compression_cloned = compression.clone(); - let password_cloned = password.clone(); - match output - .send( - blocking::unblock(move || { - bcachefs_init( - "/dev/disk/by-partlabel/bee-root", - compression_cloned, - password_cloned, - "/mnt/bzzpss-install", - ) - }) - .await - .and(Ok((10.0f32, "Creating partition table".into()))), - ) - .await - { - Err(ex) => { - log::error!("Error creating GPT partition table: {}", ex.to_string()); - return; - } - _ => (), - }; - // Check if send fails (receiver dropped/cancelled) // if output.send(res).await.is_err() { // return; // Exit early if UI is gone @@ -267,6 +211,20 @@ fn partition_disk( ) } +fn check_kconfig(k_config: &KiraConfig) -> Result<(), String> { + if k_config.res_welcome.is_none(){ Err("Missing wellcome stage result!".into())} + else if k_config.res_license == false { Err("License is NOT accepted!".into())} + else if k_config.res_locale.is_none(){ Err("Missing locale stage result!".into())} + else if k_config.res_network.is_none(){ Err("Missing network stage result!".into())} + else if k_config.res_keyboard.is_none(){ Err("Missing keyboard stage result!".into())} + else if k_config.res_timezone.is_none(){ Err("Missing timezone stage result!".into())} + else if k_config.res_partition.is_none(){ Err("Missing partition stage result!".into())} + else if k_config.res_security.is_none(){ Err("Missing security stage result!".into())} + else { + Ok(()) + } +} + impl InstallStage { pub fn new(k_config: KiraConfig) -> Self { let mut modal_backgroud = kira_theming::main_theme().palette().background; @@ -276,13 +234,12 @@ impl InstallStage { state: InstallationState::UserConfirmDialog, progress: 0.0, progress_message: String::new(), - part_config: k_config.res_partition.clone().expect("Partition stage result should be present in KiraConfig!"), k_config: k_config, } } fn gen_result(&mut self) -> KiraConfig { - self.k_config.res_install = true; + self.k_config.res_install = Some(InstallStageResult { sucess: Ok(()) }); self.k_config.clone() } @@ -290,16 +247,24 @@ impl InstallStage { match message { Message::UserDenies => Update::StgAct(StageAction::Back), Message::UserConfirms => { + + log::info!("Cheking config..."); + match check_kconfig(&self.k_config) { + Ok(()) => log::info!("Config looks good."), + Err(ex) => { + log::error!("{}", ex); + self.state = InstallationState::Error; + return Update::StgAct(StageAction::None); + } + } + + // starting installation process here log::info!("Starting disk partitioning."); self.state = InstallationState::Installing; - let disk_layout = self.part_config.part_layout.clone(); - let disk_password = self.part_config.password.clone(); - let disk_compression = Some("lz4".to_string()); Update::Task(Task::run( - partition_disk(disk_layout, disk_password, disk_compression) - .map_err(|ex| ex.to_string()), + do_install(self.k_config.clone()).map_err(|ex| ex.to_string()), Message::UpdateProgress, )) //Update::Task(Task::perform(, Message::PartitioningFinish)) diff --git a/src/stages/security/mod.rs b/src/stages/security/mod.rs index a4392e0..7af96e6 100644 --- a/src/stages/security/mod.rs +++ b/src/stages/security/mod.rs @@ -18,7 +18,7 @@ This is Security stage, setup users logins and such */ -use crate::stage::{StageAction, KiraConfig}; +use crate::stage::{KiraConfig, StageAction}; use iced::{Alignment, Color, widget}; use rust_i18n::t;