A GameCube/Wii emulator and debugger written in Rust.
experimental main app with iced
Layle345e42c98cd6
diff --git a/Cargo.lock b/Cargo.lockindex 44b86e1..a965ce0 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -61,6 +61,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 = "allocator-api2"version = "0.2.21"@@ -108,6 +126,15 @@ dependencies = ["thiserror 2.0.18",]+[[package]]+name = "android-build"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9fc9904ad2ad097c3c1cfe2eacaaf0fc24710936fa9ed941cb310b7c6ed2ab7"+dependencies = [+ "windows-sys 0.52.0",+]+[[package]]name = "android-properties"version = "0.2.2"@@ -215,6 +242,17 @@ dependencies = ["x11rb",]+[[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",+]+[[package]]name = "arrayref"version = "0.3.9"@@ -233,6 +271,15 @@ version = "1.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"+[[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 = "ascii"version = "1.1.0"@@ -257,6 +304,126 @@ dependencies = ["libloading",]+[[package]]+name = "async-broadcast"+version = "0.7.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-channel"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"+dependencies = [+ "concurrent-queue",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-executor"+version = "1.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"+dependencies = [+ "async-task",+ "concurrent-queue",+ "fastrand",+ "futures-lite",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "async-io"+version = "2.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"+dependencies = [+ "autocfg",+ "cfg-if",+ "concurrent-queue",+ "futures-io",+ "futures-lite",+ "parking",+ "polling",+ "rustix 1.1.4",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-lock"+version = "3.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "pin-project-lite",+]++[[package]]+name = "async-process"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"+dependencies = [+ "async-channel",+ "async-io",+ "async-lock",+ "async-signal",+ "async-task",+ "blocking",+ "cfg-if",+ "event-listener",+ "futures-lite",+ "rustix 1.1.4",+]++[[package]]+name = "async-recursion"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "async-signal"+version = "0.2.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"+dependencies = [+ "async-io",+ "async-lock",+ "atomic-waker",+ "cfg-if",+ "futures-core",+ "futures-io",+ "rustix 1.1.4",+ "signal-hook-registry",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-task"+version = "4.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"+[[package]]name = "async-trait"version = "0.1.89"@@ -280,6 +447,49 @@ version = "1.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"+[[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 0.1.1",+ "rayon",+ "thiserror 2.0.18",+ "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.17.0"@@ -310,14 +520,14 @@ dependencies = ["chapa","crossbeam-channel","gecko",- "glam",+ "glam 0.32.1","hotpath","png","renderdoc","rustc-hash 2.1.2","tracing","wesl",- "wgpu",+ "wgpu 28.0.0",][[package]]@@ -350,6 +560,16 @@ dependencies = ["serde",]+[[package]]+name = "bincode"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740"+dependencies = [+ "serde",+ "unty",+]+[[package]]name = "bit-set"version = "0.8.0"@@ -365,6 +585,12 @@ version = "0.8.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"+[[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"@@ -380,6 +606,15 @@ 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"@@ -413,6 +648,19 @@ dependencies = ["objc2 0.6.4",]+[[package]]+name = "blocking"+version = "1.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"+dependencies = [+ "async-channel",+ "async-task",+ "futures-io",+ "futures-lite",+ "piper",+]+[[package]]name = "bstr"version = "1.12.1"@@ -423,6 +671,12 @@ dependencies = ["serde",]+[[package]]+name = "built"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64"+[[package]]name = "bumpalo"version = "3.20.2"@@ -670,6 +924,36 @@ dependencies = ["error-code",]+[[package]]+name = "clipboard_macos"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b7f4aaa047ba3c3630b080bb9860894732ff23e2aee290a418909aa6d5df38f"+dependencies = [+ "objc2 0.5.2",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "clipboard_wayland"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "003f886bc4e2987729d10c1db3424e7f80809f3fc22dbc16c685738887cb37b8"+dependencies = [+ "smithay-clipboard",+]++[[package]]+name = "clipboard_x11"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd63e33452ffdafd39924c4f05a5dd1e94db646c779c6bd59148a3d95fff5ad4"+dependencies = [+ "thiserror 2.0.18",+ "x11rb",+]+[[package]]name = "cmake"version = "0.1.58"@@ -699,6 +983,12 @@ dependencies = ["bytemuck",]+[[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"@@ -828,6 +1118,15 @@ dependencies = ["libc",]+[[package]]+name = "core_maths"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30"+dependencies = [+ "libm",+]+[[package]]name = "coreaudio-rs"version = "0.14.2"@@ -842,6 +1141,30 @@ dependencies = ["objc2-core-foundation",]+[[package]]+name = "cosmic-text"+version = "0.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "173852283a9a57a3cbe365d86e74dc428a09c50421477d5ad6fe9d9509e37737"+dependencies = [+ "bitflags 2.11.0",+ "fontdb",+ "harfrust",+ "linebender_resource_handle",+ "log",+ "rangemap",+ "rustc-hash 1.1.0",+ "self_cell",+ "skrifa 0.37.0",+ "smol_str",+ "swash",+ "sys-locale",+ "unicode-bidi",+ "unicode-linebreak",+ "unicode-script",+ "unicode-segmentation",+]+[[package]]name = "cpal"version = "0.17.3"@@ -869,7 +1192,7 @@ dependencies = ["wasm-bindgen","wasm-bindgen-futures","web-sys",- "windows",+ "windows 0.62.2",][[package]]@@ -1067,6 +1390,25 @@ dependencies = ["crossbeam-utils",]+[[package]]+name = "crossbeam-deque"+version = "0.8.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"+dependencies = [+ "crossbeam-epoch",+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-epoch"+version = "0.9.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"+dependencies = [+ "crossbeam-utils",+]+[[package]]name = "crossbeam-utils"version = "0.8.21"@@ -1122,6 +1464,19 @@ version = "0.2.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"+[[package]]+name = "cryoglyph"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08bc795bdbccdbd461736fb163930a009da6597b226d6f6fce33e7a8eb6ec519"+dependencies = [+ "cosmic-text",+ "etagere",+ "lru 0.16.4",+ "rustc-hash 2.1.2",+ "wgpu 27.0.1",+]+[[package]]name = "crypto-common"version = "0.1.7"@@ -1132,6 +1487,15 @@ dependencies = ["typenum",]+[[package]]+name = "ctor"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "83cf0d42651b16c6dfe68685716d18480d18a9c39c62d76e8cf3eb6ed5d8bcbf"+dependencies = [+ "dtor",+]+[[package]]name = "ctrlc"version = "3.5.2"@@ -1218,7 +1582,7 @@ dependencies = ["pollster","scripting","tracing-subscriber",- "wgpu",+ "wgpu 28.0.0","winit",]@@ -1361,6 +1725,12 @@ dependencies = ["image 0.1.0",]+[[package]]+name = "dtor"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "edf234dd1594d6dd434a8fb8cada51ddbbc593e40e4a01556a0b31c62da2775b"+[[package]]name = "dunce"version = "1.0.5"@@ -1422,7 +1792,7 @@ dependencies = ["thiserror 2.0.18","type-map","web-time",- "wgpu",+ "wgpu 28.0.0",][[package]]@@ -1475,28 +1845,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"[[package]]-name = "env_home"-version = "0.1.0"+name = "endi"+version = "1.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"[[package]]-name = "epaint"-version = "0.33.3"-source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"+name = "enumflags2"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"dependencies = [- "ahash",- "bytemuck",- "ecolor",- "emath",- "epaint_default_fonts",- "font-types",- "log",- "nohash-hasher",- "parking_lot",- "profiling",+ "enumflags2_derive",+ "serde",+]++[[package]]+name = "enumflags2_derive"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "env_home"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"++[[package]]+name = "epaint"+version = "0.33.3"+source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"+dependencies = [+ "ahash",+ "bytemuck",+ "ecolor",+ "emath",+ "epaint_default_fonts",+ "font-types 0.11.2",+ "log",+ "nohash-hasher",+ "parking_lot",+ "profiling","self_cell",- "skrifa",+ "skrifa 0.40.0","smallvec","vello_cpu",]@@ -1506,6 +1903,26 @@ name = "epaint_default_fonts"version = "0.33.3"source = "git+https://github.com/ioncodes/egui.git#5aeebf13a9d68f49766273104fbde0a5ab6e38fc"+[[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",+]+[[package]]name = "equivalent"version = "1.0.2"@@ -1528,6 +1945,16 @@ version = "3.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"+[[package]]+name = "etagere"+version = "0.2.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc89bf99e5dc15954a60f707c1e09d7540e5cd9af85fa75caa0b510bc08c5342"+dependencies = [+ "euclid",+ "svg_fmt",+]+[[package]]name = "euclid"version = "0.22.14"@@ -1537,6 +1964,42 @@ dependencies = ["num-traits",]+[[package]]+name = "event-listener"+version = "5.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"+dependencies = [+ "concurrent-queue",+ "parking",+ "pin-project-lite",+]++[[package]]+name = "event-listener-strategy"+version = "0.5.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"+dependencies = [+ "event-listener",+ "pin-project-lite",+]++[[package]]+name = "exr"+version = "1.74.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be"+dependencies = [+ "bit_field",+ "half",+ "lebe",+ "miniz_oxide",+ "rayon-core",+ "smallvec",+ "zune-inflate",+]+[[package]]name = "eyre"version = "0.6.12"@@ -1547,6 +2010,12 @@ dependencies = ["once_cell",]+[[package]]+name = "fastrand"+version = "2.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"+[[package]]name = "fax"version = "0.2.6"@@ -1635,6 +2104,15 @@ version = "0.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"+[[package]]+name = "font-types"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5"+dependencies = [+ "bytemuck",+]+[[package]]name = "font-types"version = "0.11.2"@@ -1644,6 +2122,29 @@ dependencies = ["bytemuck",]+[[package]]+name = "fontconfig-parser"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646"+dependencies = [+ "roxmltree",+]++[[package]]+name = "fontdb"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"+dependencies = [+ "fontconfig-parser",+ "log",+ "memmap2 0.9.10",+ "slotmap",+ "tinyvec",+ "ttf-parser",+]+[[package]]name = "foreign-types"version = "0.5.0"@@ -1734,6 +2235,19 @@ version = "0.3.32"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"+[[package]]+name = "futures-lite"+version = "2.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"+dependencies = [+ "fastrand",+ "futures-core",+ "futures-io",+ "parking",+ "pin-project-lite",+]+[[package]]name = "futures-macro"version = "0.3.32"@@ -1796,7 +2310,7 @@ dependencies = ["crc32fast","crossbeam-channel","disasm",- "glam",+ "glam 0.32.1","hotpath","hound","image 0.1.0",@@ -1809,6 +2323,28 @@ dependencies = ["zerocopy",]+[[package]]+name = "gecko-app"+version = "0.1.0"+dependencies = [+ "anyhow",+ "bincode 2.0.1",+ "clap",+ "futures",+ "iced",+ "iced_aw",+ "image 0.1.0",+ "rfd",+ "serde",+ "serde_bytes",+ "tokio",+ "toml",+ "tracing",+ "tracing-subscriber",+ "walkdir",+ "webbrowser",+]+[[package]]name = "generic-array"version = "0.14.7"@@ -1856,6 +2392,16 @@ dependencies = ["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 = "gimli"version = "0.32.3"@@ -1885,6 +2431,12 @@ dependencies = ["xml-rs",]+[[package]]+name = "glam"+version = "0.25.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3"+[[package]]name = "glam"version = "0.32.1"@@ -1921,6 +2473,37 @@ dependencies = ["gl_generator",]+[[package]]+name = "gpu-alloc"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"+dependencies = [+ "bitflags 2.11.0",+ "gpu-alloc-types",+]++[[package]]+name = "gpu-alloc-types"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"+dependencies = [+ "bitflags 2.11.0",+]++[[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-allocator"version = "0.28.0"@@ -1932,7 +2515,7 @@ dependencies = ["log","presser","thiserror 2.0.18",- "windows",+ "windows 0.62.2",][[package]]@@ -1955,6 +2538,16 @@ dependencies = ["bitflags 2.11.0",]+[[package]]+name = "guillotiere"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782"+dependencies = [+ "euclid",+ "svg_fmt",+]+[[package]]name = "half"version = "2.7.1"@@ -1967,6 +2560,19 @@ dependencies = ["zerocopy",]+[[package]]+name = "harfrust"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92c020db12c71d8a12a3fe7607873cade3a01a6287e29d540c8723276221b9d8"+dependencies = [+ "bitflags 2.11.0",+ "bytemuck",+ "core_maths",+ "read-fonts 0.35.0",+ "smallvec",+]+[[package]]name = "hashbrown"version = "0.15.5"@@ -2017,6 +2623,12 @@ version = "0.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"+[[package]]+name = "hex"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"+[[package]]name = "hexf-parse"version = "0.2.1"@@ -2201,7 +2813,7 @@ dependencies = ["js-sys","log","wasm-bindgen",- "windows-core",+ "windows-core 0.62.2",][[package]]@@ -2213,6 +2825,230 @@ dependencies = ["cc",]+[[package]]+name = "iced"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "000e01026c93ba643f8357a3db3ada0e6555265a377f6f9291c472f6dd701fb3"+dependencies = [+ "iced_core",+ "iced_debug",+ "iced_futures",+ "iced_renderer",+ "iced_runtime",+ "iced_widget",+ "iced_winit",+ "image 0.25.10",+ "thiserror 2.0.18",+]++[[package]]+name = "iced_aw"+version = "0.14.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "59b7f923642b024c415150b70ef84ee5c11626e3b0af73b954d817d573bcd0a4"+dependencies = [+ "cfg-if",+ "iced_core",+ "iced_fonts",+ "iced_widget",+ "web-time",+]++[[package]]+name = "iced_core"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91ab1937d699403e7e69252ae743a902bcee9f4ab2052cc4c9a46fcf34729d85"+dependencies = [+ "bitflags 2.11.0",+ "bytes",+ "glam 0.25.0",+ "lilt",+ "log",+ "num-traits",+ "rustc-hash 2.1.2",+ "smol_str",+ "thiserror 2.0.18",+ "web-time",+]++[[package]]+name = "iced_debug"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25035ab0215a620e53f4103e36fc4e59a1fb2817e4bfc38a30ad27b4202ea0be"+dependencies = [+ "iced_core",+ "iced_futures",+ "log",+]++[[package]]+name = "iced_fonts"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "214cff7c8499e328774216690e58e315a1a5f8f6fdd1035aed6298e62ffc4c1d"+dependencies = [+ "iced_core",+ "iced_fonts_macros",+ "iced_widget",+]++[[package]]+name = "iced_fonts_macros"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ef5125e110cb19cd1910a28298661c98c5d9ab02eef43594968352940e8752e"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+ "ttf-parser",+]++[[package]]+name = "iced_futures"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8c0c85ccad42dfbec7293c36c018af0ea0dbcc52d137a4a9a0b0f6822a3fdf0a"+dependencies = [+ "futures",+ "iced_core",+ "log",+ "rustc-hash 2.1.2",+ "tokio",+ "wasm-bindgen-futures",+ "wasmtimer",+]++[[package]]+name = "iced_graphics"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "234ca1c2cec4155055f68fa5fad1b5242c496ac8238d80a259bca382fb44a102"+dependencies = [+ "bitflags 2.11.0",+ "bytemuck",+ "cosmic-text",+ "half",+ "iced_core",+ "iced_futures",+ "image 0.25.10",+ "kamadak-exif",+ "log",+ "raw-window-handle",+ "rustc-hash 2.1.2",+ "thiserror 2.0.18",+ "unicode-segmentation",+]++[[package]]+name = "iced_program"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6dfafec2947cda688d8eb00dac337ba11aa60f9ef6335aed343e189d26e4a673"+dependencies = [+ "iced_graphics",+ "iced_runtime",+]++[[package]]+name = "iced_renderer"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "250cc0802408e8c077986ec56c7d07c65f423ee658a4b9fd795a1f2aae5dac05"+dependencies = [+ "iced_graphics",+ "iced_tiny_skia",+ "iced_wgpu",+ "log",+ "thiserror 2.0.18",+]++[[package]]+name = "iced_runtime"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1889b819ce4c06674183242e336c8d49465665441396914dc07cc86f44fa8d4"+dependencies = [+ "bytes",+ "iced_core",+ "iced_futures",+ "raw-window-handle",+ "thiserror 2.0.18",+]++[[package]]+name = "iced_tiny_skia"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fe0acf8b75a3bc914aff5f2329fdffc1b36eeaea29dda0e4bd232f1c62e9cc3d"+dependencies = [+ "bytemuck",+ "cosmic-text",+ "iced_debug",+ "iced_graphics",+ "kurbo 0.10.4",+ "log",+ "rustc-hash 2.1.2",+ "softbuffer",+ "tiny-skia",+]++[[package]]+name = "iced_wgpu"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff144a999b0ca0f8a10257934500060240825c42e950ec0ebee9c8ae30561c13"+dependencies = [+ "bitflags 2.11.0",+ "bytemuck",+ "cryoglyph",+ "futures",+ "glam 0.25.0",+ "guillotiere",+ "iced_debug",+ "iced_graphics",+ "log",+ "rustc-hash 2.1.2",+ "thiserror 2.0.18",+ "wgpu 27.0.1",+]++[[package]]+name = "iced_widget"+version = "0.14.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b1596afa0d3109c2618e8bc12bae6c11d3064df8f95c42dfce570397dbe957ab"+dependencies = [+ "iced_renderer",+ "log",+ "num-traits",+ "rustc-hash 2.1.2",+ "thiserror 2.0.18",+ "unicode-segmentation",+]++[[package]]+name = "iced_winit"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b7dbedc47562d1de3b9707d939f678b88c382004b7ab5a18f7a7dd723162d75"+dependencies = [+ "iced_debug",+ "iced_program",+ "log",+ "mundy",+ "rustc-hash 2.1.2",+ "thiserror 2.0.18",+ "tracing",+ "wasm-bindgen-futures",+ "web-sys",+ "window_clipboard",+ "winit",+]+[[package]]name = "icu_collections"version = "2.1.1"@@ -2300,7 +3136,7 @@ version = "0.1.13"source = "git+https://github.com/ioncodes/idb-rs.git#843ae819f16aec0051c13b77d3ffccbbc70a3318"dependencies = ["anyhow",- "bincode",+ "bincode 1.3.3","clap","flate2","num-traits",@@ -2345,6 +3181,7 @@ version = "0.1.0"dependencies = ["idb-rs","object 0.36.7",+ "tracing","zerocopy","zip","zstd",@@ -2358,12 +3195,38 @@ checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"dependencies = ["bytemuck","byteorder-lite",+ "color_quant",+ "exr",+ "gif",+ "image-webp","moxcms","num-traits","png",+ "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.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40fac9d56ed6437b198fddba683305e8e2d651aa42647f00f5ae542e7f5c94a2"+[[package]]name = "indenter"version = "0.3.4"@@ -2402,6 +3265,17 @@ dependencies = ["syn",]+[[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",+]+[[package]]name = "ipnet"version = "2.12.0"@@ -2545,6 +3419,15 @@ dependencies = ["wasm-bindgen",]+[[package]]+name = "kamadak-exif"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837"+dependencies = [+ "mutate_once",+]+[[package]]name = "keccak"version = "0.1.6"@@ -2571,6 +3454,16 @@ version = "3.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"+[[package]]+name = "kurbo"+version = "0.10.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440"+dependencies = [+ "arrayvec",+ "smallvec",+]+[[package]]name = "kurbo"version = "0.13.0"@@ -2619,6 +3512,12 @@ 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 = "lexical"version = "7.0.5"@@ -2691,6 +3590,16 @@ version = "0.2.183"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"+[[package]]+name = "libfuzzer-sys"+version = "0.4.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d"+dependencies = [+ "arbitrary",+ "cc",+]+[[package]]name = "libloading"version = "0.8.9"@@ -2728,6 +3637,15 @@ dependencies = ["redox_syscall 0.7.3",]+[[package]]+name = "lilt"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad"+dependencies = [+ "web-time",+]+[[package]]name = "linebender_resource_handle"version = "0.1.1"@@ -2805,6 +3723,15 @@ dependencies = ["logos-codegen",]+[[package]]+name = "loop9"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"+dependencies = [+ "imgref",+]+[[package]]name = "lru"version = "0.12.5"@@ -2814,6 +3741,12 @@ dependencies = ["hashbrown 0.15.5",]+[[package]]+name = "lru"+version = "0.16.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39"+[[package]]name = "lru-slab"version = "0.1.2"@@ -2884,6 +3817,16 @@ dependencies = ["regex-automata",]+[[package]]+name = "maybe-rayon"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"+dependencies = [+ "cfg-if",+ "rayon",+]+[[package]]name = "mcp"version = "0.1.0"@@ -2904,7 +3847,7 @@ dependencies = ["tokio","tracing","tracing-subscriber",- "wgpu",+ "wgpu 28.0.0",][[package]]@@ -2931,6 +3874,30 @@ 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 = "metal"+version = "0.32.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605"+dependencies = [+ "bitflags 2.11.0",+ "block",+ "core-graphics-types 0.2.0",+ "foreign-types",+ "log",+ "objc",+ "paste",+]+[[package]]name = "metal"version = "0.33.0"@@ -3051,6 +4018,63 @@ dependencies = ["target-features",]+[[package]]+name = "mundy"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f32eb0db40f2df2bcfb05c93b8f73938d4c26ce9ac8881f1df0c8d3296921a73"+dependencies = [+ "android-build",+ "async-io",+ "cfg-if",+ "dispatch",+ "futures-channel",+ "futures-lite",+ "jni 0.22.4",+ "ndk-context",+ "objc2 0.6.4",+ "objc2-app-kit 0.3.2",+ "objc2-foundation 0.3.2",+ "pin-project-lite",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "windows 0.62.2",+ "zbus",+]++[[package]]+name = "mutate_once"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af"++[[package]]+name = "naga"+version = "27.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8"+dependencies = [+ "arrayvec",+ "bit-set",+ "bitflags 2.11.0",+ "cfg-if",+ "cfg_aliases",+ "codespan-reporting",+ "half",+ "hashbrown 0.16.1",+ "hexf-parse",+ "indexmap",+ "libm",+ "log",+ "num-traits",+ "once_cell",+ "rustc-hash 1.1.0",+ "spirv",+ "thiserror 2.0.18",+ "unicode-ident",+]+[[package]]name = "naga"version = "28.0.0"@@ -3125,12 +4149,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 = "nohash-hasher"version = "0.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"+[[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 = "nu-ansi-term"version = "0.50.3"@@ -3140,6 +4188,16 @@ dependencies = ["windows-sys 0.61.2",]+[[package]]+name = "num-bigint"+version = "0.4.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"+dependencies = [+ "num-integer",+ "num-traits",+]+[[package]]name = "num-derive"version = "0.4.2"@@ -3151,6 +4209,26 @@ dependencies = ["syn",]+[[package]]+name = "num-integer"+version = "0.1.46"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"+dependencies = [+ "num-traits",+]++[[package]]+name = "num-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"@@ -3227,10 +4305,10 @@ dependencies = ["block2 0.5.1","libc","objc2 0.5.2",- "objc2-core-data",- "objc2-core-image",+ "objc2-core-data 0.2.2",+ "objc2-core-image 0.2.2","objc2-foundation 0.2.2",- "objc2-quartz-core",+ "objc2-quartz-core 0.2.2",][[package]]@@ -3240,9 +4318,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"dependencies = ["bitflags 2.11.0",+ "block2 0.6.2",+ "libc","objc2 0.6.4",+ "objc2-cloud-kit 0.3.2",+ "objc2-core-data 0.3.2",+ "objc2-core-foundation","objc2-core-graphics",+ "objc2-core-image 0.3.2",+ "objc2-core-text",+ "objc2-core-video","objc2-foundation 0.3.2",+ "objc2-quartz-core 0.3.2",][[package]]@@ -3283,6 +4370,17 @@ dependencies = ["objc2-foundation 0.2.2",]+[[package]]+name = "objc2-cloud-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c"+dependencies = [+ "bitflags 2.11.0",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+]+[[package]]name = "objc2-contacts"version = "0.2.2"@@ -3329,6 +4427,17 @@ dependencies = ["objc2-foundation 0.2.2",]+[[package]]+name = "objc2-core-data"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa"+dependencies = [+ "bitflags 2.11.0",+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+]+[[package]]name = "objc2-core-foundation"version = "0.3.2"@@ -3367,6 +4476,16 @@ dependencies = ["objc2-metal",]+[[package]]+name = "objc2-core-image"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006"+dependencies = [+ "objc2 0.6.4",+ "objc2-foundation 0.3.2",+]+[[package]]name = "objc2-core-location"version = "0.2.2"@@ -3379,6 +4498,31 @@ dependencies = ["objc2-foundation 0.2.2",]+[[package]]+name = "objc2-core-text"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d"+dependencies = [+ "bitflags 2.11.0",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-core-graphics",+]++[[package]]+name = "objc2-core-video"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6"+dependencies = [+ "bitflags 2.11.0",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-io-surface",+]+[[package]]name = "objc2-encode"version = "4.1.0"@@ -3459,6 +4603,18 @@ dependencies = ["objc2-metal",]+[[package]]+name = "objc2-quartz-core"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"+dependencies = [+ "bitflags 2.11.0",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]+[[package]]name = "objc2-symbols"version = "0.2.2"@@ -3478,13 +4634,13 @@ dependencies = ["bitflags 2.11.0","block2 0.5.1","objc2 0.5.2",- "objc2-cloud-kit",- "objc2-core-data",- "objc2-core-image",+ "objc2-cloud-kit 0.2.2",+ "objc2-core-data 0.2.2",+ "objc2-core-image 0.2.2","objc2-core-location","objc2-foundation 0.2.2","objc2-link-presentation",- "objc2-quartz-core",+ "objc2-quartz-core 0.2.2","objc2-symbols","objc2-uniform-type-identifiers","objc2-user-notifications",@@ -3569,6 +4725,16 @@ dependencies = ["num-traits",]+[[package]]+name = "ordered-stream"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"+dependencies = [+ "futures-core",+ "pin-project-lite",+]+[[package]]name = "owned_ttf_parser"version = "0.25.1"@@ -3584,6 +4750,12 @@ version = "4.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d"+[[package]]+name = "parking"+version = "2.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"+[[package]]name = "parking_lot"version = "0.12.5"@@ -3613,6 +4785,12 @@ 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 = "pastey"version = "0.2.2"@@ -3627,7 +4805,7 @@ checksum = "9a2b6aadb221872732e87d465213e9be5af2849b0e8cc5300a8ba98fffa2e00a"dependencies = ["bytemuck","color",- "kurbo",+ "kurbo 0.13.0","linebender_resource_handle","smallvec",]@@ -3683,6 +4861,23 @@ version = "0.2.17"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"+[[package]]+name = "pin-utils"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"++[[package]]+name = "piper"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"+dependencies = [+ "atomic-waker",+ "fastrand",+ "futures-io",+]+[[package]]name = "pkg-config"version = "0.3.32"@@ -3809,6 +5004,19 @@ name = "profiling"version = "1.0.17"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"+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",+][[package]]name = "pxfm"@@ -3816,6 +5024,15 @@ version = "0.1.28"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"+[[package]]+name = "qoi"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"+dependencies = [+ "bytemuck",+]+[[package]]name = "quanta"version = "0.12.6"@@ -3952,6 +5169,12 @@ version = "0.1.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"+[[package]]+name = "rangemap"+version = "1.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68"+[[package]]name = "ratatui"version = "0.29.0"@@ -3965,7 +5188,7 @@ dependencies = ["indoc","instability","itertools 0.13.0",- "lru",+ "lru 0.12.5","paste","strum","unicode-segmentation",@@ -3973,6 +5196,56 @@ dependencies = ["unicode-width 0.2.0",]+[[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",+ "interpolate_name",+ "itertools 0.14.0",+ "libc",+ "libfuzzer-sys",+ "log",+ "maybe-rayon",+ "new_debug_unreachable",+ "noop_proc_macro",+ "num-derive",+ "num-traits",+ "paste",+ "profiling",+ "rand",+ "rand_chacha",+ "simd_helpers",+ "thiserror 2.0.18",+ "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"@@ -3988,6 +5261,37 @@ version = "0.6.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"+[[package]]+name = "rayon"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"+dependencies = [+ "either",+ "rayon-core",+]++[[package]]+name = "rayon-core"+version = "1.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"+dependencies = [+ "crossbeam-deque",+ "crossbeam-utils",+]++[[package]]+name = "read-fonts"+version = "0.35.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358"+dependencies = [+ "bytemuck",+ "core_maths",+ "font-types 0.10.1",+]+[[package]]name = "read-fonts"version = "0.37.0"@@ -3995,7 +5299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5"dependencies = ["bytemuck",- "font-types",+ "font-types 0.11.2",][[package]]@@ -4175,6 +5479,36 @@ dependencies = ["web-sys",]+[[package]]+name = "rfd"+version = "0.17.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220"+dependencies = [+ "block2 0.6.2",+ "dispatch2",+ "js-sys",+ "libc",+ "log",+ "objc2 0.6.4",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "percent-encoding",+ "pollster",+ "raw-window-handle",+ "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"@@ -4210,7 +5544,7 @@ dependencies = ["base64","chrono","futures",- "pastey",+ "pastey 0.2.2","pin-project-lite","rmcp-macros","schemars",@@ -4248,6 +5582,12 @@ dependencies = ["unicode-ident",]+[[package]]+name = "roxmltree"+version = "0.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"+[[package]]name = "rstest"version = "0.25.0"@@ -4483,7 +5823,7 @@ dependencies = ["image 0.1.0","png","pollster",- "wgpu",+ "wgpu 28.0.0",][[package]]@@ -4553,6 +5893,16 @@ dependencies = ["serde_derive",]+[[package]]+name = "serde_bytes"+version = "0.11.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"+dependencies = [+ "serde",+ "serde_core",+]+[[package]]name = "serde_core"version = "1.0.228"@@ -4597,6 +5947,26 @@ dependencies = ["zmij",]+[[package]]+name = "serde_repr"+version = "0.1.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[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 = "sha3"version = "0.10.8"@@ -4669,6 +6039,15 @@ dependencies = ["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"@@ -4681,6 +6060,16 @@ version = "1.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"+[[package]]+name = "skrifa"+version = "0.37.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841"+dependencies = [+ "bytemuck",+ "read-fonts 0.35.0",+]+[[package]]name = "skrifa"version = "0.40.0"@@ -4688,7 +6077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac"dependencies = ["bytemuck",- "read-fonts",+ "read-fonts 0.37.0",][[package]]@@ -4794,6 +6183,37 @@ dependencies = ["windows-sys 0.61.2",]+[[package]]+name = "softbuffer"+version = "0.4.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3"+dependencies = [+ "as-raw-xcb-connection",+ "bytemuck",+ "fastrand",+ "js-sys",+ "memmap2 0.9.10",+ "ndk",+ "objc2 0.6.4",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+ "objc2-quartz-core 0.3.2",+ "raw-window-handle",+ "redox_syscall 0.5.18",+ "rustix 1.1.4",+ "tiny-xlib",+ "tracing",+ "wasm-bindgen",+ "wayland-backend",+ "wayland-client",+ "wayland-sys",+ "web-sys",+ "windows-sys 0.61.2",+ "x11rb",+]+[[package]]name = "spin_sleep"version = "1.3.3"@@ -4876,6 +6296,23 @@ version = "2.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"+[[package]]+name = "svg_fmt"+version = "0.4.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb"++[[package]]+name = "swash"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "842f3cd369c2ba38966204f983eaa5e54a8e84a7d7159ed36ade2b6c335aae64"+dependencies = [+ "skrifa 0.40.0",+ "yazi",+ "zeno",+]+[[package]]name = "syn"version = "2.0.117"@@ -4907,6 +6344,15 @@ dependencies = ["syn",]+[[package]]+name = "sys-locale"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4"+dependencies = [+ "libc",+]+[[package]]name = "target-features"version = "0.1.6"@@ -4919,6 +6365,19 @@ version = "0.13.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"+[[package]]+name = "tempfile"+version = "3.27.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"+dependencies = [+ "fastrand",+ "getrandom 0.3.4",+ "once_cell",+ "rustix 1.1.4",+ "windows-sys 0.61.2",+]+[[package]]name = "term"version = "0.7.0"@@ -5042,6 +6501,19 @@ dependencies = ["strict-num",]+[[package]]+name = "tiny-xlib"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a90a0ca3ee6a69f2ad28fd11621a4c3f03b371f366be500b64df260c4ffbafb4"+dependencies = [+ "as-raw-xcb-connection",+ "ctor",+ "libloading",+ "pkg-config",+ "tracing",+]+[[package]]name = "tiny_http"version = "0.12.0"@@ -5075,7 +6547,7 @@ dependencies = ["spin_sleep","tracing","tracing-subscriber",- "wgpu",+ "wgpu 28.0.0","winit",]@@ -5177,11 +6649,26 @@ dependencies = ["tokio",]+[[package]]+name = "toml"+version = "1.1.2+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee"+dependencies = [+ "indexmap",+ "serde_core",+ "serde_spanned",+ "toml_datetime",+ "toml_parser",+ "toml_writer",+ "winnow",+]+[[package]]name = "toml_datetime"-version = "1.1.0+spec-1.1.0"+version = "1.1.1+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f"+checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"dependencies = ["serde_core",]@@ -5200,13 +6687,19 @@ dependencies = [[[package]]name = "toml_parser"-version = "1.1.0+spec-1.1.0"+version = "1.1.2+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011"+checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"dependencies = ["winnow",]+[[package]]+name = "toml_writer"+version = "1.1.1+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"+[[package]]name = "tower"version = "0.5.3"@@ -5325,6 +6818,9 @@ name = "ttf-parser"version = "0.25.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"+dependencies = [+ "core_maths",+][[package]]name = "twox-hash"@@ -5356,12 +6852,41 @@ version = "1.19.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"+[[package]]+name = "uds_windows"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"+dependencies = [+ "memoffset",+ "tempfile",+ "windows-sys 0.61.2",+]++[[package]]+name = "unicode-bidi"+version = "0.3.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"+[[package]]name = "unicode-ident"version = "1.0.24"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"+[[package]]+name = "unicode-linebreak"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"++[[package]]+name = "unicode-script"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee"+[[package]]name = "unicode-segmentation"version = "1.13.1"@@ -5403,6 +6928,12 @@ version = "0.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"+[[package]]+name = "unty"+version = "0.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae"+[[package]]name = "url"version = "2.5.8"@@ -5427,6 +6958,28 @@ version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"+[[package]]+name = "uuid"+version = "1.23.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"+dependencies = [+ "js-sys",+ "serde_core",+ "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"@@ -5444,7 +6997,7 @@ dependencies = ["hashbrown 0.16.1","log","peniko",- "skrifa",+ "skrifa 0.40.0","smallvec",]@@ -5570,10 +7123,24 @@ version = "44.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6a1859e920871515d324fb9757c3e448d6ed1512ca6ccdff14b6e016505d6ada"dependencies = [- "cfg-if",- "libc",- "wasmtime-internal-core",- "windows-sys 0.61.2",+ "cfg-if",+ "libc",+ "wasmtime-internal-core",+ "windows-sys 0.61.2",+]++[[package]]+name = "wasmtimer"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b"+dependencies = [+ "futures",+ "js-sys",+ "parking_lot",+ "pin-utils",+ "slab",+ "wasm-bindgen",][[package]]@@ -5791,6 +7358,35 @@ dependencies = ["syn",]+[[package]]+name = "wgpu"+version = "27.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77"+dependencies = [+ "arrayvec",+ "bitflags 2.11.0",+ "cfg-if",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.16.1",+ "js-sys",+ "log",+ "naga 27.0.3",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "smallvec",+ "static_assertions",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "wgpu-core 27.0.3",+ "wgpu-hal 27.0.4",+ "wgpu-types 27.0.1",+]+[[package]]name = "wgpu"version = "28.0.0"@@ -5806,7 +7402,7 @@ dependencies = ["hashbrown 0.16.1","js-sys","log",- "naga",+ "naga 28.0.0","parking_lot","portable-atomic","profiling",@@ -5816,9 +7412,41 @@ dependencies = ["wasm-bindgen","wasm-bindgen-futures","web-sys",- "wgpu-core",- "wgpu-hal",- "wgpu-types",+ "wgpu-core 28.0.1",+ "wgpu-hal 28.0.1",+ "wgpu-types 28.0.0",+]++[[package]]+name = "wgpu-core"+version = "27.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7"+dependencies = [+ "arrayvec",+ "bit-set",+ "bit-vec",+ "bitflags 2.11.0",+ "bytemuck",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.16.1",+ "indexmap",+ "log",+ "naga 27.0.3",+ "once_cell",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "rustc-hash 1.1.0",+ "smallvec",+ "thiserror 2.0.18",+ "wgpu-core-deps-apple 27.0.0",+ "wgpu-core-deps-emscripten 27.0.0",+ "wgpu-core-deps-windows-linux-android 27.0.0",+ "wgpu-hal 27.0.4",+ "wgpu-types 27.0.1",][[package]]@@ -5837,7 +7465,7 @@ dependencies = ["hashbrown 0.16.1","indexmap","log",- "naga",+ "naga 28.0.0","once_cell","parking_lot","portable-atomic",@@ -5846,11 +7474,20 @@ dependencies = ["rustc-hash 1.1.0","smallvec","thiserror 2.0.18",- "wgpu-core-deps-apple",- "wgpu-core-deps-emscripten",- "wgpu-core-deps-windows-linux-android",- "wgpu-hal",- "wgpu-types",+ "wgpu-core-deps-apple 28.0.0",+ "wgpu-core-deps-emscripten 28.0.0",+ "wgpu-core-deps-windows-linux-android 28.0.0",+ "wgpu-hal 28.0.1",+ "wgpu-types 28.0.0",+]++[[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 27.0.4",][[package]]@@ -5859,7 +7496,16 @@ version = "28.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "87b7b696b918f337c486bf93142454080a32a37832ba8a31e4f48221890047da"dependencies = [- "wgpu-hal",+ "wgpu-hal 28.0.1",+]++[[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 27.0.4",][[package]]@@ -5868,7 +7514,16 @@ version = "28.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "34b251c331f84feac147de3c4aa3aa45112622a95dd7ee1b74384fa0458dbd79"dependencies = [- "wgpu-hal",+ "wgpu-hal 28.0.1",+]++[[package]]+name = "wgpu-core-deps-windows-linux-android"+version = "27.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3"+dependencies = [+ "wgpu-hal 27.0.4",][[package]]@@ -5877,7 +7532,56 @@ version = "28.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "68ca976e72b2c9964eb243e281f6ce7f14a514e409920920dcda12ae40febaae"dependencies = [- "wgpu-hal",+ "wgpu-hal 28.0.1",+]++[[package]]+name = "wgpu-hal"+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.11.0",+ "block",+ "bytemuck",+ "cfg-if",+ "cfg_aliases",+ "core-graphics-types 0.2.0",+ "glow",+ "glutin_wgl_sys",+ "gpu-alloc",+ "gpu-allocator 0.27.0",+ "gpu-descriptor",+ "hashbrown 0.16.1",+ "js-sys",+ "khronos-egl",+ "libc",+ "libloading",+ "log",+ "metal 0.32.0",+ "naga 27.0.3",+ "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.18",+ "wasm-bindgen",+ "web-sys",+ "wgpu-types 27.0.1",+ "windows 0.58.0",+ "windows-core 0.58.0",][[package]]@@ -5898,7 +7602,7 @@ dependencies = ["core-graphics-types 0.2.0","glow","glutin_wgl_sys",- "gpu-allocator",+ "gpu-allocator 0.28.0","gpu-descriptor","hashbrown 0.16.1","js-sys",@@ -5906,8 +7610,8 @@ dependencies = ["libc","libloading","log",- "metal",- "naga",+ "metal 0.33.0",+ "naga 28.0.0","ndk-sys","objc","once_cell",@@ -5923,9 +7627,23 @@ dependencies = ["thiserror 2.0.18","wasm-bindgen","web-sys",- "wgpu-types",- "windows",- "windows-core",+ "wgpu-types 28.0.0",+ "windows 0.62.2",+ "windows-core 0.62.2",+]++[[package]]+name = "wgpu-types"+version = "27.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb"+dependencies = [+ "bitflags 2.11.0",+ "bytemuck",+ "js-sys",+ "log",+ "thiserror 2.0.18",+ "web-sys",][[package]]@@ -6012,6 +7730,30 @@ version = "0.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"+[[package]]+name = "window_clipboard"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d5654226305eaf2dde8853fb482861d28e5dcecbbd40cb88e8393d94bb80d733"+dependencies = [+ "clipboard-win",+ "clipboard_macos",+ "clipboard_wayland",+ "clipboard_x11",+ "raw-window-handle",+ "thiserror 2.0.18",+]++[[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 0.52.6",+]+[[package]]name = "windows"version = "0.62.2"@@ -6019,7 +7761,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"dependencies = ["windows-collections",- "windows-core",+ "windows-core 0.62.2","windows-future","windows-numerics",]@@ -6030,7 +7772,20 @@ version = "0.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"dependencies = [- "windows-core",+ "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 0.52.6",][[package]]@@ -6039,11 +7794,11 @@ version = "0.62.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"dependencies = [- "windows-implement",- "windows-interface",+ "windows-implement 0.60.2",+ "windows-interface 0.59.3","windows-link",- "windows-result",- "windows-strings",+ "windows-result 0.4.1",+ "windows-strings 0.5.1",][[package]]@@ -6052,11 +7807,22 @@ version = "0.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"dependencies = [- "windows-core",+ "windows-core 0.62.2","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",+]+[[package]]name = "windows-implement"version = "0.60.2"@@ -6068,6 +7834,17 @@ dependencies = ["syn",]+[[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",+]+[[package]]name = "windows-interface"version = "0.59.3"@@ -6091,10 +7868,19 @@ version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"dependencies = [- "windows-core",+ "windows-core 0.62.2","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 0.52.6",+]+[[package]]name = "windows-result"version = "0.4.1"@@ -6104,6 +7890,16 @@ 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 0.52.6",+]+[[package]]name = "windows-strings"version = "0.5.1"@@ -6504,6 +8300,18 @@ version = "0.8.28"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f"+[[package]]+name = "y4m"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448"++[[package]]+name = "yazi"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"+[[package]]name = "yoke"version = "0.8.1"@@ -6527,6 +8335,73 @@ dependencies = ["synstructure",]+[[package]]+name = "zbus"+version = "5.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1"+dependencies = [+ "async-broadcast",+ "async-executor",+ "async-io",+ "async-lock",+ "async-process",+ "async-recursion",+ "async-task",+ "async-trait",+ "blocking",+ "enumflags2",+ "event-listener",+ "futures-core",+ "futures-lite",+ "hex",+ "libc",+ "ordered-stream",+ "rustix 1.1.4",+ "serde",+ "serde_repr",+ "tracing",+ "uds_windows",+ "uuid",+ "windows-sys 0.61.2",+ "winnow",+ "zbus_macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zbus_macros"+version = "5.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff"+dependencies = [+ "proc-macro-crate",+ "proc-macro2",+ "quote",+ "syn",+ "zbus_names",+ "zvariant",+ "zvariant_utils",+]++[[package]]+name = "zbus_names"+version = "4.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d"+dependencies = [+ "serde",+ "winnow",+ "zvariant",+]++[[package]]+name = "zeno"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"+[[package]]name = "zerocopy"version = "0.8.48"@@ -6679,6 +8554,15 @@ version = "0.5.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"+[[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.14"@@ -6687,3 +8571,43 @@ checksum = "0b7a1c0af6e5d8d1363f4994b7a091ccf963d8b694f7da5b0b9cceb82da2c0a6"dependencies = ["zune-core",]++[[package]]+name = "zvariant"+version = "5.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1c1567a6ec68df868cbbfde844cfc6d81649fe5109a62b116b19fabd53e618ee"+dependencies = [+ "endi",+ "enumflags2",+ "serde",+ "winnow",+ "zvariant_derive",+ "zvariant_utils",+]++[[package]]+name = "zvariant_derive"+version = "5.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7d5b780599bbde114e39d9a0799577fad1ced5105d38515745f7b3099d8ceda"+dependencies = [+ "proc-macro-crate",+ "proc-macro2",+ "quote",+ "syn",+ "zvariant_utils",+]++[[package]]+name = "zvariant_utils"+version = "3.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691"+dependencies = [+ "proc-macro2",+ "quote",+ "serde",+ "syn",+ "winnow",+]diff --git a/Cargo.toml b/Cargo.tomlindex 2b6c625..5bb666c 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -6,6 +6,7 @@ members = ["crates/gecko","crates/image","crates/tinyapp",+ "crates/app","crates/backend-wgpu","crates/scripting","crates/dbglib",@@ -25,6 +26,7 @@ default-members = ["crates/gecko","crates/image","crates/tinyapp",+ "crates/app","crates/backend-wgpu","crates/scripting","crates/mcp",diff --git a/crates/app/Cargo.toml b/crates/app/Cargo.tomlnew file mode 100644index 0000000..4904be0--- /dev/null+++ b/crates/app/Cargo.toml@@ -0,0 +1,26 @@+[package]+name = "gecko-app"+version = "0.1.0"+edition = "2024"++[[bin]]+name = "gecko"+path = "src/main.rs"++[dependencies]+image = { path = "../image" }+iced = { version = "0.14.0", features = ["tokio", "advanced", "image"] }+iced_aw = { version = "0.14.1", default-features = false, features = ["menu"] }+tokio = { version = "1.52.3", features = ["rt-multi-thread", "fs", "macros", "sync"] }+futures = { version = "0.3.32", default-features = false, features = ["std", "async-await"] }+serde = { version = "1.0.228", features = ["derive", "rc"] }+serde_bytes = "0.11.19"+bincode = { version = "2.0.1", default-features = false, features = ["serde", "std"] }+toml = "1.1.2"+walkdir = "2.5.0"+rfd = { version = "0.17.2", default-features = false, features = ["xdg-portal"] }+tracing = "0.1.44"+tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }+clap = { version = "4.6.1", features = ["derive"] }+anyhow = "1.0.102"+webbrowser = "1.0.5"diff --git a/crates/app/src/app.rs b/crates/app/src/app.rsnew file mode 100644index 0000000..6b061a0--- /dev/null+++ b/crates/app/src/app.rs@@ -0,0 +1,431 @@+use std::path::PathBuf;++use iced::theme::Mode;+use iced::widget::{button, column, container, mouse_area, scrollable, stack, text};+use iced::{Background, Border, Color, Element, Length, Padding, Subscription, Task, Theme};++use crate::cache::{self, LibraryCache};+use crate::config::{self, Config};+use crate::game::{CpuMode, Game, Platform, ThemePreference};+use crate::library::{self, ScanProgress};+use crate::theme::{self, Palette};+use crate::widgets::{game_row, menubar, search_bar, statusbar};++const REPO_URL: &str = "https://github.com/ioncodes/gecko";++#[derive(Debug, Clone)]+pub enum Message {+ LibraryPicked(Platform, Option<PathBuf>),+ ScanRequested,+ ScanProgress(ScanProgress),+ SearchChanged(String),+ MenuChooseLibrary(Platform),+ MenuRescan,+ MenuQuit,+ MenuToggleCpu(CpuMode),+ MenuSetTheme(ThemePreference),+ MenuAbout,+ AboutClose,+ OpenRepo,+ GameClicked(usize),+ SystemThemeLoaded(Mode),+ SystemThemeChanged(Mode),+}++pub struct App {+ cache: LibraryCache,+ config: Config,+ cli_gcn_override: Option<PathBuf>,+ cli_wii_override: Option<PathBuf>,+ games: Vec<Game>,+ search: String,+ search_lc: String,+ scanning: bool,+ about_open: bool,+ system_mode: Mode,+ palette: Palette,+}++impl App {+ pub fn new(cli_gcn: Option<PathBuf>, cli_wii: Option<PathBuf>) -> (Self, Task<Message>) {+ let config = config::load(&config::config_path());+ let cache = cache::load(&cache::cache_path());++ let mut games: Vec<Game> = cache.entries.values().map(|e| e.game.clone()).collect();+ games.sort_by(|a, b| a.title_lc.cmp(&b.title_lc));++ let has_any_root =+ cli_gcn.is_some() || cli_wii.is_some() || config.gcn_library.is_some() || config.wii_library.is_some();++ let palette = self::resolve_palette(config.theme, Mode::Light);+ let app = Self {+ cache,+ config,+ cli_gcn_override: cli_gcn,+ cli_wii_override: cli_wii,+ games,+ search: String::new(),+ search_lc: String::new(),+ scanning: false,+ about_open: false,+ system_mode: Mode::Light,+ palette,+ };++ let mut tasks: Vec<Task<Message>> = Vec::new();+ tasks.push(iced::system::theme().map(Message::SystemThemeLoaded));+ if has_any_root {+ tasks.push(Task::done(Message::ScanRequested));+ }++ (app, Task::batch(tasks))+ }++ pub fn title(&self) -> String {+ "Gecko".to_owned()+ }++ pub fn theme(&self) -> Theme {+ theme::theme(&self.palette)+ }++ pub fn subscription(&self) -> Subscription<Message> {+ iced::system::theme_changes().map(Message::SystemThemeChanged)+ }++ pub fn update(&mut self, message: Message) -> Task<Message> {+ match message {+ Message::LibraryPicked(_, None) => Task::none(),+ Message::LibraryPicked(platform, Some(path)) => {+ match platform {+ Platform::Gcn => self.config.gcn_library = Some(path),+ Platform::Wii => self.config.wii_library = Some(path),+ }+ self.persist_config();+ Task::done(Message::ScanRequested)+ }+ Message::ScanRequested => {+ let roots = self.effective_library_roots();+ if roots.is_empty() {+ return Task::none();+ }++ self.scanning = true;+ let prior = self.cache.clone();+ Task::stream(library::scan_library_stream(roots, prior)).map(Message::ScanProgress)+ }+ Message::ScanProgress(ScanProgress::Started { cached, pending }) => {+ self.games = cached;+ self.games.sort_by(|a, b| a.title_lc.cmp(&b.title_lc));+ tracing::info!(cached = self.games.len(), pending, "scan started");+ Task::none()+ }+ Message::ScanProgress(ScanProgress::Loaded(game)) => {+ self.insert_game_sorted(*game);+ Task::none()+ }+ Message::ScanProgress(ScanProgress::Finished(cache)) => {+ self.cache = *cache;+ self.persist_cache();+ self.scanning = false;+ tracing::info!(total = self.games.len(), "scan finished");+ Task::none()+ }+ Message::ScanProgress(ScanProgress::Error(err)) => {+ tracing::warn!(%err, "scan failed");+ self.scanning = false;+ Task::none()+ }+ Message::SearchChanged(q) => {+ self.search_lc = q.to_lowercase();+ self.search = q;+ Task::none()+ }+ Message::MenuChooseLibrary(platform) => {+ let title = match platform {+ Platform::Gcn => "Select GameCube folder",+ Platform::Wii => "Select Wii folder",+ };+ Task::perform(+ async move {+ rfd::AsyncFileDialog::new()+ .set_title(title)+ .pick_folder()+ .await+ .map(|h| h.path().to_path_buf())+ },+ move |opt| Message::LibraryPicked(platform, opt),+ )+ }+ Message::MenuRescan => {+ if self.effective_library_roots().is_empty() {+ Task::done(Message::MenuChooseLibrary(Platform::Gcn))+ } else {+ Task::done(Message::ScanRequested)+ }+ }+ Message::MenuQuit => iced::exit(),+ Message::MenuToggleCpu(mode) => {+ self.config.cpu_mode = mode;+ self.persist_config();+ Task::none()+ }+ Message::MenuSetTheme(pref) => {+ self.config.theme = pref;+ self.persist_config();+ self.refresh_palette();+ Task::none()+ }+ Message::MenuAbout => {+ self.about_open = true;+ Task::none()+ }+ Message::AboutClose => {+ self.about_open = false;+ Task::none()+ }+ Message::OpenRepo => {+ if let Err(err) = webbrowser::open(REPO_URL) {+ tracing::warn!(%err, url = REPO_URL, "failed to open repo URL");+ }+ Task::none()+ }+ Message::GameClicked(idx) => {+ if let Some(game) = self.games.get(idx) {+ tracing::info!(path = %game.path.display(), title = %game.title, "game selected");+ }+ Task::none()+ }+ Message::SystemThemeLoaded(mode) | Message::SystemThemeChanged(mode) => {+ self.system_mode = mode;+ self.refresh_palette();+ Task::none()+ }+ }+ }++ pub fn view(&self) -> Element<'_, Message> {+ let palette = &self.palette;++ let body: Element<'_, Message> = if self.games.is_empty() {+ let (msg, hint) = if self.scanning {+ ("Scanning…", "Reading disc headers")+ } else if self.effective_library_roots().is_empty() {+ ("No libraries set", "File → Set GameCube / Wii Folder…")+ } else {+ ("No games found", "Drop ISO, RVZ, or ZIP files into the library folder")+ };+ game_row::empty_state(palette, msg, hint)+ } else {+ let mut list = column![].spacing(0);+ for (idx, game) in self.games.iter().enumerate() {+ if !game.matches_lc(&self.search_lc) {+ continue;+ }+ list = list.push(game_row::game_row(palette, idx, game));+ }+ scrollable(list).height(Length::Fill).width(Length::Fill).into()+ };++ let bg = palette.bg;+ let text_color = palette.text;+ let main = column![+ menubar::menubar(palette, self.config.cpu_mode, self.config.theme),+ search_bar::search_bar(palette, &self.search),+ body,+ statusbar::statusbar(palette, self.config.cpu_mode, self.games.len(), self.scanning),+ ];++ let root = container(main)+ .width(Length::Fill)+ .height(Length::Fill)+ .style(move |_| container::Style {+ background: Some(Background::Color(bg)),+ text_color: Some(text_color),+ ..container::Style::default()+ });++ let root_element: Element<'_, Message> = root.into();+ if self.about_open {+ stack![root_element, self::about_overlay(palette)].into()+ } else {+ root_element+ }+ }++ fn effective_library_roots(&self) -> Vec<PathBuf> {+ let mut roots = Vec::new();+ if let Some(p) = self+ .cli_gcn_override+ .clone()+ .or_else(|| self.config.gcn_library.clone())+ {+ roots.push(p);+ }++ if let Some(p) = self+ .cli_wii_override+ .clone()+ .or_else(|| self.config.wii_library.clone())+ {+ roots.push(p);+ }++ roots+ }++ fn persist_config(&self) {+ let path = config::config_path();+ if let Err(err) = config::save(&path, &self.config) {+ tracing::warn!(%err, path = %path.display(), "failed to persist config");+ }+ }++ fn persist_cache(&self) {+ let path = cache::cache_path();+ if let Err(err) = cache::save(&path, &self.cache) {+ tracing::warn!(%err, path = %path.display(), "failed to persist library cache");+ }+ }++ fn insert_game_sorted(&mut self, game: Game) {+ let pos = self+ .games+ .binary_search_by(|g| g.title_lc.cmp(&game.title_lc))+ .unwrap_or_else(|p| p);+ self.games.insert(pos, game);+ }++ fn refresh_palette(&mut self) {+ self.palette = self::resolve_palette(self.config.theme, self.system_mode);+ }+}++fn resolve_palette(pref: ThemePreference, system_mode: Mode) -> Palette {+ let effective = match pref {+ ThemePreference::Light => Mode::Light,+ ThemePreference::Dark => Mode::Dark,+ ThemePreference::System => system_mode,+ };+ Palette::for_mode(effective)+}++fn about_overlay(palette: &Palette) -> Element<'static, Message> {+ let bg = palette.bg;+ let surface = palette.surface;+ let surface_2 = palette.surface_2;+ let border = palette.border;+ let border_2 = palette.border_2;+ let text_color = palette.text;+ let dim = palette.text_dim;+ let mute = palette.text_mute;+ let link_color = palette.accent;+ let backdrop_color = Color {+ a: 0.45,+ ..(if palette.is_dark { Color::BLACK } else { palette.text })+ };++ let link_button = button(text(REPO_URL).size(12).color(link_color))+ .on_press(Message::OpenRepo)+ .padding(Padding::from([2, 4]))+ .style(move |_: &Theme, status| {+ let bg = match status {+ button::Status::Hovered | button::Status::Pressed => Color { a: 0.08, ..link_color },+ _ => Color::TRANSPARENT,+ };+ button::Style {+ background: Some(Background::Color(bg)),+ text_color: link_color,+ border: Border {+ radius: 4.0.into(),+ ..Border::default()+ },+ ..button::Style::default()+ }+ });++ let card: Element<'static, Message> = container(+ column![+ text("Gecko").size(28).color(text_color),+ text("GameCube / Wii emulator").size(13).color(dim),+ link_button,+ container(text(""))+ .width(Length::Fill)+ .height(1)+ .style(move |_: &Theme| container::Style {+ background: Some(Background::Color(border)),+ ..container::Style::default()+ }),+ column![+ text("Author").size(13).color(text_color),+ text("Layle").size(12).color(dim),+ ]+ .spacing(2)+ .align_x(iced::Alignment::Center),+ column![+ text("Acknowledgements").size(13).color(text_color),+ text("zayd").size(12).color(dim),+ text("vxpm").size(12).color(dim),+ text("hazelwiss").size(12).color(dim),+ text("Dolphin team").size(12).color(dim),+ ]+ .spacing(2)+ .align_x(iced::Alignment::Center),+ text("v0.1.0").size(11).color(mute),+ button(text("Close").size(13))+ .on_press(Message::AboutClose)+ .padding(Padding::from([6, 14]))+ .style(move |_: &Theme, status| {+ let button_bg = match status {+ button::Status::Hovered | button::Status::Pressed => surface_2,+ _ => surface,+ };+ button::Style {+ background: Some(Background::Color(button_bg)),+ text_color,+ border: Border {+ color: border_2,+ width: 1.0,+ radius: 6.0.into(),+ },+ ..button::Style::default()+ }+ }),+ ]+ .spacing(8)+ .align_x(iced::Alignment::Center),+ )+ .width(Length::Fixed(320.0))+ .padding(24)+ .style(move |_: &Theme| container::Style {+ background: Some(Background::Color(bg)),+ border: Border {+ color: border_2,+ width: 1.0,+ radius: 12.0.into(),+ },+ ..container::Style::default()+ })+ .into();++ let backdrop: Element<'static, Message> = mouse_area(+ container(text(""))+ .width(Length::Fill)+ .height(Length::Fill)+ .style(move |_: &Theme| container::Style {+ background: Some(Background::Color(backdrop_color)),+ ..container::Style::default()+ }),+ )+ .on_press(Message::AboutClose)+ .into();++ let centered: Element<'static, Message> = container(card)+ .width(Length::Fill)+ .height(Length::Fill)+ .center_x(Length::Fill)+ .center_y(Length::Fill)+ .into();++ stack![backdrop, centered].into()+}diff --git a/crates/app/src/cache.rs b/crates/app/src/cache.rsnew file mode 100644index 0000000..23b85bd--- /dev/null+++ b/crates/app/src/cache.rs@@ -0,0 +1,108 @@+use std::collections::HashMap;+use std::path::{Path, PathBuf};+use std::time::UNIX_EPOCH;++use serde::{Deserialize, Serialize};++use crate::game::Game;++const CACHE_VERSION: u32 = 1;+const CACHE_DIR: &str = "cache";+const CACHE_FILE: &str = "library.bin";++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+pub struct FileFingerprint {+ pub size: u64,+ pub mtime_secs: u64,+}++impl FileFingerprint {+ pub fn from_path(path: &Path) -> Option<Self> {+ let meta = std::fs::metadata(path).ok()?;+ let mtime_secs = meta+ .modified()+ .ok()+ .and_then(|t| t.duration_since(UNIX_EPOCH).ok())+ .map(|d| d.as_secs())+ .unwrap_or(0);+ Some(Self {+ size: meta.len(),+ mtime_secs,+ })+ }+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct CacheEntry {+ pub fingerprint: FileFingerprint,+ pub game: Game,+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct LibraryCache {+ pub version: u32,+ pub entries: HashMap<PathBuf, CacheEntry>,+}++impl Default for LibraryCache {+ fn default() -> Self {+ Self {+ version: CACHE_VERSION,+ entries: HashMap::new(),+ }+ }+}++pub fn cache_path() -> PathBuf {+ match std::env::current_exe() {+ Ok(exe) => exe+ .parent()+ .map(|p| p.join(CACHE_DIR).join(CACHE_FILE))+ .unwrap_or_else(|| PathBuf::from(CACHE_FILE)),+ Err(_) => PathBuf::from(CACHE_FILE),+ }+}++pub fn load(path: &Path) -> LibraryCache {+ let bytes = match std::fs::read(path) {+ Ok(b) => b,+ Err(err) if err.kind() == std::io::ErrorKind::NotFound => return LibraryCache::default(),+ Err(err) => {+ tracing::warn!(?err, path = %path.display(), "failed to read cache; starting fresh");+ return LibraryCache::default();+ }+ };++ match bincode::serde::decode_from_slice::<LibraryCache, _>(&bytes, bincode::config::standard()) {+ Ok((mut cache, _)) if cache.version == CACHE_VERSION => {+ for entry in cache.entries.values_mut() {+ entry.game.rehydrate_keys();+ }+ cache+ }+ Ok((cache, _)) => {+ tracing::info!(+ got = cache.version,+ want = CACHE_VERSION,+ "cache version mismatch; discarding"+ );+ LibraryCache::default()+ }+ Err(err) => {+ tracing::warn!(?err, "failed to decode cache; starting fresh");+ LibraryCache::default()+ }+ }+}++pub fn save(path: &Path, cache: &LibraryCache) -> anyhow::Result<()> {+ if let Some(parent) = path.parent()+ && !parent.as_os_str().is_empty()+ {+ std::fs::create_dir_all(parent)?;+ }++ let bytes = bincode::serde::encode_to_vec(cache, bincode::config::standard())?;+ std::fs::write(path, bytes)?;+ Ok(())+}diff --git a/crates/app/src/config.rs b/crates/app/src/config.rsnew file mode 100644index 0000000..a9104ed--- /dev/null+++ b/crates/app/src/config.rs@@ -0,0 +1,53 @@+use std::path::{Path, PathBuf};++use serde::{Deserialize, Serialize};++use crate::game::{CpuMode, ThemePreference};++#[derive(Debug, Clone, Default, Serialize, Deserialize)]+#[serde(default)]+pub struct Config {+ pub gcn_library: Option<PathBuf>,+ pub wii_library: Option<PathBuf>,+ pub cpu_mode: CpuMode,+ pub theme: ThemePreference,+}++pub fn config_path() -> PathBuf {+ match std::env::current_exe() {+ Ok(exe) => exe+ .parent()+ .map(|p| p.join("config.toml"))+ .unwrap_or_else(|| PathBuf::from("config.toml")),+ Err(_) => PathBuf::from("config.toml"),+ }+}++pub fn load(path: &Path) -> Config {+ match std::fs::read_to_string(path) {+ Ok(s) => match toml::from_str(&s) {+ Ok(cfg) => cfg,+ Err(err) => {+ tracing::warn!(?err, path = %path.display(), "failed to parse config; using defaults");+ Config::default()+ }+ },+ Err(err) if err.kind() == std::io::ErrorKind::NotFound => Config::default(),+ Err(err) => {+ tracing::warn!(?err, path = %path.display(), "failed to read config; using defaults");+ Config::default()+ }+ }+}++pub fn save(path: &Path, cfg: &Config) -> anyhow::Result<()> {+ if let Some(parent) = path.parent()+ && !parent.as_os_str().is_empty()+ {+ std::fs::create_dir_all(parent)?;+ }++ let body = toml::to_string_pretty(cfg)?;+ std::fs::write(path, body)?;+ Ok(())+}diff --git a/crates/app/src/game.rs b/crates/app/src/game.rsnew file mode 100644index 0000000..024977f--- /dev/null+++ b/crates/app/src/game.rs@@ -0,0 +1,218 @@+use std::path::{Path, PathBuf};+use std::sync::{Arc, OnceLock};++use iced::widget::image::Handle;+use image::Dvd;+use serde::{Deserialize, Serialize};++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct BannerData {+ pub width: u32,+ pub height: u32,+ #[serde(with = "serde_bytes")]+ pub rgba: Vec<u8>,+}++impl From<image::banner::Banner> for BannerData {+ fn from(b: image::banner::Banner) -> Self {+ Self {+ width: b.width,+ height: b.height,+ rgba: b.rgba,+ }+ }+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+pub enum Region {+ NtscU,+ NtscJ,+ Pal,+ NtscK,+ NtscT,+ Unknown,+}++impl Region {+ pub fn from_game_code(code: [u8; 4]) -> Self {+ match code[3] {+ b'E' | b'N' | b'B' => Region::NtscU,+ b'J' => Region::NtscJ,+ b'P' | b'D' | b'F' | b'S' | b'I' | b'H' | b'U' | b'X' | b'Y' | b'Z' => Region::Pal,+ b'K' | b'Q' | b'T' => Region::NtscK,+ b'W' => Region::NtscT,+ _ => Region::Unknown,+ }+ }++ pub fn short(self) -> &'static str {+ match self {+ Region::NtscU => "NTSC-U",+ Region::NtscJ => "NTSC-J",+ Region::Pal => "PAL",+ Region::NtscK => "NTSC-K",+ Region::NtscT => "NTSC-T",+ Region::Unknown => "??",+ }+ }+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+pub enum Platform {+ Gcn,+ Wii,+}++impl Platform {+ pub fn short(self) -> &'static str {+ match self {+ Platform::Gcn => "GCN",+ Platform::Wii => "Wii",+ }+ }+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]+pub enum Format {+ Iso,+ Rvz,+ Zip,+}++impl Format {+ pub fn from_path(path: &Path) -> Option<Self> {+ let ext = path.extension()?.to_str()?.to_ascii_lowercase();+ match ext.as_str() {+ "iso" => Some(Format::Iso),+ "rvz" => Some(Format::Rvz),+ "zip" => Some(Format::Zip),+ _ => None,+ }+ }++ pub fn short(self) -> &'static str {+ match self {+ Format::Iso => "ISO",+ Format::Rvz => "RVZ",+ Format::Zip => "ZIP",+ }+ }+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]+#[serde(rename_all = "lowercase")]+pub enum CpuMode {+ #[default]+ Jit,+ Interpreter,+}++impl CpuMode {+ pub fn label(self) -> &'static str {+ match self {+ CpuMode::Jit => "JIT",+ CpuMode::Interpreter => "Interpreter",+ }+ }+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]+#[serde(rename_all = "lowercase")]+pub enum ThemePreference {+ #[default]+ System,+ Light,+ Dark,+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct Game {+ pub path: PathBuf,+ pub file_name: String,+ pub game_id: String,+ pub maker_code: String,+ pub disc_id: u8,+ pub title: String,+ pub region: Region,+ pub platform: Platform,+ pub format: Format,+ pub banner: Option<Arc<BannerData>>,+ #[serde(skip)]+ pub title_lc: String,+ #[serde(skip)]+ pub file_name_lc: String,+ #[serde(skip)]+ pub game_id_lc: String,+ #[serde(skip, default)]+ pub banner_handle: Arc<OnceLock<Handle>>,+}++impl Game {+ pub fn from_dvd(path: &Path, dvd: &dyn Dvd, format: Format) -> Self {+ let hdr = dvd.header();+ let title = self::decode_cstring(&hdr.game_name);+ let game_id = String::from_utf8_lossy(&hdr.game_code).into_owned();+ let maker_code = String::from_utf8_lossy(&hdr.maker_code).into_owned();+ let file_name = path.file_name().and_then(|s| s.to_str()).unwrap_or("").to_owned();++ let region = Region::from_game_code(hdr.game_code);+ let platform = if hdr.is_wii() { Platform::Wii } else { Platform::Gcn };+ let banner = image::banner::extract(dvd).map(BannerData::from).map(Arc::new);++ let title_lc = title.to_lowercase();+ let file_name_lc = file_name.to_lowercase();+ let game_id_lc = game_id.to_lowercase();++ Game {+ path: path.to_owned(),+ file_name,+ game_id,+ maker_code,+ disc_id: hdr.disk_id,+ title,+ region,+ platform,+ format,+ banner,+ title_lc,+ file_name_lc,+ game_id_lc,+ banner_handle: Arc::new(OnceLock::new()),+ }+ }++ pub fn matches_lc(&self, query: &str) -> bool {+ if query.is_empty() {+ return true;+ }++ self.title_lc.contains(query) || self.file_name_lc.contains(query) || self.game_id_lc.contains(query)+ }++ pub fn rehydrate_keys(&mut self) {+ if self.title_lc.is_empty() {+ self.title_lc = self.title.to_lowercase();+ }++ if self.file_name_lc.is_empty() {+ self.file_name_lc = self.file_name.to_lowercase();+ }++ if self.game_id_lc.is_empty() {+ self.game_id_lc = self.game_id.to_lowercase();+ }+ }++ pub fn banner_handle(&self) -> Option<Handle> {+ let banner = self.banner.as_ref()?;+ let handle = self+ .banner_handle+ .get_or_init(|| Handle::from_rgba(banner.width, banner.height, banner.rgba.clone()));+ Some(handle.clone())+ }+}++fn decode_cstring(bytes: &[u8]) -> String {+ let end = bytes.iter().position(|&b| b == 0).unwrap_or(bytes.len());+ String::from_utf8_lossy(&bytes[..end]).trim().to_owned()+}diff --git a/crates/app/src/library.rs b/crates/app/src/library.rsnew file mode 100644index 0000000..21fd353--- /dev/null+++ b/crates/app/src/library.rs@@ -0,0 +1,146 @@+use std::panic::AssertUnwindSafe;+use std::path::{Path, PathBuf};++use futures::channel::mpsc;+use futures::stream::Stream;+use walkdir::WalkDir;++use crate::cache::{CacheEntry, FileFingerprint, LibraryCache};+use crate::game::{Format, Game};++#[derive(Debug, Clone)]+pub enum ScanProgress {+ Started { cached: Vec<Game>, pending: usize },+ Loaded(Box<Game>),+ Finished(Box<LibraryCache>),+ Error(String),+}++pub fn scan_library_stream(+ roots: Vec<PathBuf>,+ prior: LibraryCache,+) -> impl Stream<Item = ScanProgress> + Send + 'static {+ let (tx, rx) = mpsc::unbounded();+ tokio::spawn(self::run_scan(roots, prior, tx));+ rx+}++async fn run_scan(roots: Vec<PathBuf>, prior: LibraryCache, tx: mpsc::UnboundedSender<ScanProgress>) {+ let enumerated = match tokio::task::spawn_blocking(move || self::enumerate_many(&roots)).await {+ Ok(Ok(v)) => v,+ Ok(Err(err)) => {+ let _ = tx.unbounded_send(ScanProgress::Error(err));+ return;+ }+ Err(err) => {+ let _ = tx.unbounded_send(ScanProgress::Error(err.to_string()));+ return;+ }+ };++ let mut cache = LibraryCache::default();+ let mut cached_games: Vec<Game> = Vec::new();+ let mut todo: Vec<(PathBuf, Format, FileFingerprint)> = Vec::new();++ for (path, format, fp) in enumerated {+ match prior.entries.get(&path) {+ Some(entry) if entry.fingerprint == fp => {+ let game = entry.game.clone();+ cache.entries.insert(+ path.clone(),+ CacheEntry {+ fingerprint: fp,+ game: game.clone(),+ },+ );+ cached_games.push(game);+ }+ _ => todo.push((path, format, fp)),+ }+ }++ let _ = tx.unbounded_send(ScanProgress::Started {+ cached: cached_games,+ pending: todo.len(),+ });++ for (path, format, fp) in todo {+ let path_for_task = path.clone();+ let join = tokio::task::spawn_blocking(move || {+ tracing::info!(path = %path_for_task.display(), "scanning");+ self::load_one(&path_for_task, format).map(|game| (path_for_task, fp, game))+ })+ .await;++ let (path, fp, game) = match join {+ Ok(Ok(triple)) => triple,+ Ok(Err(err)) => {+ tracing::warn!(path = %path.display(), %err, "skip file");+ continue;+ }+ Err(err) => {+ tracing::warn!(?err, path = %path.display(), "scanner task panicked");+ continue;+ }+ };++ cache.entries.insert(+ path,+ CacheEntry {+ fingerprint: fp,+ game: game.clone(),+ },+ );+ if tx.unbounded_send(ScanProgress::Loaded(Box::new(game))).is_err() {+ return;+ }+ }++ let _ = tx.unbounded_send(ScanProgress::Finished(Box::new(cache)));+}++fn enumerate_many(roots: &[PathBuf]) -> Result<Vec<(PathBuf, Format, FileFingerprint)>, String> {+ use std::collections::HashSet;++ let mut canonical_roots: Vec<PathBuf> = Vec::with_capacity(roots.len());+ let mut seen_roots: HashSet<PathBuf> = HashSet::new();+ for root in roots {+ if !root.exists() {+ tracing::warn!(path = %root.display(), "library path does not exist; skipping");+ continue;+ }++ let canonical = std::fs::canonicalize(root).unwrap_or_else(|_| root.clone());+ if seen_roots.insert(canonical.clone()) {+ canonical_roots.push(canonical);+ }+ }++ let mut out = Vec::new();+ for root in &canonical_roots {+ for entry in WalkDir::new(root).max_depth(2).into_iter().filter_map(Result::ok) {+ if !entry.file_type().is_file() {+ continue;+ }++ let path = entry.into_path();+ let Some(format) = Format::from_path(&path) else {+ continue;+ };+ let Some(fp) = FileFingerprint::from_path(&path) else {+ continue;+ };+ out.push((path, format, fp));+ }+ }+ Ok(out)+}++fn load_one(path: &Path, format: Format) -> Result<Game, String> {+ let data = std::fs::read(path).map_err(|e| e.to_string())?;+ let result = std::panic::catch_unwind(AssertUnwindSafe(|| {+ let dvd = image::load_dvd(data);+ Game::from_dvd(path, dvd.as_ref(), format)+ }));+ result.map_err(|_| "image::load_dvd panicked".to_owned())+}diff --git a/crates/app/src/main.rs b/crates/app/src/main.rsnew file mode 100644index 0000000..132f9ee--- /dev/null+++ b/crates/app/src/main.rs@@ -0,0 +1,40 @@+mod app;+mod cache;+mod config;+mod game;+mod library;+mod theme;+mod widgets;++use std::path::PathBuf;++use clap::Parser;+use tracing_subscriber::EnvFilter;++#[derive(Parser, Debug, Clone)]+#[command(version, about = "Gecko: A humble GameCube/Wii emulator")]+struct Args {+ #[arg(long)]+ gcn: Option<PathBuf>,+ #[arg(long)]+ wii: Option<PathBuf>,+}++fn main() -> iced::Result {+ tracing_subscriber::fmt()+ .with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")))+ .init();++ let args = Args::parse();++ iced::application(+ move || app::App::new(args.gcn.clone(), args.wii.clone()),+ app::App::update,+ app::App::view,+ )+ .title(app::App::title)+ .theme(app::App::theme)+ .subscription(app::App::subscription)+ .window_size((1100.0, 720.0))+ .run()+}diff --git a/crates/app/src/theme.rs b/crates/app/src/theme.rsnew file mode 100644index 0000000..8fac2fc--- /dev/null+++ b/crates/app/src/theme.rs@@ -0,0 +1,76 @@+use iced::theme::Mode;+use iced::{Color, Theme};++#[derive(Debug, Clone, Copy)]+pub struct Palette {+ pub bg: Color,+ pub bg_2: Color,+ pub surface: Color,+ pub surface_2: Color,+ pub border: Color,+ pub border_2: Color,+ pub text: Color,+ pub text_dim: Color,+ pub text_mute: Color,+ pub accent: Color,+ pub purple: Color,+ pub is_dark: bool,+}++const fn rgb(r: u8, g: u8, b: u8) -> Color {+ Color::from_rgb(r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0)+}++impl Palette {+ pub const LIGHT: Self = Self {+ bg: self::rgb(0xff, 0xff, 0xff),+ bg_2: self::rgb(0xfa, 0xfa, 0xfa),+ surface: self::rgb(0xf4, 0xf4, 0xf5),+ surface_2: self::rgb(0xe4, 0xe4, 0xe7),+ border: self::rgb(0xe4, 0xe4, 0xe7),+ border_2: self::rgb(0xd4, 0xd4, 0xd8),+ text: self::rgb(0x18, 0x18, 0x1b),+ text_dim: self::rgb(0x52, 0x52, 0x5b),+ text_mute: self::rgb(0xa1, 0xa1, 0xaa),+ accent: self::rgb(0x22, 0xc5, 0x5e),+ purple: self::rgb(0xa8, 0x55, 0xf7),+ is_dark: false,+ };++ pub const DARK: Self = Self {+ bg: self::rgb(0x0a, 0x0a, 0x0a),+ bg_2: self::rgb(0x14, 0x14, 0x14),+ surface: self::rgb(0x1c, 0x1c, 0x1c),+ surface_2: self::rgb(0x26, 0x26, 0x26),+ border: self::rgb(0x26, 0x26, 0x26),+ border_2: self::rgb(0x3f, 0x3f, 0x46),+ text: self::rgb(0xfa, 0xfa, 0xfa),+ text_dim: self::rgb(0xa1, 0xa1, 0xaa),+ text_mute: self::rgb(0x71, 0x71, 0x7a),+ accent: self::rgb(0x22, 0xc5, 0x5e),+ purple: self::rgb(0xb9, 0x6d, 0xff),+ is_dark: true,+ };++ pub fn for_mode(mode: Mode) -> Self {+ match mode {+ Mode::Dark => Self::DARK,+ Mode::None | Mode::Light => Self::LIGHT,+ }+ }+}++pub fn theme(palette: &Palette) -> Theme {+ let name = if palette.is_dark { "Gecko Dark" } else { "Gecko Light" };+ Theme::custom(+ name.to_owned(),+ iced::theme::Palette {+ background: palette.bg,+ text: palette.text,+ primary: palette.accent,+ success: palette.accent,+ warning: palette.purple,+ danger: palette.purple,+ },+ )+}diff --git a/crates/app/src/widgets.rs b/crates/app/src/widgets.rsnew file mode 100644index 0000000..e7c083d--- /dev/null+++ b/crates/app/src/widgets.rs@@ -0,0 +1,6 @@+pub mod badge;+pub mod cover;+pub mod game_row;+pub mod menubar;+pub mod search_bar;+pub mod statusbar;diff --git a/crates/app/src/widgets/badge.rs b/crates/app/src/widgets/badge.rsnew file mode 100644index 0000000..a86cb5d--- /dev/null+++ b/crates/app/src/widgets/badge.rs@@ -0,0 +1,63 @@+use iced::widget::{container, row, text};+use iced::{Alignment, Background, Border, Color, Element, Padding};++use crate::game::{Format, Platform, Region};+use crate::theme::Palette;++pub fn region_badge<'a, Message: 'a>(palette: &Palette, region: Region) -> Element<'a, Message> {+ let color = palette.accent;+ row![+ self::dot_marker(color),+ text(region.short().to_owned()).size(11).color(color)+ ]+ .spacing(6)+ .align_y(Alignment::Center)+ .into()+}++pub fn platform_badge<'a, Message: 'a>(palette: &Palette, platform: Platform) -> Element<'a, Message> {+ let (text_color, bg_color) = match platform {+ Platform::Gcn => {+ let tinted = Color {+ a: 0.20,+ ..palette.purple+ };+ (palette.purple, tinted)+ }+ Platform::Wii => (Color::from_rgb(0.10, 0.10, 0.12), Color::WHITE),+ };+ self::pill(platform.short(), text_color, bg_color)+}++pub fn format_badge<'a, Message: 'a>(palette: &Palette, format: Format) -> Element<'a, Message> {+ text(format.short().to_owned()).size(11).color(palette.text_mute).into()+}++fn pill<'a, Message: 'a>(label: &str, text_color: Color, bg_color: Color) -> Element<'a, Message> {+ container(text(label.to_owned()).size(10).color(text_color))+ .padding(Padding::from([2, 7]))+ .style(move |_| container::Style {+ background: Some(Background::Color(bg_color)),+ border: Border {+ radius: 4.0.into(),+ ..Border::default()+ },+ ..container::Style::default()+ })+ .into()+}++fn dot_marker<'a, Message: 'a>(color: Color) -> Element<'a, Message> {+ container(text(""))+ .width(6)+ .height(6)+ .style(move |_| container::Style {+ background: Some(Background::Color(color)),+ border: Border {+ radius: 3.0.into(),+ ..Border::default()+ },+ ..container::Style::default()+ })+ .into()+}diff --git a/crates/app/src/widgets/cover.rs b/crates/app/src/widgets/cover.rsnew file mode 100644index 0000000..47fd91d--- /dev/null+++ b/crates/app/src/widgets/cover.rs@@ -0,0 +1,45 @@+use iced::alignment::{Horizontal, Vertical};+use iced::widget::{container, image, text};+use iced::{Background, Border, ContentFit, Element, Length};++use crate::game::Game;+use crate::theme::Palette;++const COVER_WIDTH: f32 = 96.0;+const COVER_HEIGHT: f32 = 32.0;++pub fn cover<'a, Message: 'a>(palette: &Palette, game: &Game) -> Element<'a, Message> {+ if let Some(handle) = game.banner_handle() {+ return image::Image::new(handle)+ .content_fit(ContentFit::Contain)+ .width(Length::Fixed(COVER_WIDTH))+ .height(Length::Fixed(COVER_HEIGHT))+ .into();+ }++ let letter = game+ .title+ .chars()+ .find(|c| c.is_alphanumeric())+ .map(|c| c.to_ascii_uppercase())+ .unwrap_or('?')+ .to_string();+ let bg = palette.surface;+ let border = palette.border;++ container(text(letter).size(18).color(palette.text_dim))+ .width(Length::Fixed(COVER_WIDTH))+ .height(Length::Fixed(COVER_HEIGHT))+ .align_x(Horizontal::Center)+ .align_y(Vertical::Center)+ .style(move |_| container::Style {+ background: Some(Background::Color(bg)),+ border: Border {+ radius: 6.0.into(),+ width: 1.0,+ color: border,+ },+ ..container::Style::default()+ })+ .into()+}diff --git a/crates/app/src/widgets/game_row.rs b/crates/app/src/widgets/game_row.rsnew file mode 100644index 0000000..6f12a08--- /dev/null+++ b/crates/app/src/widgets/game_row.rs@@ -0,0 +1,87 @@+use iced::alignment::Horizontal;+use iced::widget::{button, column, container, row, text};+use iced::{Alignment, Background, Border, Color, Element, Length, Padding};++use crate::app::Message;+use crate::game::Game;+use crate::theme::Palette;+use crate::widgets::{badge, cover};++const REGION_COL_WIDTH: f32 = 80.0;+const PLATFORM_COL_WIDTH: f32 = 48.0;+const FORMAT_COL_WIDTH: f32 = 40.0;++pub fn game_row<'a>(palette: &Palette, index: usize, game: &'a Game) -> Element<'a, Message> {+ let disc_marker = if game.disc_id > 0 {+ format!(" · disc {}", game.disc_id + 1)+ } else {+ String::new()+ };+ let meta = format!(+ "{} / {}{} · {}",+ game.game_id, game.maker_code, disc_marker, game.file_name+ );++ let info = column![+ text(&game.title).size(16).color(palette.text),+ text(meta).size(11).color(palette.text_mute),+ ]+ .spacing(3);++ let body = row![+ cover::cover(palette, game),+ info.width(Length::Fill),+ container(badge::region_badge(palette, game.region))+ .width(REGION_COL_WIDTH)+ .align_x(Horizontal::Center),+ container(badge::platform_badge(palette, game.platform))+ .width(PLATFORM_COL_WIDTH)+ .align_x(Horizontal::Center),+ container(badge::format_badge(palette, game.format))+ .width(FORMAT_COL_WIDTH)+ .align_x(Horizontal::Center),+ ]+ .spacing(16)+ .align_y(Alignment::Center);++ let hover_bg = palette.surface;+ let text_color = palette.text;+ button(body)+ .on_press(Message::GameClicked(index))+ .padding(Padding::from([10, 12]))+ .width(Length::Fill)+ .style(move |_, status| {+ let bg = match status {+ button::Status::Hovered | button::Status::Pressed => hover_bg,+ _ => Color::TRANSPARENT,+ };+ button::Style {+ background: Some(Background::Color(bg)),+ text_color,+ border: Border {+ radius: 0.0.into(),+ width: 0.0,+ color: Color::TRANSPARENT,+ },+ ..button::Style::default()+ }+ })+ .into()+}++pub fn empty_state<'a>(palette: &Palette, msg: &'a str, hint: &'a str) -> Element<'a, Message> {+ container(+ column![+ text(msg).size(20).color(palette.text_dim),+ text(hint).size(12).color(palette.text_mute),+ ]+ .spacing(8)+ .align_x(Alignment::Center),+ )+ .width(Length::Fill)+ .height(Length::Fill)+ .center_x(Length::Fill)+ .center_y(Length::Fill)+ .padding(48)+ .into()+}diff --git a/crates/app/src/widgets/menubar.rs b/crates/app/src/widgets/menubar.rsnew file mode 100644index 0000000..4fc97d5--- /dev/null+++ b/crates/app/src/widgets/menubar.rs@@ -0,0 +1,248 @@+use iced::widget::{button, container, row, text};+use iced::{Background, Border, Color, Element, Length, Padding};+use iced_aw::menu::{self, Item, Menu, MenuBar};++use crate::app::Message;+use crate::game::{CpuMode, Platform, ThemePreference};+use crate::theme::Palette;++pub fn menubar(palette: &Palette, cpu: CpuMode, theme_pref: ThemePreference) -> Element<'static, Message> {+ let bar_bg = palette.bg_2;+ let border = palette.border;+ let border_2 = palette.border_2;+ let surface = palette.surface;+ let surface_2 = palette.surface_2;+ let bar = MenuBar::new(vec![+ Item::with_menu(self::top_label(palette, "File"), self::file_menu(palette)),+ Item::with_menu(+ self::top_label(palette, "Settings"),+ self::settings_menu(palette, cpu, theme_pref),+ ),+ Item::with_menu(self::top_label(palette, "About"), self::about_menu(palette)),+ ])+ .draw_path(menu::DrawPath::Backdrop)+ .style(move |_: &iced::Theme, _status| menu::Style {+ bar_background: Background::Color(bar_bg),+ bar_border: Border {+ color: border,+ width: 0.0,+ radius: 0.0.into(),+ },+ bar_shadow: iced::Shadow::default(),+ menu_background: Background::Color(surface),+ menu_border: Border {+ color: border_2,+ width: 1.0,+ radius: 8.0.into(),+ },+ menu_shadow: iced::Shadow::default(),+ path: Background::Color(surface_2),+ path_border: Border {+ radius: 0.0.into(),+ ..Border::default()+ },+ });++ container(bar)+ .width(Length::Fill)+ .height(30)+ .padding(Padding {+ top: 0.0,+ right: 6.0,+ bottom: 0.0,+ left: 6.0,+ })+ .style(move |_| container::Style {+ background: Some(Background::Color(bar_bg)),+ border: Border {+ color: border,+ width: 1.0,+ radius: 0.0.into(),+ },+ ..container::Style::default()+ })+ .into()+}++fn top_label(palette: &Palette, label: &'static str) -> Element<'static, Message> {+ let dim = palette.text_dim;+ let text_color = palette.text;+ let hover = palette.surface;+ button(text(label).size(13).color(dim))+ .padding(Padding {+ top: 6.0,+ right: 11.0,+ bottom: 6.0,+ left: 11.0,+ })+ .style(move |_, status| self::top_button_style(status, hover, text_color))+ .into()+}++fn top_button_style(status: button::Status, hover: Color, text_color: Color) -> button::Style {+ let bg = match status {+ button::Status::Hovered | button::Status::Pressed => hover,+ _ => Color::TRANSPARENT,+ };+ button::Style {+ background: Some(Background::Color(bg)),+ text_color,+ border: Border {+ color: Color::TRANSPARENT,+ width: 0.0,+ radius: 6.0.into(),+ },+ ..button::Style::default()+ }+}++fn menu_item(palette: &Palette, label: &'static str, msg: Message, checked: Option<bool>) -> Element<'static, Message> {+ let text_color = palette.text;+ let hover = palette.surface_2;+ let (content, left_pad): (iced::widget::Row<'static, Message>, f32) = match checked {+ Some(is_on) => {+ let mark = if is_on { "✓" } else { " " };+ let r = row![+ text(mark).size(13).color(palette.accent).width(14),+ text(label).size(13).color(text_color),+ ]+ .spacing(4);+ (r, 10.0)+ }+ None => (row![text(label).size(13).color(text_color)], 14.0),+ };++ button(content.width(Length::Fill).align_y(iced::Alignment::Center))+ .width(Length::Fill)+ .padding(Padding {+ top: 6.0,+ right: 14.0,+ bottom: 6.0,+ left: left_pad,+ })+ .on_press(msg)+ .style(move |_, status| self::menu_item_style(status, hover, text_color))+ .into()+}++fn menu_item_style(status: button::Status, hover: Color, text_color: Color) -> button::Style {+ let bg = match status {+ button::Status::Hovered | button::Status::Pressed => hover,+ _ => Color::TRANSPARENT,+ };+ button::Style {+ background: Some(Background::Color(bg)),+ text_color,+ border: Border {+ color: Color::TRANSPARENT,+ width: 0.0,+ radius: 4.0.into(),+ },+ ..button::Style::default()+ }+}++fn separator(palette: &Palette) -> Element<'static, Message> {+ let color = palette.border;+ container(text(""))+ .width(Length::Fill)+ .height(1)+ .padding(Padding::from([4, 0]))+ .style(move |_| container::Style {+ background: Some(Background::Color(color)),+ ..container::Style::default()+ })+ .into()+}++fn section_header(palette: &Palette, label: &'static str) -> Element<'static, Message> {+ container(text(label).size(10).color(palette.text_mute))+ .width(Length::Fill)+ .padding(Padding {+ top: 6.0,+ right: 14.0,+ bottom: 2.0,+ left: 14.0,+ })+ .into()+}++fn file_menu(palette: &Palette) -> Menu<'static, Message, iced::Theme, iced::Renderer> {+ Menu::new(vec![+ Item::new(self::menu_item(+ palette,+ "Set GameCube Folder…",+ Message::MenuChooseLibrary(Platform::Gcn),+ None,+ )),+ Item::new(self::menu_item(+ palette,+ "Set Wii Folder…",+ Message::MenuChooseLibrary(Platform::Wii),+ None,+ )),+ Item::new(self::menu_item(palette, "Rescan", Message::MenuRescan, None)),+ Item::new(self::separator(palette)),+ Item::new(self::menu_item(palette, "Quit", Message::MenuQuit, None)),+ ])+ .max_width(240.0)+ .offset(4.0)+ .spacing(2.0)+}++fn settings_menu(+ palette: &Palette,+ cpu: CpuMode,+ theme_pref: ThemePreference,+) -> Menu<'static, Message, iced::Theme, iced::Renderer> {+ Menu::new(vec![+ Item::new(self::section_header(palette, "Execution Engine")),+ Item::new(self::menu_item(+ palette,+ "JIT (Recompiler)",+ Message::MenuToggleCpu(CpuMode::Jit),+ Some(cpu == CpuMode::Jit),+ )),+ Item::new(self::menu_item(+ palette,+ "Interpreter",+ Message::MenuToggleCpu(CpuMode::Interpreter),+ Some(cpu == CpuMode::Interpreter),+ )),+ Item::new(self::separator(palette)),+ Item::new(self::section_header(palette, "Theme")),+ Item::new(self::menu_item(+ palette,+ "System",+ Message::MenuSetTheme(ThemePreference::System),+ Some(theme_pref == ThemePreference::System),+ )),+ Item::new(self::menu_item(+ palette,+ "Light",+ Message::MenuSetTheme(ThemePreference::Light),+ Some(theme_pref == ThemePreference::Light),+ )),+ Item::new(self::menu_item(+ palette,+ "Dark",+ Message::MenuSetTheme(ThemePreference::Dark),+ Some(theme_pref == ThemePreference::Dark),+ )),+ ])+ .max_width(240.0)+ .offset(4.0)+ .spacing(2.0)+}++fn about_menu(palette: &Palette) -> Menu<'static, Message, iced::Theme, iced::Renderer> {+ Menu::new(vec![Item::new(self::menu_item(+ palette,+ "About Gecko",+ Message::MenuAbout,+ None,+ ))])+ .max_width(200.0)+ .offset(4.0)+ .spacing(2.0)+}diff --git a/crates/app/src/widgets/search_bar.rs b/crates/app/src/widgets/search_bar.rsnew file mode 100644index 0000000..f8ba35e--- /dev/null+++ b/crates/app/src/widgets/search_bar.rs@@ -0,0 +1,41 @@+use iced::widget::{container, text_input};+use iced::{Background, Border, Element, Length, Padding};++use crate::app::Message;+use crate::theme::Palette;++pub fn search_bar<'a>(palette: &Palette, value: &'a str) -> Element<'a, Message> {+ let bg = palette.surface;+ let border = palette.border;+ let icon = palette.text_mute;+ let placeholder = palette.text_mute;+ let value_color = palette.text;+ let selection = palette.accent;++ let input = text_input("Search games", value)+ .on_input(Message::SearchChanged)+ .padding(Padding::from([8, 12]))+ .size(14)+ .style(move |_, _status| text_input::Style {+ background: Background::Color(bg),+ border: Border {+ color: border,+ width: 1.0,+ radius: 8.0.into(),+ },+ icon,+ placeholder,+ value: value_color,+ selection,+ });++ container(input)+ .width(Length::Fill)+ .padding(Padding {+ top: 10.0,+ right: 10.0,+ bottom: 10.0,+ left: 10.0,+ })+ .into()+}diff --git a/crates/app/src/widgets/statusbar.rs b/crates/app/src/widgets/statusbar.rsnew file mode 100644index 0000000..0277c8d--- /dev/null+++ b/crates/app/src/widgets/statusbar.rs@@ -0,0 +1,64 @@+use iced::widget::{Space, container, row, text};+use iced::{Alignment, Background, Border, Element, Length, Padding};++use crate::app::Message;+use crate::game::CpuMode;+use crate::theme::Palette;++pub fn statusbar(palette: &Palette, cpu: CpuMode, count: usize, scanning: bool) -> Element<'static, Message> {+ let led_color = match cpu {+ CpuMode::Jit => palette.accent,+ CpuMode::Interpreter => palette.text_mute,+ };++ let led = container(text("")).width(6).height(6).style(move |_| container::Style {+ background: Some(Background::Color(led_color)),+ border: Border {+ radius: 3.0.into(),+ ..Border::default()+ },+ ..container::Style::default()+ });++ let left = row![led, text(cpu.label()).size(11).color(palette.text_dim)]+ .spacing(8)+ .align_y(Alignment::Center);++ let count_label = if count == 1 {+ "1 game".to_owned()+ } else {+ format!("{count} games")+ };+ let count_text = if scanning {+ format!("Scanning… · {count_label}")+ } else {+ count_label+ };+ let count_color = if scanning { palette.accent } else { palette.text_dim };+ let right = text(count_text).size(11).color(count_color);++ let bg = palette.bg_2;+ let border = palette.border;+ let text_color = palette.text_dim;++ container(+ row![left, Space::new().width(Length::Fill), right]+ .align_y(Alignment::Center)+ .width(Length::Fill)+ .height(Length::Fill),+ )+ .width(Length::Fill)+ .height(28)+ .padding(Padding::from([0, 12]))+ .style(move |_| container::Style {+ background: Some(Background::Color(bg)),+ border: Border {+ color: border,+ width: 1.0,+ radius: 0.0.into(),+ },+ text_color: Some(text_color),+ ..container::Style::default()+ })+ .into()+}diff --git a/crates/image/Cargo.toml b/crates/image/Cargo.tomlindex 12a89ef..5f7a7d6 100644--- a/crates/image/Cargo.toml+++ b/crates/image/Cargo.toml@@ -4,9 +4,10 @@ version = "0.1.0"edition = "2024"[features]-default = ["symbols", "rvz"]+default = ["symbols", "rvz", "banner"]symbols = ["dep:idb-rs", "dep:object"]rvz = ["dep:zstd"]+banner = [][dependencies]idb-rs = { git = "https://github.com/ioncodes/idb-rs.git", optional = true }@@ -14,3 +15,4 @@ object = { version = "0.36.7", default-features = false, features = ["elf", "reazerocopy = { version = "0.8.48", features = ["derive"] }zstd = { version = "0.13.3", optional = true }zip = { version = "8.5.1", default-features = false, features = ["deflate"] }+tracing = "0.1.44"diff --git a/crates/image/src/banner.rs b/crates/image/src/banner.rsnew file mode 100644index 0000000..ad5017f--- /dev/null+++ b/crates/image/src/banner.rs@@ -0,0 +1,517 @@+use crate::Dvd;+use crate::dvd::FstNode;++pub const GCN_BANNER_WIDTH: u32 = 96;+pub const GCN_BANNER_HEIGHT: u32 = 32;++const GCN_PIXELS_OFFSET: usize = 0x20;+const WII_IMET_MAGIC_OFFSET: usize = 0x40;+const WII_U8_OFFSET: usize = 0x600;+const U8_MAGIC: [u8; 4] = [0x55, 0xAA, 0x38, 0x2D];+const TPL_MAGIC: u32 = 0x0020_AF30;++#[derive(Debug, Clone)]+pub struct Banner {+ pub width: u32,+ pub height: u32,+ pub rgba: Vec<u8>,+}++pub fn extract(dvd: &dyn Dvd) -> Option<Banner> {+ let header = dvd.header();+ let fst_offset = header.offset_filesystem.get() as usize;+ let fst_size = header.filesystem_size.get() as usize;+ if fst_size == 0 || fst_offset == 0 {+ return None;+ }++ let mut fst_buf = vec![0u8; fst_size];+ dvd.read_disc_into(fst_offset, &mut fst_buf);+ let shift = if header.is_wii() { 2 } else { 0 };+ let root = FstNode::parse(&fst_buf, shift);+ let (file_offset, file_size) = self::find_file(&root, "opening.bnr")?;++ let mut buf = vec![0u8; file_size as usize];+ dvd.read_disc_into(file_offset as usize, &mut buf);++ if buf.len() >= 4 && (&buf[0..4] == b"BNR1" || &buf[0..4] == b"BNR2") {+ return self::decode_gcn(&buf);+ }++ if header.is_wii() {+ return self::decode_wii(&buf);+ }++ None+}++fn decode_gcn(buf: &[u8]) -> Option<Banner> {+ let w = GCN_BANNER_WIDTH as usize;+ let h = GCN_BANNER_HEIGHT as usize;+ let need = GCN_PIXELS_OFFSET + w * h * 2;+ if buf.len() < need {+ return None;+ }++ let rgba = self::decode_rgb5a3_tiled(&buf[GCN_PIXELS_OFFSET..], w, h)?;+ Some(Banner {+ width: GCN_BANNER_WIDTH,+ height: GCN_BANNER_HEIGHT,+ rgba,+ })+}++fn decode_wii(buf: &[u8]) -> Option<Banner> {+ if buf.len() < WII_U8_OFFSET + 32 || &buf[WII_IMET_MAGIC_OFFSET..WII_IMET_MAGIC_OFFSET + 4] != b"IMET" {+ tracing::warn!("wii banner: outer layout / IMET magic missing");+ return None;+ }++ let banner_bin = self::read_u8_file(&buf[WII_U8_OFFSET..], "banner.bin")?;+ let inner = self::strip_imd5_and_lz77(&banner_bin)?;+ let tpl = self::find_largest_tpl(&inner)?;+ self::decode_first_tpl_texture(&tpl)+}++fn strip_imd5_and_lz77(banner_bin: &[u8]) -> Option<Vec<u8>> {+ if banner_bin.len() < 0x28 || &banner_bin[0..4] != b"IMD5" {+ tracing::warn!("wii banner: missing IMD5 header");+ return None;+ }++ let lz77 = &banner_bin[0x20..];+ if lz77.len() < 8 || &lz77[0..4] != b"LZ77" {+ tracing::warn!("wii banner: missing LZ77 header");+ return None;+ }++ if lz77[4] != 0x10 {+ tracing::warn!(ctrl = lz77[4], "wii banner: unsupported LZ77 variant");+ return None;+ }++ let decompressed_size = (lz77[5] as usize) | ((lz77[6] as usize) << 8) | ((lz77[7] as usize) << 16);+ let inner = self::lz77_decompress(&lz77[8..], decompressed_size);+ if inner.is_none() {+ tracing::warn!("wii banner: LZ77 decompress failed");+ }++ inner+}++fn find_file(node: &FstNode, name: &str) -> Option<(u32, u32)> {+ match node {+ FstNode::File { name: n, offset, size } => n.eq_ignore_ascii_case(name).then_some((*offset, *size)),+ FstNode::Directory { children, .. } => children.iter().find_map(|c| self::find_file(c, name)),+ }+}++fn read_u8_file(archive: &[u8], name: &str) -> Option<Vec<u8>> {+ let (nodes_base, node_count, strings) = self::parse_u8_header(archive)?;++ for i in 1..node_count {+ let base = nodes_base + i * 12;+ if archive[base] != 0 {+ continue;+ }++ let name_off = self::u24_be(archive, base + 1)? as usize;+ let file_offset = self::u32_be(archive, base + 4)? as usize;+ let file_size = self::u32_be(archive, base + 8)? as usize;+ let entry_name = self::read_cstr_at(strings, name_off)?;+ if !entry_name.eq_ignore_ascii_case(name) {+ continue;+ }++ if file_offset + file_size > archive.len() {+ return None;+ }++ return Some(archive[file_offset..file_offset + file_size].to_vec());+ }++ None+}++fn find_largest_tpl(archive: &[u8]) -> Option<Vec<u8>> {+ let (nodes_base, node_count, strings) = self::parse_u8_header(archive)?;+ let mut best: Option<(usize, usize)> = None;++ for i in 1..node_count {+ let base = nodes_base + i * 12;+ if archive[base] != 0 {+ continue;+ }++ let name_off = self::u24_be(archive, base + 1)? as usize;+ let file_offset = self::u32_be(archive, base + 4)? as usize;+ let file_size = self::u32_be(archive, base + 8)? as usize;+ let entry_name = self::read_cstr_at(strings, name_off)?;++ if !entry_name.to_ascii_lowercase().ends_with(".tpl") {+ continue;+ }++ if best.map_or(true, |(_, sz)| file_size > sz) {+ best = Some((file_offset, file_size));+ }+ }++ let (off, sz) = best?;+ if off + sz > archive.len() {+ return None;+ }++ Some(archive[off..off + sz].to_vec())+}++fn parse_u8_header(archive: &[u8]) -> Option<(usize, usize, &[u8])> {+ if archive.len() < 0x20 || archive[0..4] != U8_MAGIC {+ return None;+ }++ let root_node_offset = self::u32_be(archive, 0x04)? as usize;+ let header_size = self::u32_be(archive, 0x08)? as usize;+ let nodes_base = root_node_offset;+ let node_count = self::u32_be(archive, nodes_base + 8)? as usize;+ if node_count == 0 {+ return None;+ }++ let nodes_end = nodes_base + node_count * 12;+ let strings_end = root_node_offset + header_size;+ if strings_end > archive.len() || nodes_end > strings_end {+ return None;+ }++ let strings = &archive[nodes_end..strings_end];+ Some((nodes_base, node_count, strings))+}++fn decode_first_tpl_texture(tpl: &[u8]) -> Option<Banner> {+ if tpl.len() < 12 {+ return None;+ }++ let magic = self::u32_be(tpl, 0)?;+ if magic != TPL_MAGIC {+ tracing::warn!(magic, "wii banner: bad TPL magic");+ return None;+ }++ let ntex = self::u32_be(tpl, 4)?;+ if ntex == 0 {+ return None;+ }++ let table_off = self::u32_be(tpl, 8)? as usize;+ let img_hdr_off = self::u32_be(tpl, table_off)? as usize;+ let palette_hdr_off = self::u32_be(tpl, table_off + 4)? as usize;+ if img_hdr_off + 0x24 > tpl.len() {+ return None;+ }++ let height = u16::from_be_bytes(tpl[img_hdr_off..img_hdr_off + 2].try_into().ok()?) as usize;+ let width = u16::from_be_bytes(tpl[img_hdr_off + 2..img_hdr_off + 4].try_into().ok()?) as usize;+ let format = self::u32_be(tpl, img_hdr_off + 4)?;+ let data_off = self::u32_be(tpl, img_hdr_off + 8)? as usize;++ if width == 0 || height == 0 || width > 4096 || height > 4096 || data_off >= tpl.len() {+ return None;+ }++ let pixels = &tpl[data_off..];+ let rgba = match format {+ 4 => self::decode_rgb565_tiled(pixels, width, height)?,+ 5 => self::decode_rgb5a3_tiled(pixels, width, height)?,+ 6 => self::decode_rgba8_tiled(pixels, width, height)?,+ 9 => {+ let palette = self::decode_palette(tpl, palette_hdr_off)?;+ self::decode_c8_tiled(pixels, width, height, &palette)?+ }+ other => {+ tracing::warn!(format = other, width, height, "wii banner: unsupported TPL format");+ return None;+ }+ };++ Some(Banner {+ width: width as u32,+ height: height as u32,+ rgba,+ })+}++fn decode_palette(tpl: &[u8], palette_hdr_off: usize) -> Option<Vec<(u8, u8, u8, u8)>> {+ if palette_hdr_off == 0 || palette_hdr_off + 0x0C > tpl.len() {+ tracing::warn!(palette_hdr_off, "wii banner: paletted texture without palette header");+ return None;+ }++ let entry_count = u16::from_be_bytes(tpl[palette_hdr_off..palette_hdr_off + 2].try_into().ok()?) as usize;+ let format = self::u32_be(tpl, palette_hdr_off + 4)?;+ let data_off = self::u32_be(tpl, palette_hdr_off + 8)? as usize;+ if data_off + entry_count * 2 > tpl.len() {+ return None;+ }++ let decode: fn(u16) -> (u8, u8, u8, u8) = match format {+ 0 => self::decode_ia8_pixel,+ 1 => self::decode_rgb565_pixel,+ 2 => self::decode_rgb5a3_pixel,+ other => {+ tracing::warn!(format = other, "wii banner: unsupported palette format");+ return None;+ }+ };++ let mut palette = vec![(0u8, 0u8, 0u8, 0u8); 256];+ for i in 0..entry_count.min(256) {+ let off = data_off + i * 2;+ let value = u16::from_be_bytes([tpl[off], tpl[off + 1]]);+ palette[i] = decode(value);+ }++ Some(palette)+}++fn decode_c8_tiled(indices: &[u8], width: usize, height: usize, palette: &[(u8, u8, u8, u8)]) -> Option<Vec<u8>> {+ const TILE_W: usize = 8;+ const TILE_H: usize = 4;++ let (tiles_x, tiles_y) = self::padded_tiles(width, height, TILE_W, TILE_H);+ let need = tiles_x * tiles_y * TILE_W * TILE_H;+ if indices.len() < need {+ return None;+ }++ let mut rgba = vec![0u8; width * height * 4];+ for ty in 0..tiles_y {+ for tx in 0..tiles_x {+ let tile_base = (ty * tiles_x + tx) * TILE_W * TILE_H;++ for py in 0..TILE_H {+ for px in 0..TILE_W {+ let dx = tx * TILE_W + px;+ let dy = ty * TILE_H + py;+ if dx >= width || dy >= height {+ continue;+ }++ let idx = indices[tile_base + py * TILE_W + px] as usize;+ let (r, g, b, a) = palette[idx];+ let dst = (dy * width + dx) * 4;++ rgba[dst] = r;+ rgba[dst + 1] = g;+ rgba[dst + 2] = b;+ rgba[dst + 3] = a;+ }+ }+ }+ }++ Some(rgba)+}++fn decode_ia8_pixel(value: u16) -> (u8, u8, u8, u8) {+ let intensity = (value >> 8) as u8;+ let alpha = (value & 0xFF) as u8;+ (intensity, intensity, intensity, alpha)+}++fn lz77_decompress(src: &[u8], expected_size: usize) -> Option<Vec<u8>> {+ let mut out = Vec::with_capacity(expected_size);+ let mut i = 0;++ while out.len() < expected_size && i < src.len() {+ let flags = src[i];+ i += 1;++ for bit in 0..8 {+ if out.len() >= expected_size {+ break;+ }++ if flags & (0x80 >> bit) == 0 {+ if i >= src.len() {+ return None;+ }++ out.push(src[i]);++ i += 1;+ } else {+ if i + 1 >= src.len() {+ return None;+ }++ let b0 = src[i];+ let b1 = src[i + 1];+ i += 2;++ let length = ((b0 >> 4) as usize) + 3;+ let offset = ((((b0 & 0xF) as usize) << 8) | (b1 as usize)) + 1;+ if offset > out.len() {+ return None;+ }++ for _ in 0..length {+ let v = out[out.len() - offset];+ out.push(v);+ }+ }+ }+ }++ if out.len() != expected_size {+ return None;+ }++ Some(out)+}++fn u32_be(buf: &[u8], off: usize) -> Option<u32> {+ let slice = buf.get(off..off + 4)?;+ Some(u32::from_be_bytes(slice.try_into().ok()?))+}++fn u24_be(buf: &[u8], off: usize) -> Option<u32> {+ let slice = buf.get(off..off + 3)?;+ Some(u32::from_be_bytes([0, slice[0], slice[1], slice[2]]))+}++fn read_cstr_at(buf: &[u8], off: usize) -> Option<&str> {+ let slice = buf.get(off..)?;+ let end = slice.iter().position(|&b| b == 0)?;+ std::str::from_utf8(&slice[..end]).ok()+}++fn padded_tiles(width: usize, height: usize, tile_w: usize, tile_h: usize) -> (usize, usize) {+ let pw = (width + tile_w - 1) & !(tile_w - 1);+ let ph = (height + tile_h - 1) & !(tile_h - 1);+ (pw / tile_w, ph / tile_h)+}++fn decode_rgb5a3_tiled(data: &[u8], width: usize, height: usize) -> Option<Vec<u8>> {+ self::decode_2bpp_tiled(data, width, height, self::decode_rgb5a3_pixel)+}++fn decode_rgb565_tiled(data: &[u8], width: usize, height: usize) -> Option<Vec<u8>> {+ self::decode_2bpp_tiled(data, width, height, self::decode_rgb565_pixel)+}++fn decode_2bpp_tiled<F>(data: &[u8], width: usize, height: usize, decode: F) -> Option<Vec<u8>>+where+ F: Fn(u16) -> (u8, u8, u8, u8),+{+ const TILE_W: usize = 4;+ const TILE_H: usize = 4;++ let (tiles_x, tiles_y) = self::padded_tiles(width, height, TILE_W, TILE_H);+ let need = tiles_x * tiles_y * TILE_W * TILE_H * 2;+ if data.len() < need {+ return None;+ }++ let mut rgba = vec![0u8; width * height * 4];+ for ty in 0..tiles_y {+ for tx in 0..tiles_x {+ let tile_base = (ty * tiles_x + tx) * TILE_W * TILE_H * 2;++ for py in 0..TILE_H {+ for px in 0..TILE_W {+ let dx = tx * TILE_W + px;+ let dy = ty * TILE_H + py;+ if dx >= width || dy >= height {+ continue;+ }++ let src = tile_base + (py * TILE_W + px) * 2;+ let pixel = u16::from_be_bytes([data[src], data[src + 1]]);+ let (r, g, b, a) = decode(pixel);+ let dst = (dy * width + dx) * 4;++ rgba[dst] = r;+ rgba[dst + 1] = g;+ rgba[dst + 2] = b;+ rgba[dst + 3] = a;+ }+ }+ }+ }++ Some(rgba)+}++fn decode_rgb5a3_pixel(value: u16) -> (u8, u8, u8, u8) {+ if value & 0x8000 != 0 {+ let r5 = ((value >> 10) & 0x1F) as u8;+ let g5 = ((value >> 5) & 0x1F) as u8;+ let b5 = (value & 0x1F) as u8;+ (+ (r5 << 3) | (r5 >> 2),+ (g5 << 3) | (g5 >> 2),+ (b5 << 3) | (b5 >> 2),+ 0xFF,+ )+ } else {+ let a3 = ((value >> 12) & 0x7) as u8;+ let r4 = ((value >> 8) & 0xF) as u8;+ let g4 = ((value >> 4) & 0xF) as u8;+ let b4 = (value & 0xF) as u8;+ let a = (a3 << 5) | (a3 << 2) | (a3 >> 1);+ ((r4 << 4) | r4, (g4 << 4) | g4, (b4 << 4) | b4, a)+ }+}++fn decode_rgb565_pixel(value: u16) -> (u8, u8, u8, u8) {+ let r5 = ((value >> 11) & 0x1F) as u8;+ let g6 = ((value >> 5) & 0x3F) as u8;+ let b5 = (value & 0x1F) as u8;+ let r = (r5 << 3) | (r5 >> 2);+ let g = (g6 << 2) | (g6 >> 4);+ let b = (b5 << 3) | (b5 >> 2);+ (r, g, b, 0xFF)+}++fn decode_rgba8_tiled(data: &[u8], width: usize, height: usize) -> Option<Vec<u8>> {+ const TILE_W: usize = 4;+ const TILE_H: usize = 4;++ let (tiles_x, tiles_y) = self::padded_tiles(width, height, TILE_W, TILE_H);+ let need = tiles_x * tiles_y * 64;+ if data.len() < need {+ return None;+ }++ let mut rgba = vec![0u8; width * height * 4];+ for ty in 0..tiles_y {+ for tx in 0..tiles_x {+ let tile_base = (ty * tiles_x + tx) * 64;+ for py in 0..TILE_H {+ for px in 0..TILE_W {+ let pix_idx = py * TILE_W + px;+ let ar_off = tile_base + pix_idx * 2;+ let gb_off = tile_base + 32 + pix_idx * 2;+ let a = data[ar_off];+ let r = data[ar_off + 1];+ let g = data[gb_off];+ let b = data[gb_off + 1];+ let dx = tx * TILE_W + px;+ let dy = ty * TILE_H + py;++ if dx < width && dy < height {+ let dst = (dy * width + dx) * 4;+ rgba[dst] = r;+ rgba[dst + 1] = g;+ rgba[dst + 2] = b;+ rgba[dst + 3] = a;+ }+ }+ }+ }+ }++ Some(rgba)+}diff --git a/crates/image/src/lib.rs b/crates/image/src/lib.rsindex cd09067..1795f93 100644--- a/crates/image/src/lib.rs+++ b/crates/image/src/lib.rs@@ -1,3 +1,5 @@+#[cfg(feature = "banner")]+pub mod banner;pub mod dol;pub mod dvd;pub mod iso;