Editor for papermario-dx mods
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial commit

Alex Bates 6b34e7c3

+11321
+2
.gitignore
··· 1 + /target 2 + /.direnv
+6
.reuse/dep5
··· 1 + Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 + 3 + Files: Cargo.lock flake.lock 4 + Copyright: 2026 Alex Bates <alex@bates64.com> 5 + License: AGPL-3.0-or-later 6 + Comment: Auto-generated lock files
+62
CONTRIBUTING.md
··· 1 + <!-- 2 + SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 3 + 4 + SPDX-License-Identifier: AGPL-3.0-or-later 5 + --> 6 + 7 + # Contributing 8 + 9 + Enter the dev shell with `nix develop` (or use [direnv](https://direnv.net/)), then: 10 + 11 + ```sh 12 + just run 13 + ``` 14 + 15 + ## Dependencies 16 + 17 + - Dependencies that could feasibly be used by multiple crates should go in the workspace `Cargo.toml`. 18 + - When adding a new dependency, ensure it is up to date. 19 + 20 + ## Formatting 21 + 22 + Run `just fmt` before committing. This formats code and adds 23 + [REUSE](https://reuse.software/)-compliant SPDX license headers to any new 24 + files, using your `git config user.name` and `git config user.email` as the 25 + copyright holder. 26 + 27 + If you contribute to an existing file, you may add your own 28 + `SPDX-FileCopyrightText` line alongside the existing one. 29 + 30 + ## Style 31 + 32 + - Check your code against `just check` and `just test`. 33 + - Try to follow the [Rust API Guidelines Checklist](https://rust-lang.github.io/api-guidelines/checklist.html). 34 + - Write unit tests for all public functions containing business logic, data transformations, or state management. They go in a `#[cfg(test)] mod tests` at the bottom of each file. GUI/rendering code does not require unit tests. 35 + - Write integration tests using `egui_kittest` for GUI code. Binary crates (like `kammy`) cannot use the `tests/` directory at the crate root because there is no library target to import. Instead, use a `src/tests.rs` module gated behind `#[cfg(test)]`, with submodules in `src/tests/` organized by feature (e.g. `src/tests/undo.rs`). Shared test utilities go in `src/tests.rs`. Library crates should use the standard `tests/` directory at the crate root. 36 + - Prefer module-level inner doc comments (`//!`) at the top of a file over outer doc comments (`///`) on the `mod` declaration. This keeps the documentation next to the code it describes. 37 + 38 + ## Error handling 39 + 40 + - The code should only panic if there is a bug in the code. User input should never cause a panic. 41 + - Use `thiserror` to validate user data and return errors. 42 + - Use `anyhow` to attach context to errors as they bubble up the stack. 43 + - Never ignore an error: either pass it on, or log it. 44 + - If a problem is recoverable, use `ka_log::warn!` and recover. 45 + 46 + Strive to encode code invariants and contracts in the type system as much as possible. [Parse, don't validate.](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/) If you can't enforce a contract in the type system, enforce them using `assert` and in documentation (if its part of a public API). 47 + 48 + ## Logging 49 + 50 + Use `tracing`, or, if a library isn't multithreaded, use `log`. 51 + 52 + - `error!` is for _unrecoverable_ problems. The program couldn't complete an operation. 53 + - Libraries should ideally not log error, but instead return Err in a Result. 54 + - `warn!` is for when you recover from an error. The operation completed, but it couldn't do exactly what it was asked to do. 55 + - Sometimes an `Err` is handled by logging it as a warning and then running some fallback code. 56 + - Warnings are also used for things that might be errors, but could be intended. 57 + - If data is lost, it is an error and not a warning. 58 + - `info!` should be used by application code to write interesting and rare things to the user. For instance, you might log that a file was saved to a specific path. 59 + - `debug!` is a level you opt-in to debug. These are logged when high-level, important operations are performed. 60 + - `trace!` is a last resort and is mostly for spam. If it generates a lot of continuous logging (e.g. `ui` function called every frame), it should go to trace. 61 + 62 + Use debug formatting `{:?}` in logs.
+5525
Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "ab_glyph" 7 + version = "0.2.32" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" 10 + dependencies = [ 11 + "ab_glyph_rasterizer", 12 + "owned_ttf_parser", 13 + ] 14 + 15 + [[package]] 16 + name = "ab_glyph_rasterizer" 17 + version = "0.1.10" 18 + source = "registry+https://github.com/rust-lang/crates.io-index" 19 + checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" 20 + 21 + [[package]] 22 + name = "accesskit" 23 + version = "0.21.1" 24 + source = "registry+https://github.com/rust-lang/crates.io-index" 25 + checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" 26 + dependencies = [ 27 + "enumn", 28 + "serde", 29 + ] 30 + 31 + [[package]] 32 + name = "accesskit_atspi_common" 33 + version = "0.14.2" 34 + source = "registry+https://github.com/rust-lang/crates.io-index" 35 + checksum = "890d241cf51fc784f0ac5ac34dfc847421f8d39da6c7c91a0fcc987db62a8267" 36 + dependencies = [ 37 + "accesskit", 38 + "accesskit_consumer 0.31.0", 39 + "atspi-common", 40 + "serde", 41 + "thiserror 1.0.69", 42 + "zvariant", 43 + ] 44 + 45 + [[package]] 46 + name = "accesskit_consumer" 47 + version = "0.30.1" 48 + source = "registry+https://github.com/rust-lang/crates.io-index" 49 + checksum = "bdd06f5fea9819250fffd4debf926709f3593ac22f8c1541a2573e5ee0ca01cd" 50 + dependencies = [ 51 + "accesskit", 52 + "hashbrown 0.15.5", 53 + ] 54 + 55 + [[package]] 56 + name = "accesskit_consumer" 57 + version = "0.31.0" 58 + source = "registry+https://github.com/rust-lang/crates.io-index" 59 + checksum = "db81010a6895d8707f9072e6ce98070579b43b717193d2614014abd5cb17dd43" 60 + dependencies = [ 61 + "accesskit", 62 + "hashbrown 0.15.5", 63 + ] 64 + 65 + [[package]] 66 + name = "accesskit_macos" 67 + version = "0.22.2" 68 + source = "registry+https://github.com/rust-lang/crates.io-index" 69 + checksum = "a0089e5c0ac0ca281e13ea374773898d9354cc28d15af9f0f7394d44a495b575" 70 + dependencies = [ 71 + "accesskit", 72 + "accesskit_consumer 0.31.0", 73 + "hashbrown 0.15.5", 74 + "objc2 0.5.2", 75 + "objc2-app-kit 0.2.2", 76 + "objc2-foundation 0.2.2", 77 + ] 78 + 79 + [[package]] 80 + name = "accesskit_unix" 81 + version = "0.17.2" 82 + source = "registry+https://github.com/rust-lang/crates.io-index" 83 + checksum = "301e55b39cfc15d9c48943ce5f572204a551646700d0e8efa424585f94fec528" 84 + dependencies = [ 85 + "accesskit", 86 + "accesskit_atspi_common", 87 + "async-channel", 88 + "async-executor", 89 + "async-task", 90 + "atspi", 91 + "futures-lite", 92 + "futures-util", 93 + "serde", 94 + "zbus", 95 + ] 96 + 97 + [[package]] 98 + name = "accesskit_windows" 99 + version = "0.29.2" 100 + source = "registry+https://github.com/rust-lang/crates.io-index" 101 + checksum = "d2d63dd5041e49c363d83f5419a896ecb074d309c414036f616dc0b04faca971" 102 + dependencies = [ 103 + "accesskit", 104 + "accesskit_consumer 0.31.0", 105 + "hashbrown 0.15.5", 106 + "static_assertions", 107 + "windows 0.61.3", 108 + "windows-core 0.61.2", 109 + ] 110 + 111 + [[package]] 112 + name = "accesskit_winit" 113 + version = "0.29.2" 114 + source = "registry+https://github.com/rust-lang/crates.io-index" 115 + checksum = "c8cfabe59d0eaca7412bfb1f70198dd31e3b0496fee7e15b066f9c36a1a140a0" 116 + dependencies = [ 117 + "accesskit", 118 + "accesskit_macos", 119 + "accesskit_unix", 120 + "accesskit_windows", 121 + "raw-window-handle", 122 + "winit", 123 + ] 124 + 125 + [[package]] 126 + name = "adler2" 127 + version = "2.0.1" 128 + source = "registry+https://github.com/rust-lang/crates.io-index" 129 + checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 130 + 131 + [[package]] 132 + name = "ahash" 133 + version = "0.8.12" 134 + source = "registry+https://github.com/rust-lang/crates.io-index" 135 + checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" 136 + dependencies = [ 137 + "cfg-if", 138 + "getrandom 0.3.4", 139 + "once_cell", 140 + "serde", 141 + "version_check", 142 + "zerocopy", 143 + ] 144 + 145 + [[package]] 146 + name = "aho-corasick" 147 + version = "1.1.4" 148 + source = "registry+https://github.com/rust-lang/crates.io-index" 149 + checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" 150 + dependencies = [ 151 + "memchr", 152 + ] 153 + 154 + [[package]] 155 + name = "android-activity" 156 + version = "0.6.0" 157 + source = "registry+https://github.com/rust-lang/crates.io-index" 158 + checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" 159 + dependencies = [ 160 + "android-properties", 161 + "bitflags 2.11.0", 162 + "cc", 163 + "cesu8", 164 + "jni", 165 + "jni-sys", 166 + "libc", 167 + "log", 168 + "ndk", 169 + "ndk-context", 170 + "ndk-sys", 171 + "num_enum", 172 + "thiserror 1.0.69", 173 + ] 174 + 175 + [[package]] 176 + name = "android-properties" 177 + version = "0.2.2" 178 + source = "registry+https://github.com/rust-lang/crates.io-index" 179 + checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" 180 + 181 + [[package]] 182 + name = "android_system_properties" 183 + version = "0.1.5" 184 + source = "registry+https://github.com/rust-lang/crates.io-index" 185 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 186 + dependencies = [ 187 + "libc", 188 + ] 189 + 190 + [[package]] 191 + name = "anyhow" 192 + version = "1.0.102" 193 + source = "registry+https://github.com/rust-lang/crates.io-index" 194 + checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" 195 + 196 + [[package]] 197 + name = "append-only-bytes" 198 + version = "0.1.12" 199 + source = "registry+https://github.com/rust-lang/crates.io-index" 200 + checksum = "ac436601d6bdde674a0d7fb593e829ffe7b3387c351b356dd20e2d40f5bf3ee5" 201 + 202 + [[package]] 203 + name = "arbitrary" 204 + version = "1.4.2" 205 + source = "registry+https://github.com/rust-lang/crates.io-index" 206 + checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" 207 + dependencies = [ 208 + "derive_arbitrary", 209 + ] 210 + 211 + [[package]] 212 + name = "arboard" 213 + version = "3.6.1" 214 + source = "registry+https://github.com/rust-lang/crates.io-index" 215 + checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" 216 + dependencies = [ 217 + "clipboard-win", 218 + "image", 219 + "log", 220 + "objc2 0.6.3", 221 + "objc2-app-kit 0.3.2", 222 + "objc2-core-foundation", 223 + "objc2-core-graphics", 224 + "objc2-foundation 0.3.2", 225 + "parking_lot", 226 + "percent-encoding", 227 + "windows-sys 0.60.2", 228 + "x11rb", 229 + ] 230 + 231 + [[package]] 232 + name = "arrayref" 233 + version = "0.3.9" 234 + source = "registry+https://github.com/rust-lang/crates.io-index" 235 + checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 236 + 237 + [[package]] 238 + name = "arrayvec" 239 + version = "0.7.6" 240 + source = "registry+https://github.com/rust-lang/crates.io-index" 241 + checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 242 + 243 + [[package]] 244 + name = "arref" 245 + version = "0.1.0" 246 + source = "registry+https://github.com/rust-lang/crates.io-index" 247 + checksum = "2ccd462b64c3c72f1be8305905a85d85403d768e8690c9b8bd3b9009a5761679" 248 + 249 + [[package]] 250 + name = "as-raw-xcb-connection" 251 + version = "1.0.1" 252 + source = "registry+https://github.com/rust-lang/crates.io-index" 253 + checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" 254 + 255 + [[package]] 256 + name = "ash" 257 + version = "0.38.0+1.3.281" 258 + source = "registry+https://github.com/rust-lang/crates.io-index" 259 + checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" 260 + dependencies = [ 261 + "libloading", 262 + ] 263 + 264 + [[package]] 265 + name = "async-broadcast" 266 + version = "0.7.2" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" 269 + dependencies = [ 270 + "event-listener", 271 + "event-listener-strategy", 272 + "futures-core", 273 + "pin-project-lite", 274 + ] 275 + 276 + [[package]] 277 + name = "async-channel" 278 + version = "2.5.0" 279 + source = "registry+https://github.com/rust-lang/crates.io-index" 280 + checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" 281 + dependencies = [ 282 + "concurrent-queue", 283 + "event-listener-strategy", 284 + "futures-core", 285 + "pin-project-lite", 286 + ] 287 + 288 + [[package]] 289 + name = "async-executor" 290 + version = "1.14.0" 291 + source = "registry+https://github.com/rust-lang/crates.io-index" 292 + checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" 293 + dependencies = [ 294 + "async-task", 295 + "concurrent-queue", 296 + "fastrand", 297 + "futures-lite", 298 + "pin-project-lite", 299 + "slab", 300 + ] 301 + 302 + [[package]] 303 + name = "async-io" 304 + version = "2.6.0" 305 + source = "registry+https://github.com/rust-lang/crates.io-index" 306 + checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" 307 + dependencies = [ 308 + "autocfg", 309 + "cfg-if", 310 + "concurrent-queue", 311 + "futures-io", 312 + "futures-lite", 313 + "parking", 314 + "polling", 315 + "rustix 1.1.3", 316 + "slab", 317 + "windows-sys 0.61.2", 318 + ] 319 + 320 + [[package]] 321 + name = "async-lock" 322 + version = "3.4.2" 323 + source = "registry+https://github.com/rust-lang/crates.io-index" 324 + checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" 325 + dependencies = [ 326 + "event-listener", 327 + "event-listener-strategy", 328 + "pin-project-lite", 329 + ] 330 + 331 + [[package]] 332 + name = "async-process" 333 + version = "2.5.0" 334 + source = "registry+https://github.com/rust-lang/crates.io-index" 335 + checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" 336 + dependencies = [ 337 + "async-channel", 338 + "async-io", 339 + "async-lock", 340 + "async-signal", 341 + "async-task", 342 + "blocking", 343 + "cfg-if", 344 + "event-listener", 345 + "futures-lite", 346 + "rustix 1.1.3", 347 + ] 348 + 349 + [[package]] 350 + name = "async-recursion" 351 + version = "1.1.1" 352 + source = "registry+https://github.com/rust-lang/crates.io-index" 353 + checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" 354 + dependencies = [ 355 + "proc-macro2", 356 + "quote", 357 + "syn 2.0.117", 358 + ] 359 + 360 + [[package]] 361 + name = "async-signal" 362 + version = "0.2.13" 363 + source = "registry+https://github.com/rust-lang/crates.io-index" 364 + checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" 365 + dependencies = [ 366 + "async-io", 367 + "async-lock", 368 + "atomic-waker", 369 + "cfg-if", 370 + "futures-core", 371 + "futures-io", 372 + "rustix 1.1.3", 373 + "signal-hook-registry", 374 + "slab", 375 + "windows-sys 0.61.2", 376 + ] 377 + 378 + [[package]] 379 + name = "async-task" 380 + version = "4.7.1" 381 + source = "registry+https://github.com/rust-lang/crates.io-index" 382 + checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" 383 + 384 + [[package]] 385 + name = "async-trait" 386 + version = "0.1.89" 387 + source = "registry+https://github.com/rust-lang/crates.io-index" 388 + checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" 389 + dependencies = [ 390 + "proc-macro2", 391 + "quote", 392 + "syn 2.0.117", 393 + ] 394 + 395 + [[package]] 396 + name = "atomic-polyfill" 397 + version = "1.0.3" 398 + source = "registry+https://github.com/rust-lang/crates.io-index" 399 + checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" 400 + dependencies = [ 401 + "critical-section", 402 + ] 403 + 404 + [[package]] 405 + name = "atomic-waker" 406 + version = "1.1.2" 407 + source = "registry+https://github.com/rust-lang/crates.io-index" 408 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 409 + 410 + [[package]] 411 + name = "atspi" 412 + version = "0.25.0" 413 + source = "registry+https://github.com/rust-lang/crates.io-index" 414 + checksum = "c83247582e7508838caf5f316c00791eee0e15c0bf743e6880585b867e16815c" 415 + dependencies = [ 416 + "atspi-common", 417 + "atspi-connection", 418 + "atspi-proxies", 419 + ] 420 + 421 + [[package]] 422 + name = "atspi-common" 423 + version = "0.9.0" 424 + source = "registry+https://github.com/rust-lang/crates.io-index" 425 + checksum = "33dfc05e7cdf90988a197803bf24f5788f94f7c94a69efa95683e8ffe76cfdfb" 426 + dependencies = [ 427 + "enumflags2", 428 + "serde", 429 + "static_assertions", 430 + "zbus", 431 + "zbus-lockstep", 432 + "zbus-lockstep-macros", 433 + "zbus_names", 434 + "zvariant", 435 + ] 436 + 437 + [[package]] 438 + name = "atspi-connection" 439 + version = "0.9.0" 440 + source = "registry+https://github.com/rust-lang/crates.io-index" 441 + checksum = "4193d51303d8332304056ae0004714256b46b6635a5c556109b319c0d3784938" 442 + dependencies = [ 443 + "atspi-common", 444 + "atspi-proxies", 445 + "futures-lite", 446 + "zbus", 447 + ] 448 + 449 + [[package]] 450 + name = "atspi-proxies" 451 + version = "0.9.0" 452 + source = "registry+https://github.com/rust-lang/crates.io-index" 453 + checksum = "d2eebcb9e7e76f26d0bcfd6f0295e1cd1e6f33bedbc5698a971db8dc43d7751c" 454 + dependencies = [ 455 + "atspi-common", 456 + "serde", 457 + "zbus", 458 + ] 459 + 460 + [[package]] 461 + name = "autocfg" 462 + version = "1.5.0" 463 + source = "registry+https://github.com/rust-lang/crates.io-index" 464 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 465 + 466 + [[package]] 467 + name = "bit-set" 468 + version = "0.8.0" 469 + source = "registry+https://github.com/rust-lang/crates.io-index" 470 + checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" 471 + dependencies = [ 472 + "bit-vec", 473 + ] 474 + 475 + [[package]] 476 + name = "bit-vec" 477 + version = "0.8.0" 478 + source = "registry+https://github.com/rust-lang/crates.io-index" 479 + checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" 480 + 481 + [[package]] 482 + name = "bitflags" 483 + version = "1.3.2" 484 + source = "registry+https://github.com/rust-lang/crates.io-index" 485 + checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 486 + 487 + [[package]] 488 + name = "bitflags" 489 + version = "2.11.0" 490 + source = "registry+https://github.com/rust-lang/crates.io-index" 491 + checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" 492 + 493 + [[package]] 494 + name = "bitmaps" 495 + version = "2.1.0" 496 + source = "registry+https://github.com/rust-lang/crates.io-index" 497 + checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" 498 + dependencies = [ 499 + "typenum", 500 + ] 501 + 502 + [[package]] 503 + name = "block" 504 + version = "0.1.6" 505 + source = "registry+https://github.com/rust-lang/crates.io-index" 506 + checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 507 + 508 + [[package]] 509 + name = "block-buffer" 510 + version = "0.10.4" 511 + source = "registry+https://github.com/rust-lang/crates.io-index" 512 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 513 + dependencies = [ 514 + "generic-array", 515 + ] 516 + 517 + [[package]] 518 + name = "block2" 519 + version = "0.5.1" 520 + source = "registry+https://github.com/rust-lang/crates.io-index" 521 + checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" 522 + dependencies = [ 523 + "objc2 0.5.2", 524 + ] 525 + 526 + [[package]] 527 + name = "blocking" 528 + version = "1.6.2" 529 + source = "registry+https://github.com/rust-lang/crates.io-index" 530 + checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" 531 + dependencies = [ 532 + "async-channel", 533 + "async-task", 534 + "futures-io", 535 + "futures-lite", 536 + "piper", 537 + ] 538 + 539 + [[package]] 540 + name = "bumpalo" 541 + version = "3.20.2" 542 + source = "registry+https://github.com/rust-lang/crates.io-index" 543 + checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" 544 + 545 + [[package]] 546 + name = "bytemuck" 547 + version = "1.25.0" 548 + source = "registry+https://github.com/rust-lang/crates.io-index" 549 + checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" 550 + dependencies = [ 551 + "bytemuck_derive", 552 + ] 553 + 554 + [[package]] 555 + name = "bytemuck_derive" 556 + version = "1.10.2" 557 + source = "registry+https://github.com/rust-lang/crates.io-index" 558 + checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" 559 + dependencies = [ 560 + "proc-macro2", 561 + "quote", 562 + "syn 2.0.117", 563 + ] 564 + 565 + [[package]] 566 + name = "byteorder" 567 + version = "1.5.0" 568 + source = "registry+https://github.com/rust-lang/crates.io-index" 569 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 570 + 571 + [[package]] 572 + name = "byteorder-lite" 573 + version = "0.1.0" 574 + source = "registry+https://github.com/rust-lang/crates.io-index" 575 + checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" 576 + 577 + [[package]] 578 + name = "bytes" 579 + version = "1.11.1" 580 + source = "registry+https://github.com/rust-lang/crates.io-index" 581 + checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" 582 + 583 + [[package]] 584 + name = "calloop" 585 + version = "0.13.0" 586 + source = "registry+https://github.com/rust-lang/crates.io-index" 587 + checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" 588 + dependencies = [ 589 + "bitflags 2.11.0", 590 + "log", 591 + "polling", 592 + "rustix 0.38.44", 593 + "slab", 594 + "thiserror 1.0.69", 595 + ] 596 + 597 + [[package]] 598 + name = "calloop" 599 + version = "0.14.4" 600 + source = "registry+https://github.com/rust-lang/crates.io-index" 601 + checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" 602 + dependencies = [ 603 + "bitflags 2.11.0", 604 + "polling", 605 + "rustix 1.1.3", 606 + "slab", 607 + "tracing", 608 + ] 609 + 610 + [[package]] 611 + name = "calloop-wayland-source" 612 + version = "0.3.0" 613 + source = "registry+https://github.com/rust-lang/crates.io-index" 614 + checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" 615 + dependencies = [ 616 + "calloop 0.13.0", 617 + "rustix 0.38.44", 618 + "wayland-backend", 619 + "wayland-client", 620 + ] 621 + 622 + [[package]] 623 + name = "calloop-wayland-source" 624 + version = "0.4.1" 625 + source = "registry+https://github.com/rust-lang/crates.io-index" 626 + checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" 627 + dependencies = [ 628 + "calloop 0.14.4", 629 + "rustix 1.1.3", 630 + "wayland-backend", 631 + "wayland-client", 632 + ] 633 + 634 + [[package]] 635 + name = "cc" 636 + version = "1.2.56" 637 + source = "registry+https://github.com/rust-lang/crates.io-index" 638 + checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" 639 + dependencies = [ 640 + "find-msvc-tools", 641 + "jobserver", 642 + "libc", 643 + "shlex", 644 + ] 645 + 646 + [[package]] 647 + name = "cesu8" 648 + version = "1.1.0" 649 + source = "registry+https://github.com/rust-lang/crates.io-index" 650 + checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 651 + 652 + [[package]] 653 + name = "cfg-if" 654 + version = "1.0.4" 655 + source = "registry+https://github.com/rust-lang/crates.io-index" 656 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 657 + 658 + [[package]] 659 + name = "cfg_aliases" 660 + version = "0.2.1" 661 + source = "registry+https://github.com/rust-lang/crates.io-index" 662 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 663 + 664 + [[package]] 665 + name = "cgl" 666 + version = "0.3.2" 667 + source = "registry+https://github.com/rust-lang/crates.io-index" 668 + checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" 669 + dependencies = [ 670 + "libc", 671 + ] 672 + 673 + [[package]] 674 + name = "clipboard-win" 675 + version = "5.4.1" 676 + source = "registry+https://github.com/rust-lang/crates.io-index" 677 + checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" 678 + dependencies = [ 679 + "error-code", 680 + ] 681 + 682 + [[package]] 683 + name = "cobs" 684 + version = "0.3.0" 685 + source = "registry+https://github.com/rust-lang/crates.io-index" 686 + checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" 687 + dependencies = [ 688 + "thiserror 2.0.18", 689 + ] 690 + 691 + [[package]] 692 + name = "codespan-reporting" 693 + version = "0.12.0" 694 + source = "registry+https://github.com/rust-lang/crates.io-index" 695 + checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" 696 + dependencies = [ 697 + "serde", 698 + "termcolor", 699 + "unicode-width", 700 + ] 701 + 702 + [[package]] 703 + name = "combine" 704 + version = "4.6.7" 705 + source = "registry+https://github.com/rust-lang/crates.io-index" 706 + checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 707 + dependencies = [ 708 + "bytes", 709 + "memchr", 710 + ] 711 + 712 + [[package]] 713 + name = "concurrent-queue" 714 + version = "2.5.0" 715 + source = "registry+https://github.com/rust-lang/crates.io-index" 716 + checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 717 + dependencies = [ 718 + "crossbeam-utils", 719 + ] 720 + 721 + [[package]] 722 + name = "const_format" 723 + version = "0.2.35" 724 + source = "registry+https://github.com/rust-lang/crates.io-index" 725 + checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" 726 + dependencies = [ 727 + "const_format_proc_macros", 728 + ] 729 + 730 + [[package]] 731 + name = "const_format_proc_macros" 732 + version = "0.2.34" 733 + source = "registry+https://github.com/rust-lang/crates.io-index" 734 + checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" 735 + dependencies = [ 736 + "proc-macro2", 737 + "quote", 738 + "unicode-xid", 739 + ] 740 + 741 + [[package]] 742 + name = "core-foundation" 743 + version = "0.9.4" 744 + source = "registry+https://github.com/rust-lang/crates.io-index" 745 + checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 746 + dependencies = [ 747 + "core-foundation-sys", 748 + "libc", 749 + ] 750 + 751 + [[package]] 752 + name = "core-foundation" 753 + version = "0.10.1" 754 + source = "registry+https://github.com/rust-lang/crates.io-index" 755 + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" 756 + dependencies = [ 757 + "core-foundation-sys", 758 + "libc", 759 + ] 760 + 761 + [[package]] 762 + name = "core-foundation-sys" 763 + version = "0.8.7" 764 + source = "registry+https://github.com/rust-lang/crates.io-index" 765 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 766 + 767 + [[package]] 768 + name = "core-graphics" 769 + version = "0.23.2" 770 + source = "registry+https://github.com/rust-lang/crates.io-index" 771 + checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" 772 + dependencies = [ 773 + "bitflags 1.3.2", 774 + "core-foundation 0.9.4", 775 + "core-graphics-types 0.1.3", 776 + "foreign-types", 777 + "libc", 778 + ] 779 + 780 + [[package]] 781 + name = "core-graphics-types" 782 + version = "0.1.3" 783 + source = "registry+https://github.com/rust-lang/crates.io-index" 784 + checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" 785 + dependencies = [ 786 + "bitflags 1.3.2", 787 + "core-foundation 0.9.4", 788 + "libc", 789 + ] 790 + 791 + [[package]] 792 + name = "core-graphics-types" 793 + version = "0.2.0" 794 + source = "registry+https://github.com/rust-lang/crates.io-index" 795 + checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" 796 + dependencies = [ 797 + "bitflags 2.11.0", 798 + "core-foundation 0.10.1", 799 + "libc", 800 + ] 801 + 802 + [[package]] 803 + name = "cpufeatures" 804 + version = "0.2.17" 805 + source = "registry+https://github.com/rust-lang/crates.io-index" 806 + checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 807 + dependencies = [ 808 + "libc", 809 + ] 810 + 811 + [[package]] 812 + name = "crc32fast" 813 + version = "1.5.0" 814 + source = "registry+https://github.com/rust-lang/crates.io-index" 815 + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 816 + dependencies = [ 817 + "cfg-if", 818 + ] 819 + 820 + [[package]] 821 + name = "critical-section" 822 + version = "1.2.0" 823 + source = "registry+https://github.com/rust-lang/crates.io-index" 824 + checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" 825 + 826 + [[package]] 827 + name = "crossbeam-utils" 828 + version = "0.8.21" 829 + source = "registry+https://github.com/rust-lang/crates.io-index" 830 + checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 831 + 832 + [[package]] 833 + name = "crunchy" 834 + version = "0.2.4" 835 + source = "registry+https://github.com/rust-lang/crates.io-index" 836 + checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" 837 + 838 + [[package]] 839 + name = "crypto-common" 840 + version = "0.1.7" 841 + source = "registry+https://github.com/rust-lang/crates.io-index" 842 + checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" 843 + dependencies = [ 844 + "generic-array", 845 + "typenum", 846 + ] 847 + 848 + [[package]] 849 + name = "cursor-icon" 850 + version = "1.2.0" 851 + source = "registry+https://github.com/rust-lang/crates.io-index" 852 + checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" 853 + 854 + [[package]] 855 + name = "darling" 856 + version = "0.20.11" 857 + source = "registry+https://github.com/rust-lang/crates.io-index" 858 + checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" 859 + dependencies = [ 860 + "darling_core", 861 + "darling_macro", 862 + ] 863 + 864 + [[package]] 865 + name = "darling_core" 866 + version = "0.20.11" 867 + source = "registry+https://github.com/rust-lang/crates.io-index" 868 + checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" 869 + dependencies = [ 870 + "fnv", 871 + "ident_case", 872 + "proc-macro2", 873 + "quote", 874 + "strsim", 875 + "syn 2.0.117", 876 + ] 877 + 878 + [[package]] 879 + name = "darling_macro" 880 + version = "0.20.11" 881 + source = "registry+https://github.com/rust-lang/crates.io-index" 882 + checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" 883 + dependencies = [ 884 + "darling_core", 885 + "quote", 886 + "syn 2.0.117", 887 + ] 888 + 889 + [[package]] 890 + name = "data-encoding" 891 + version = "2.10.0" 892 + source = "registry+https://github.com/rust-lang/crates.io-index" 893 + checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" 894 + 895 + [[package]] 896 + name = "derive_arbitrary" 897 + version = "1.4.2" 898 + source = "registry+https://github.com/rust-lang/crates.io-index" 899 + checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" 900 + dependencies = [ 901 + "proc-macro2", 902 + "quote", 903 + "syn 2.0.117", 904 + ] 905 + 906 + [[package]] 907 + name = "diff" 908 + version = "0.1.13" 909 + source = "registry+https://github.com/rust-lang/crates.io-index" 910 + checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 911 + 912 + [[package]] 913 + name = "digest" 914 + version = "0.10.7" 915 + source = "registry+https://github.com/rust-lang/crates.io-index" 916 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 917 + dependencies = [ 918 + "block-buffer", 919 + "crypto-common", 920 + ] 921 + 922 + [[package]] 923 + name = "dioxus-cli-config" 924 + version = "0.7.3" 925 + source = "registry+https://github.com/rust-lang/crates.io-index" 926 + checksum = "ccd67ab405e1915a47df9769cd5408545d1b559d5c01ce7a0f442caef520d1f3" 927 + 928 + [[package]] 929 + name = "dioxus-core" 930 + version = "0.7.3" 931 + source = "registry+https://github.com/rust-lang/crates.io-index" 932 + checksum = "b389b0e3cc01c7da292ad9b884b088835fdd1671d45fbd2f737506152b22eef0" 933 + dependencies = [ 934 + "anyhow", 935 + "const_format", 936 + "dioxus-core-types", 937 + "futures-channel", 938 + "futures-util", 939 + "generational-box", 940 + "longest-increasing-subsequence", 941 + "rustc-hash 2.1.1", 942 + "rustversion", 943 + "serde", 944 + "slab", 945 + "slotmap", 946 + "subsecond", 947 + "tracing", 948 + ] 949 + 950 + [[package]] 951 + name = "dioxus-core-types" 952 + version = "0.7.3" 953 + source = "registry+https://github.com/rust-lang/crates.io-index" 954 + checksum = "bfc4b8cdc440a55c17355542fc2089d97949bba674255d84cac77805e1db8c9f" 955 + 956 + [[package]] 957 + name = "dioxus-devtools" 958 + version = "0.7.3" 959 + source = "registry+https://github.com/rust-lang/crates.io-index" 960 + checksum = "dcf89488bad8fb0f18b9086ee2db01f95f709801c10c68be42691a36378a0f2d" 961 + dependencies = [ 962 + "dioxus-cli-config", 963 + "dioxus-core", 964 + "dioxus-devtools-types", 965 + "dioxus-signals", 966 + "serde", 967 + "serde_json", 968 + "subsecond", 969 + "thiserror 2.0.18", 970 + "tracing", 971 + "tungstenite", 972 + ] 973 + 974 + [[package]] 975 + name = "dioxus-devtools-types" 976 + version = "0.7.3" 977 + source = "registry+https://github.com/rust-lang/crates.io-index" 978 + checksum = "6e7381d9d7d0a0f66b9d5082d584853c3d53be21d34007073daca98ddf26fc4d" 979 + dependencies = [ 980 + "dioxus-core", 981 + "serde", 982 + "subsecond-types", 983 + ] 984 + 985 + [[package]] 986 + name = "dioxus-signals" 987 + version = "0.7.3" 988 + source = "registry+https://github.com/rust-lang/crates.io-index" 989 + checksum = "2f48020bc23bc9766e7cce986c0fd6de9af0b8cbfd432652ec6b1094439c1ec6" 990 + dependencies = [ 991 + "dioxus-core", 992 + "futures-channel", 993 + "futures-util", 994 + "generational-box", 995 + "parking_lot", 996 + "rustc-hash 2.1.1", 997 + "tracing", 998 + "warnings", 999 + ] 1000 + 1001 + [[package]] 1002 + name = "dispatch" 1003 + version = "0.2.0" 1004 + source = "registry+https://github.com/rust-lang/crates.io-index" 1005 + checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 1006 + 1007 + [[package]] 1008 + name = "dispatch2" 1009 + version = "0.3.0" 1010 + source = "registry+https://github.com/rust-lang/crates.io-index" 1011 + checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" 1012 + dependencies = [ 1013 + "bitflags 2.11.0", 1014 + "objc2 0.6.3", 1015 + ] 1016 + 1017 + [[package]] 1018 + name = "displaydoc" 1019 + version = "0.2.5" 1020 + source = "registry+https://github.com/rust-lang/crates.io-index" 1021 + checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 1022 + dependencies = [ 1023 + "proc-macro2", 1024 + "quote", 1025 + "syn 2.0.117", 1026 + ] 1027 + 1028 + [[package]] 1029 + name = "dlib" 1030 + version = "0.5.2" 1031 + source = "registry+https://github.com/rust-lang/crates.io-index" 1032 + checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" 1033 + dependencies = [ 1034 + "libloading", 1035 + ] 1036 + 1037 + [[package]] 1038 + name = "document-features" 1039 + version = "0.2.12" 1040 + source = "registry+https://github.com/rust-lang/crates.io-index" 1041 + checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" 1042 + dependencies = [ 1043 + "litrs", 1044 + ] 1045 + 1046 + [[package]] 1047 + name = "downcast-rs" 1048 + version = "1.2.1" 1049 + source = "registry+https://github.com/rust-lang/crates.io-index" 1050 + checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" 1051 + 1052 + [[package]] 1053 + name = "dpi" 1054 + version = "0.1.2" 1055 + source = "registry+https://github.com/rust-lang/crates.io-index" 1056 + checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" 1057 + 1058 + [[package]] 1059 + name = "ecolor" 1060 + version = "0.33.3" 1061 + source = "registry+https://github.com/rust-lang/crates.io-index" 1062 + checksum = "71ddb8ac7643d1dba1bb02110e804406dd459a838efcb14011ced10556711a8e" 1063 + dependencies = [ 1064 + "bytemuck", 1065 + "emath", 1066 + "serde", 1067 + ] 1068 + 1069 + [[package]] 1070 + name = "eframe" 1071 + version = "0.33.3" 1072 + source = "registry+https://github.com/rust-lang/crates.io-index" 1073 + checksum = "457481173e6db5ca9fa2be93a58df8f4c7be639587aeb4853b526c6cf87db4e6" 1074 + dependencies = [ 1075 + "ahash", 1076 + "bytemuck", 1077 + "document-features", 1078 + "egui", 1079 + "egui-wgpu", 1080 + "egui-winit", 1081 + "egui_glow", 1082 + "glow", 1083 + "glutin", 1084 + "glutin-winit", 1085 + "image", 1086 + "js-sys", 1087 + "log", 1088 + "objc2 0.5.2", 1089 + "objc2-app-kit 0.2.2", 1090 + "objc2-foundation 0.2.2", 1091 + "parking_lot", 1092 + "percent-encoding", 1093 + "profiling", 1094 + "raw-window-handle", 1095 + "static_assertions", 1096 + "wasm-bindgen", 1097 + "wasm-bindgen-futures", 1098 + "web-sys", 1099 + "web-time", 1100 + "windows-sys 0.61.2", 1101 + "winit", 1102 + ] 1103 + 1104 + [[package]] 1105 + name = "egui" 1106 + version = "0.33.3" 1107 + source = "registry+https://github.com/rust-lang/crates.io-index" 1108 + checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" 1109 + dependencies = [ 1110 + "accesskit", 1111 + "ahash", 1112 + "bitflags 2.11.0", 1113 + "emath", 1114 + "epaint", 1115 + "log", 1116 + "nohash-hasher", 1117 + "profiling", 1118 + "serde", 1119 + "smallvec", 1120 + "unicode-segmentation", 1121 + ] 1122 + 1123 + [[package]] 1124 + name = "egui-phosphor" 1125 + version = "0.11.0" 1126 + source = "registry+https://github.com/rust-lang/crates.io-index" 1127 + checksum = "e3b2838620355debaeb7fa3cc331a1d8ab77e6387d40e65686fa468c229dbf63" 1128 + dependencies = [ 1129 + "egui", 1130 + ] 1131 + 1132 + [[package]] 1133 + name = "egui-wgpu" 1134 + version = "0.33.3" 1135 + source = "registry+https://github.com/rust-lang/crates.io-index" 1136 + checksum = "5e4d209971c84b2352a06174abdba701af1e552ce56b144d96f2bd50a3c91236" 1137 + dependencies = [ 1138 + "ahash", 1139 + "bytemuck", 1140 + "document-features", 1141 + "egui", 1142 + "epaint", 1143 + "log", 1144 + "profiling", 1145 + "thiserror 2.0.18", 1146 + "type-map", 1147 + "web-time", 1148 + "wgpu", 1149 + "winit", 1150 + ] 1151 + 1152 + [[package]] 1153 + name = "egui-winit" 1154 + version = "0.33.3" 1155 + source = "registry+https://github.com/rust-lang/crates.io-index" 1156 + checksum = "ec6687e5bb551702f4ad10ac428bab12acf9d53047ebb1082d4a0ed8c6251a29" 1157 + dependencies = [ 1158 + "accesskit_winit", 1159 + "arboard", 1160 + "bytemuck", 1161 + "egui", 1162 + "log", 1163 + "objc2 0.5.2", 1164 + "objc2-foundation 0.2.2", 1165 + "objc2-ui-kit", 1166 + "profiling", 1167 + "raw-window-handle", 1168 + "smithay-clipboard", 1169 + "web-time", 1170 + "webbrowser", 1171 + "winit", 1172 + ] 1173 + 1174 + [[package]] 1175 + name = "egui_glow" 1176 + version = "0.33.3" 1177 + source = "registry+https://github.com/rust-lang/crates.io-index" 1178 + checksum = "6420863ea1d90e750f75075231a260030ad8a9f30a7cef82cdc966492dc4c4eb" 1179 + dependencies = [ 1180 + "bytemuck", 1181 + "egui", 1182 + "glow", 1183 + "log", 1184 + "memoffset", 1185 + "profiling", 1186 + "wasm-bindgen", 1187 + "web-sys", 1188 + "winit", 1189 + ] 1190 + 1191 + [[package]] 1192 + name = "egui_kittest" 1193 + version = "0.33.3" 1194 + source = "registry+https://github.com/rust-lang/crates.io-index" 1195 + checksum = "43afb5f968dfa9e6c8f5e609ab9039e11a2c4af79a326f4cb1b99cf6875cb6a0" 1196 + dependencies = [ 1197 + "eframe", 1198 + "egui", 1199 + "kittest", 1200 + ] 1201 + 1202 + [[package]] 1203 + name = "egui_tiles" 1204 + version = "0.14.1" 1205 + source = "registry+https://github.com/rust-lang/crates.io-index" 1206 + checksum = "7ef184e589f0a80560bd3b63017634642d1ba112a8a8d9b29341f7cafd04601f" 1207 + dependencies = [ 1208 + "ahash", 1209 + "egui", 1210 + "itertools 0.14.0", 1211 + "log", 1212 + "serde", 1213 + ] 1214 + 1215 + [[package]] 1216 + name = "either" 1217 + version = "1.15.0" 1218 + source = "registry+https://github.com/rust-lang/crates.io-index" 1219 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 1220 + 1221 + [[package]] 1222 + name = "emath" 1223 + version = "0.33.3" 1224 + source = "registry+https://github.com/rust-lang/crates.io-index" 1225 + checksum = "491bdf728bf25ddd9ad60d4cf1c48588fa82c013a2440b91aa7fc43e34a07c32" 1226 + dependencies = [ 1227 + "bytemuck", 1228 + "serde", 1229 + ] 1230 + 1231 + [[package]] 1232 + name = "embedded-io" 1233 + version = "0.4.0" 1234 + source = "registry+https://github.com/rust-lang/crates.io-index" 1235 + checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" 1236 + 1237 + [[package]] 1238 + name = "embedded-io" 1239 + version = "0.6.1" 1240 + source = "registry+https://github.com/rust-lang/crates.io-index" 1241 + checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" 1242 + 1243 + [[package]] 1244 + name = "endi" 1245 + version = "1.1.1" 1246 + source = "registry+https://github.com/rust-lang/crates.io-index" 1247 + checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" 1248 + 1249 + [[package]] 1250 + name = "ensure-cov" 1251 + version = "0.1.0" 1252 + source = "registry+https://github.com/rust-lang/crates.io-index" 1253 + checksum = "33753185802e107b8fa907192af1f0eca13b1fb33327a59266d650fef29b2b4e" 1254 + 1255 + [[package]] 1256 + name = "enum-as-inner" 1257 + version = "0.5.1" 1258 + source = "registry+https://github.com/rust-lang/crates.io-index" 1259 + checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" 1260 + dependencies = [ 1261 + "heck 0.4.1", 1262 + "proc-macro2", 1263 + "quote", 1264 + "syn 1.0.109", 1265 + ] 1266 + 1267 + [[package]] 1268 + name = "enum-as-inner" 1269 + version = "0.6.1" 1270 + source = "registry+https://github.com/rust-lang/crates.io-index" 1271 + checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" 1272 + dependencies = [ 1273 + "heck 0.5.0", 1274 + "proc-macro2", 1275 + "quote", 1276 + "syn 2.0.117", 1277 + ] 1278 + 1279 + [[package]] 1280 + name = "enum_dispatch" 1281 + version = "0.3.13" 1282 + source = "registry+https://github.com/rust-lang/crates.io-index" 1283 + checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" 1284 + dependencies = [ 1285 + "once_cell", 1286 + "proc-macro2", 1287 + "quote", 1288 + "syn 2.0.117", 1289 + ] 1290 + 1291 + [[package]] 1292 + name = "enumflags2" 1293 + version = "0.7.12" 1294 + source = "registry+https://github.com/rust-lang/crates.io-index" 1295 + checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" 1296 + dependencies = [ 1297 + "enumflags2_derive", 1298 + "serde", 1299 + ] 1300 + 1301 + [[package]] 1302 + name = "enumflags2_derive" 1303 + version = "0.7.12" 1304 + source = "registry+https://github.com/rust-lang/crates.io-index" 1305 + checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" 1306 + dependencies = [ 1307 + "proc-macro2", 1308 + "quote", 1309 + "syn 2.0.117", 1310 + ] 1311 + 1312 + [[package]] 1313 + name = "enumn" 1314 + version = "0.1.14" 1315 + source = "registry+https://github.com/rust-lang/crates.io-index" 1316 + checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" 1317 + dependencies = [ 1318 + "proc-macro2", 1319 + "quote", 1320 + "syn 2.0.117", 1321 + ] 1322 + 1323 + [[package]] 1324 + name = "epaint" 1325 + version = "0.33.3" 1326 + source = "registry+https://github.com/rust-lang/crates.io-index" 1327 + checksum = "009d0dd3c2163823a0abdb899451ecbc78798dec545ee91b43aff1fa790bab62" 1328 + dependencies = [ 1329 + "ab_glyph", 1330 + "ahash", 1331 + "bytemuck", 1332 + "ecolor", 1333 + "emath", 1334 + "epaint_default_fonts", 1335 + "log", 1336 + "nohash-hasher", 1337 + "parking_lot", 1338 + "profiling", 1339 + "serde", 1340 + ] 1341 + 1342 + [[package]] 1343 + name = "epaint_default_fonts" 1344 + version = "0.33.3" 1345 + source = "registry+https://github.com/rust-lang/crates.io-index" 1346 + checksum = "5c4fbe202b6578d3d56428fa185cdf114a05e49da05f477b3c7f0fbb221f1862" 1347 + 1348 + [[package]] 1349 + name = "equivalent" 1350 + version = "1.0.2" 1351 + source = "registry+https://github.com/rust-lang/crates.io-index" 1352 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 1353 + 1354 + [[package]] 1355 + name = "errno" 1356 + version = "0.3.14" 1357 + source = "registry+https://github.com/rust-lang/crates.io-index" 1358 + checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" 1359 + dependencies = [ 1360 + "libc", 1361 + "windows-sys 0.61.2", 1362 + ] 1363 + 1364 + [[package]] 1365 + name = "error-code" 1366 + version = "3.3.2" 1367 + source = "registry+https://github.com/rust-lang/crates.io-index" 1368 + checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" 1369 + 1370 + [[package]] 1371 + name = "event-listener" 1372 + version = "5.4.1" 1373 + source = "registry+https://github.com/rust-lang/crates.io-index" 1374 + checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" 1375 + dependencies = [ 1376 + "concurrent-queue", 1377 + "parking", 1378 + "pin-project-lite", 1379 + ] 1380 + 1381 + [[package]] 1382 + name = "event-listener-strategy" 1383 + version = "0.5.4" 1384 + source = "registry+https://github.com/rust-lang/crates.io-index" 1385 + checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" 1386 + dependencies = [ 1387 + "event-listener", 1388 + "pin-project-lite", 1389 + ] 1390 + 1391 + [[package]] 1392 + name = "fastrand" 1393 + version = "2.3.0" 1394 + source = "registry+https://github.com/rust-lang/crates.io-index" 1395 + checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 1396 + 1397 + [[package]] 1398 + name = "fax" 1399 + version = "0.2.6" 1400 + source = "registry+https://github.com/rust-lang/crates.io-index" 1401 + checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" 1402 + dependencies = [ 1403 + "fax_derive", 1404 + ] 1405 + 1406 + [[package]] 1407 + name = "fax_derive" 1408 + version = "0.2.0" 1409 + source = "registry+https://github.com/rust-lang/crates.io-index" 1410 + checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" 1411 + dependencies = [ 1412 + "proc-macro2", 1413 + "quote", 1414 + "syn 2.0.117", 1415 + ] 1416 + 1417 + [[package]] 1418 + name = "fdeflate" 1419 + version = "0.3.7" 1420 + source = "registry+https://github.com/rust-lang/crates.io-index" 1421 + checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" 1422 + dependencies = [ 1423 + "simd-adler32", 1424 + ] 1425 + 1426 + [[package]] 1427 + name = "find-msvc-tools" 1428 + version = "0.1.9" 1429 + source = "registry+https://github.com/rust-lang/crates.io-index" 1430 + checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" 1431 + 1432 + [[package]] 1433 + name = "flate2" 1434 + version = "1.1.9" 1435 + source = "registry+https://github.com/rust-lang/crates.io-index" 1436 + checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" 1437 + dependencies = [ 1438 + "crc32fast", 1439 + "miniz_oxide", 1440 + ] 1441 + 1442 + [[package]] 1443 + name = "fnv" 1444 + version = "1.0.7" 1445 + source = "registry+https://github.com/rust-lang/crates.io-index" 1446 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 1447 + 1448 + [[package]] 1449 + name = "foldhash" 1450 + version = "0.1.5" 1451 + source = "registry+https://github.com/rust-lang/crates.io-index" 1452 + checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 1453 + 1454 + [[package]] 1455 + name = "foldhash" 1456 + version = "0.2.0" 1457 + source = "registry+https://github.com/rust-lang/crates.io-index" 1458 + checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" 1459 + 1460 + [[package]] 1461 + name = "foreign-types" 1462 + version = "0.5.0" 1463 + source = "registry+https://github.com/rust-lang/crates.io-index" 1464 + checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 1465 + dependencies = [ 1466 + "foreign-types-macros", 1467 + "foreign-types-shared", 1468 + ] 1469 + 1470 + [[package]] 1471 + name = "foreign-types-macros" 1472 + version = "0.2.3" 1473 + source = "registry+https://github.com/rust-lang/crates.io-index" 1474 + checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" 1475 + dependencies = [ 1476 + "proc-macro2", 1477 + "quote", 1478 + "syn 2.0.117", 1479 + ] 1480 + 1481 + [[package]] 1482 + name = "foreign-types-shared" 1483 + version = "0.3.1" 1484 + source = "registry+https://github.com/rust-lang/crates.io-index" 1485 + checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 1486 + 1487 + [[package]] 1488 + name = "form_urlencoded" 1489 + version = "1.2.2" 1490 + source = "registry+https://github.com/rust-lang/crates.io-index" 1491 + checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" 1492 + dependencies = [ 1493 + "percent-encoding", 1494 + ] 1495 + 1496 + [[package]] 1497 + name = "futures-channel" 1498 + version = "0.3.32" 1499 + source = "registry+https://github.com/rust-lang/crates.io-index" 1500 + checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" 1501 + dependencies = [ 1502 + "futures-core", 1503 + ] 1504 + 1505 + [[package]] 1506 + name = "futures-core" 1507 + version = "0.3.32" 1508 + source = "registry+https://github.com/rust-lang/crates.io-index" 1509 + checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" 1510 + 1511 + [[package]] 1512 + name = "futures-io" 1513 + version = "0.3.32" 1514 + source = "registry+https://github.com/rust-lang/crates.io-index" 1515 + checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" 1516 + 1517 + [[package]] 1518 + name = "futures-lite" 1519 + version = "2.6.1" 1520 + source = "registry+https://github.com/rust-lang/crates.io-index" 1521 + checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" 1522 + dependencies = [ 1523 + "fastrand", 1524 + "futures-core", 1525 + "futures-io", 1526 + "parking", 1527 + "pin-project-lite", 1528 + ] 1529 + 1530 + [[package]] 1531 + name = "futures-macro" 1532 + version = "0.3.32" 1533 + source = "registry+https://github.com/rust-lang/crates.io-index" 1534 + checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" 1535 + dependencies = [ 1536 + "proc-macro2", 1537 + "quote", 1538 + "syn 2.0.117", 1539 + ] 1540 + 1541 + [[package]] 1542 + name = "futures-task" 1543 + version = "0.3.32" 1544 + source = "registry+https://github.com/rust-lang/crates.io-index" 1545 + checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" 1546 + 1547 + [[package]] 1548 + name = "futures-util" 1549 + version = "0.3.32" 1550 + source = "registry+https://github.com/rust-lang/crates.io-index" 1551 + checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" 1552 + dependencies = [ 1553 + "futures-core", 1554 + "futures-macro", 1555 + "futures-task", 1556 + "pin-project-lite", 1557 + "slab", 1558 + ] 1559 + 1560 + [[package]] 1561 + name = "generational-box" 1562 + version = "0.7.3" 1563 + source = "registry+https://github.com/rust-lang/crates.io-index" 1564 + checksum = "cc4ed190b9de8e734d47a70be59b1e7588b9e8e0d0036e332f4c014e8aed1bc5" 1565 + dependencies = [ 1566 + "parking_lot", 1567 + "tracing", 1568 + ] 1569 + 1570 + [[package]] 1571 + name = "generator" 1572 + version = "0.8.8" 1573 + source = "registry+https://github.com/rust-lang/crates.io-index" 1574 + checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" 1575 + dependencies = [ 1576 + "cc", 1577 + "cfg-if", 1578 + "libc", 1579 + "log", 1580 + "rustversion", 1581 + "windows-link 0.2.1", 1582 + "windows-result 0.4.1", 1583 + ] 1584 + 1585 + [[package]] 1586 + name = "generic-array" 1587 + version = "0.14.7" 1588 + source = "registry+https://github.com/rust-lang/crates.io-index" 1589 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 1590 + dependencies = [ 1591 + "typenum", 1592 + "version_check", 1593 + ] 1594 + 1595 + [[package]] 1596 + name = "generic-btree" 1597 + version = "0.10.7" 1598 + source = "registry+https://github.com/rust-lang/crates.io-index" 1599 + checksum = "a0c1bce85c110ab718fd139e0cc89c51b63bd647b14a767e24bdfc77c83df79b" 1600 + dependencies = [ 1601 + "arref", 1602 + "heapless 0.9.2", 1603 + "itertools 0.11.0", 1604 + "loro-thunderdome", 1605 + "proc-macro2", 1606 + "rustc-hash 2.1.1", 1607 + ] 1608 + 1609 + [[package]] 1610 + name = "gethostname" 1611 + version = "1.1.0" 1612 + source = "registry+https://github.com/rust-lang/crates.io-index" 1613 + checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" 1614 + dependencies = [ 1615 + "rustix 1.1.3", 1616 + "windows-link 0.2.1", 1617 + ] 1618 + 1619 + [[package]] 1620 + name = "getrandom" 1621 + version = "0.2.17" 1622 + source = "registry+https://github.com/rust-lang/crates.io-index" 1623 + checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" 1624 + dependencies = [ 1625 + "cfg-if", 1626 + "js-sys", 1627 + "libc", 1628 + "wasi", 1629 + "wasm-bindgen", 1630 + ] 1631 + 1632 + [[package]] 1633 + name = "getrandom" 1634 + version = "0.3.4" 1635 + source = "registry+https://github.com/rust-lang/crates.io-index" 1636 + checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 1637 + dependencies = [ 1638 + "cfg-if", 1639 + "libc", 1640 + "r-efi", 1641 + "wasip2", 1642 + ] 1643 + 1644 + [[package]] 1645 + name = "gl_generator" 1646 + version = "0.14.0" 1647 + source = "registry+https://github.com/rust-lang/crates.io-index" 1648 + checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" 1649 + dependencies = [ 1650 + "khronos_api", 1651 + "log", 1652 + "xml-rs", 1653 + ] 1654 + 1655 + [[package]] 1656 + name = "glow" 1657 + version = "0.16.0" 1658 + source = "registry+https://github.com/rust-lang/crates.io-index" 1659 + checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" 1660 + dependencies = [ 1661 + "js-sys", 1662 + "slotmap", 1663 + "wasm-bindgen", 1664 + "web-sys", 1665 + ] 1666 + 1667 + [[package]] 1668 + name = "glutin" 1669 + version = "0.32.3" 1670 + source = "registry+https://github.com/rust-lang/crates.io-index" 1671 + checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" 1672 + dependencies = [ 1673 + "bitflags 2.11.0", 1674 + "cfg_aliases", 1675 + "cgl", 1676 + "dispatch2", 1677 + "glutin_egl_sys", 1678 + "glutin_glx_sys", 1679 + "glutin_wgl_sys", 1680 + "libloading", 1681 + "objc2 0.6.3", 1682 + "objc2-app-kit 0.3.2", 1683 + "objc2-core-foundation", 1684 + "objc2-foundation 0.3.2", 1685 + "once_cell", 1686 + "raw-window-handle", 1687 + "wayland-sys", 1688 + "windows-sys 0.52.0", 1689 + "x11-dl", 1690 + ] 1691 + 1692 + [[package]] 1693 + name = "glutin-winit" 1694 + version = "0.5.0" 1695 + source = "registry+https://github.com/rust-lang/crates.io-index" 1696 + checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" 1697 + dependencies = [ 1698 + "cfg_aliases", 1699 + "glutin", 1700 + "raw-window-handle", 1701 + "winit", 1702 + ] 1703 + 1704 + [[package]] 1705 + name = "glutin_egl_sys" 1706 + version = "0.7.1" 1707 + source = "registry+https://github.com/rust-lang/crates.io-index" 1708 + checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" 1709 + dependencies = [ 1710 + "gl_generator", 1711 + "windows-sys 0.52.0", 1712 + ] 1713 + 1714 + [[package]] 1715 + name = "glutin_glx_sys" 1716 + version = "0.6.1" 1717 + source = "registry+https://github.com/rust-lang/crates.io-index" 1718 + checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" 1719 + dependencies = [ 1720 + "gl_generator", 1721 + "x11-dl", 1722 + ] 1723 + 1724 + [[package]] 1725 + name = "glutin_wgl_sys" 1726 + version = "0.6.1" 1727 + source = "registry+https://github.com/rust-lang/crates.io-index" 1728 + checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" 1729 + dependencies = [ 1730 + "gl_generator", 1731 + ] 1732 + 1733 + [[package]] 1734 + name = "gpu-alloc" 1735 + version = "0.6.0" 1736 + source = "registry+https://github.com/rust-lang/crates.io-index" 1737 + checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" 1738 + dependencies = [ 1739 + "bitflags 2.11.0", 1740 + "gpu-alloc-types", 1741 + ] 1742 + 1743 + [[package]] 1744 + name = "gpu-alloc-types" 1745 + version = "0.3.0" 1746 + source = "registry+https://github.com/rust-lang/crates.io-index" 1747 + checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" 1748 + dependencies = [ 1749 + "bitflags 2.11.0", 1750 + ] 1751 + 1752 + [[package]] 1753 + name = "gpu-allocator" 1754 + version = "0.27.0" 1755 + source = "registry+https://github.com/rust-lang/crates.io-index" 1756 + checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" 1757 + dependencies = [ 1758 + "log", 1759 + "presser", 1760 + "thiserror 1.0.69", 1761 + "windows 0.58.0", 1762 + ] 1763 + 1764 + [[package]] 1765 + name = "gpu-descriptor" 1766 + version = "0.3.2" 1767 + source = "registry+https://github.com/rust-lang/crates.io-index" 1768 + checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" 1769 + dependencies = [ 1770 + "bitflags 2.11.0", 1771 + "gpu-descriptor-types", 1772 + "hashbrown 0.15.5", 1773 + ] 1774 + 1775 + [[package]] 1776 + name = "gpu-descriptor-types" 1777 + version = "0.2.0" 1778 + source = "registry+https://github.com/rust-lang/crates.io-index" 1779 + checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" 1780 + dependencies = [ 1781 + "bitflags 2.11.0", 1782 + ] 1783 + 1784 + [[package]] 1785 + name = "half" 1786 + version = "2.7.1" 1787 + source = "registry+https://github.com/rust-lang/crates.io-index" 1788 + checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" 1789 + dependencies = [ 1790 + "cfg-if", 1791 + "crunchy", 1792 + "num-traits", 1793 + "zerocopy", 1794 + ] 1795 + 1796 + [[package]] 1797 + name = "hash32" 1798 + version = "0.2.1" 1799 + source = "registry+https://github.com/rust-lang/crates.io-index" 1800 + checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" 1801 + dependencies = [ 1802 + "byteorder", 1803 + ] 1804 + 1805 + [[package]] 1806 + name = "hash32" 1807 + version = "0.3.1" 1808 + source = "registry+https://github.com/rust-lang/crates.io-index" 1809 + checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" 1810 + dependencies = [ 1811 + "byteorder", 1812 + ] 1813 + 1814 + [[package]] 1815 + name = "hashbrown" 1816 + version = "0.15.5" 1817 + source = "registry+https://github.com/rust-lang/crates.io-index" 1818 + checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" 1819 + dependencies = [ 1820 + "foldhash 0.1.5", 1821 + ] 1822 + 1823 + [[package]] 1824 + name = "hashbrown" 1825 + version = "0.16.1" 1826 + source = "registry+https://github.com/rust-lang/crates.io-index" 1827 + checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" 1828 + dependencies = [ 1829 + "foldhash 0.2.0", 1830 + ] 1831 + 1832 + [[package]] 1833 + name = "heapless" 1834 + version = "0.7.17" 1835 + source = "registry+https://github.com/rust-lang/crates.io-index" 1836 + checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" 1837 + dependencies = [ 1838 + "atomic-polyfill", 1839 + "hash32 0.2.1", 1840 + "rustc_version", 1841 + "serde", 1842 + "spin", 1843 + "stable_deref_trait", 1844 + ] 1845 + 1846 + [[package]] 1847 + name = "heapless" 1848 + version = "0.8.0" 1849 + source = "registry+https://github.com/rust-lang/crates.io-index" 1850 + checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" 1851 + dependencies = [ 1852 + "hash32 0.3.1", 1853 + "stable_deref_trait", 1854 + ] 1855 + 1856 + [[package]] 1857 + name = "heapless" 1858 + version = "0.9.2" 1859 + source = "registry+https://github.com/rust-lang/crates.io-index" 1860 + checksum = "2af2455f757db2b292a9b1768c4b70186d443bcb3b316252d6b540aec1cd89ed" 1861 + dependencies = [ 1862 + "hash32 0.3.1", 1863 + "stable_deref_trait", 1864 + ] 1865 + 1866 + [[package]] 1867 + name = "heck" 1868 + version = "0.4.1" 1869 + source = "registry+https://github.com/rust-lang/crates.io-index" 1870 + checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1871 + 1872 + [[package]] 1873 + name = "heck" 1874 + version = "0.5.0" 1875 + source = "registry+https://github.com/rust-lang/crates.io-index" 1876 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1877 + 1878 + [[package]] 1879 + name = "hermit-abi" 1880 + version = "0.5.2" 1881 + source = "registry+https://github.com/rust-lang/crates.io-index" 1882 + checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" 1883 + 1884 + [[package]] 1885 + name = "hex" 1886 + version = "0.4.3" 1887 + source = "registry+https://github.com/rust-lang/crates.io-index" 1888 + checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1889 + 1890 + [[package]] 1891 + name = "hexf-parse" 1892 + version = "0.2.1" 1893 + source = "registry+https://github.com/rust-lang/crates.io-index" 1894 + checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 1895 + 1896 + [[package]] 1897 + name = "http" 1898 + version = "1.4.0" 1899 + source = "registry+https://github.com/rust-lang/crates.io-index" 1900 + checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" 1901 + dependencies = [ 1902 + "bytes", 1903 + "itoa", 1904 + ] 1905 + 1906 + [[package]] 1907 + name = "httparse" 1908 + version = "1.10.1" 1909 + source = "registry+https://github.com/rust-lang/crates.io-index" 1910 + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 1911 + 1912 + [[package]] 1913 + name = "icu_collections" 1914 + version = "2.1.1" 1915 + source = "registry+https://github.com/rust-lang/crates.io-index" 1916 + checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" 1917 + dependencies = [ 1918 + "displaydoc", 1919 + "potential_utf", 1920 + "yoke", 1921 + "zerofrom", 1922 + "zerovec", 1923 + ] 1924 + 1925 + [[package]] 1926 + name = "icu_locale_core" 1927 + version = "2.1.1" 1928 + source = "registry+https://github.com/rust-lang/crates.io-index" 1929 + checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" 1930 + dependencies = [ 1931 + "displaydoc", 1932 + "litemap", 1933 + "tinystr", 1934 + "writeable", 1935 + "zerovec", 1936 + ] 1937 + 1938 + [[package]] 1939 + name = "icu_normalizer" 1940 + version = "2.1.1" 1941 + source = "registry+https://github.com/rust-lang/crates.io-index" 1942 + checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" 1943 + dependencies = [ 1944 + "icu_collections", 1945 + "icu_normalizer_data", 1946 + "icu_properties", 1947 + "icu_provider", 1948 + "smallvec", 1949 + "zerovec", 1950 + ] 1951 + 1952 + [[package]] 1953 + name = "icu_normalizer_data" 1954 + version = "2.1.1" 1955 + source = "registry+https://github.com/rust-lang/crates.io-index" 1956 + checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" 1957 + 1958 + [[package]] 1959 + name = "icu_properties" 1960 + version = "2.1.2" 1961 + source = "registry+https://github.com/rust-lang/crates.io-index" 1962 + checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" 1963 + dependencies = [ 1964 + "icu_collections", 1965 + "icu_locale_core", 1966 + "icu_properties_data", 1967 + "icu_provider", 1968 + "zerotrie", 1969 + "zerovec", 1970 + ] 1971 + 1972 + [[package]] 1973 + name = "icu_properties_data" 1974 + version = "2.1.2" 1975 + source = "registry+https://github.com/rust-lang/crates.io-index" 1976 + checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" 1977 + 1978 + [[package]] 1979 + name = "icu_provider" 1980 + version = "2.1.1" 1981 + source = "registry+https://github.com/rust-lang/crates.io-index" 1982 + checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" 1983 + dependencies = [ 1984 + "displaydoc", 1985 + "icu_locale_core", 1986 + "writeable", 1987 + "yoke", 1988 + "zerofrom", 1989 + "zerotrie", 1990 + "zerovec", 1991 + ] 1992 + 1993 + [[package]] 1994 + name = "ident_case" 1995 + version = "1.0.1" 1996 + source = "registry+https://github.com/rust-lang/crates.io-index" 1997 + checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1998 + 1999 + [[package]] 2000 + name = "idna" 2001 + version = "1.1.0" 2002 + source = "registry+https://github.com/rust-lang/crates.io-index" 2003 + checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" 2004 + dependencies = [ 2005 + "idna_adapter", 2006 + "smallvec", 2007 + "utf8_iter", 2008 + ] 2009 + 2010 + [[package]] 2011 + name = "idna_adapter" 2012 + version = "1.2.1" 2013 + source = "registry+https://github.com/rust-lang/crates.io-index" 2014 + checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" 2015 + dependencies = [ 2016 + "icu_normalizer", 2017 + "icu_properties", 2018 + ] 2019 + 2020 + [[package]] 2021 + name = "im" 2022 + version = "15.1.0" 2023 + source = "registry+https://github.com/rust-lang/crates.io-index" 2024 + checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" 2025 + dependencies = [ 2026 + "bitmaps", 2027 + "rand_core 0.6.4", 2028 + "rand_xoshiro", 2029 + "serde", 2030 + "sized-chunks", 2031 + "typenum", 2032 + "version_check", 2033 + ] 2034 + 2035 + [[package]] 2036 + name = "image" 2037 + version = "0.25.9" 2038 + source = "registry+https://github.com/rust-lang/crates.io-index" 2039 + checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" 2040 + dependencies = [ 2041 + "bytemuck", 2042 + "byteorder-lite", 2043 + "moxcms", 2044 + "num-traits", 2045 + "png", 2046 + "tiff", 2047 + ] 2048 + 2049 + [[package]] 2050 + name = "indexmap" 2051 + version = "2.13.0" 2052 + source = "registry+https://github.com/rust-lang/crates.io-index" 2053 + checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" 2054 + dependencies = [ 2055 + "equivalent", 2056 + "hashbrown 0.16.1", 2057 + ] 2058 + 2059 + [[package]] 2060 + name = "itertools" 2061 + version = "0.11.0" 2062 + source = "registry+https://github.com/rust-lang/crates.io-index" 2063 + checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 2064 + dependencies = [ 2065 + "either", 2066 + ] 2067 + 2068 + [[package]] 2069 + name = "itertools" 2070 + version = "0.12.1" 2071 + source = "registry+https://github.com/rust-lang/crates.io-index" 2072 + checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 2073 + dependencies = [ 2074 + "either", 2075 + ] 2076 + 2077 + [[package]] 2078 + name = "itertools" 2079 + version = "0.14.0" 2080 + source = "registry+https://github.com/rust-lang/crates.io-index" 2081 + checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 2082 + dependencies = [ 2083 + "either", 2084 + ] 2085 + 2086 + [[package]] 2087 + name = "itoa" 2088 + version = "1.0.17" 2089 + source = "registry+https://github.com/rust-lang/crates.io-index" 2090 + checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 2091 + 2092 + [[package]] 2093 + name = "jni" 2094 + version = "0.21.1" 2095 + source = "registry+https://github.com/rust-lang/crates.io-index" 2096 + checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 2097 + dependencies = [ 2098 + "cesu8", 2099 + "cfg-if", 2100 + "combine", 2101 + "jni-sys", 2102 + "log", 2103 + "thiserror 1.0.69", 2104 + "walkdir", 2105 + "windows-sys 0.45.0", 2106 + ] 2107 + 2108 + [[package]] 2109 + name = "jni-sys" 2110 + version = "0.3.0" 2111 + source = "registry+https://github.com/rust-lang/crates.io-index" 2112 + checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 2113 + 2114 + [[package]] 2115 + name = "jobserver" 2116 + version = "0.1.34" 2117 + source = "registry+https://github.com/rust-lang/crates.io-index" 2118 + checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" 2119 + dependencies = [ 2120 + "getrandom 0.3.4", 2121 + "libc", 2122 + ] 2123 + 2124 + [[package]] 2125 + name = "js-sys" 2126 + version = "0.3.86" 2127 + source = "registry+https://github.com/rust-lang/crates.io-index" 2128 + checksum = "d36139f1c97c42c0c86a411910b04e48d4939a0376e6e0f989420cbdee0120e5" 2129 + dependencies = [ 2130 + "once_cell", 2131 + "wasm-bindgen", 2132 + ] 2133 + 2134 + [[package]] 2135 + name = "kammy" 2136 + version = "0.1.0" 2137 + dependencies = [ 2138 + "dioxus-devtools", 2139 + "eframe", 2140 + "egui-phosphor", 2141 + "egui_kittest", 2142 + "egui_tiles", 2143 + "loro", 2144 + "loroscope", 2145 + "subsecond", 2146 + "tracing", 2147 + "tracing-subscriber", 2148 + ] 2149 + 2150 + [[package]] 2151 + name = "khronos-egl" 2152 + version = "6.0.0" 2153 + source = "registry+https://github.com/rust-lang/crates.io-index" 2154 + checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" 2155 + dependencies = [ 2156 + "libc", 2157 + "libloading", 2158 + "pkg-config", 2159 + ] 2160 + 2161 + [[package]] 2162 + name = "khronos_api" 2163 + version = "3.1.0" 2164 + source = "registry+https://github.com/rust-lang/crates.io-index" 2165 + checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 2166 + 2167 + [[package]] 2168 + name = "kittest" 2169 + version = "0.3.0" 2170 + source = "registry+https://github.com/rust-lang/crates.io-index" 2171 + checksum = "01fd6dd2cce251a360101038acb9334e3a50cd38cd02fefddbf28aa975f043c8" 2172 + dependencies = [ 2173 + "accesskit", 2174 + "accesskit_consumer 0.30.1", 2175 + "parking_lot", 2176 + ] 2177 + 2178 + [[package]] 2179 + name = "lazy_static" 2180 + version = "1.5.0" 2181 + source = "registry+https://github.com/rust-lang/crates.io-index" 2182 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 2183 + 2184 + [[package]] 2185 + name = "leb128" 2186 + version = "0.2.5" 2187 + source = "registry+https://github.com/rust-lang/crates.io-index" 2188 + checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" 2189 + 2190 + [[package]] 2191 + name = "libc" 2192 + version = "0.2.182" 2193 + source = "registry+https://github.com/rust-lang/crates.io-index" 2194 + checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" 2195 + 2196 + [[package]] 2197 + name = "libloading" 2198 + version = "0.8.9" 2199 + source = "registry+https://github.com/rust-lang/crates.io-index" 2200 + checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" 2201 + dependencies = [ 2202 + "cfg-if", 2203 + "windows-link 0.2.1", 2204 + ] 2205 + 2206 + [[package]] 2207 + name = "libm" 2208 + version = "0.2.16" 2209 + source = "registry+https://github.com/rust-lang/crates.io-index" 2210 + checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" 2211 + 2212 + [[package]] 2213 + name = "libredox" 2214 + version = "0.1.12" 2215 + source = "registry+https://github.com/rust-lang/crates.io-index" 2216 + checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" 2217 + dependencies = [ 2218 + "bitflags 2.11.0", 2219 + "libc", 2220 + "redox_syscall 0.7.1", 2221 + ] 2222 + 2223 + [[package]] 2224 + name = "linux-raw-sys" 2225 + version = "0.4.15" 2226 + source = "registry+https://github.com/rust-lang/crates.io-index" 2227 + checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 2228 + 2229 + [[package]] 2230 + name = "linux-raw-sys" 2231 + version = "0.11.0" 2232 + source = "registry+https://github.com/rust-lang/crates.io-index" 2233 + checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" 2234 + 2235 + [[package]] 2236 + name = "litemap" 2237 + version = "0.8.1" 2238 + source = "registry+https://github.com/rust-lang/crates.io-index" 2239 + checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" 2240 + 2241 + [[package]] 2242 + name = "litrs" 2243 + version = "1.0.0" 2244 + source = "registry+https://github.com/rust-lang/crates.io-index" 2245 + checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" 2246 + 2247 + [[package]] 2248 + name = "lock_api" 2249 + version = "0.4.14" 2250 + source = "registry+https://github.com/rust-lang/crates.io-index" 2251 + checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" 2252 + dependencies = [ 2253 + "scopeguard", 2254 + ] 2255 + 2256 + [[package]] 2257 + name = "log" 2258 + version = "0.4.29" 2259 + source = "registry+https://github.com/rust-lang/crates.io-index" 2260 + checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 2261 + 2262 + [[package]] 2263 + name = "longest-increasing-subsequence" 2264 + version = "0.1.0" 2265 + source = "registry+https://github.com/rust-lang/crates.io-index" 2266 + checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" 2267 + 2268 + [[package]] 2269 + name = "loom" 2270 + version = "0.7.2" 2271 + source = "registry+https://github.com/rust-lang/crates.io-index" 2272 + checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 2273 + dependencies = [ 2274 + "cfg-if", 2275 + "generator", 2276 + "scoped-tls", 2277 + "serde", 2278 + "serde_json", 2279 + "tracing", 2280 + "tracing-subscriber", 2281 + ] 2282 + 2283 + [[package]] 2284 + name = "loro" 2285 + version = "1.10.3" 2286 + source = "registry+https://github.com/rust-lang/crates.io-index" 2287 + checksum = "d75216d8f99725531a30f7b00901ee154a4f8a9b7f125bfe032e197d4c7ffb8c" 2288 + dependencies = [ 2289 + "enum-as-inner 0.6.1", 2290 + "generic-btree", 2291 + "loro-common", 2292 + "loro-delta", 2293 + "loro-internal", 2294 + "loro-kv-store", 2295 + "rustc-hash 2.1.1", 2296 + "tracing", 2297 + ] 2298 + 2299 + [[package]] 2300 + name = "loro-common" 2301 + version = "1.10.0" 2302 + source = "registry+https://github.com/rust-lang/crates.io-index" 2303 + checksum = "70363ea05a9c507fd9d58b65dc414bf515f636d69d8ab53e50ecbe8d27eef90c" 2304 + dependencies = [ 2305 + "arbitrary", 2306 + "enum-as-inner 0.6.1", 2307 + "leb128", 2308 + "loro-rle", 2309 + "nonmax", 2310 + "rustc-hash 2.1.1", 2311 + "serde", 2312 + "serde_columnar", 2313 + "serde_json", 2314 + "thiserror 1.0.69", 2315 + ] 2316 + 2317 + [[package]] 2318 + name = "loro-delta" 2319 + version = "1.9.1" 2320 + source = "registry+https://github.com/rust-lang/crates.io-index" 2321 + checksum = "8eafa788a72c1cbf0b7dc08a862cd7cc31b96d99c2ef749cdc94c2330f9494d3" 2322 + dependencies = [ 2323 + "arrayvec", 2324 + "enum-as-inner 0.5.1", 2325 + "generic-btree", 2326 + "heapless 0.8.0", 2327 + ] 2328 + 2329 + [[package]] 2330 + name = "loro-internal" 2331 + version = "1.10.3" 2332 + source = "registry+https://github.com/rust-lang/crates.io-index" 2333 + checksum = "f447044ec3d3ba572623859add3334bd87b84340ee5fdf00315bfee0e3ad3e3f" 2334 + dependencies = [ 2335 + "append-only-bytes", 2336 + "arref", 2337 + "bytes", 2338 + "either", 2339 + "ensure-cov", 2340 + "enum-as-inner 0.6.1", 2341 + "enum_dispatch", 2342 + "generic-btree", 2343 + "getrandom 0.2.17", 2344 + "im", 2345 + "itertools 0.12.1", 2346 + "leb128", 2347 + "loom", 2348 + "loro-common", 2349 + "loro-delta", 2350 + "loro-kv-store", 2351 + "loro-rle", 2352 + "loro_fractional_index", 2353 + "md5", 2354 + "nonmax", 2355 + "num", 2356 + "num-traits", 2357 + "once_cell", 2358 + "parking_lot", 2359 + "pest", 2360 + "pest_derive", 2361 + "postcard", 2362 + "pretty_assertions", 2363 + "rand 0.8.5", 2364 + "rustc-hash 2.1.1", 2365 + "serde", 2366 + "serde_columnar", 2367 + "serde_json", 2368 + "smallvec", 2369 + "thiserror 1.0.69", 2370 + "thread_local", 2371 + "tracing", 2372 + "wasm-bindgen", 2373 + "xxhash-rust", 2374 + ] 2375 + 2376 + [[package]] 2377 + name = "loro-kv-store" 2378 + version = "1.10.0" 2379 + source = "registry+https://github.com/rust-lang/crates.io-index" 2380 + checksum = "78beebc933a33c26495c9a98f05b38bc0a4c0a337ecfbd3146ce1f9437eec71f" 2381 + dependencies = [ 2382 + "bytes", 2383 + "ensure-cov", 2384 + "loro-common", 2385 + "lz4_flex", 2386 + "once_cell", 2387 + "quick_cache", 2388 + "rustc-hash 2.1.1", 2389 + "tracing", 2390 + "xxhash-rust", 2391 + ] 2392 + 2393 + [[package]] 2394 + name = "loro-rle" 2395 + version = "1.6.0" 2396 + source = "registry+https://github.com/rust-lang/crates.io-index" 2397 + checksum = "76400c3eea6bb39b013406acce964a8db39311534e308286c8d8721baba8ee20" 2398 + dependencies = [ 2399 + "append-only-bytes", 2400 + "num", 2401 + "smallvec", 2402 + ] 2403 + 2404 + [[package]] 2405 + name = "loro-thunderdome" 2406 + version = "0.6.2" 2407 + source = "registry+https://github.com/rust-lang/crates.io-index" 2408 + checksum = "3f3d053a135388e6b1df14e8af1212af5064746e9b87a06a345a7a779ee9695a" 2409 + 2410 + [[package]] 2411 + name = "loro_fractional_index" 2412 + version = "1.6.0" 2413 + source = "registry+https://github.com/rust-lang/crates.io-index" 2414 + checksum = "427c8ea186958094052b971fe7e322a934b034c3bf62f0458ccea04fcd687ba1" 2415 + dependencies = [ 2416 + "once_cell", 2417 + "rand 0.8.5", 2418 + "serde", 2419 + ] 2420 + 2421 + [[package]] 2422 + name = "loroscope" 2423 + version = "0.1.0" 2424 + dependencies = [ 2425 + "loro", 2426 + "loroscope_macros", 2427 + "paste", 2428 + ] 2429 + 2430 + [[package]] 2431 + name = "loroscope_macros" 2432 + version = "0.1.0" 2433 + dependencies = [ 2434 + "proc-macro2", 2435 + "quote", 2436 + "syn 2.0.117", 2437 + ] 2438 + 2439 + [[package]] 2440 + name = "lz4_flex" 2441 + version = "0.11.5" 2442 + source = "registry+https://github.com/rust-lang/crates.io-index" 2443 + checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" 2444 + dependencies = [ 2445 + "twox-hash", 2446 + ] 2447 + 2448 + [[package]] 2449 + name = "malloc_buf" 2450 + version = "0.0.6" 2451 + source = "registry+https://github.com/rust-lang/crates.io-index" 2452 + checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 2453 + dependencies = [ 2454 + "libc", 2455 + ] 2456 + 2457 + [[package]] 2458 + name = "matchers" 2459 + version = "0.2.0" 2460 + source = "registry+https://github.com/rust-lang/crates.io-index" 2461 + checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" 2462 + dependencies = [ 2463 + "regex-automata", 2464 + ] 2465 + 2466 + [[package]] 2467 + name = "md5" 2468 + version = "0.7.0" 2469 + source = "registry+https://github.com/rust-lang/crates.io-index" 2470 + checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" 2471 + 2472 + [[package]] 2473 + name = "memchr" 2474 + version = "2.8.0" 2475 + source = "registry+https://github.com/rust-lang/crates.io-index" 2476 + checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" 2477 + 2478 + [[package]] 2479 + name = "memfd" 2480 + version = "0.6.5" 2481 + source = "registry+https://github.com/rust-lang/crates.io-index" 2482 + checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" 2483 + dependencies = [ 2484 + "rustix 1.1.3", 2485 + ] 2486 + 2487 + [[package]] 2488 + name = "memmap2" 2489 + version = "0.9.10" 2490 + source = "registry+https://github.com/rust-lang/crates.io-index" 2491 + checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" 2492 + dependencies = [ 2493 + "libc", 2494 + ] 2495 + 2496 + [[package]] 2497 + name = "memoffset" 2498 + version = "0.9.1" 2499 + source = "registry+https://github.com/rust-lang/crates.io-index" 2500 + checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 2501 + dependencies = [ 2502 + "autocfg", 2503 + ] 2504 + 2505 + [[package]] 2506 + name = "metal" 2507 + version = "0.32.0" 2508 + source = "registry+https://github.com/rust-lang/crates.io-index" 2509 + checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" 2510 + dependencies = [ 2511 + "bitflags 2.11.0", 2512 + "block", 2513 + "core-graphics-types 0.2.0", 2514 + "foreign-types", 2515 + "log", 2516 + "objc", 2517 + "paste", 2518 + ] 2519 + 2520 + [[package]] 2521 + name = "miniz_oxide" 2522 + version = "0.8.9" 2523 + source = "registry+https://github.com/rust-lang/crates.io-index" 2524 + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 2525 + dependencies = [ 2526 + "adler2", 2527 + "simd-adler32", 2528 + ] 2529 + 2530 + [[package]] 2531 + name = "moxcms" 2532 + version = "0.7.11" 2533 + source = "registry+https://github.com/rust-lang/crates.io-index" 2534 + checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" 2535 + dependencies = [ 2536 + "num-traits", 2537 + "pxfm", 2538 + ] 2539 + 2540 + [[package]] 2541 + name = "naga" 2542 + version = "27.0.3" 2543 + source = "registry+https://github.com/rust-lang/crates.io-index" 2544 + checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" 2545 + dependencies = [ 2546 + "arrayvec", 2547 + "bit-set", 2548 + "bitflags 2.11.0", 2549 + "cfg-if", 2550 + "cfg_aliases", 2551 + "codespan-reporting", 2552 + "half", 2553 + "hashbrown 0.16.1", 2554 + "hexf-parse", 2555 + "indexmap", 2556 + "libm", 2557 + "log", 2558 + "num-traits", 2559 + "once_cell", 2560 + "rustc-hash 1.1.0", 2561 + "spirv", 2562 + "thiserror 2.0.18", 2563 + "unicode-ident", 2564 + ] 2565 + 2566 + [[package]] 2567 + name = "ndk" 2568 + version = "0.9.0" 2569 + source = "registry+https://github.com/rust-lang/crates.io-index" 2570 + checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" 2571 + dependencies = [ 2572 + "bitflags 2.11.0", 2573 + "jni-sys", 2574 + "log", 2575 + "ndk-sys", 2576 + "num_enum", 2577 + "raw-window-handle", 2578 + "thiserror 1.0.69", 2579 + ] 2580 + 2581 + [[package]] 2582 + name = "ndk-context" 2583 + version = "0.1.1" 2584 + source = "registry+https://github.com/rust-lang/crates.io-index" 2585 + checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 2586 + 2587 + [[package]] 2588 + name = "ndk-sys" 2589 + version = "0.6.0+11769913" 2590 + source = "registry+https://github.com/rust-lang/crates.io-index" 2591 + checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" 2592 + dependencies = [ 2593 + "jni-sys", 2594 + ] 2595 + 2596 + [[package]] 2597 + name = "nohash-hasher" 2598 + version = "0.2.0" 2599 + source = "registry+https://github.com/rust-lang/crates.io-index" 2600 + checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" 2601 + 2602 + [[package]] 2603 + name = "nonmax" 2604 + version = "0.5.5" 2605 + source = "registry+https://github.com/rust-lang/crates.io-index" 2606 + checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" 2607 + 2608 + [[package]] 2609 + name = "nu-ansi-term" 2610 + version = "0.50.3" 2611 + source = "registry+https://github.com/rust-lang/crates.io-index" 2612 + checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" 2613 + dependencies = [ 2614 + "windows-sys 0.61.2", 2615 + ] 2616 + 2617 + [[package]] 2618 + name = "num" 2619 + version = "0.4.3" 2620 + source = "registry+https://github.com/rust-lang/crates.io-index" 2621 + checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" 2622 + dependencies = [ 2623 + "num-bigint", 2624 + "num-complex", 2625 + "num-integer", 2626 + "num-iter", 2627 + "num-rational", 2628 + "num-traits", 2629 + ] 2630 + 2631 + [[package]] 2632 + name = "num-bigint" 2633 + version = "0.4.6" 2634 + source = "registry+https://github.com/rust-lang/crates.io-index" 2635 + checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 2636 + dependencies = [ 2637 + "num-integer", 2638 + "num-traits", 2639 + ] 2640 + 2641 + [[package]] 2642 + name = "num-complex" 2643 + version = "0.4.6" 2644 + source = "registry+https://github.com/rust-lang/crates.io-index" 2645 + checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 2646 + dependencies = [ 2647 + "num-traits", 2648 + ] 2649 + 2650 + [[package]] 2651 + name = "num-integer" 2652 + version = "0.1.46" 2653 + source = "registry+https://github.com/rust-lang/crates.io-index" 2654 + checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 2655 + dependencies = [ 2656 + "num-traits", 2657 + ] 2658 + 2659 + [[package]] 2660 + name = "num-iter" 2661 + version = "0.1.45" 2662 + source = "registry+https://github.com/rust-lang/crates.io-index" 2663 + checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 2664 + dependencies = [ 2665 + "autocfg", 2666 + "num-integer", 2667 + "num-traits", 2668 + ] 2669 + 2670 + [[package]] 2671 + name = "num-rational" 2672 + version = "0.4.2" 2673 + source = "registry+https://github.com/rust-lang/crates.io-index" 2674 + checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" 2675 + dependencies = [ 2676 + "num-bigint", 2677 + "num-integer", 2678 + "num-traits", 2679 + ] 2680 + 2681 + [[package]] 2682 + name = "num-traits" 2683 + version = "0.2.19" 2684 + source = "registry+https://github.com/rust-lang/crates.io-index" 2685 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 2686 + dependencies = [ 2687 + "autocfg", 2688 + "libm", 2689 + ] 2690 + 2691 + [[package]] 2692 + name = "num_enum" 2693 + version = "0.7.5" 2694 + source = "registry+https://github.com/rust-lang/crates.io-index" 2695 + checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" 2696 + dependencies = [ 2697 + "num_enum_derive", 2698 + "rustversion", 2699 + ] 2700 + 2701 + [[package]] 2702 + name = "num_enum_derive" 2703 + version = "0.7.5" 2704 + source = "registry+https://github.com/rust-lang/crates.io-index" 2705 + checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" 2706 + dependencies = [ 2707 + "proc-macro-crate", 2708 + "proc-macro2", 2709 + "quote", 2710 + "syn 2.0.117", 2711 + ] 2712 + 2713 + [[package]] 2714 + name = "objc" 2715 + version = "0.2.7" 2716 + source = "registry+https://github.com/rust-lang/crates.io-index" 2717 + checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 2718 + dependencies = [ 2719 + "malloc_buf", 2720 + ] 2721 + 2722 + [[package]] 2723 + name = "objc-sys" 2724 + version = "0.3.5" 2725 + source = "registry+https://github.com/rust-lang/crates.io-index" 2726 + checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" 2727 + 2728 + [[package]] 2729 + name = "objc2" 2730 + version = "0.5.2" 2731 + source = "registry+https://github.com/rust-lang/crates.io-index" 2732 + checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" 2733 + dependencies = [ 2734 + "objc-sys", 2735 + "objc2-encode", 2736 + ] 2737 + 2738 + [[package]] 2739 + name = "objc2" 2740 + version = "0.6.3" 2741 + source = "registry+https://github.com/rust-lang/crates.io-index" 2742 + checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" 2743 + dependencies = [ 2744 + "objc2-encode", 2745 + ] 2746 + 2747 + [[package]] 2748 + name = "objc2-app-kit" 2749 + version = "0.2.2" 2750 + source = "registry+https://github.com/rust-lang/crates.io-index" 2751 + checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" 2752 + dependencies = [ 2753 + "bitflags 2.11.0", 2754 + "block2", 2755 + "libc", 2756 + "objc2 0.5.2", 2757 + "objc2-core-data", 2758 + "objc2-core-image", 2759 + "objc2-foundation 0.2.2", 2760 + "objc2-quartz-core", 2761 + ] 2762 + 2763 + [[package]] 2764 + name = "objc2-app-kit" 2765 + version = "0.3.2" 2766 + source = "registry+https://github.com/rust-lang/crates.io-index" 2767 + checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" 2768 + dependencies = [ 2769 + "bitflags 2.11.0", 2770 + "objc2 0.6.3", 2771 + "objc2-core-foundation", 2772 + "objc2-core-graphics", 2773 + "objc2-foundation 0.3.2", 2774 + ] 2775 + 2776 + [[package]] 2777 + name = "objc2-cloud-kit" 2778 + version = "0.2.2" 2779 + source = "registry+https://github.com/rust-lang/crates.io-index" 2780 + checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" 2781 + dependencies = [ 2782 + "bitflags 2.11.0", 2783 + "block2", 2784 + "objc2 0.5.2", 2785 + "objc2-core-location", 2786 + "objc2-foundation 0.2.2", 2787 + ] 2788 + 2789 + [[package]] 2790 + name = "objc2-contacts" 2791 + version = "0.2.2" 2792 + source = "registry+https://github.com/rust-lang/crates.io-index" 2793 + checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" 2794 + dependencies = [ 2795 + "block2", 2796 + "objc2 0.5.2", 2797 + "objc2-foundation 0.2.2", 2798 + ] 2799 + 2800 + [[package]] 2801 + name = "objc2-core-data" 2802 + version = "0.2.2" 2803 + source = "registry+https://github.com/rust-lang/crates.io-index" 2804 + checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" 2805 + dependencies = [ 2806 + "bitflags 2.11.0", 2807 + "block2", 2808 + "objc2 0.5.2", 2809 + "objc2-foundation 0.2.2", 2810 + ] 2811 + 2812 + [[package]] 2813 + name = "objc2-core-foundation" 2814 + version = "0.3.2" 2815 + source = "registry+https://github.com/rust-lang/crates.io-index" 2816 + checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" 2817 + dependencies = [ 2818 + "bitflags 2.11.0", 2819 + "dispatch2", 2820 + "objc2 0.6.3", 2821 + ] 2822 + 2823 + [[package]] 2824 + name = "objc2-core-graphics" 2825 + version = "0.3.2" 2826 + source = "registry+https://github.com/rust-lang/crates.io-index" 2827 + checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" 2828 + dependencies = [ 2829 + "bitflags 2.11.0", 2830 + "dispatch2", 2831 + "objc2 0.6.3", 2832 + "objc2-core-foundation", 2833 + "objc2-io-surface", 2834 + ] 2835 + 2836 + [[package]] 2837 + name = "objc2-core-image" 2838 + version = "0.2.2" 2839 + source = "registry+https://github.com/rust-lang/crates.io-index" 2840 + checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" 2841 + dependencies = [ 2842 + "block2", 2843 + "objc2 0.5.2", 2844 + "objc2-foundation 0.2.2", 2845 + "objc2-metal", 2846 + ] 2847 + 2848 + [[package]] 2849 + name = "objc2-core-location" 2850 + version = "0.2.2" 2851 + source = "registry+https://github.com/rust-lang/crates.io-index" 2852 + checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" 2853 + dependencies = [ 2854 + "block2", 2855 + "objc2 0.5.2", 2856 + "objc2-contacts", 2857 + "objc2-foundation 0.2.2", 2858 + ] 2859 + 2860 + [[package]] 2861 + name = "objc2-encode" 2862 + version = "4.1.0" 2863 + source = "registry+https://github.com/rust-lang/crates.io-index" 2864 + checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" 2865 + 2866 + [[package]] 2867 + name = "objc2-foundation" 2868 + version = "0.2.2" 2869 + source = "registry+https://github.com/rust-lang/crates.io-index" 2870 + checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" 2871 + dependencies = [ 2872 + "bitflags 2.11.0", 2873 + "block2", 2874 + "dispatch", 2875 + "libc", 2876 + "objc2 0.5.2", 2877 + ] 2878 + 2879 + [[package]] 2880 + name = "objc2-foundation" 2881 + version = "0.3.2" 2882 + source = "registry+https://github.com/rust-lang/crates.io-index" 2883 + checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" 2884 + dependencies = [ 2885 + "bitflags 2.11.0", 2886 + "objc2 0.6.3", 2887 + "objc2-core-foundation", 2888 + ] 2889 + 2890 + [[package]] 2891 + name = "objc2-io-surface" 2892 + version = "0.3.2" 2893 + source = "registry+https://github.com/rust-lang/crates.io-index" 2894 + checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" 2895 + dependencies = [ 2896 + "bitflags 2.11.0", 2897 + "objc2 0.6.3", 2898 + "objc2-core-foundation", 2899 + ] 2900 + 2901 + [[package]] 2902 + name = "objc2-link-presentation" 2903 + version = "0.2.2" 2904 + source = "registry+https://github.com/rust-lang/crates.io-index" 2905 + checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" 2906 + dependencies = [ 2907 + "block2", 2908 + "objc2 0.5.2", 2909 + "objc2-app-kit 0.2.2", 2910 + "objc2-foundation 0.2.2", 2911 + ] 2912 + 2913 + [[package]] 2914 + name = "objc2-metal" 2915 + version = "0.2.2" 2916 + source = "registry+https://github.com/rust-lang/crates.io-index" 2917 + checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" 2918 + dependencies = [ 2919 + "bitflags 2.11.0", 2920 + "block2", 2921 + "objc2 0.5.2", 2922 + "objc2-foundation 0.2.2", 2923 + ] 2924 + 2925 + [[package]] 2926 + name = "objc2-quartz-core" 2927 + version = "0.2.2" 2928 + source = "registry+https://github.com/rust-lang/crates.io-index" 2929 + checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" 2930 + dependencies = [ 2931 + "bitflags 2.11.0", 2932 + "block2", 2933 + "objc2 0.5.2", 2934 + "objc2-foundation 0.2.2", 2935 + "objc2-metal", 2936 + ] 2937 + 2938 + [[package]] 2939 + name = "objc2-symbols" 2940 + version = "0.2.2" 2941 + source = "registry+https://github.com/rust-lang/crates.io-index" 2942 + checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" 2943 + dependencies = [ 2944 + "objc2 0.5.2", 2945 + "objc2-foundation 0.2.2", 2946 + ] 2947 + 2948 + [[package]] 2949 + name = "objc2-ui-kit" 2950 + version = "0.2.2" 2951 + source = "registry+https://github.com/rust-lang/crates.io-index" 2952 + checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" 2953 + dependencies = [ 2954 + "bitflags 2.11.0", 2955 + "block2", 2956 + "objc2 0.5.2", 2957 + "objc2-cloud-kit", 2958 + "objc2-core-data", 2959 + "objc2-core-image", 2960 + "objc2-core-location", 2961 + "objc2-foundation 0.2.2", 2962 + "objc2-link-presentation", 2963 + "objc2-quartz-core", 2964 + "objc2-symbols", 2965 + "objc2-uniform-type-identifiers", 2966 + "objc2-user-notifications", 2967 + ] 2968 + 2969 + [[package]] 2970 + name = "objc2-uniform-type-identifiers" 2971 + version = "0.2.2" 2972 + source = "registry+https://github.com/rust-lang/crates.io-index" 2973 + checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" 2974 + dependencies = [ 2975 + "block2", 2976 + "objc2 0.5.2", 2977 + "objc2-foundation 0.2.2", 2978 + ] 2979 + 2980 + [[package]] 2981 + name = "objc2-user-notifications" 2982 + version = "0.2.2" 2983 + source = "registry+https://github.com/rust-lang/crates.io-index" 2984 + checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" 2985 + dependencies = [ 2986 + "bitflags 2.11.0", 2987 + "block2", 2988 + "objc2 0.5.2", 2989 + "objc2-core-location", 2990 + "objc2-foundation 0.2.2", 2991 + ] 2992 + 2993 + [[package]] 2994 + name = "once_cell" 2995 + version = "1.21.3" 2996 + source = "registry+https://github.com/rust-lang/crates.io-index" 2997 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 2998 + 2999 + [[package]] 3000 + name = "orbclient" 3001 + version = "0.3.50" 3002 + source = "registry+https://github.com/rust-lang/crates.io-index" 3003 + checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd" 3004 + dependencies = [ 3005 + "libc", 3006 + "libredox", 3007 + ] 3008 + 3009 + [[package]] 3010 + name = "ordered-float" 3011 + version = "4.6.0" 3012 + source = "registry+https://github.com/rust-lang/crates.io-index" 3013 + checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" 3014 + dependencies = [ 3015 + "num-traits", 3016 + ] 3017 + 3018 + [[package]] 3019 + name = "ordered-stream" 3020 + version = "0.2.0" 3021 + source = "registry+https://github.com/rust-lang/crates.io-index" 3022 + checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" 3023 + dependencies = [ 3024 + "futures-core", 3025 + "pin-project-lite", 3026 + ] 3027 + 3028 + [[package]] 3029 + name = "owned_ttf_parser" 3030 + version = "0.25.1" 3031 + source = "registry+https://github.com/rust-lang/crates.io-index" 3032 + checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" 3033 + dependencies = [ 3034 + "ttf-parser", 3035 + ] 3036 + 3037 + [[package]] 3038 + name = "parking" 3039 + version = "2.2.1" 3040 + source = "registry+https://github.com/rust-lang/crates.io-index" 3041 + checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 3042 + 3043 + [[package]] 3044 + name = "parking_lot" 3045 + version = "0.12.5" 3046 + source = "registry+https://github.com/rust-lang/crates.io-index" 3047 + checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 3048 + dependencies = [ 3049 + "lock_api", 3050 + "parking_lot_core", 3051 + ] 3052 + 3053 + [[package]] 3054 + name = "parking_lot_core" 3055 + version = "0.9.12" 3056 + source = "registry+https://github.com/rust-lang/crates.io-index" 3057 + checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 3058 + dependencies = [ 3059 + "cfg-if", 3060 + "libc", 3061 + "redox_syscall 0.5.18", 3062 + "smallvec", 3063 + "windows-link 0.2.1", 3064 + ] 3065 + 3066 + [[package]] 3067 + name = "paste" 3068 + version = "1.0.15" 3069 + source = "registry+https://github.com/rust-lang/crates.io-index" 3070 + checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 3071 + 3072 + [[package]] 3073 + name = "percent-encoding" 3074 + version = "2.3.2" 3075 + source = "registry+https://github.com/rust-lang/crates.io-index" 3076 + checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 3077 + 3078 + [[package]] 3079 + name = "pest" 3080 + version = "2.8.6" 3081 + source = "registry+https://github.com/rust-lang/crates.io-index" 3082 + checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" 3083 + dependencies = [ 3084 + "memchr", 3085 + "ucd-trie", 3086 + ] 3087 + 3088 + [[package]] 3089 + name = "pest_derive" 3090 + version = "2.8.6" 3091 + source = "registry+https://github.com/rust-lang/crates.io-index" 3092 + checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" 3093 + dependencies = [ 3094 + "pest", 3095 + "pest_generator", 3096 + ] 3097 + 3098 + [[package]] 3099 + name = "pest_generator" 3100 + version = "2.8.6" 3101 + source = "registry+https://github.com/rust-lang/crates.io-index" 3102 + checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" 3103 + dependencies = [ 3104 + "pest", 3105 + "pest_meta", 3106 + "proc-macro2", 3107 + "quote", 3108 + "syn 2.0.117", 3109 + ] 3110 + 3111 + [[package]] 3112 + name = "pest_meta" 3113 + version = "2.8.6" 3114 + source = "registry+https://github.com/rust-lang/crates.io-index" 3115 + checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" 3116 + dependencies = [ 3117 + "pest", 3118 + "sha2", 3119 + ] 3120 + 3121 + [[package]] 3122 + name = "pin-project" 3123 + version = "1.1.10" 3124 + source = "registry+https://github.com/rust-lang/crates.io-index" 3125 + checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 3126 + dependencies = [ 3127 + "pin-project-internal", 3128 + ] 3129 + 3130 + [[package]] 3131 + name = "pin-project-internal" 3132 + version = "1.1.10" 3133 + source = "registry+https://github.com/rust-lang/crates.io-index" 3134 + checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 3135 + dependencies = [ 3136 + "proc-macro2", 3137 + "quote", 3138 + "syn 2.0.117", 3139 + ] 3140 + 3141 + [[package]] 3142 + name = "pin-project-lite" 3143 + version = "0.2.16" 3144 + source = "registry+https://github.com/rust-lang/crates.io-index" 3145 + checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 3146 + 3147 + [[package]] 3148 + name = "piper" 3149 + version = "0.2.4" 3150 + source = "registry+https://github.com/rust-lang/crates.io-index" 3151 + checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" 3152 + dependencies = [ 3153 + "atomic-waker", 3154 + "fastrand", 3155 + "futures-io", 3156 + ] 3157 + 3158 + [[package]] 3159 + name = "pkg-config" 3160 + version = "0.3.32" 3161 + source = "registry+https://github.com/rust-lang/crates.io-index" 3162 + checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 3163 + 3164 + [[package]] 3165 + name = "png" 3166 + version = "0.18.1" 3167 + source = "registry+https://github.com/rust-lang/crates.io-index" 3168 + checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" 3169 + dependencies = [ 3170 + "bitflags 2.11.0", 3171 + "crc32fast", 3172 + "fdeflate", 3173 + "flate2", 3174 + "miniz_oxide", 3175 + ] 3176 + 3177 + [[package]] 3178 + name = "polling" 3179 + version = "3.11.0" 3180 + source = "registry+https://github.com/rust-lang/crates.io-index" 3181 + checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" 3182 + dependencies = [ 3183 + "cfg-if", 3184 + "concurrent-queue", 3185 + "hermit-abi", 3186 + "pin-project-lite", 3187 + "rustix 1.1.3", 3188 + "windows-sys 0.61.2", 3189 + ] 3190 + 3191 + [[package]] 3192 + name = "portable-atomic" 3193 + version = "1.13.1" 3194 + source = "registry+https://github.com/rust-lang/crates.io-index" 3195 + checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" 3196 + 3197 + [[package]] 3198 + name = "portable-atomic-util" 3199 + version = "0.2.5" 3200 + source = "registry+https://github.com/rust-lang/crates.io-index" 3201 + checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" 3202 + dependencies = [ 3203 + "portable-atomic", 3204 + ] 3205 + 3206 + [[package]] 3207 + name = "postcard" 3208 + version = "1.1.3" 3209 + source = "registry+https://github.com/rust-lang/crates.io-index" 3210 + checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" 3211 + dependencies = [ 3212 + "cobs", 3213 + "embedded-io 0.4.0", 3214 + "embedded-io 0.6.1", 3215 + "heapless 0.7.17", 3216 + "serde", 3217 + ] 3218 + 3219 + [[package]] 3220 + name = "potential_utf" 3221 + version = "0.1.4" 3222 + source = "registry+https://github.com/rust-lang/crates.io-index" 3223 + checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" 3224 + dependencies = [ 3225 + "zerovec", 3226 + ] 3227 + 3228 + [[package]] 3229 + name = "ppv-lite86" 3230 + version = "0.2.21" 3231 + source = "registry+https://github.com/rust-lang/crates.io-index" 3232 + checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 3233 + dependencies = [ 3234 + "zerocopy", 3235 + ] 3236 + 3237 + [[package]] 3238 + name = "presser" 3239 + version = "0.3.1" 3240 + source = "registry+https://github.com/rust-lang/crates.io-index" 3241 + checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" 3242 + 3243 + [[package]] 3244 + name = "pretty_assertions" 3245 + version = "1.4.1" 3246 + source = "registry+https://github.com/rust-lang/crates.io-index" 3247 + checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" 3248 + dependencies = [ 3249 + "diff", 3250 + "yansi", 3251 + ] 3252 + 3253 + [[package]] 3254 + name = "proc-macro-crate" 3255 + version = "3.4.0" 3256 + source = "registry+https://github.com/rust-lang/crates.io-index" 3257 + checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" 3258 + dependencies = [ 3259 + "toml_edit", 3260 + ] 3261 + 3262 + [[package]] 3263 + name = "proc-macro2" 3264 + version = "1.0.106" 3265 + source = "registry+https://github.com/rust-lang/crates.io-index" 3266 + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" 3267 + dependencies = [ 3268 + "unicode-ident", 3269 + ] 3270 + 3271 + [[package]] 3272 + name = "profiling" 3273 + version = "1.0.17" 3274 + source = "registry+https://github.com/rust-lang/crates.io-index" 3275 + checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" 3276 + 3277 + [[package]] 3278 + name = "pxfm" 3279 + version = "0.1.27" 3280 + source = "registry+https://github.com/rust-lang/crates.io-index" 3281 + checksum = "7186d3822593aa4393561d186d1393b3923e9d6163d3fbfd6e825e3e6cf3e6a8" 3282 + dependencies = [ 3283 + "num-traits", 3284 + ] 3285 + 3286 + [[package]] 3287 + name = "quick-error" 3288 + version = "2.0.1" 3289 + source = "registry+https://github.com/rust-lang/crates.io-index" 3290 + checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" 3291 + 3292 + [[package]] 3293 + name = "quick-xml" 3294 + version = "0.38.4" 3295 + source = "registry+https://github.com/rust-lang/crates.io-index" 3296 + checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" 3297 + dependencies = [ 3298 + "memchr", 3299 + "serde", 3300 + ] 3301 + 3302 + [[package]] 3303 + name = "quick_cache" 3304 + version = "0.6.18" 3305 + source = "registry+https://github.com/rust-lang/crates.io-index" 3306 + checksum = "7ada44a88ef953a3294f6eb55d2007ba44646015e18613d2f213016379203ef3" 3307 + dependencies = [ 3308 + "ahash", 3309 + "equivalent", 3310 + "hashbrown 0.16.1", 3311 + "parking_lot", 3312 + ] 3313 + 3314 + [[package]] 3315 + name = "quote" 3316 + version = "1.0.44" 3317 + source = "registry+https://github.com/rust-lang/crates.io-index" 3318 + checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" 3319 + dependencies = [ 3320 + "proc-macro2", 3321 + ] 3322 + 3323 + [[package]] 3324 + name = "r-efi" 3325 + version = "5.3.0" 3326 + source = "registry+https://github.com/rust-lang/crates.io-index" 3327 + checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" 3328 + 3329 + [[package]] 3330 + name = "rand" 3331 + version = "0.8.5" 3332 + source = "registry+https://github.com/rust-lang/crates.io-index" 3333 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 3334 + dependencies = [ 3335 + "libc", 3336 + "rand_chacha 0.3.1", 3337 + "rand_core 0.6.4", 3338 + ] 3339 + 3340 + [[package]] 3341 + name = "rand" 3342 + version = "0.9.2" 3343 + source = "registry+https://github.com/rust-lang/crates.io-index" 3344 + checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 3345 + dependencies = [ 3346 + "rand_chacha 0.9.0", 3347 + "rand_core 0.9.5", 3348 + ] 3349 + 3350 + [[package]] 3351 + name = "rand_chacha" 3352 + version = "0.3.1" 3353 + source = "registry+https://github.com/rust-lang/crates.io-index" 3354 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 3355 + dependencies = [ 3356 + "ppv-lite86", 3357 + "rand_core 0.6.4", 3358 + ] 3359 + 3360 + [[package]] 3361 + name = "rand_chacha" 3362 + version = "0.9.0" 3363 + source = "registry+https://github.com/rust-lang/crates.io-index" 3364 + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 3365 + dependencies = [ 3366 + "ppv-lite86", 3367 + "rand_core 0.9.5", 3368 + ] 3369 + 3370 + [[package]] 3371 + name = "rand_core" 3372 + version = "0.6.4" 3373 + source = "registry+https://github.com/rust-lang/crates.io-index" 3374 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 3375 + dependencies = [ 3376 + "getrandom 0.2.17", 3377 + ] 3378 + 3379 + [[package]] 3380 + name = "rand_core" 3381 + version = "0.9.5" 3382 + source = "registry+https://github.com/rust-lang/crates.io-index" 3383 + checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" 3384 + dependencies = [ 3385 + "getrandom 0.3.4", 3386 + ] 3387 + 3388 + [[package]] 3389 + name = "rand_xoshiro" 3390 + version = "0.6.0" 3391 + source = "registry+https://github.com/rust-lang/crates.io-index" 3392 + checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" 3393 + dependencies = [ 3394 + "rand_core 0.6.4", 3395 + ] 3396 + 3397 + [[package]] 3398 + name = "range-alloc" 3399 + version = "0.1.4" 3400 + source = "registry+https://github.com/rust-lang/crates.io-index" 3401 + checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" 3402 + 3403 + [[package]] 3404 + name = "raw-window-handle" 3405 + version = "0.6.2" 3406 + source = "registry+https://github.com/rust-lang/crates.io-index" 3407 + checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" 3408 + 3409 + [[package]] 3410 + name = "redox_syscall" 3411 + version = "0.4.1" 3412 + source = "registry+https://github.com/rust-lang/crates.io-index" 3413 + checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 3414 + dependencies = [ 3415 + "bitflags 1.3.2", 3416 + ] 3417 + 3418 + [[package]] 3419 + name = "redox_syscall" 3420 + version = "0.5.18" 3421 + source = "registry+https://github.com/rust-lang/crates.io-index" 3422 + checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" 3423 + dependencies = [ 3424 + "bitflags 2.11.0", 3425 + ] 3426 + 3427 + [[package]] 3428 + name = "redox_syscall" 3429 + version = "0.7.1" 3430 + source = "registry+https://github.com/rust-lang/crates.io-index" 3431 + checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" 3432 + dependencies = [ 3433 + "bitflags 2.11.0", 3434 + ] 3435 + 3436 + [[package]] 3437 + name = "regex-automata" 3438 + version = "0.4.14" 3439 + source = "registry+https://github.com/rust-lang/crates.io-index" 3440 + checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" 3441 + dependencies = [ 3442 + "aho-corasick", 3443 + "memchr", 3444 + "regex-syntax", 3445 + ] 3446 + 3447 + [[package]] 3448 + name = "regex-syntax" 3449 + version = "0.8.9" 3450 + source = "registry+https://github.com/rust-lang/crates.io-index" 3451 + checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" 3452 + 3453 + [[package]] 3454 + name = "renderdoc-sys" 3455 + version = "1.1.0" 3456 + source = "registry+https://github.com/rust-lang/crates.io-index" 3457 + checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" 3458 + 3459 + [[package]] 3460 + name = "rustc-hash" 3461 + version = "1.1.0" 3462 + source = "registry+https://github.com/rust-lang/crates.io-index" 3463 + checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 3464 + 3465 + [[package]] 3466 + name = "rustc-hash" 3467 + version = "2.1.1" 3468 + source = "registry+https://github.com/rust-lang/crates.io-index" 3469 + checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 3470 + 3471 + [[package]] 3472 + name = "rustc_version" 3473 + version = "0.4.1" 3474 + source = "registry+https://github.com/rust-lang/crates.io-index" 3475 + checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 3476 + dependencies = [ 3477 + "semver", 3478 + ] 3479 + 3480 + [[package]] 3481 + name = "rustix" 3482 + version = "0.38.44" 3483 + source = "registry+https://github.com/rust-lang/crates.io-index" 3484 + checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 3485 + dependencies = [ 3486 + "bitflags 2.11.0", 3487 + "errno", 3488 + "libc", 3489 + "linux-raw-sys 0.4.15", 3490 + "windows-sys 0.59.0", 3491 + ] 3492 + 3493 + [[package]] 3494 + name = "rustix" 3495 + version = "1.1.3" 3496 + source = "registry+https://github.com/rust-lang/crates.io-index" 3497 + checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" 3498 + dependencies = [ 3499 + "bitflags 2.11.0", 3500 + "errno", 3501 + "libc", 3502 + "linux-raw-sys 0.11.0", 3503 + "windows-sys 0.61.2", 3504 + ] 3505 + 3506 + [[package]] 3507 + name = "rustversion" 3508 + version = "1.0.22" 3509 + source = "registry+https://github.com/rust-lang/crates.io-index" 3510 + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 3511 + 3512 + [[package]] 3513 + name = "same-file" 3514 + version = "1.0.6" 3515 + source = "registry+https://github.com/rust-lang/crates.io-index" 3516 + checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 3517 + dependencies = [ 3518 + "winapi-util", 3519 + ] 3520 + 3521 + [[package]] 3522 + name = "scoped-tls" 3523 + version = "1.0.1" 3524 + source = "registry+https://github.com/rust-lang/crates.io-index" 3525 + checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 3526 + 3527 + [[package]] 3528 + name = "scopeguard" 3529 + version = "1.2.0" 3530 + source = "registry+https://github.com/rust-lang/crates.io-index" 3531 + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 3532 + 3533 + [[package]] 3534 + name = "sctk-adwaita" 3535 + version = "0.10.1" 3536 + source = "registry+https://github.com/rust-lang/crates.io-index" 3537 + checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" 3538 + dependencies = [ 3539 + "ab_glyph", 3540 + "log", 3541 + "memmap2", 3542 + "smithay-client-toolkit 0.19.2", 3543 + "tiny-skia", 3544 + ] 3545 + 3546 + [[package]] 3547 + name = "semver" 3548 + version = "1.0.27" 3549 + source = "registry+https://github.com/rust-lang/crates.io-index" 3550 + checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" 3551 + 3552 + [[package]] 3553 + name = "serde" 3554 + version = "1.0.228" 3555 + source = "registry+https://github.com/rust-lang/crates.io-index" 3556 + checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 3557 + dependencies = [ 3558 + "serde_core", 3559 + "serde_derive", 3560 + ] 3561 + 3562 + [[package]] 3563 + name = "serde_columnar" 3564 + version = "0.3.14" 3565 + source = "registry+https://github.com/rust-lang/crates.io-index" 3566 + checksum = "2a16e404f17b16d0273460350e29b02d76ba0d70f34afdc9a4fa034c97d6c6eb" 3567 + dependencies = [ 3568 + "itertools 0.11.0", 3569 + "postcard", 3570 + "serde", 3571 + "serde_columnar_derive", 3572 + "thiserror 1.0.69", 3573 + ] 3574 + 3575 + [[package]] 3576 + name = "serde_columnar_derive" 3577 + version = "0.3.7" 3578 + source = "registry+https://github.com/rust-lang/crates.io-index" 3579 + checksum = "45958fce4903f67e871fbf15ac78e289269b21ebd357d6fecacdba233629112e" 3580 + dependencies = [ 3581 + "darling", 3582 + "proc-macro2", 3583 + "quote", 3584 + "syn 2.0.117", 3585 + ] 3586 + 3587 + [[package]] 3588 + name = "serde_core" 3589 + version = "1.0.228" 3590 + source = "registry+https://github.com/rust-lang/crates.io-index" 3591 + checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" 3592 + dependencies = [ 3593 + "serde_derive", 3594 + ] 3595 + 3596 + [[package]] 3597 + name = "serde_derive" 3598 + version = "1.0.228" 3599 + source = "registry+https://github.com/rust-lang/crates.io-index" 3600 + checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" 3601 + dependencies = [ 3602 + "proc-macro2", 3603 + "quote", 3604 + "syn 2.0.117", 3605 + ] 3606 + 3607 + [[package]] 3608 + name = "serde_json" 3609 + version = "1.0.149" 3610 + source = "registry+https://github.com/rust-lang/crates.io-index" 3611 + checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" 3612 + dependencies = [ 3613 + "itoa", 3614 + "memchr", 3615 + "serde", 3616 + "serde_core", 3617 + "zmij", 3618 + ] 3619 + 3620 + [[package]] 3621 + name = "serde_repr" 3622 + version = "0.1.20" 3623 + source = "registry+https://github.com/rust-lang/crates.io-index" 3624 + checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" 3625 + dependencies = [ 3626 + "proc-macro2", 3627 + "quote", 3628 + "syn 2.0.117", 3629 + ] 3630 + 3631 + [[package]] 3632 + name = "sha1" 3633 + version = "0.10.6" 3634 + source = "registry+https://github.com/rust-lang/crates.io-index" 3635 + checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 3636 + dependencies = [ 3637 + "cfg-if", 3638 + "cpufeatures", 3639 + "digest", 3640 + ] 3641 + 3642 + [[package]] 3643 + name = "sha2" 3644 + version = "0.10.9" 3645 + source = "registry+https://github.com/rust-lang/crates.io-index" 3646 + checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 3647 + dependencies = [ 3648 + "cfg-if", 3649 + "cpufeatures", 3650 + "digest", 3651 + ] 3652 + 3653 + [[package]] 3654 + name = "sharded-slab" 3655 + version = "0.1.7" 3656 + source = "registry+https://github.com/rust-lang/crates.io-index" 3657 + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 3658 + dependencies = [ 3659 + "lazy_static", 3660 + ] 3661 + 3662 + [[package]] 3663 + name = "shlex" 3664 + version = "1.3.0" 3665 + source = "registry+https://github.com/rust-lang/crates.io-index" 3666 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 3667 + 3668 + [[package]] 3669 + name = "signal-hook-registry" 3670 + version = "1.4.8" 3671 + source = "registry+https://github.com/rust-lang/crates.io-index" 3672 + checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" 3673 + dependencies = [ 3674 + "errno", 3675 + "libc", 3676 + ] 3677 + 3678 + [[package]] 3679 + name = "simd-adler32" 3680 + version = "0.3.8" 3681 + source = "registry+https://github.com/rust-lang/crates.io-index" 3682 + checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" 3683 + 3684 + [[package]] 3685 + name = "sized-chunks" 3686 + version = "0.6.5" 3687 + source = "registry+https://github.com/rust-lang/crates.io-index" 3688 + checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" 3689 + dependencies = [ 3690 + "bitmaps", 3691 + "typenum", 3692 + ] 3693 + 3694 + [[package]] 3695 + name = "slab" 3696 + version = "0.4.12" 3697 + source = "registry+https://github.com/rust-lang/crates.io-index" 3698 + checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" 3699 + 3700 + [[package]] 3701 + name = "slotmap" 3702 + version = "1.1.1" 3703 + source = "registry+https://github.com/rust-lang/crates.io-index" 3704 + checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" 3705 + dependencies = [ 3706 + "serde", 3707 + "version_check", 3708 + ] 3709 + 3710 + [[package]] 3711 + name = "smallvec" 3712 + version = "1.15.1" 3713 + source = "registry+https://github.com/rust-lang/crates.io-index" 3714 + checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 3715 + dependencies = [ 3716 + "serde", 3717 + ] 3718 + 3719 + [[package]] 3720 + name = "smithay-client-toolkit" 3721 + version = "0.19.2" 3722 + source = "registry+https://github.com/rust-lang/crates.io-index" 3723 + checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" 3724 + dependencies = [ 3725 + "bitflags 2.11.0", 3726 + "calloop 0.13.0", 3727 + "calloop-wayland-source 0.3.0", 3728 + "cursor-icon", 3729 + "libc", 3730 + "log", 3731 + "memmap2", 3732 + "rustix 0.38.44", 3733 + "thiserror 1.0.69", 3734 + "wayland-backend", 3735 + "wayland-client", 3736 + "wayland-csd-frame", 3737 + "wayland-cursor", 3738 + "wayland-protocols", 3739 + "wayland-protocols-wlr", 3740 + "wayland-scanner", 3741 + "xkeysym", 3742 + ] 3743 + 3744 + [[package]] 3745 + name = "smithay-client-toolkit" 3746 + version = "0.20.0" 3747 + source = "registry+https://github.com/rust-lang/crates.io-index" 3748 + checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" 3749 + dependencies = [ 3750 + "bitflags 2.11.0", 3751 + "calloop 0.14.4", 3752 + "calloop-wayland-source 0.4.1", 3753 + "cursor-icon", 3754 + "libc", 3755 + "log", 3756 + "memmap2", 3757 + "rustix 1.1.3", 3758 + "thiserror 2.0.18", 3759 + "wayland-backend", 3760 + "wayland-client", 3761 + "wayland-csd-frame", 3762 + "wayland-cursor", 3763 + "wayland-protocols", 3764 + "wayland-protocols-experimental", 3765 + "wayland-protocols-misc", 3766 + "wayland-protocols-wlr", 3767 + "wayland-scanner", 3768 + "xkeysym", 3769 + ] 3770 + 3771 + [[package]] 3772 + name = "smithay-clipboard" 3773 + version = "0.7.3" 3774 + source = "registry+https://github.com/rust-lang/crates.io-index" 3775 + checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" 3776 + dependencies = [ 3777 + "libc", 3778 + "smithay-client-toolkit 0.20.0", 3779 + "wayland-backend", 3780 + ] 3781 + 3782 + [[package]] 3783 + name = "smol_str" 3784 + version = "0.2.2" 3785 + source = "registry+https://github.com/rust-lang/crates.io-index" 3786 + checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" 3787 + dependencies = [ 3788 + "serde", 3789 + ] 3790 + 3791 + [[package]] 3792 + name = "spin" 3793 + version = "0.9.8" 3794 + source = "registry+https://github.com/rust-lang/crates.io-index" 3795 + checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 3796 + dependencies = [ 3797 + "lock_api", 3798 + ] 3799 + 3800 + [[package]] 3801 + name = "spirv" 3802 + version = "0.3.0+sdk-1.3.268.0" 3803 + source = "registry+https://github.com/rust-lang/crates.io-index" 3804 + checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" 3805 + dependencies = [ 3806 + "bitflags 2.11.0", 3807 + ] 3808 + 3809 + [[package]] 3810 + name = "stable_deref_trait" 3811 + version = "1.2.1" 3812 + source = "registry+https://github.com/rust-lang/crates.io-index" 3813 + checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" 3814 + 3815 + [[package]] 3816 + name = "static_assertions" 3817 + version = "1.1.0" 3818 + source = "registry+https://github.com/rust-lang/crates.io-index" 3819 + checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 3820 + 3821 + [[package]] 3822 + name = "strict-num" 3823 + version = "0.1.1" 3824 + source = "registry+https://github.com/rust-lang/crates.io-index" 3825 + checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" 3826 + 3827 + [[package]] 3828 + name = "strsim" 3829 + version = "0.11.1" 3830 + source = "registry+https://github.com/rust-lang/crates.io-index" 3831 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 3832 + 3833 + [[package]] 3834 + name = "subsecond" 3835 + version = "0.7.3" 3836 + source = "registry+https://github.com/rust-lang/crates.io-index" 3837 + checksum = "8438668e545834d795d04c4335aafc332ce046106521a29f0a5c6501de34187c" 3838 + dependencies = [ 3839 + "js-sys", 3840 + "libc", 3841 + "libloading", 3842 + "memfd", 3843 + "memmap2", 3844 + "serde", 3845 + "subsecond-types", 3846 + "thiserror 2.0.18", 3847 + "wasm-bindgen", 3848 + "wasm-bindgen-futures", 3849 + "web-sys", 3850 + ] 3851 + 3852 + [[package]] 3853 + name = "subsecond-types" 3854 + version = "0.7.3" 3855 + source = "registry+https://github.com/rust-lang/crates.io-index" 3856 + checksum = "1e72f747606fc19fe81d6c59e491af93ed7dcbcb6aad9d1d18b05129914ec298" 3857 + dependencies = [ 3858 + "serde", 3859 + ] 3860 + 3861 + [[package]] 3862 + name = "syn" 3863 + version = "1.0.109" 3864 + source = "registry+https://github.com/rust-lang/crates.io-index" 3865 + checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 3866 + dependencies = [ 3867 + "proc-macro2", 3868 + "quote", 3869 + "unicode-ident", 3870 + ] 3871 + 3872 + [[package]] 3873 + name = "syn" 3874 + version = "2.0.117" 3875 + source = "registry+https://github.com/rust-lang/crates.io-index" 3876 + checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" 3877 + dependencies = [ 3878 + "proc-macro2", 3879 + "quote", 3880 + "unicode-ident", 3881 + ] 3882 + 3883 + [[package]] 3884 + name = "synstructure" 3885 + version = "0.13.2" 3886 + source = "registry+https://github.com/rust-lang/crates.io-index" 3887 + checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" 3888 + dependencies = [ 3889 + "proc-macro2", 3890 + "quote", 3891 + "syn 2.0.117", 3892 + ] 3893 + 3894 + [[package]] 3895 + name = "tempfile" 3896 + version = "3.25.0" 3897 + source = "registry+https://github.com/rust-lang/crates.io-index" 3898 + checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" 3899 + dependencies = [ 3900 + "fastrand", 3901 + "getrandom 0.3.4", 3902 + "once_cell", 3903 + "rustix 1.1.3", 3904 + "windows-sys 0.61.2", 3905 + ] 3906 + 3907 + [[package]] 3908 + name = "termcolor" 3909 + version = "1.4.1" 3910 + source = "registry+https://github.com/rust-lang/crates.io-index" 3911 + checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 3912 + dependencies = [ 3913 + "winapi-util", 3914 + ] 3915 + 3916 + [[package]] 3917 + name = "thiserror" 3918 + version = "1.0.69" 3919 + source = "registry+https://github.com/rust-lang/crates.io-index" 3920 + checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 3921 + dependencies = [ 3922 + "thiserror-impl 1.0.69", 3923 + ] 3924 + 3925 + [[package]] 3926 + name = "thiserror" 3927 + version = "2.0.18" 3928 + source = "registry+https://github.com/rust-lang/crates.io-index" 3929 + checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" 3930 + dependencies = [ 3931 + "thiserror-impl 2.0.18", 3932 + ] 3933 + 3934 + [[package]] 3935 + name = "thiserror-impl" 3936 + version = "1.0.69" 3937 + source = "registry+https://github.com/rust-lang/crates.io-index" 3938 + checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 3939 + dependencies = [ 3940 + "proc-macro2", 3941 + "quote", 3942 + "syn 2.0.117", 3943 + ] 3944 + 3945 + [[package]] 3946 + name = "thiserror-impl" 3947 + version = "2.0.18" 3948 + source = "registry+https://github.com/rust-lang/crates.io-index" 3949 + checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" 3950 + dependencies = [ 3951 + "proc-macro2", 3952 + "quote", 3953 + "syn 2.0.117", 3954 + ] 3955 + 3956 + [[package]] 3957 + name = "thread_local" 3958 + version = "1.1.9" 3959 + source = "registry+https://github.com/rust-lang/crates.io-index" 3960 + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 3961 + dependencies = [ 3962 + "cfg-if", 3963 + ] 3964 + 3965 + [[package]] 3966 + name = "tiff" 3967 + version = "0.10.3" 3968 + source = "registry+https://github.com/rust-lang/crates.io-index" 3969 + checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" 3970 + dependencies = [ 3971 + "fax", 3972 + "flate2", 3973 + "half", 3974 + "quick-error", 3975 + "weezl", 3976 + "zune-jpeg", 3977 + ] 3978 + 3979 + [[package]] 3980 + name = "tiny-skia" 3981 + version = "0.11.4" 3982 + source = "registry+https://github.com/rust-lang/crates.io-index" 3983 + checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" 3984 + dependencies = [ 3985 + "arrayref", 3986 + "arrayvec", 3987 + "bytemuck", 3988 + "cfg-if", 3989 + "log", 3990 + "tiny-skia-path", 3991 + ] 3992 + 3993 + [[package]] 3994 + name = "tiny-skia-path" 3995 + version = "0.11.4" 3996 + source = "registry+https://github.com/rust-lang/crates.io-index" 3997 + checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" 3998 + dependencies = [ 3999 + "arrayref", 4000 + "bytemuck", 4001 + "strict-num", 4002 + ] 4003 + 4004 + [[package]] 4005 + name = "tinystr" 4006 + version = "0.8.2" 4007 + source = "registry+https://github.com/rust-lang/crates.io-index" 4008 + checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" 4009 + dependencies = [ 4010 + "displaydoc", 4011 + "zerovec", 4012 + ] 4013 + 4014 + [[package]] 4015 + name = "toml_datetime" 4016 + version = "0.7.5+spec-1.1.0" 4017 + source = "registry+https://github.com/rust-lang/crates.io-index" 4018 + checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" 4019 + dependencies = [ 4020 + "serde_core", 4021 + ] 4022 + 4023 + [[package]] 4024 + name = "toml_edit" 4025 + version = "0.23.10+spec-1.0.0" 4026 + source = "registry+https://github.com/rust-lang/crates.io-index" 4027 + checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" 4028 + dependencies = [ 4029 + "indexmap", 4030 + "toml_datetime", 4031 + "toml_parser", 4032 + "winnow", 4033 + ] 4034 + 4035 + [[package]] 4036 + name = "toml_parser" 4037 + version = "1.0.9+spec-1.1.0" 4038 + source = "registry+https://github.com/rust-lang/crates.io-index" 4039 + checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" 4040 + dependencies = [ 4041 + "winnow", 4042 + ] 4043 + 4044 + [[package]] 4045 + name = "tracing" 4046 + version = "0.1.44" 4047 + source = "registry+https://github.com/rust-lang/crates.io-index" 4048 + checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" 4049 + dependencies = [ 4050 + "log", 4051 + "pin-project-lite", 4052 + "tracing-attributes", 4053 + "tracing-core", 4054 + ] 4055 + 4056 + [[package]] 4057 + name = "tracing-attributes" 4058 + version = "0.1.31" 4059 + source = "registry+https://github.com/rust-lang/crates.io-index" 4060 + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" 4061 + dependencies = [ 4062 + "proc-macro2", 4063 + "quote", 4064 + "syn 2.0.117", 4065 + ] 4066 + 4067 + [[package]] 4068 + name = "tracing-core" 4069 + version = "0.1.36" 4070 + source = "registry+https://github.com/rust-lang/crates.io-index" 4071 + checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" 4072 + dependencies = [ 4073 + "once_cell", 4074 + "valuable", 4075 + ] 4076 + 4077 + [[package]] 4078 + name = "tracing-log" 4079 + version = "0.2.0" 4080 + source = "registry+https://github.com/rust-lang/crates.io-index" 4081 + checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 4082 + dependencies = [ 4083 + "log", 4084 + "once_cell", 4085 + "tracing-core", 4086 + ] 4087 + 4088 + [[package]] 4089 + name = "tracing-subscriber" 4090 + version = "0.3.22" 4091 + source = "registry+https://github.com/rust-lang/crates.io-index" 4092 + checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" 4093 + dependencies = [ 4094 + "matchers", 4095 + "nu-ansi-term", 4096 + "once_cell", 4097 + "regex-automata", 4098 + "sharded-slab", 4099 + "smallvec", 4100 + "thread_local", 4101 + "tracing", 4102 + "tracing-core", 4103 + "tracing-log", 4104 + ] 4105 + 4106 + [[package]] 4107 + name = "ttf-parser" 4108 + version = "0.25.1" 4109 + source = "registry+https://github.com/rust-lang/crates.io-index" 4110 + checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" 4111 + 4112 + [[package]] 4113 + name = "tungstenite" 4114 + version = "0.27.0" 4115 + source = "registry+https://github.com/rust-lang/crates.io-index" 4116 + checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" 4117 + dependencies = [ 4118 + "bytes", 4119 + "data-encoding", 4120 + "http", 4121 + "httparse", 4122 + "log", 4123 + "rand 0.9.2", 4124 + "sha1", 4125 + "thiserror 2.0.18", 4126 + "utf-8", 4127 + ] 4128 + 4129 + [[package]] 4130 + name = "twox-hash" 4131 + version = "2.1.2" 4132 + source = "registry+https://github.com/rust-lang/crates.io-index" 4133 + checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" 4134 + 4135 + [[package]] 4136 + name = "type-map" 4137 + version = "0.5.1" 4138 + source = "registry+https://github.com/rust-lang/crates.io-index" 4139 + checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" 4140 + dependencies = [ 4141 + "rustc-hash 2.1.1", 4142 + ] 4143 + 4144 + [[package]] 4145 + name = "typenum" 4146 + version = "1.19.0" 4147 + source = "registry+https://github.com/rust-lang/crates.io-index" 4148 + checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" 4149 + 4150 + [[package]] 4151 + name = "ucd-trie" 4152 + version = "0.1.7" 4153 + source = "registry+https://github.com/rust-lang/crates.io-index" 4154 + checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" 4155 + 4156 + [[package]] 4157 + name = "uds_windows" 4158 + version = "1.1.0" 4159 + source = "registry+https://github.com/rust-lang/crates.io-index" 4160 + checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" 4161 + dependencies = [ 4162 + "memoffset", 4163 + "tempfile", 4164 + "winapi", 4165 + ] 4166 + 4167 + [[package]] 4168 + name = "unicode-ident" 4169 + version = "1.0.24" 4170 + source = "registry+https://github.com/rust-lang/crates.io-index" 4171 + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" 4172 + 4173 + [[package]] 4174 + name = "unicode-segmentation" 4175 + version = "1.12.0" 4176 + source = "registry+https://github.com/rust-lang/crates.io-index" 4177 + checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 4178 + 4179 + [[package]] 4180 + name = "unicode-width" 4181 + version = "0.1.14" 4182 + source = "registry+https://github.com/rust-lang/crates.io-index" 4183 + checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 4184 + 4185 + [[package]] 4186 + name = "unicode-xid" 4187 + version = "0.2.6" 4188 + source = "registry+https://github.com/rust-lang/crates.io-index" 4189 + checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 4190 + 4191 + [[package]] 4192 + name = "url" 4193 + version = "2.5.8" 4194 + source = "registry+https://github.com/rust-lang/crates.io-index" 4195 + checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" 4196 + dependencies = [ 4197 + "form_urlencoded", 4198 + "idna", 4199 + "percent-encoding", 4200 + "serde", 4201 + ] 4202 + 4203 + [[package]] 4204 + name = "utf-8" 4205 + version = "0.7.6" 4206 + source = "registry+https://github.com/rust-lang/crates.io-index" 4207 + checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 4208 + 4209 + [[package]] 4210 + name = "utf8_iter" 4211 + version = "1.0.4" 4212 + source = "registry+https://github.com/rust-lang/crates.io-index" 4213 + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 4214 + 4215 + [[package]] 4216 + name = "uuid" 4217 + version = "1.21.0" 4218 + source = "registry+https://github.com/rust-lang/crates.io-index" 4219 + checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" 4220 + dependencies = [ 4221 + "js-sys", 4222 + "serde_core", 4223 + "wasm-bindgen", 4224 + ] 4225 + 4226 + [[package]] 4227 + name = "valuable" 4228 + version = "0.1.1" 4229 + source = "registry+https://github.com/rust-lang/crates.io-index" 4230 + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 4231 + 4232 + [[package]] 4233 + name = "version_check" 4234 + version = "0.9.5" 4235 + source = "registry+https://github.com/rust-lang/crates.io-index" 4236 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 4237 + 4238 + [[package]] 4239 + name = "walkdir" 4240 + version = "2.5.0" 4241 + source = "registry+https://github.com/rust-lang/crates.io-index" 4242 + checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 4243 + dependencies = [ 4244 + "same-file", 4245 + "winapi-util", 4246 + ] 4247 + 4248 + [[package]] 4249 + name = "warnings" 4250 + version = "0.2.1" 4251 + source = "registry+https://github.com/rust-lang/crates.io-index" 4252 + checksum = "64f68998838dab65727c9b30465595c6f7c953313559371ca8bf31759b3680ad" 4253 + dependencies = [ 4254 + "pin-project", 4255 + "tracing", 4256 + "warnings-macro", 4257 + ] 4258 + 4259 + [[package]] 4260 + name = "warnings-macro" 4261 + version = "0.2.0" 4262 + source = "registry+https://github.com/rust-lang/crates.io-index" 4263 + checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571" 4264 + dependencies = [ 4265 + "proc-macro2", 4266 + "quote", 4267 + "syn 2.0.117", 4268 + ] 4269 + 4270 + [[package]] 4271 + name = "wasi" 4272 + version = "0.11.1+wasi-snapshot-preview1" 4273 + source = "registry+https://github.com/rust-lang/crates.io-index" 4274 + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 4275 + 4276 + [[package]] 4277 + name = "wasip2" 4278 + version = "1.0.2+wasi-0.2.9" 4279 + source = "registry+https://github.com/rust-lang/crates.io-index" 4280 + checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" 4281 + dependencies = [ 4282 + "wit-bindgen", 4283 + ] 4284 + 4285 + [[package]] 4286 + name = "wasm-bindgen" 4287 + version = "0.2.109" 4288 + source = "registry+https://github.com/rust-lang/crates.io-index" 4289 + checksum = "9ff9c7baef35ac3c0e17d8bfc9ad75eb62f85a2f02bccc906699dadb0aa9c622" 4290 + dependencies = [ 4291 + "cfg-if", 4292 + "once_cell", 4293 + "rustversion", 4294 + "wasm-bindgen-macro", 4295 + "wasm-bindgen-shared", 4296 + ] 4297 + 4298 + [[package]] 4299 + name = "wasm-bindgen-futures" 4300 + version = "0.4.59" 4301 + source = "registry+https://github.com/rust-lang/crates.io-index" 4302 + checksum = "d24699cd39db9966cf6e2ef10d2f72779c961ad905911f395ea201c3ec9f545d" 4303 + dependencies = [ 4304 + "cfg-if", 4305 + "futures-util", 4306 + "js-sys", 4307 + "once_cell", 4308 + "wasm-bindgen", 4309 + "web-sys", 4310 + ] 4311 + 4312 + [[package]] 4313 + name = "wasm-bindgen-macro" 4314 + version = "0.2.109" 4315 + source = "registry+https://github.com/rust-lang/crates.io-index" 4316 + checksum = "39455e84ad887a0bbc93c116d72403f1bb0a39e37dd6f235a43e2128a0c7f1fd" 4317 + dependencies = [ 4318 + "quote", 4319 + "wasm-bindgen-macro-support", 4320 + ] 4321 + 4322 + [[package]] 4323 + name = "wasm-bindgen-macro-support" 4324 + version = "0.2.109" 4325 + source = "registry+https://github.com/rust-lang/crates.io-index" 4326 + checksum = "dff4761f60b0b51fd13fec8764167b7bbcc34498ce3e52805fe1db6f2d56b6d6" 4327 + dependencies = [ 4328 + "bumpalo", 4329 + "proc-macro2", 4330 + "quote", 4331 + "syn 2.0.117", 4332 + "wasm-bindgen-shared", 4333 + ] 4334 + 4335 + [[package]] 4336 + name = "wasm-bindgen-shared" 4337 + version = "0.2.109" 4338 + source = "registry+https://github.com/rust-lang/crates.io-index" 4339 + checksum = "bc6a171c53d98021a93a474c4a4579d76ba97f9517d871bc12e27640f218b6dd" 4340 + dependencies = [ 4341 + "unicode-ident", 4342 + ] 4343 + 4344 + [[package]] 4345 + name = "wayland-backend" 4346 + version = "0.3.12" 4347 + source = "registry+https://github.com/rust-lang/crates.io-index" 4348 + checksum = "fee64194ccd96bf648f42a65a7e589547096dfa702f7cadef84347b66ad164f9" 4349 + dependencies = [ 4350 + "cc", 4351 + "downcast-rs", 4352 + "rustix 1.1.3", 4353 + "scoped-tls", 4354 + "smallvec", 4355 + "wayland-sys", 4356 + ] 4357 + 4358 + [[package]] 4359 + name = "wayland-client" 4360 + version = "0.31.12" 4361 + source = "registry+https://github.com/rust-lang/crates.io-index" 4362 + checksum = "b8e6faa537fbb6c186cb9f1d41f2f811a4120d1b57ec61f50da451a0c5122bec" 4363 + dependencies = [ 4364 + "bitflags 2.11.0", 4365 + "rustix 1.1.3", 4366 + "wayland-backend", 4367 + "wayland-scanner", 4368 + ] 4369 + 4370 + [[package]] 4371 + name = "wayland-csd-frame" 4372 + version = "0.3.0" 4373 + source = "registry+https://github.com/rust-lang/crates.io-index" 4374 + checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" 4375 + dependencies = [ 4376 + "bitflags 2.11.0", 4377 + "cursor-icon", 4378 + "wayland-backend", 4379 + ] 4380 + 4381 + [[package]] 4382 + name = "wayland-cursor" 4383 + version = "0.31.12" 4384 + source = "registry+https://github.com/rust-lang/crates.io-index" 4385 + checksum = "5864c4b5b6064b06b1e8b74ead4a98a6c45a285fe7a0e784d24735f011fdb078" 4386 + dependencies = [ 4387 + "rustix 1.1.3", 4388 + "wayland-client", 4389 + "xcursor", 4390 + ] 4391 + 4392 + [[package]] 4393 + name = "wayland-protocols" 4394 + version = "0.32.10" 4395 + source = "registry+https://github.com/rust-lang/crates.io-index" 4396 + checksum = "baeda9ffbcfc8cd6ddaade385eaf2393bd2115a69523c735f12242353c3df4f3" 4397 + dependencies = [ 4398 + "bitflags 2.11.0", 4399 + "wayland-backend", 4400 + "wayland-client", 4401 + "wayland-scanner", 4402 + ] 4403 + 4404 + [[package]] 4405 + name = "wayland-protocols-experimental" 4406 + version = "20250721.0.1" 4407 + source = "registry+https://github.com/rust-lang/crates.io-index" 4408 + checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" 4409 + dependencies = [ 4410 + "bitflags 2.11.0", 4411 + "wayland-backend", 4412 + "wayland-client", 4413 + "wayland-protocols", 4414 + "wayland-scanner", 4415 + ] 4416 + 4417 + [[package]] 4418 + name = "wayland-protocols-misc" 4419 + version = "0.3.10" 4420 + source = "registry+https://github.com/rust-lang/crates.io-index" 4421 + checksum = "791c58fdeec5406aa37169dd815327d1e47f334219b523444bc26d70ceb4c34e" 4422 + dependencies = [ 4423 + "bitflags 2.11.0", 4424 + "wayland-backend", 4425 + "wayland-client", 4426 + "wayland-protocols", 4427 + "wayland-scanner", 4428 + ] 4429 + 4430 + [[package]] 4431 + name = "wayland-protocols-plasma" 4432 + version = "0.3.10" 4433 + source = "registry+https://github.com/rust-lang/crates.io-index" 4434 + checksum = "aa98634619300a535a9a97f338aed9a5ff1e01a461943e8346ff4ae26007306b" 4435 + dependencies = [ 4436 + "bitflags 2.11.0", 4437 + "wayland-backend", 4438 + "wayland-client", 4439 + "wayland-protocols", 4440 + "wayland-scanner", 4441 + ] 4442 + 4443 + [[package]] 4444 + name = "wayland-protocols-wlr" 4445 + version = "0.3.10" 4446 + source = "registry+https://github.com/rust-lang/crates.io-index" 4447 + checksum = "e9597cdf02cf0c34cd5823786dce6b5ae8598f05c2daf5621b6e178d4f7345f3" 4448 + dependencies = [ 4449 + "bitflags 2.11.0", 4450 + "wayland-backend", 4451 + "wayland-client", 4452 + "wayland-protocols", 4453 + "wayland-scanner", 4454 + ] 4455 + 4456 + [[package]] 4457 + name = "wayland-scanner" 4458 + version = "0.31.8" 4459 + source = "registry+https://github.com/rust-lang/crates.io-index" 4460 + checksum = "5423e94b6a63e68e439803a3e153a9252d5ead12fd853334e2ad33997e3889e3" 4461 + dependencies = [ 4462 + "proc-macro2", 4463 + "quick-xml", 4464 + "quote", 4465 + ] 4466 + 4467 + [[package]] 4468 + name = "wayland-sys" 4469 + version = "0.31.8" 4470 + source = "registry+https://github.com/rust-lang/crates.io-index" 4471 + checksum = "1e6dbfc3ac5ef974c92a2235805cc0114033018ae1290a72e474aa8b28cbbdfd" 4472 + dependencies = [ 4473 + "dlib", 4474 + "log", 4475 + "once_cell", 4476 + "pkg-config", 4477 + ] 4478 + 4479 + [[package]] 4480 + name = "web-sys" 4481 + version = "0.3.86" 4482 + source = "registry+https://github.com/rust-lang/crates.io-index" 4483 + checksum = "668fa5d00434e890a452ab060d24e3904d1be93f7bb01b70e5603baa2b8ab23b" 4484 + dependencies = [ 4485 + "js-sys", 4486 + "wasm-bindgen", 4487 + ] 4488 + 4489 + [[package]] 4490 + name = "web-time" 4491 + version = "1.1.0" 4492 + source = "registry+https://github.com/rust-lang/crates.io-index" 4493 + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 4494 + dependencies = [ 4495 + "js-sys", 4496 + "wasm-bindgen", 4497 + ] 4498 + 4499 + [[package]] 4500 + name = "webbrowser" 4501 + version = "1.1.0" 4502 + source = "registry+https://github.com/rust-lang/crates.io-index" 4503 + checksum = "3f00bb839c1cf1e3036066614cbdcd035ecf215206691ea646aa3c60a24f68f2" 4504 + dependencies = [ 4505 + "core-foundation 0.10.1", 4506 + "jni", 4507 + "log", 4508 + "ndk-context", 4509 + "objc2 0.6.3", 4510 + "objc2-foundation 0.3.2", 4511 + "url", 4512 + "web-sys", 4513 + ] 4514 + 4515 + [[package]] 4516 + name = "weezl" 4517 + version = "0.1.12" 4518 + source = "registry+https://github.com/rust-lang/crates.io-index" 4519 + checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" 4520 + 4521 + [[package]] 4522 + name = "wgpu" 4523 + version = "27.0.1" 4524 + source = "registry+https://github.com/rust-lang/crates.io-index" 4525 + checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" 4526 + dependencies = [ 4527 + "arrayvec", 4528 + "bitflags 2.11.0", 4529 + "cfg-if", 4530 + "cfg_aliases", 4531 + "document-features", 4532 + "hashbrown 0.16.1", 4533 + "js-sys", 4534 + "log", 4535 + "naga", 4536 + "parking_lot", 4537 + "portable-atomic", 4538 + "profiling", 4539 + "raw-window-handle", 4540 + "smallvec", 4541 + "static_assertions", 4542 + "wasm-bindgen", 4543 + "wasm-bindgen-futures", 4544 + "web-sys", 4545 + "wgpu-core", 4546 + "wgpu-hal", 4547 + "wgpu-types", 4548 + ] 4549 + 4550 + [[package]] 4551 + name = "wgpu-core" 4552 + version = "27.0.3" 4553 + source = "registry+https://github.com/rust-lang/crates.io-index" 4554 + checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" 4555 + dependencies = [ 4556 + "arrayvec", 4557 + "bit-set", 4558 + "bit-vec", 4559 + "bitflags 2.11.0", 4560 + "bytemuck", 4561 + "cfg_aliases", 4562 + "document-features", 4563 + "hashbrown 0.16.1", 4564 + "indexmap", 4565 + "log", 4566 + "naga", 4567 + "once_cell", 4568 + "parking_lot", 4569 + "portable-atomic", 4570 + "profiling", 4571 + "raw-window-handle", 4572 + "rustc-hash 1.1.0", 4573 + "smallvec", 4574 + "thiserror 2.0.18", 4575 + "wgpu-core-deps-apple", 4576 + "wgpu-core-deps-emscripten", 4577 + "wgpu-core-deps-windows-linux-android", 4578 + "wgpu-hal", 4579 + "wgpu-types", 4580 + ] 4581 + 4582 + [[package]] 4583 + name = "wgpu-core-deps-apple" 4584 + version = "27.0.0" 4585 + source = "registry+https://github.com/rust-lang/crates.io-index" 4586 + checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" 4587 + dependencies = [ 4588 + "wgpu-hal", 4589 + ] 4590 + 4591 + [[package]] 4592 + name = "wgpu-core-deps-emscripten" 4593 + version = "27.0.0" 4594 + source = "registry+https://github.com/rust-lang/crates.io-index" 4595 + checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" 4596 + dependencies = [ 4597 + "wgpu-hal", 4598 + ] 4599 + 4600 + [[package]] 4601 + name = "wgpu-core-deps-windows-linux-android" 4602 + version = "27.0.0" 4603 + source = "registry+https://github.com/rust-lang/crates.io-index" 4604 + checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" 4605 + dependencies = [ 4606 + "wgpu-hal", 4607 + ] 4608 + 4609 + [[package]] 4610 + name = "wgpu-hal" 4611 + version = "27.0.4" 4612 + source = "registry+https://github.com/rust-lang/crates.io-index" 4613 + checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" 4614 + dependencies = [ 4615 + "android_system_properties", 4616 + "arrayvec", 4617 + "ash", 4618 + "bit-set", 4619 + "bitflags 2.11.0", 4620 + "block", 4621 + "bytemuck", 4622 + "cfg-if", 4623 + "cfg_aliases", 4624 + "core-graphics-types 0.2.0", 4625 + "glow", 4626 + "glutin_wgl_sys", 4627 + "gpu-alloc", 4628 + "gpu-allocator", 4629 + "gpu-descriptor", 4630 + "hashbrown 0.16.1", 4631 + "js-sys", 4632 + "khronos-egl", 4633 + "libc", 4634 + "libloading", 4635 + "log", 4636 + "metal", 4637 + "naga", 4638 + "ndk-sys", 4639 + "objc", 4640 + "once_cell", 4641 + "ordered-float", 4642 + "parking_lot", 4643 + "portable-atomic", 4644 + "portable-atomic-util", 4645 + "profiling", 4646 + "range-alloc", 4647 + "raw-window-handle", 4648 + "renderdoc-sys", 4649 + "smallvec", 4650 + "thiserror 2.0.18", 4651 + "wasm-bindgen", 4652 + "web-sys", 4653 + "wgpu-types", 4654 + "windows 0.58.0", 4655 + "windows-core 0.58.0", 4656 + ] 4657 + 4658 + [[package]] 4659 + name = "wgpu-types" 4660 + version = "27.0.1" 4661 + source = "registry+https://github.com/rust-lang/crates.io-index" 4662 + checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" 4663 + dependencies = [ 4664 + "bitflags 2.11.0", 4665 + "bytemuck", 4666 + "js-sys", 4667 + "log", 4668 + "thiserror 2.0.18", 4669 + "web-sys", 4670 + ] 4671 + 4672 + [[package]] 4673 + name = "winapi" 4674 + version = "0.3.9" 4675 + source = "registry+https://github.com/rust-lang/crates.io-index" 4676 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 4677 + dependencies = [ 4678 + "winapi-i686-pc-windows-gnu", 4679 + "winapi-x86_64-pc-windows-gnu", 4680 + ] 4681 + 4682 + [[package]] 4683 + name = "winapi-i686-pc-windows-gnu" 4684 + version = "0.4.0" 4685 + source = "registry+https://github.com/rust-lang/crates.io-index" 4686 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 4687 + 4688 + [[package]] 4689 + name = "winapi-util" 4690 + version = "0.1.11" 4691 + source = "registry+https://github.com/rust-lang/crates.io-index" 4692 + checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" 4693 + dependencies = [ 4694 + "windows-sys 0.61.2", 4695 + ] 4696 + 4697 + [[package]] 4698 + name = "winapi-x86_64-pc-windows-gnu" 4699 + version = "0.4.0" 4700 + source = "registry+https://github.com/rust-lang/crates.io-index" 4701 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 4702 + 4703 + [[package]] 4704 + name = "windows" 4705 + version = "0.58.0" 4706 + source = "registry+https://github.com/rust-lang/crates.io-index" 4707 + checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" 4708 + dependencies = [ 4709 + "windows-core 0.58.0", 4710 + "windows-targets 0.52.6", 4711 + ] 4712 + 4713 + [[package]] 4714 + name = "windows" 4715 + version = "0.61.3" 4716 + source = "registry+https://github.com/rust-lang/crates.io-index" 4717 + checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" 4718 + dependencies = [ 4719 + "windows-collections", 4720 + "windows-core 0.61.2", 4721 + "windows-future", 4722 + "windows-link 0.1.3", 4723 + "windows-numerics", 4724 + ] 4725 + 4726 + [[package]] 4727 + name = "windows-collections" 4728 + version = "0.2.0" 4729 + source = "registry+https://github.com/rust-lang/crates.io-index" 4730 + checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" 4731 + dependencies = [ 4732 + "windows-core 0.61.2", 4733 + ] 4734 + 4735 + [[package]] 4736 + name = "windows-core" 4737 + version = "0.58.0" 4738 + source = "registry+https://github.com/rust-lang/crates.io-index" 4739 + checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" 4740 + dependencies = [ 4741 + "windows-implement 0.58.0", 4742 + "windows-interface 0.58.0", 4743 + "windows-result 0.2.0", 4744 + "windows-strings 0.1.0", 4745 + "windows-targets 0.52.6", 4746 + ] 4747 + 4748 + [[package]] 4749 + name = "windows-core" 4750 + version = "0.61.2" 4751 + source = "registry+https://github.com/rust-lang/crates.io-index" 4752 + checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 4753 + dependencies = [ 4754 + "windows-implement 0.60.2", 4755 + "windows-interface 0.59.3", 4756 + "windows-link 0.1.3", 4757 + "windows-result 0.3.4", 4758 + "windows-strings 0.4.2", 4759 + ] 4760 + 4761 + [[package]] 4762 + name = "windows-future" 4763 + version = "0.2.1" 4764 + source = "registry+https://github.com/rust-lang/crates.io-index" 4765 + checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" 4766 + dependencies = [ 4767 + "windows-core 0.61.2", 4768 + "windows-link 0.1.3", 4769 + "windows-threading", 4770 + ] 4771 + 4772 + [[package]] 4773 + name = "windows-implement" 4774 + version = "0.58.0" 4775 + source = "registry+https://github.com/rust-lang/crates.io-index" 4776 + checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" 4777 + dependencies = [ 4778 + "proc-macro2", 4779 + "quote", 4780 + "syn 2.0.117", 4781 + ] 4782 + 4783 + [[package]] 4784 + name = "windows-implement" 4785 + version = "0.60.2" 4786 + source = "registry+https://github.com/rust-lang/crates.io-index" 4787 + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" 4788 + dependencies = [ 4789 + "proc-macro2", 4790 + "quote", 4791 + "syn 2.0.117", 4792 + ] 4793 + 4794 + [[package]] 4795 + name = "windows-interface" 4796 + version = "0.58.0" 4797 + source = "registry+https://github.com/rust-lang/crates.io-index" 4798 + checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" 4799 + dependencies = [ 4800 + "proc-macro2", 4801 + "quote", 4802 + "syn 2.0.117", 4803 + ] 4804 + 4805 + [[package]] 4806 + name = "windows-interface" 4807 + version = "0.59.3" 4808 + source = "registry+https://github.com/rust-lang/crates.io-index" 4809 + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" 4810 + dependencies = [ 4811 + "proc-macro2", 4812 + "quote", 4813 + "syn 2.0.117", 4814 + ] 4815 + 4816 + [[package]] 4817 + name = "windows-link" 4818 + version = "0.1.3" 4819 + source = "registry+https://github.com/rust-lang/crates.io-index" 4820 + checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 4821 + 4822 + [[package]] 4823 + name = "windows-link" 4824 + version = "0.2.1" 4825 + source = "registry+https://github.com/rust-lang/crates.io-index" 4826 + checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 4827 + 4828 + [[package]] 4829 + name = "windows-numerics" 4830 + version = "0.2.0" 4831 + source = "registry+https://github.com/rust-lang/crates.io-index" 4832 + checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" 4833 + dependencies = [ 4834 + "windows-core 0.61.2", 4835 + "windows-link 0.1.3", 4836 + ] 4837 + 4838 + [[package]] 4839 + name = "windows-result" 4840 + version = "0.2.0" 4841 + source = "registry+https://github.com/rust-lang/crates.io-index" 4842 + checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" 4843 + dependencies = [ 4844 + "windows-targets 0.52.6", 4845 + ] 4846 + 4847 + [[package]] 4848 + name = "windows-result" 4849 + version = "0.3.4" 4850 + source = "registry+https://github.com/rust-lang/crates.io-index" 4851 + checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 4852 + dependencies = [ 4853 + "windows-link 0.1.3", 4854 + ] 4855 + 4856 + [[package]] 4857 + name = "windows-result" 4858 + version = "0.4.1" 4859 + source = "registry+https://github.com/rust-lang/crates.io-index" 4860 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 4861 + dependencies = [ 4862 + "windows-link 0.2.1", 4863 + ] 4864 + 4865 + [[package]] 4866 + name = "windows-strings" 4867 + version = "0.1.0" 4868 + source = "registry+https://github.com/rust-lang/crates.io-index" 4869 + checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" 4870 + dependencies = [ 4871 + "windows-result 0.2.0", 4872 + "windows-targets 0.52.6", 4873 + ] 4874 + 4875 + [[package]] 4876 + name = "windows-strings" 4877 + version = "0.4.2" 4878 + source = "registry+https://github.com/rust-lang/crates.io-index" 4879 + checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 4880 + dependencies = [ 4881 + "windows-link 0.1.3", 4882 + ] 4883 + 4884 + [[package]] 4885 + name = "windows-sys" 4886 + version = "0.45.0" 4887 + source = "registry+https://github.com/rust-lang/crates.io-index" 4888 + checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 4889 + dependencies = [ 4890 + "windows-targets 0.42.2", 4891 + ] 4892 + 4893 + [[package]] 4894 + name = "windows-sys" 4895 + version = "0.52.0" 4896 + source = "registry+https://github.com/rust-lang/crates.io-index" 4897 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 4898 + dependencies = [ 4899 + "windows-targets 0.52.6", 4900 + ] 4901 + 4902 + [[package]] 4903 + name = "windows-sys" 4904 + version = "0.59.0" 4905 + source = "registry+https://github.com/rust-lang/crates.io-index" 4906 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 4907 + dependencies = [ 4908 + "windows-targets 0.52.6", 4909 + ] 4910 + 4911 + [[package]] 4912 + name = "windows-sys" 4913 + version = "0.60.2" 4914 + source = "registry+https://github.com/rust-lang/crates.io-index" 4915 + checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 4916 + dependencies = [ 4917 + "windows-targets 0.53.5", 4918 + ] 4919 + 4920 + [[package]] 4921 + name = "windows-sys" 4922 + version = "0.61.2" 4923 + source = "registry+https://github.com/rust-lang/crates.io-index" 4924 + checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" 4925 + dependencies = [ 4926 + "windows-link 0.2.1", 4927 + ] 4928 + 4929 + [[package]] 4930 + name = "windows-targets" 4931 + version = "0.42.2" 4932 + source = "registry+https://github.com/rust-lang/crates.io-index" 4933 + checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 4934 + dependencies = [ 4935 + "windows_aarch64_gnullvm 0.42.2", 4936 + "windows_aarch64_msvc 0.42.2", 4937 + "windows_i686_gnu 0.42.2", 4938 + "windows_i686_msvc 0.42.2", 4939 + "windows_x86_64_gnu 0.42.2", 4940 + "windows_x86_64_gnullvm 0.42.2", 4941 + "windows_x86_64_msvc 0.42.2", 4942 + ] 4943 + 4944 + [[package]] 4945 + name = "windows-targets" 4946 + version = "0.52.6" 4947 + source = "registry+https://github.com/rust-lang/crates.io-index" 4948 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 4949 + dependencies = [ 4950 + "windows_aarch64_gnullvm 0.52.6", 4951 + "windows_aarch64_msvc 0.52.6", 4952 + "windows_i686_gnu 0.52.6", 4953 + "windows_i686_gnullvm 0.52.6", 4954 + "windows_i686_msvc 0.52.6", 4955 + "windows_x86_64_gnu 0.52.6", 4956 + "windows_x86_64_gnullvm 0.52.6", 4957 + "windows_x86_64_msvc 0.52.6", 4958 + ] 4959 + 4960 + [[package]] 4961 + name = "windows-targets" 4962 + version = "0.53.5" 4963 + source = "registry+https://github.com/rust-lang/crates.io-index" 4964 + checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" 4965 + dependencies = [ 4966 + "windows-link 0.2.1", 4967 + "windows_aarch64_gnullvm 0.53.1", 4968 + "windows_aarch64_msvc 0.53.1", 4969 + "windows_i686_gnu 0.53.1", 4970 + "windows_i686_gnullvm 0.53.1", 4971 + "windows_i686_msvc 0.53.1", 4972 + "windows_x86_64_gnu 0.53.1", 4973 + "windows_x86_64_gnullvm 0.53.1", 4974 + "windows_x86_64_msvc 0.53.1", 4975 + ] 4976 + 4977 + [[package]] 4978 + name = "windows-threading" 4979 + version = "0.1.0" 4980 + source = "registry+https://github.com/rust-lang/crates.io-index" 4981 + checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" 4982 + dependencies = [ 4983 + "windows-link 0.1.3", 4984 + ] 4985 + 4986 + [[package]] 4987 + name = "windows_aarch64_gnullvm" 4988 + version = "0.42.2" 4989 + source = "registry+https://github.com/rust-lang/crates.io-index" 4990 + checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 4991 + 4992 + [[package]] 4993 + name = "windows_aarch64_gnullvm" 4994 + version = "0.52.6" 4995 + source = "registry+https://github.com/rust-lang/crates.io-index" 4996 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 4997 + 4998 + [[package]] 4999 + name = "windows_aarch64_gnullvm" 5000 + version = "0.53.1" 5001 + source = "registry+https://github.com/rust-lang/crates.io-index" 5002 + checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" 5003 + 5004 + [[package]] 5005 + name = "windows_aarch64_msvc" 5006 + version = "0.42.2" 5007 + source = "registry+https://github.com/rust-lang/crates.io-index" 5008 + checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 5009 + 5010 + [[package]] 5011 + name = "windows_aarch64_msvc" 5012 + version = "0.52.6" 5013 + source = "registry+https://github.com/rust-lang/crates.io-index" 5014 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 5015 + 5016 + [[package]] 5017 + name = "windows_aarch64_msvc" 5018 + version = "0.53.1" 5019 + source = "registry+https://github.com/rust-lang/crates.io-index" 5020 + checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" 5021 + 5022 + [[package]] 5023 + name = "windows_i686_gnu" 5024 + version = "0.42.2" 5025 + source = "registry+https://github.com/rust-lang/crates.io-index" 5026 + checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 5027 + 5028 + [[package]] 5029 + name = "windows_i686_gnu" 5030 + version = "0.52.6" 5031 + source = "registry+https://github.com/rust-lang/crates.io-index" 5032 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 5033 + 5034 + [[package]] 5035 + name = "windows_i686_gnu" 5036 + version = "0.53.1" 5037 + source = "registry+https://github.com/rust-lang/crates.io-index" 5038 + checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" 5039 + 5040 + [[package]] 5041 + name = "windows_i686_gnullvm" 5042 + version = "0.52.6" 5043 + source = "registry+https://github.com/rust-lang/crates.io-index" 5044 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 5045 + 5046 + [[package]] 5047 + name = "windows_i686_gnullvm" 5048 + version = "0.53.1" 5049 + source = "registry+https://github.com/rust-lang/crates.io-index" 5050 + checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" 5051 + 5052 + [[package]] 5053 + name = "windows_i686_msvc" 5054 + version = "0.42.2" 5055 + source = "registry+https://github.com/rust-lang/crates.io-index" 5056 + checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 5057 + 5058 + [[package]] 5059 + name = "windows_i686_msvc" 5060 + version = "0.52.6" 5061 + source = "registry+https://github.com/rust-lang/crates.io-index" 5062 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 5063 + 5064 + [[package]] 5065 + name = "windows_i686_msvc" 5066 + version = "0.53.1" 5067 + source = "registry+https://github.com/rust-lang/crates.io-index" 5068 + checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" 5069 + 5070 + [[package]] 5071 + name = "windows_x86_64_gnu" 5072 + version = "0.42.2" 5073 + source = "registry+https://github.com/rust-lang/crates.io-index" 5074 + checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 5075 + 5076 + [[package]] 5077 + name = "windows_x86_64_gnu" 5078 + version = "0.52.6" 5079 + source = "registry+https://github.com/rust-lang/crates.io-index" 5080 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 5081 + 5082 + [[package]] 5083 + name = "windows_x86_64_gnu" 5084 + version = "0.53.1" 5085 + source = "registry+https://github.com/rust-lang/crates.io-index" 5086 + checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" 5087 + 5088 + [[package]] 5089 + name = "windows_x86_64_gnullvm" 5090 + version = "0.42.2" 5091 + source = "registry+https://github.com/rust-lang/crates.io-index" 5092 + checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 5093 + 5094 + [[package]] 5095 + name = "windows_x86_64_gnullvm" 5096 + version = "0.52.6" 5097 + source = "registry+https://github.com/rust-lang/crates.io-index" 5098 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 5099 + 5100 + [[package]] 5101 + name = "windows_x86_64_gnullvm" 5102 + version = "0.53.1" 5103 + source = "registry+https://github.com/rust-lang/crates.io-index" 5104 + checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" 5105 + 5106 + [[package]] 5107 + name = "windows_x86_64_msvc" 5108 + version = "0.42.2" 5109 + source = "registry+https://github.com/rust-lang/crates.io-index" 5110 + checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 5111 + 5112 + [[package]] 5113 + name = "windows_x86_64_msvc" 5114 + version = "0.52.6" 5115 + source = "registry+https://github.com/rust-lang/crates.io-index" 5116 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 5117 + 5118 + [[package]] 5119 + name = "windows_x86_64_msvc" 5120 + version = "0.53.1" 5121 + source = "registry+https://github.com/rust-lang/crates.io-index" 5122 + checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" 5123 + 5124 + [[package]] 5125 + name = "winit" 5126 + version = "0.30.12" 5127 + source = "registry+https://github.com/rust-lang/crates.io-index" 5128 + checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" 5129 + dependencies = [ 5130 + "ahash", 5131 + "android-activity", 5132 + "atomic-waker", 5133 + "bitflags 2.11.0", 5134 + "block2", 5135 + "bytemuck", 5136 + "calloop 0.13.0", 5137 + "cfg_aliases", 5138 + "concurrent-queue", 5139 + "core-foundation 0.9.4", 5140 + "core-graphics", 5141 + "cursor-icon", 5142 + "dpi", 5143 + "js-sys", 5144 + "libc", 5145 + "memmap2", 5146 + "ndk", 5147 + "objc2 0.5.2", 5148 + "objc2-app-kit 0.2.2", 5149 + "objc2-foundation 0.2.2", 5150 + "objc2-ui-kit", 5151 + "orbclient", 5152 + "percent-encoding", 5153 + "pin-project", 5154 + "raw-window-handle", 5155 + "redox_syscall 0.4.1", 5156 + "rustix 0.38.44", 5157 + "sctk-adwaita", 5158 + "smithay-client-toolkit 0.19.2", 5159 + "smol_str", 5160 + "tracing", 5161 + "unicode-segmentation", 5162 + "wasm-bindgen", 5163 + "wasm-bindgen-futures", 5164 + "wayland-backend", 5165 + "wayland-client", 5166 + "wayland-protocols", 5167 + "wayland-protocols-plasma", 5168 + "web-sys", 5169 + "web-time", 5170 + "windows-sys 0.52.0", 5171 + "x11-dl", 5172 + "x11rb", 5173 + "xkbcommon-dl", 5174 + ] 5175 + 5176 + [[package]] 5177 + name = "winnow" 5178 + version = "0.7.14" 5179 + source = "registry+https://github.com/rust-lang/crates.io-index" 5180 + checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" 5181 + dependencies = [ 5182 + "memchr", 5183 + ] 5184 + 5185 + [[package]] 5186 + name = "wit-bindgen" 5187 + version = "0.51.0" 5188 + source = "registry+https://github.com/rust-lang/crates.io-index" 5189 + checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" 5190 + 5191 + [[package]] 5192 + name = "writeable" 5193 + version = "0.6.2" 5194 + source = "registry+https://github.com/rust-lang/crates.io-index" 5195 + checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" 5196 + 5197 + [[package]] 5198 + name = "x11-dl" 5199 + version = "2.21.0" 5200 + source = "registry+https://github.com/rust-lang/crates.io-index" 5201 + checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" 5202 + dependencies = [ 5203 + "libc", 5204 + "once_cell", 5205 + "pkg-config", 5206 + ] 5207 + 5208 + [[package]] 5209 + name = "x11rb" 5210 + version = "0.13.2" 5211 + source = "registry+https://github.com/rust-lang/crates.io-index" 5212 + checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" 5213 + dependencies = [ 5214 + "as-raw-xcb-connection", 5215 + "gethostname", 5216 + "libc", 5217 + "libloading", 5218 + "once_cell", 5219 + "rustix 1.1.3", 5220 + "x11rb-protocol", 5221 + ] 5222 + 5223 + [[package]] 5224 + name = "x11rb-protocol" 5225 + version = "0.13.2" 5226 + source = "registry+https://github.com/rust-lang/crates.io-index" 5227 + checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" 5228 + 5229 + [[package]] 5230 + name = "xcursor" 5231 + version = "0.3.10" 5232 + source = "registry+https://github.com/rust-lang/crates.io-index" 5233 + checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" 5234 + 5235 + [[package]] 5236 + name = "xkbcommon-dl" 5237 + version = "0.4.2" 5238 + source = "registry+https://github.com/rust-lang/crates.io-index" 5239 + checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" 5240 + dependencies = [ 5241 + "bitflags 2.11.0", 5242 + "dlib", 5243 + "log", 5244 + "once_cell", 5245 + "xkeysym", 5246 + ] 5247 + 5248 + [[package]] 5249 + name = "xkeysym" 5250 + version = "0.2.1" 5251 + source = "registry+https://github.com/rust-lang/crates.io-index" 5252 + checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" 5253 + 5254 + [[package]] 5255 + name = "xml-rs" 5256 + version = "0.8.28" 5257 + source = "registry+https://github.com/rust-lang/crates.io-index" 5258 + checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" 5259 + 5260 + [[package]] 5261 + name = "xxhash-rust" 5262 + version = "0.8.15" 5263 + source = "registry+https://github.com/rust-lang/crates.io-index" 5264 + checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" 5265 + 5266 + [[package]] 5267 + name = "yansi" 5268 + version = "1.0.1" 5269 + source = "registry+https://github.com/rust-lang/crates.io-index" 5270 + checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" 5271 + 5272 + [[package]] 5273 + name = "yoke" 5274 + version = "0.8.1" 5275 + source = "registry+https://github.com/rust-lang/crates.io-index" 5276 + checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" 5277 + dependencies = [ 5278 + "stable_deref_trait", 5279 + "yoke-derive", 5280 + "zerofrom", 5281 + ] 5282 + 5283 + [[package]] 5284 + name = "yoke-derive" 5285 + version = "0.8.1" 5286 + source = "registry+https://github.com/rust-lang/crates.io-index" 5287 + checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" 5288 + dependencies = [ 5289 + "proc-macro2", 5290 + "quote", 5291 + "syn 2.0.117", 5292 + "synstructure", 5293 + ] 5294 + 5295 + [[package]] 5296 + name = "zbus" 5297 + version = "5.13.2" 5298 + source = "registry+https://github.com/rust-lang/crates.io-index" 5299 + checksum = "1bfeff997a0aaa3eb20c4652baf788d2dfa6d2839a0ead0b3ff69ce2f9c4bdd1" 5300 + dependencies = [ 5301 + "async-broadcast", 5302 + "async-executor", 5303 + "async-io", 5304 + "async-lock", 5305 + "async-process", 5306 + "async-recursion", 5307 + "async-task", 5308 + "async-trait", 5309 + "blocking", 5310 + "enumflags2", 5311 + "event-listener", 5312 + "futures-core", 5313 + "futures-lite", 5314 + "hex", 5315 + "libc", 5316 + "ordered-stream", 5317 + "rustix 1.1.3", 5318 + "serde", 5319 + "serde_repr", 5320 + "tracing", 5321 + "uds_windows", 5322 + "uuid", 5323 + "windows-sys 0.61.2", 5324 + "winnow", 5325 + "zbus_macros", 5326 + "zbus_names", 5327 + "zvariant", 5328 + ] 5329 + 5330 + [[package]] 5331 + name = "zbus-lockstep" 5332 + version = "0.5.2" 5333 + source = "registry+https://github.com/rust-lang/crates.io-index" 5334 + checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" 5335 + dependencies = [ 5336 + "zbus_xml", 5337 + "zvariant", 5338 + ] 5339 + 5340 + [[package]] 5341 + name = "zbus-lockstep-macros" 5342 + version = "0.5.2" 5343 + source = "registry+https://github.com/rust-lang/crates.io-index" 5344 + checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" 5345 + dependencies = [ 5346 + "proc-macro2", 5347 + "quote", 5348 + "syn 2.0.117", 5349 + "zbus-lockstep", 5350 + "zbus_xml", 5351 + "zvariant", 5352 + ] 5353 + 5354 + [[package]] 5355 + name = "zbus_macros" 5356 + version = "5.13.2" 5357 + source = "registry+https://github.com/rust-lang/crates.io-index" 5358 + checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1" 5359 + dependencies = [ 5360 + "proc-macro-crate", 5361 + "proc-macro2", 5362 + "quote", 5363 + "syn 2.0.117", 5364 + "zbus_names", 5365 + "zvariant", 5366 + "zvariant_utils", 5367 + ] 5368 + 5369 + [[package]] 5370 + name = "zbus_names" 5371 + version = "4.3.1" 5372 + source = "registry+https://github.com/rust-lang/crates.io-index" 5373 + checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" 5374 + dependencies = [ 5375 + "serde", 5376 + "winnow", 5377 + "zvariant", 5378 + ] 5379 + 5380 + [[package]] 5381 + name = "zbus_xml" 5382 + version = "5.1.0" 5383 + source = "registry+https://github.com/rust-lang/crates.io-index" 5384 + checksum = "441a0064125265655bccc3a6af6bef56814d9277ac83fce48b1cd7e160b80eac" 5385 + dependencies = [ 5386 + "quick-xml", 5387 + "serde", 5388 + "zbus_names", 5389 + "zvariant", 5390 + ] 5391 + 5392 + [[package]] 5393 + name = "zerocopy" 5394 + version = "0.8.39" 5395 + source = "registry+https://github.com/rust-lang/crates.io-index" 5396 + checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" 5397 + dependencies = [ 5398 + "zerocopy-derive", 5399 + ] 5400 + 5401 + [[package]] 5402 + name = "zerocopy-derive" 5403 + version = "0.8.39" 5404 + source = "registry+https://github.com/rust-lang/crates.io-index" 5405 + checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" 5406 + dependencies = [ 5407 + "proc-macro2", 5408 + "quote", 5409 + "syn 2.0.117", 5410 + ] 5411 + 5412 + [[package]] 5413 + name = "zerofrom" 5414 + version = "0.1.6" 5415 + source = "registry+https://github.com/rust-lang/crates.io-index" 5416 + checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 5417 + dependencies = [ 5418 + "zerofrom-derive", 5419 + ] 5420 + 5421 + [[package]] 5422 + name = "zerofrom-derive" 5423 + version = "0.1.6" 5424 + source = "registry+https://github.com/rust-lang/crates.io-index" 5425 + checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 5426 + dependencies = [ 5427 + "proc-macro2", 5428 + "quote", 5429 + "syn 2.0.117", 5430 + "synstructure", 5431 + ] 5432 + 5433 + [[package]] 5434 + name = "zerotrie" 5435 + version = "0.2.3" 5436 + source = "registry+https://github.com/rust-lang/crates.io-index" 5437 + checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" 5438 + dependencies = [ 5439 + "displaydoc", 5440 + "yoke", 5441 + "zerofrom", 5442 + ] 5443 + 5444 + [[package]] 5445 + name = "zerovec" 5446 + version = "0.11.5" 5447 + source = "registry+https://github.com/rust-lang/crates.io-index" 5448 + checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" 5449 + dependencies = [ 5450 + "yoke", 5451 + "zerofrom", 5452 + "zerovec-derive", 5453 + ] 5454 + 5455 + [[package]] 5456 + name = "zerovec-derive" 5457 + version = "0.11.2" 5458 + source = "registry+https://github.com/rust-lang/crates.io-index" 5459 + checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" 5460 + dependencies = [ 5461 + "proc-macro2", 5462 + "quote", 5463 + "syn 2.0.117", 5464 + ] 5465 + 5466 + [[package]] 5467 + name = "zmij" 5468 + version = "1.0.21" 5469 + source = "registry+https://github.com/rust-lang/crates.io-index" 5470 + checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" 5471 + 5472 + [[package]] 5473 + name = "zune-core" 5474 + version = "0.4.12" 5475 + source = "registry+https://github.com/rust-lang/crates.io-index" 5476 + checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" 5477 + 5478 + [[package]] 5479 + name = "zune-jpeg" 5480 + version = "0.4.21" 5481 + source = "registry+https://github.com/rust-lang/crates.io-index" 5482 + checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" 5483 + dependencies = [ 5484 + "zune-core", 5485 + ] 5486 + 5487 + [[package]] 5488 + name = "zvariant" 5489 + version = "5.9.2" 5490 + source = "registry+https://github.com/rust-lang/crates.io-index" 5491 + checksum = "68b64ef4f40c7951337ddc7023dd03528a57a3ce3408ee9da5e948bd29b232c4" 5492 + dependencies = [ 5493 + "endi", 5494 + "enumflags2", 5495 + "serde", 5496 + "winnow", 5497 + "zvariant_derive", 5498 + "zvariant_utils", 5499 + ] 5500 + 5501 + [[package]] 5502 + name = "zvariant_derive" 5503 + version = "5.9.2" 5504 + source = "registry+https://github.com/rust-lang/crates.io-index" 5505 + checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c" 5506 + dependencies = [ 5507 + "proc-macro-crate", 5508 + "proc-macro2", 5509 + "quote", 5510 + "syn 2.0.117", 5511 + "zvariant_utils", 5512 + ] 5513 + 5514 + [[package]] 5515 + name = "zvariant_utils" 5516 + version = "3.3.0" 5517 + source = "registry+https://github.com/rust-lang/crates.io-index" 5518 + checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" 5519 + dependencies = [ 5520 + "proc-macro2", 5521 + "quote", 5522 + "serde", 5523 + "syn 2.0.117", 5524 + "winnow", 5525 + ]
+92
Cargo.toml
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + [workspace] 6 + members = ["crates/*"] 7 + resolver = "2" 8 + 9 + [workspace.dependencies] 10 + loro = { version = "1.10", features = ["counter"] } 11 + eframe = { version = "0.33", features = ["accesskit"] } 12 + egui_tiles = "0.14" 13 + egui-phosphor = { version = "0.11", default-features = false, features = ["regular"] } 14 + egui_kittest = { version = "0.33", features = ["eframe"] } 15 + tracing = "0.1" 16 + tracing-subscriber = { version = "0.3", features = ["env-filter"] } 17 + subsecond = "0.7" 18 + dioxus-devtools = "0.7" 19 + 20 + [workspace.lints.rust] 21 + missing_debug_implementations = "warn" 22 + unsafe_code = "deny" 23 + 24 + [workspace.lints.clippy] 25 + pedantic = { level = "warn", priority = -1 } 26 + complexity = { level = "warn", priority = -1 } 27 + style = { level = "warn", priority = -1 } 28 + suspicious = { level = "warn", priority = -1 } 29 + perf = { level = "warn", priority = -1 } 30 + 31 + must_use_candidate = "allow" 32 + redundant_pub_crate = "deny" 33 + 34 + # Don't panic 35 + unwrap_used = "deny" 36 + expect_used = "warn" 37 + exit = "deny" 38 + infinite_loop = "deny" 39 + allow_attributes = "warn" 40 + 41 + # Force ? propagation over manual matching 42 + manual_let_else = "warn" 43 + 44 + # Avoid stringly typed code 45 + str_to_string = "warn" 46 + rc_buffer = "warn" 47 + large_types_passed_by_value = "warn" 48 + inefficient_to_string = "warn" 49 + 50 + # Sloppy conversions 51 + as_conversions = "warn" 52 + cast_possible_truncation = "warn" 53 + cast_precision_loss = "warn" 54 + cast_sign_loss = "warn" 55 + 56 + # Don't clone unnecessarily 57 + redundant_clone = "warn" 58 + cloned_instead_of_copied = "warn" 59 + needless_pass_by_value = "warn" 60 + 61 + # Documentation quality 62 + missing_errors_doc = "allow" 63 + missing_panics_doc = "warn" 64 + missing_safety_doc = "warn" 65 + too_long_first_doc_paragraph = "deny" 66 + 67 + # Unnecessary code 68 + needless_return = "warn" 69 + manual_map = "warn" 70 + manual_filter_map = "warn" 71 + explicit_iter_loop = "warn" 72 + implicit_clone = "warn" 73 + 74 + # Forgotten debug code 75 + todo = "warn" 76 + dbg_macro = "warn" 77 + unimplemented = "warn" 78 + 79 + # Prefer log 80 + print_stdout = "warn" 81 + print_stderr = "warn" 82 + uninlined_format_args = "warn" # Prefer format!("{x}") 83 + 84 + # Modules/crates 85 + wildcard_imports = "deny" 86 + mod_module_files = "deny" 87 + multiple_crate_versions = "allow" # Noisy with transitive deps 88 + 89 + # nursery 90 + use_self = "deny" 91 + needless_collect = "warn" 92 + branches_sharing_code = "warn"
+235
LICENSES/AGPL-3.0-or-later.txt
··· 1 + GNU AFFERO GENERAL PUBLIC LICENSE 2 + Version 3, 19 November 2007 3 + 4 + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> 5 + 6 + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 7 + 8 + Preamble 9 + 10 + The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. 11 + 12 + The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. 13 + 14 + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. 15 + 16 + Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. 17 + 18 + A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. 19 + 20 + The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. 21 + 22 + An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. 23 + 24 + The precise terms and conditions for copying, distribution and modification follow. 25 + 26 + TERMS AND CONDITIONS 27 + 28 + 0. Definitions. 29 + 30 + "This License" refers to version 3 of the GNU Affero General Public License. 31 + 32 + "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. 33 + 34 + "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. 35 + 36 + To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. 37 + 38 + A "covered work" means either the unmodified Program or a work based on the Program. 39 + 40 + To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. 41 + 42 + To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. 43 + 44 + An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 45 + 46 + 1. Source Code. 47 + The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. 48 + 49 + A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. 50 + 51 + The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. 52 + 53 + The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those 54 + subprograms and other parts of the work. 55 + 56 + The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. 57 + 58 + The Corresponding Source for a work in source code form is that same work. 59 + 60 + 2. Basic Permissions. 61 + All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. 62 + 63 + You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. 64 + 65 + Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 66 + 67 + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 68 + No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. 69 + 70 + When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 71 + 72 + 4. Conveying Verbatim Copies. 73 + You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. 74 + 75 + You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 76 + 77 + 5. Conveying Modified Source Versions. 78 + You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: 79 + 80 + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. 81 + 82 + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". 83 + 84 + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. 85 + 86 + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. 87 + 88 + A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 89 + 90 + 6. Conveying Non-Source Forms. 91 + You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: 92 + 93 + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. 94 + 95 + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. 96 + 97 + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. 98 + 99 + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. 100 + 101 + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. 102 + 103 + A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. 104 + 105 + A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. 106 + 107 + "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. 108 + 109 + If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). 110 + 111 + The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. 112 + 113 + Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 114 + 115 + 7. Additional Terms. 116 + "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. 117 + 118 + When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. 119 + 120 + Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: 121 + 122 + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or 123 + 124 + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or 125 + 126 + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or 127 + 128 + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or 129 + 130 + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or 131 + 132 + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. 133 + 134 + All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. 135 + 136 + If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. 137 + 138 + Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 139 + 140 + 8. Termination. 141 + 142 + You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). 143 + 144 + However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. 145 + 146 + Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. 147 + 148 + Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 149 + 150 + 9. Acceptance Not Required for Having Copies. 151 + 152 + You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 153 + 154 + 10. Automatic Licensing of Downstream Recipients. 155 + 156 + Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. 157 + 158 + An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. 159 + 160 + You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 161 + 162 + 11. Patents. 163 + 164 + A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". 165 + 166 + A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. 167 + 168 + Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. 169 + 170 + In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. 171 + 172 + If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent 173 + license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. 174 + 175 + If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. 176 + 177 + A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. 178 + 179 + Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 180 + 181 + 12. No Surrender of Others' Freedom. 182 + 183 + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may 184 + not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 185 + 186 + 13. Remote Network Interaction; Use with the GNU General Public License. 187 + 188 + Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. 189 + 190 + Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 191 + 192 + 14. Revised Versions of this License. 193 + 194 + The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 195 + 196 + Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. 197 + 198 + If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. 199 + 200 + Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 201 + 202 + 15. Disclaimer of Warranty. 203 + 204 + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 205 + 206 + 16. Limitation of Liability. 207 + 208 + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 209 + 210 + 17. Interpretation of Sections 15 and 16. 211 + 212 + If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 213 + 214 + END OF TERMS AND CONDITIONS 215 + 216 + How to Apply These Terms to Your New Programs 217 + 218 + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. 219 + 220 + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. 221 + 222 + <one line to give the program's name and a brief idea of what it does.> 223 + Copyright (C) <year> <name of author> 224 + 225 + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 226 + 227 + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. 228 + 229 + You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. 230 + 231 + Also add information on how to contact you by electronic and paper mail. 232 + 233 + If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. 234 + 235 + You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.
+9
README.md
··· 1 + <!-- 2 + SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 3 + 4 + SPDX-License-Identifier: AGPL-3.0-or-later 5 + --> 6 + 7 + # Kammy 8 + 9 + An editor for [papermario-dx](https://github.com/bates64/papermario-dx) mods.
+25
crates/kammy/Cargo.toml
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + [package] 6 + name = "kammy" 7 + version = "0.1.0" 8 + edition = "2024" 9 + 10 + [dependencies] 11 + loroscope = { path = "../loroscope" } 12 + loro = { workspace = true } 13 + eframe = { workspace = true } 14 + egui-phosphor = { workspace = true } 15 + egui_tiles = { workspace = true } 16 + tracing = { workspace = true } 17 + tracing-subscriber = { workspace = true } 18 + subsecond = { workspace = true } 19 + dioxus-devtools = { workspace = true } 20 + 21 + [dev-dependencies] 22 + egui_kittest = { workspace = true } 23 + 24 + [lints] 25 + workspace = true
+430
crates/kammy/src/app.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Application logic: the main [`KammyApp`] struct. 6 + 7 + use std::cell::Cell; 8 + use std::collections::HashMap; 9 + 10 + use eframe::egui; 11 + 12 + use crate::Project; 13 + use crate::dock::{Dock, DockPosition}; 14 + use crate::editor::todo::TodoEditor; 15 + use crate::editor::{Editor, EditorId, Inspect, TileBehavior, UndoBehavior}; 16 + use crate::tool::ToolContext; 17 + use crate::tool::assets::AssetsTool; 18 + use crate::tool::hierarchy::HierarchyTool; 19 + use crate::tool::inspector::InspectorTool; 20 + 21 + /// The main application, managing a tabbed editor tree with per-tab undo 22 + /// and collapsible tool docks. 23 + #[derive(Debug)] 24 + pub struct KammyApp { 25 + project: Project, 26 + tree: egui_tiles::Tree<Box<dyn Editor>>, 27 + undo_behaviors: HashMap<EditorId, UndoBehavior>, 28 + active_document: Option<egui_tiles::TileId>, 29 + active_editor_id: Option<EditorId>, 30 + inspect: Option<Box<dyn Inspect>>, 31 + next_editor_id: u64, 32 + left_dock: Dock, 33 + right_dock: Dock, 34 + bottom_dock: Dock, 35 + } 36 + 37 + impl Default for KammyApp { 38 + fn default() -> Self { 39 + Self::new() 40 + } 41 + } 42 + 43 + impl KammyApp { 44 + fn alloc_editor_id(&mut self) -> EditorId { 45 + let id = EditorId(self.next_editor_id); 46 + self.next_editor_id += 1; 47 + id 48 + } 49 + 50 + /// Creates the app with a todo editor and tool docks. 51 + pub fn new() -> Self { 52 + let project = Project::new(); 53 + let todo_editor_id = EditorId(0); 54 + let next_editor_id = 1u64; 55 + 56 + let mut tiles = egui_tiles::Tiles::default(); 57 + let todo_tile = tiles.insert_pane({ 58 + let editor: Box<dyn Editor> = Box::new(TodoEditor::new(todo_editor_id)); 59 + editor 60 + }); 61 + let editor_tabs = tiles.insert_tab_tile(vec![todo_tile]); 62 + let tree = egui_tiles::Tree::new("kammy_editors", editor_tabs, tiles); 63 + 64 + // Create CRDT data for the initial editor 65 + let key = todo_editor_id.to_string(); 66 + let initial = project.tabs().get_or_create(&key); 67 + let _ = initial.items(); 68 + project.doc().set_next_commit_origin("meta"); 69 + project.doc().commit(); 70 + 71 + let origin = format!("e{}/", todo_editor_id.0); 72 + let mut undo_manager = loro::UndoManager::new(&project.doc()); 73 + undo_manager.add_exclude_origin_prefix("meta"); 74 + 75 + let mut undo_behaviors = HashMap::new(); 76 + undo_behaviors.insert( 77 + todo_editor_id, 78 + UndoBehavior::Own { 79 + undo_manager, 80 + origin, 81 + }, 82 + ); 83 + 84 + // Create docks with default tools 85 + let left_dock = Dock::new( 86 + DockPosition::Left, 87 + vec![Box::new(HierarchyTool)], 88 + None, // collapsed by default 89 + 200.0, 90 + ); 91 + let right_dock = Dock::new( 92 + DockPosition::Right, 93 + vec![Box::new(InspectorTool)], 94 + Some(0), // open by default 95 + 200.0, 96 + ); 97 + let bottom_dock = Dock::new( 98 + DockPosition::Bottom, 99 + vec![Box::new(AssetsTool)], 100 + Some(0), // open by default 101 + 150.0, 102 + ); 103 + 104 + Self { 105 + project, 106 + tree, 107 + undo_behaviors, 108 + active_document: Some(todo_tile), 109 + active_editor_id: Some(todo_editor_id), 110 + inspect: None, 111 + next_editor_id, 112 + left_dock, 113 + right_dock, 114 + bottom_dock, 115 + } 116 + } 117 + 118 + /// Returns the tile ID of an `Own` pane that is not the currently active 119 + /// one, or `None` if no other document pane exists. 120 + #[cfg(test)] 121 + pub fn find_other_pane(&self) -> Option<egui_tiles::TileId> { 122 + self.tree.tiles.iter().find_map(|(id, tile)| { 123 + if let egui_tiles::Tile::Pane(editor) = tile { 124 + (Some(*id) != self.active_document 125 + && matches!( 126 + self.undo_behaviors.get(&editor.id()), 127 + Some(UndoBehavior::Own { .. }) 128 + )) 129 + .then_some(*id) 130 + } else { 131 + None 132 + } 133 + }) 134 + } 135 + 136 + /// Finds the tabs container that directly holds the given tile ID. 137 + fn find_parent_tabs(&self, tile_id: egui_tiles::TileId) -> Option<egui_tiles::TileId> { 138 + self.tree.tiles.iter().find_map(|(id, tile)| { 139 + if let egui_tiles::Tile::Container(egui_tiles::Container::Tabs(tabs)) = tile { 140 + tabs.children.contains(&tile_id).then_some(*id) 141 + } else { 142 + None 143 + } 144 + }) 145 + } 146 + 147 + /// Switches focus to the pane with the given tile ID. Updates both the 148 + /// internal active-document tracking and the editor tabs' visible tab. 149 + #[cfg(test)] 150 + pub fn switch_to_pane(&mut self, tile_id: egui_tiles::TileId) { 151 + self.active_document = Some(tile_id); 152 + if let Some(egui_tiles::Tile::Pane(editor)) = self.tree.tiles.get(tile_id) { 153 + self.active_editor_id = Some(editor.id()); 154 + } 155 + if let Some(parent_id) = self.find_parent_tabs(tile_id) 156 + && let Some(egui_tiles::Tile::Container(egui_tiles::Container::Tabs(tabs))) = 157 + self.tree.tiles.get_mut(parent_id) 158 + { 159 + tabs.set_active(tile_id); 160 + } 161 + } 162 + 163 + fn add_editor(&mut self) { 164 + let editor_id = self.alloc_editor_id(); 165 + 166 + // Insert editor into tree first to obtain the TileId 167 + let pane_id = self.tree.tiles.insert_pane({ 168 + let editor: Box<dyn Editor> = Box::new(TodoEditor::new(editor_id)); 169 + editor 170 + }); 171 + 172 + // Create CRDT data keyed by stable editor id 173 + let key = editor_id.to_string(); 174 + let data = self.project.tabs().get_or_create(&key); 175 + let _ = data.items(); 176 + self.project.doc().set_next_commit_origin("meta"); 177 + self.project.doc().commit(); 178 + 179 + // Create undo manager with mutual exclusion against all existing editors 180 + let origin = format!("e{}/", editor_id.0); 181 + let mut undo_manager = loro::UndoManager::new(&self.project.doc()); 182 + undo_manager.add_exclude_origin_prefix("meta"); 183 + for behavior in self.undo_behaviors.values_mut() { 184 + let UndoBehavior::Own { 185 + undo_manager: existing, 186 + origin: existing_origin, 187 + } = behavior; 188 + existing.add_exclude_origin_prefix(&origin); 189 + undo_manager.add_exclude_origin_prefix(existing_origin); 190 + } 191 + self.undo_behaviors.insert( 192 + editor_id, 193 + UndoBehavior::Own { 194 + undo_manager, 195 + origin, 196 + }, 197 + ); 198 + 199 + // Place the new tab in the same tabs container as the active editor. 200 + let target = self 201 + .active_document 202 + .and_then(|id| self.find_parent_tabs(id)); 203 + if let Some(container_id) = target { 204 + self.tree 205 + .move_tile_to_container(pane_id, container_id, usize::MAX, false); 206 + } 207 + } 208 + 209 + /// Returns the [`EditorId`] for the active document, if any. 210 + fn active_editor_id(&self) -> Option<EditorId> { 211 + self.active_editor_id 212 + } 213 + 214 + /// Performs undo or redo on the active editor's undo manager, 215 + /// setting the commit origin first so other undo managers exclude 216 + /// the reverse-changes. 217 + fn active_undo(&mut self, redo: bool) -> bool { 218 + let Some(editor_id) = self.active_editor_id() else { 219 + return false; 220 + }; 221 + let Some(UndoBehavior::Own { 222 + undo_manager, 223 + origin, 224 + }) = self.undo_behaviors.get_mut(&editor_id) 225 + else { 226 + return false; 227 + }; 228 + let can = if redo { 229 + undo_manager.can_redo() 230 + } else { 231 + undo_manager.can_undo() 232 + }; 233 + if !can { 234 + return false; 235 + } 236 + self.project.doc().set_next_commit_origin(origin); 237 + let result = if redo { 238 + undo_manager.redo() 239 + } else { 240 + undo_manager.undo() 241 + }; 242 + result.is_ok() 243 + } 244 + 245 + fn active_can_undo(&self) -> bool { 246 + self.active_editor_id() 247 + .and_then(|id| self.undo_behaviors.get(&id)) 248 + .is_some_and( 249 + |b| matches!(b, UndoBehavior::Own { undo_manager, .. } if undo_manager.can_undo()), 250 + ) 251 + } 252 + 253 + fn active_can_redo(&self) -> bool { 254 + self.active_editor_id() 255 + .and_then(|id| self.undo_behaviors.get(&id)) 256 + .is_some_and( 257 + |b| matches!(b, UndoBehavior::Own { undo_manager, .. } if undo_manager.can_redo()), 258 + ) 259 + } 260 + 261 + fn handle_keyboard(&mut self, ctx: &egui::Context) { 262 + if ctx.input(|i| i.modifiers.command && i.key_pressed(egui::Key::Z) && !i.modifiers.shift) { 263 + self.active_undo(false); 264 + } 265 + if ctx.input(|i| { 266 + (i.modifiers.command && i.key_pressed(egui::Key::Z) && i.modifiers.shift) 267 + || (i.modifiers.command && i.key_pressed(egui::Key::Y)) 268 + }) { 269 + self.active_undo(true); 270 + } 271 + } 272 + 273 + fn toolbar_ui(&mut self, ctx: &egui::Context) { 274 + egui::TopBottomPanel::top("toolbar").show(ctx, |ui| { 275 + ui.horizontal(|ui| { 276 + if self.active_document.is_some() { 277 + if ui 278 + .add_enabled(self.active_can_undo(), egui::Button::new("⟲ Undo")) 279 + .clicked() 280 + { 281 + self.active_undo(false); 282 + } 283 + if ui 284 + .add_enabled(self.active_can_redo(), egui::Button::new("⟳ Redo")) 285 + .clicked() 286 + { 287 + self.active_undo(true); 288 + } 289 + } 290 + 291 + ui.separator(); 292 + 293 + if ui.button("+ New Tab").clicked() { 294 + self.add_editor(); 295 + } 296 + }); 297 + }); 298 + } 299 + 300 + fn status_bar_ui(&mut self, ctx: &egui::Context) { 301 + egui::TopBottomPanel::bottom("status_bar").show(ctx, |ui| { 302 + ui.horizontal(|ui| { 303 + // Left zone: left dock tool icons 304 + self.left_dock.status_bar_icons(ui); 305 + 306 + ui.separator(); 307 + 308 + // Center zone: bottom dock tool icons 309 + self.bottom_dock.status_bar_icons(ui); 310 + 311 + // Right zone: right dock tool icons (right-aligned) 312 + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { 313 + self.right_dock.status_bar_icons(ui); 314 + }); 315 + }); 316 + }); 317 + } 318 + 319 + fn render_docks(&mut self, ctx: &egui::Context) { 320 + // Determine commit origin from the active editor so tool edits 321 + // are attributed to the correct undo stack. 322 + let commit_origin = self.active_editor_id.and_then(|id| { 323 + if let Some(UndoBehavior::Own { origin, .. }) = self.undo_behaviors.get(&id) { 324 + Some(origin.clone()) 325 + } else { 326 + None 327 + } 328 + }); 329 + 330 + if let Some(ref origin) = commit_origin { 331 + self.project.doc().set_next_commit_origin(origin); 332 + } 333 + 334 + // Destructure for disjoint borrows 335 + let Self { 336 + project, 337 + active_editor_id, 338 + inspect, 339 + left_dock, 340 + right_dock, 341 + bottom_dock, 342 + .. 343 + } = self; 344 + 345 + let mut tool_ctx = ToolContext { 346 + project, 347 + active_editor_id: *active_editor_id, 348 + inspect, 349 + }; 350 + 351 + bottom_dock.show(ctx, &mut tool_ctx); 352 + left_dock.show(ctx, &mut tool_ctx); 353 + right_dock.show(ctx, &mut tool_ctx); 354 + 355 + // Commit any tool edits 356 + if commit_origin.is_some() { 357 + project.doc().commit(); 358 + } 359 + } 360 + 361 + fn content_ui(&mut self, ctx: &egui::Context) { 362 + egui::CentralPanel::default().show(ctx, |ui| { 363 + // Snapshot each tabs container's children and active tab so we can 364 + // detect removals after tree.ui() and activate the left neighbor. 365 + let tabs_snapshot: Vec<_> = self 366 + .tree 367 + .tiles 368 + .iter() 369 + .filter_map(|(id, tile)| { 370 + if let egui_tiles::Tile::Container(egui_tiles::Container::Tabs(tabs)) = tile { 371 + Some((*id, tabs.children.clone(), tabs.active)) 372 + } else { 373 + None 374 + } 375 + }) 376 + .collect(); 377 + 378 + let inspect_cell = Cell::new(self.inspect.take()); 379 + let mut behavior = TileBehavior { 380 + project: &self.project, 381 + undo_behaviors: &self.undo_behaviors, 382 + active_document: &mut self.active_document, 383 + active_editor_id: &mut self.active_editor_id, 384 + inspect: &inspect_cell, 385 + }; 386 + self.tree.ui(&mut behavior, ui); 387 + self.inspect = inspect_cell.into_inner(); 388 + 389 + // When a tab is removed (closed or dragged out), activate the tab 390 + // to its left instead of the default (first child). 391 + for (container_id, old_children, old_active) in &tabs_snapshot { 392 + let Some(egui_tiles::Tile::Container(egui_tiles::Container::Tabs(tabs))) = 393 + self.tree.tiles.get_mut(*container_id) 394 + else { 395 + continue; 396 + }; 397 + let Some(old_active) = old_active else { 398 + continue; 399 + }; 400 + // Only fix up if the previously active tab was removed 401 + if tabs.children.contains(old_active) { 402 + continue; 403 + } 404 + let Some(old_idx) = old_children.iter().position(|id| id == old_active) else { 405 + continue; 406 + }; 407 + let target = if old_idx > 0 { 408 + old_children.get(old_idx - 1) 409 + } else { 410 + old_children.get(1) 411 + }; 412 + if let Some(&target_id) = target 413 + && tabs.children.contains(&target_id) 414 + { 415 + tabs.set_active(target_id); 416 + } 417 + } 418 + }); 419 + } 420 + } 421 + 422 + impl eframe::App for KammyApp { 423 + fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { 424 + self.handle_keyboard(ctx); 425 + subsecond::call(|| self.toolbar_ui(ctx)); 426 + subsecond::call(|| self.status_bar_ui(ctx)); 427 + subsecond::call(|| self.render_docks(ctx)); 428 + subsecond::call(|| self.content_ui(ctx)); 429 + } 430 + }
+205
crates/kammy/src/dock.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Collapsible dock panels that host tools around the edges of the window. 6 + 7 + mod icon; 8 + 9 + use eframe::egui; 10 + 11 + use crate::tool::{Tool, ToolContext}; 12 + use icon::DockIcon; 13 + 14 + /// Which edge of the window a dock is attached to. 15 + #[derive(Debug, Clone, Copy, PartialEq, Eq)] 16 + pub enum DockPosition { 17 + /// Left side panel. 18 + Left, 19 + /// Right side panel. 20 + Right, 21 + /// Bottom panel (above the status bar). 22 + Bottom, 23 + } 24 + 25 + /// A collapsible panel hosting one or more [`Tool`]s. 26 + /// 27 + /// Only one tool is visible at a time. The active tool is controlled by 28 + /// icon buttons in the status bar — clicking an already-active tool's icon 29 + /// collapses the dock. 30 + #[derive(Debug)] 31 + pub struct Dock { 32 + position: DockPosition, 33 + tools: Vec<Box<dyn Tool>>, 34 + active: Option<usize>, 35 + size: f32, 36 + } 37 + 38 + impl Dock { 39 + /// Creates a new dock at the given position with the given tools. 40 + /// 41 + /// `default_active` is the index of the initially active tool, or `None` 42 + /// to start collapsed. 43 + pub fn new( 44 + position: DockPosition, 45 + tools: Vec<Box<dyn Tool>>, 46 + default_active: Option<usize>, 47 + size: f32, 48 + ) -> Self { 49 + Self { 50 + position, 51 + tools, 52 + active: default_active, 53 + size, 54 + } 55 + } 56 + 57 + /// Whether the dock is currently open (has an active tool). 58 + pub fn is_open(&self) -> bool { 59 + self.active.is_some() 60 + } 61 + 62 + /// Toggles a tool by index. If the tool is already active, collapses the 63 + /// dock. Otherwise, activates the tool. 64 + pub fn toggle_tool(&mut self, idx: usize) { 65 + if self.active == Some(idx) { 66 + self.active = None; 67 + } else { 68 + self.active = Some(idx); 69 + } 70 + } 71 + 72 + /// Renders clickable icon buttons for this dock's tools. Returns which 73 + /// tool index was toggled, if any. 74 + /// 75 + /// Call this from the status bar layout. 76 + pub fn status_bar_icons(&mut self, ui: &mut egui::Ui) { 77 + // Collect icon/active pairs first to avoid borrowing self during mutation. 78 + let icons: Vec<_> = self 79 + .tools 80 + .iter() 81 + .enumerate() 82 + .map(|(i, tool)| (i, tool.icon(), tool.title(), self.active == Some(i))) 83 + .collect(); 84 + 85 + for (idx, icon, title, is_active) in icons { 86 + if ui 87 + .add(DockIcon::new(icon, is_active)) 88 + .on_hover_text(title) 89 + .clicked() 90 + { 91 + self.toggle_tool(idx); 92 + } 93 + } 94 + } 95 + 96 + /// Renders the dock panel and active tool, if open. 97 + pub fn show(&mut self, ctx: &egui::Context, tool_ctx: &mut ToolContext<'_>) { 98 + let Some(active_idx) = self.active else { 99 + return; 100 + }; 101 + let Some(tool) = self.tools.get_mut(active_idx) else { 102 + return; 103 + }; 104 + 105 + let show_tool = 106 + |ui: &mut egui::Ui, tool: &mut Box<dyn Tool>, tool_ctx: &mut ToolContext<'_>| { 107 + tool.ui(ui, tool_ctx); 108 + }; 109 + 110 + match self.position { 111 + DockPosition::Left => { 112 + egui::SidePanel::left("dock_left") 113 + .default_width(self.size) 114 + .show(ctx, |ui| show_tool(ui, tool, tool_ctx)); 115 + } 116 + DockPosition::Right => { 117 + egui::SidePanel::right("dock_right") 118 + .default_width(self.size) 119 + .show(ctx, |ui| show_tool(ui, tool, tool_ctx)); 120 + } 121 + DockPosition::Bottom => { 122 + egui::TopBottomPanel::bottom("dock_bottom") 123 + .resizable(true) 124 + .default_height(self.size) 125 + .show(ctx, |ui| show_tool(ui, tool, tool_ctx)); 126 + } 127 + } 128 + } 129 + } 130 + 131 + #[cfg(test)] 132 + mod tests { 133 + use super::*; 134 + 135 + use eframe::egui; 136 + 137 + #[derive(Debug)] 138 + struct DummyTool { 139 + title: &'static str, 140 + icon: &'static str, 141 + } 142 + 143 + impl Tool for DummyTool { 144 + fn title(&self) -> &'static str { 145 + self.title 146 + } 147 + fn icon(&self) -> &'static str { 148 + self.icon 149 + } 150 + fn ui(&mut self, _ui: &mut egui::Ui, _ctx: &mut ToolContext<'_>) {} 151 + } 152 + 153 + fn make_dock(active: Option<usize>) -> Dock { 154 + Dock::new( 155 + DockPosition::Right, 156 + vec![ 157 + Box::new(DummyTool { 158 + title: "A", 159 + icon: "a", 160 + }), 161 + Box::new(DummyTool { 162 + title: "B", 163 + icon: "b", 164 + }), 165 + ], 166 + active, 167 + 200.0, 168 + ) 169 + } 170 + 171 + #[test] 172 + fn starts_collapsed() { 173 + let dock = make_dock(None); 174 + assert!(!dock.is_open()); 175 + } 176 + 177 + #[test] 178 + fn starts_open() { 179 + let dock = make_dock(Some(0)); 180 + assert!(dock.is_open()); 181 + } 182 + 183 + #[test] 184 + fn toggle_opens_and_closes() { 185 + let mut dock = make_dock(None); 186 + 187 + dock.toggle_tool(0); 188 + assert_eq!(dock.active, Some(0)); 189 + assert!(dock.is_open()); 190 + 191 + // Toggle same tool collapses 192 + dock.toggle_tool(0); 193 + assert_eq!(dock.active, None); 194 + assert!(!dock.is_open()); 195 + } 196 + 197 + #[test] 198 + fn toggle_switches_tool() { 199 + let mut dock = make_dock(Some(0)); 200 + 201 + dock.toggle_tool(1); 202 + assert_eq!(dock.active, Some(1)); 203 + assert!(dock.is_open()); 204 + } 205 + }
+55
crates/kammy/src/dock/icon.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! A custom icon button for dock tools in the status bar. 6 + 7 + use eframe::egui; 8 + 9 + /// An icon button that shows active state via color and hover/press via 10 + /// translucent background fill. 11 + pub struct DockIcon { 12 + icon: &'static str, 13 + active: bool, 14 + } 15 + 16 + impl DockIcon { 17 + pub fn new(icon: &'static str, active: bool) -> Self { 18 + Self { icon, active } 19 + } 20 + } 21 + 22 + impl egui::Widget for DockIcon { 23 + fn ui(self, ui: &mut egui::Ui) -> egui::Response { 24 + let visuals = ui.visuals(); 25 + let text_color = if self.active { 26 + visuals.selection.stroke.color 27 + } else { 28 + visuals.weak_text_color() 29 + }; 30 + 31 + let galley = 32 + ui.painter() 33 + .layout_no_wrap(self.icon.to_owned(), egui::FontId::default(), text_color); 34 + 35 + let padding = ui.spacing().button_padding; 36 + let desired_size = galley.size() + padding * 2.0; 37 + let (rect, response) = ui.allocate_exact_size(desired_size, egui::Sense::click()); 38 + 39 + if ui.is_rect_visible(rect) { 40 + // Translucent fill on hover/press. 41 + if response.is_pointer_button_down_on() { 42 + let fill = ui.visuals().widgets.active.bg_fill.gamma_multiply(0.5); 43 + ui.painter().rect_filled(rect, 2.0, fill); 44 + } else if response.hovered() { 45 + let fill = ui.visuals().widgets.hovered.bg_fill.gamma_multiply(0.5); 46 + ui.painter().rect_filled(rect, 2.0, fill); 47 + } 48 + 49 + let text_pos = rect.center() - galley.size() / 2.0; 50 + ui.painter().galley(text_pos, galley, text_color); 51 + } 52 + 53 + response 54 + } 55 + }
+171
crates/kammy/src/editor.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Editor trait, built-in editor implementations, and tile-tree dispatch. 6 + 7 + pub mod todo; 8 + 9 + use std::cell::Cell; 10 + use std::collections::HashMap; 11 + use std::fmt; 12 + 13 + use eframe::egui; 14 + use tracing::debug; 15 + 16 + use crate::Project; 17 + 18 + /// Trait for objects that provide property-editing UI in the Inspector panel. 19 + /// 20 + /// Implementors capture their CRDT handles (loroscope accessors) at creation 21 + /// time, so they don't need `EditorContext` — they already have everything 22 + /// they need to read/write properties. 23 + pub trait Inspect: std::fmt::Debug { 24 + /// Renders property-editing UI for whatever is being inspected. 25 + fn ui(&mut self, ui: &mut egui::Ui); 26 + } 27 + 28 + /// A unique, stable identifier for each editor instance. 29 + /// 30 + /// Unlike [`egui_tiles::TileId`], this ID does not change when the tile tree 31 + /// is restructured. It is used to key persistent data (CRDT state, undo 32 + /// managers) that must survive tile moves and tree simplification. 33 + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 34 + pub struct EditorId(pub u64); 35 + 36 + impl fmt::Display for EditorId { 37 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 38 + self.0.fmt(f) 39 + } 40 + } 41 + 42 + /// Trait implemented by each editor type. 43 + pub trait Editor: std::fmt::Debug { 44 + /// A stable identifier that persists across tile tree restructuring. 45 + fn id(&self) -> EditorId; 46 + /// The display title for the editor's tab. 47 + fn title(&self) -> String; 48 + /// Renders the editor UI. 49 + fn ui(&mut self, ui: &mut egui::Ui, ctx: &EditorContext); 50 + } 51 + 52 + /// Context passed to each editor during rendering. 53 + pub struct EditorContext<'a> { 54 + /// The shared project data. 55 + pub project: &'a Project, 56 + /// This editor's tile ID. 57 + pub tile_id: egui_tiles::TileId, 58 + } 59 + 60 + impl fmt::Debug for EditorContext<'_> { 61 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 62 + f.debug_struct("EditorContext") 63 + .field("tile_id", &self.tile_id) 64 + .finish_non_exhaustive() 65 + } 66 + } 67 + 68 + /// Controls how an editor's edits are attributed for undo/redo. 69 + #[derive(Debug)] 70 + pub enum UndoBehavior { 71 + /// Has its own undo manager and commit origin. Undo/redo applies to this 72 + /// editor's changes only. 73 + Own { 74 + undo_manager: loro::UndoManager, 75 + origin: String, 76 + }, 77 + } 78 + 79 + /// Tile-tree behavior that dispatches rendering to individual editors and 80 + /// handles focus tracking and auto-commit. 81 + pub struct TileBehavior<'a> { 82 + pub project: &'a Project, 83 + pub undo_behaviors: &'a HashMap<EditorId, UndoBehavior>, 84 + pub active_document: &'a mut Option<egui_tiles::TileId>, 85 + pub active_editor_id: &'a mut Option<EditorId>, 86 + pub inspect: &'a Cell<Option<Box<dyn Inspect>>>, 87 + } 88 + 89 + impl egui_tiles::Behavior<Box<dyn Editor>> for TileBehavior<'_> { 90 + fn simplification_options(&self) -> egui_tiles::SimplificationOptions { 91 + egui_tiles::SimplificationOptions { 92 + prune_empty_tabs: true, 93 + prune_empty_containers: true, 94 + prune_single_child_tabs: true, 95 + prune_single_child_containers: false, 96 + all_panes_must_have_tabs: true, 97 + join_nested_linear_containers: true, 98 + } 99 + } 100 + 101 + fn tab_title_for_pane(&mut self, editor: &Box<dyn Editor>) -> egui::WidgetText { 102 + editor.title().into() 103 + } 104 + 105 + fn on_tab_button( 106 + &mut self, 107 + tiles: &egui_tiles::Tiles<Box<dyn Editor>>, 108 + tile_id: egui_tiles::TileId, 109 + button_response: egui::Response, 110 + ) -> egui::Response { 111 + if let Some(egui_tiles::Tile::Pane(editor)) = tiles.get(tile_id) { 112 + let editor_id = editor.id(); 113 + if button_response.clicked() 114 + && matches!( 115 + self.undo_behaviors.get(&editor_id), 116 + Some(UndoBehavior::Own { .. }) 117 + ) 118 + { 119 + if *self.active_document != Some(tile_id) { 120 + self.inspect.set(None); 121 + } 122 + *self.active_document = Some(tile_id); 123 + *self.active_editor_id = Some(editor_id); 124 + } 125 + } 126 + button_response 127 + } 128 + 129 + fn pane_ui( 130 + &mut self, 131 + ui: &mut egui::Ui, 132 + tile_id: egui_tiles::TileId, 133 + editor: &mut Box<dyn Editor>, 134 + ) -> egui_tiles::UiResponse { 135 + let editor_id = editor.id(); 136 + 137 + // Click-to-focus 138 + let pane_rect = ui.max_rect(); 139 + if ui.input(|i| { 140 + (i.pointer.any_pressed() || i.pointer.any_down()) 141 + && i.pointer 142 + .latest_pos() 143 + .is_some_and(|pos| pane_rect.contains(pos)) 144 + }) && matches!( 145 + self.undo_behaviors.get(&editor_id), 146 + Some(UndoBehavior::Own { .. }) 147 + ) && *self.active_document != Some(tile_id) 148 + { 149 + self.inspect.set(None); 150 + *self.active_document = Some(tile_id); 151 + *self.active_editor_id = Some(editor_id); 152 + debug!("set active_document to {tile_id:?} (editor {editor_id:?})"); 153 + } 154 + 155 + // Extract to avoid capturing self in the closure 156 + let project = self.project; 157 + 158 + subsecond::call(|| { 159 + let ctx = EditorContext { project, tile_id }; 160 + editor.ui(ui, &ctx); 161 + }); 162 + 163 + // Auto-commit under this editor's origin. 164 + if let Some(UndoBehavior::Own { origin, .. }) = self.undo_behaviors.get(&editor_id) { 165 + self.project.doc().set_next_commit_origin(origin); 166 + self.project.doc().commit(); 167 + } 168 + 169 + egui_tiles::UiResponse::None 170 + } 171 + }
+112
crates/kammy/src/editor/todo.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Todo-list editor. 6 + 7 + use eframe::egui; 8 + 9 + use super::{Editor, EditorContext, EditorId}; 10 + 11 + /// A simple todo-list editor. 12 + #[derive(Debug)] 13 + pub struct TodoEditor { 14 + id: EditorId, 15 + new_todo_text: String, 16 + } 17 + 18 + impl TodoEditor { 19 + /// Creates a new empty todo editor with the given stable ID. 20 + pub fn new(id: EditorId) -> Self { 21 + Self { 22 + id, 23 + new_todo_text: String::new(), 24 + } 25 + } 26 + } 27 + 28 + impl Editor for TodoEditor { 29 + fn id(&self) -> EditorId { 30 + self.id 31 + } 32 + 33 + fn title(&self) -> String { 34 + subsecond::call(|| "Todos".to_owned()) 35 + } 36 + 37 + fn ui(&mut self, ui: &mut egui::Ui, ctx: &EditorContext) { 38 + let key = self.id.to_string(); 39 + let tab_data = ctx.project.tabs().get_or_create(&key); 40 + 41 + ui.horizontal(|ui| { 42 + let response = ui.text_edit_singleline(&mut self.new_todo_text); 43 + let submitted = response.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter)); 44 + if (ui.button("Add").clicked() || submitted) && !self.new_todo_text.is_empty() { 45 + let item = tab_data.items().push_new(); 46 + item.set_title(&self.new_todo_text); 47 + self.new_todo_text.clear(); 48 + response.request_focus(); 49 + } 50 + }); 51 + 52 + ui.separator(); 53 + 54 + let items = tab_data.items(); 55 + let len = items.len(); 56 + 57 + if len == 0 { 58 + ui.vertical_centered(|ui| { 59 + ui.add_space(20.0); 60 + ui.label("No todos yet!"); 61 + }); 62 + return; 63 + } 64 + 65 + let done_count = (0..len) 66 + .filter(|&i| items.get(i).is_some_and(|item| item.done())) 67 + .count(); 68 + ui.label(format!("{done_count}/{len} completed")); 69 + ui.add_space(4.0); 70 + 71 + let mut to_delete = None; 72 + 73 + egui::ScrollArea::vertical().show(ui, |ui| { 74 + for i in 0..len { 75 + if let Some(item) = items.get(i) { 76 + egui::Frame::NONE.inner_margin(4.0).show(ui, |ui| { 77 + ui.horizontal(|ui| { 78 + let mut done = item.done(); 79 + if ui.checkbox(&mut done, "").changed() { 80 + item.set_done(done); 81 + } 82 + 83 + let title = item.title(); 84 + if done { 85 + ui.label( 86 + egui::RichText::new(&title) 87 + .strikethrough() 88 + .color(ui.visuals().weak_text_color()), 89 + ); 90 + } else { 91 + ui.label(&title); 92 + } 93 + 94 + ui.with_layout( 95 + egui::Layout::right_to_left(egui::Align::Center), 96 + |ui| { 97 + if ui.button("\u{1f5d1}").clicked() { 98 + to_delete = Some(i); 99 + } 100 + }, 101 + ); 102 + }); 103 + }); 104 + } 105 + } 106 + }); 107 + 108 + if let Some(i) = to_delete { 109 + items.delete(i, 1); 110 + } 111 + } 112 + }
+68
crates/kammy/src/main.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! An IDE for papermario-dx mods. 6 + 7 + mod app; 8 + mod dock; 9 + mod editor; 10 + #[cfg(test)] 11 + mod tests; 12 + mod theme; 13 + mod tool; 14 + 15 + use std::sync::Arc; 16 + 17 + use eframe::egui; 18 + use loroscope::loroscope; 19 + use tracing_subscriber::EnvFilter; 20 + 21 + /// A single todo item with a title and completion status. 22 + #[loroscope] 23 + #[derive(Debug)] 24 + pub struct TodoItem { 25 + pub title: String, 26 + pub done: bool, 27 + } 28 + 29 + /// Data for a single editor tab (a list of todo items). 30 + #[loroscope] 31 + #[derive(Debug)] 32 + pub struct TabData { 33 + pub items: List<TodoItem>, 34 + } 35 + 36 + /// Root project data, holding all tabs keyed by tile ID. 37 + #[loroscope] 38 + #[derive(Debug)] 39 + pub struct Project { 40 + pub tabs: Map<TabData>, 41 + } 42 + 43 + fn main() -> eframe::Result { 44 + tracing_subscriber::fmt() 45 + .with_env_filter(EnvFilter::from_default_env()) 46 + .init(); 47 + 48 + dioxus_devtools::connect_subsecond(); 49 + 50 + subsecond::call(|| { 51 + let options = eframe::NativeOptions { 52 + viewport: egui::ViewportBuilder::default().with_inner_size([500.0, 600.0]), 53 + ..Default::default() 54 + }; 55 + eframe::run_native( 56 + "Kammy", 57 + options, 58 + Box::new(|cc| { 59 + let ctx = cc.egui_ctx.clone(); 60 + theme::apply(&ctx); 61 + subsecond::register_handler(Arc::new(move || { 62 + ctx.request_repaint(); 63 + })); 64 + Ok(Box::new(app::KammyApp::new())) 65 + }), 66 + ) 67 + }) 68 + }
+19
crates/kammy/src/tests.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Integration tests for kammy, using `egui_kittest`. 6 + 7 + #![allow(clippy::unwrap_used, clippy::expect_used)] 8 + 9 + mod undo; 10 + 11 + use eframe::egui; 12 + 13 + use crate::app::KammyApp; 14 + 15 + pub fn make_harness() -> egui_kittest::Harness<'static, KammyApp> { 16 + egui_kittest::Harness::builder() 17 + .with_size(egui::Vec2::new(1000.0, 600.0)) 18 + .build_eframe(|_cc| KammyApp::new()) 19 + }
+111
crates/kammy/src/tests/undo.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Tests for undo/redo behavior across single and multiple editor tabs. 6 + 7 + use eframe::egui; 8 + use egui_kittest::kittest::Queryable; 9 + 10 + use crate::app::KammyApp; 11 + 12 + /// Helper: type text into the todo input and click Add. 13 + fn add_todo(harness: &mut egui_kittest::Harness<'_, KammyApp>, text: &str) { 14 + harness 15 + .get_by_role(egui::accesskit::Role::TextInput) 16 + .click(); 17 + harness.run(); 18 + harness 19 + .get_by_role(egui::accesskit::Role::TextInput) 20 + .type_text(text); 21 + harness.get_by_label("Add").click(); 22 + harness.run(); 23 + } 24 + 25 + /// Helper: switch the visible tab and `active_document` to a different pane. 26 + fn switch_to_other_pane(harness: &mut egui_kittest::Harness<'_, KammyApp>) { 27 + let app = harness.state_mut(); 28 + let other = app.find_other_pane().expect("should find another pane"); 29 + app.switch_to_pane(other); 30 + } 31 + 32 + #[test] 33 + fn single_tab_undo_redo() { 34 + let mut harness = super::make_harness(); 35 + 36 + add_todo(&mut harness, "buy milk"); 37 + assert!( 38 + harness.query_by_label("buy milk").is_some(), 39 + "item should exist after adding" 40 + ); 41 + 42 + harness.get_by_label("⟲ Undo").click(); 43 + harness.run(); 44 + assert!( 45 + harness.query_by_label("buy milk").is_none(), 46 + "item should be gone after undo" 47 + ); 48 + 49 + harness.get_by_label("⟳ Redo").click(); 50 + harness.run(); 51 + assert!( 52 + harness.query_by_label("buy milk").is_some(), 53 + "item should reappear after redo" 54 + ); 55 + } 56 + 57 + #[test] 58 + fn undo_is_scoped_to_editor() { 59 + let mut harness = super::make_harness(); 60 + 61 + // Add item to editor 1 62 + add_todo(&mut harness, "from editor 1"); 63 + assert!(harness.query_by_label("from editor 1").is_some()); 64 + 65 + // Create editor 2 and switch to it 66 + harness.get_by_label("+ New Tab").click(); 67 + harness.run(); 68 + switch_to_other_pane(&mut harness); 69 + harness.run(); 70 + 71 + // Add item to editor 2 72 + add_todo(&mut harness, "from editor 2"); 73 + assert!(harness.query_by_label("from editor 2").is_some()); 74 + 75 + // Undo on editor 2: should remove "from editor 2" only 76 + harness.get_by_label("⟲ Undo").click(); 77 + harness.run(); 78 + assert!( 79 + harness.query_by_label("from editor 2").is_none(), 80 + "editor 2's item should be gone after undo" 81 + ); 82 + 83 + // Redo on editor 2, then switch back to editor 1 and undo there 84 + harness.get_by_label("⟳ Redo").click(); 85 + harness.run(); 86 + 87 + switch_to_other_pane(&mut harness); 88 + harness.run(); 89 + 90 + // Editor 1's item should still be visible 91 + assert!( 92 + harness.query_by_label("from editor 1").is_some(), 93 + "editor 1's item should still be visible" 94 + ); 95 + 96 + // Undo on editor 1 97 + harness.get_by_label("⟲ Undo").click(); 98 + harness.run(); 99 + assert!( 100 + harness.query_by_label("from editor 1").is_none(), 101 + "editor 1's item should be gone after undo on editor 1" 102 + ); 103 + 104 + // Switch to editor 2 and verify its item survived 105 + switch_to_other_pane(&mut harness); 106 + harness.run(); 107 + assert!( 108 + harness.query_by_label("from editor 2").is_some(), 109 + "editor 2's item should survive editor 1's undo" 110 + ); 111 + }
+104
crates/kammy/src/theme.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Theme configuration: custom fonts and styling. 6 + 7 + use std::sync::Arc; 8 + 9 + use eframe::egui; 10 + 11 + /// A named font family for medium-weight text (headings, labels). 12 + pub fn medium() -> egui::FontFamily { 13 + egui::FontFamily::Name("Medium".into()) 14 + } 15 + 16 + /// A named font family for bold text (strong emphasis). 17 + pub fn bold() -> egui::FontFamily { 18 + egui::FontFamily::Name("Bold".into()) 19 + } 20 + 21 + /// Configures the egui context with Switzer fonts and app styling. 22 + pub fn apply(ctx: &egui::Context) { 23 + let mut fonts = egui::FontDefinitions::default(); 24 + 25 + // Register font data 26 + fonts.font_data.insert( 27 + "Switzer-Regular".into(), 28 + Arc::new(egui::FontData::from_static(include_bytes!(concat!( 29 + env!("SWITZER_FONT_DIR"), 30 + "/Switzer_Complete/Fonts/OTF/Switzer-Regular.otf" 31 + )))), 32 + ); 33 + fonts.font_data.insert( 34 + "Switzer-Medium".into(), 35 + Arc::new(egui::FontData::from_static(include_bytes!(concat!( 36 + env!("SWITZER_FONT_DIR"), 37 + "/Switzer_Complete/Fonts/OTF/Switzer-Medium.otf" 38 + )))), 39 + ); 40 + fonts.font_data.insert( 41 + "Switzer-Bold".into(), 42 + Arc::new(egui::FontData::from_static(include_bytes!(concat!( 43 + env!("SWITZER_FONT_DIR"), 44 + "/Switzer_Complete/Fonts/OTF/Switzer-Bold.otf" 45 + )))), 46 + ); 47 + 48 + // Default proportional = Switzer Regular, falling back to egui built-ins 49 + fonts 50 + .families 51 + .entry(egui::FontFamily::Proportional) 52 + .or_default() 53 + .insert(0, "Switzer-Regular".into()); 54 + 55 + // Named families for other weights 56 + fonts 57 + .families 58 + .entry(medium()) 59 + .or_default() 60 + .extend(["Switzer-Medium".into(), "Switzer-Regular".into()]); 61 + fonts 62 + .families 63 + .entry(bold()) 64 + .or_default() 65 + .extend(["Switzer-Bold".into(), "Switzer-Regular".into()]); 66 + 67 + egui_phosphor::add_to_fonts(&mut fonts, egui_phosphor::Variant::Regular); 68 + 69 + ctx.set_fonts(fonts); 70 + 71 + apply_style(ctx); 72 + } 73 + 74 + fn apply_style(ctx: &egui::Context) { 75 + use egui::{FontId, TextStyle}; 76 + 77 + subsecond::call(|| { 78 + // Major-second typographic scale (×1.125) from a 12px base. 79 + let mut style = (*ctx.style()).clone(); 80 + style 81 + .text_styles 82 + .insert(TextStyle::Small, FontId::proportional(10.0)); 83 + style 84 + .text_styles 85 + .insert(TextStyle::Body, FontId::proportional(12.0)); 86 + style 87 + .text_styles 88 + .insert(TextStyle::Button, FontId::proportional(12.0)); 89 + style 90 + .text_styles 91 + .insert(TextStyle::Heading, FontId::proportional(15.0)); 92 + style 93 + .text_styles 94 + .insert(TextStyle::Monospace, FontId::monospace(12.0)); 95 + 96 + // Tighten spacing to match the smaller text. 97 + style.spacing.item_spacing = egui::vec2(6.0, 3.0); 98 + style.spacing.button_padding = egui::vec2(3.0, 1.0); 99 + style.spacing.window_margin = egui::Margin::same(5); 100 + style.spacing.indent = 16.0; 101 + 102 + ctx.set_style(style); 103 + }); 104 + }
+41
crates/kammy/src/tool.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Tool trait and built-in tool implementations. 6 + //! 7 + //! Tools are secondary panels that live in docks around the edges of the 8 + //! window. Unlike editors, tools do not have their own undo history — they 9 + //! operate on the active editor's data and contribute to its undo stack. 10 + 11 + pub mod assets; 12 + pub mod hierarchy; 13 + pub mod inspector; 14 + 15 + use eframe::egui; 16 + 17 + use crate::Project; 18 + use crate::editor::{EditorId, Inspect}; 19 + 20 + /// Context passed to each tool during rendering. 21 + pub struct ToolContext<'a> { 22 + /// The shared project data (CRDT document). 23 + pub project: &'a Project, 24 + /// The currently focused editor, if any. 25 + pub active_editor_id: Option<EditorId>, 26 + /// The current inspect object set by editors. Tools like the Inspector 27 + /// read this to display property UI. 28 + pub inspect: &'a mut Option<Box<dyn Inspect>>, 29 + } 30 + 31 + /// A secondary panel that provides supporting UI in a dock. 32 + pub trait Tool: std::fmt::Debug { 33 + /// The display title for this tool. 34 + fn title(&self) -> &'static str; 35 + 36 + /// A phosphor icon constant identifying this tool in the status bar. 37 + fn icon(&self) -> &'static str; 38 + 39 + /// Renders the tool's UI. 40 + fn ui(&mut self, ui: &mut egui::Ui, ctx: &mut ToolContext<'_>); 41 + }
+27
crates/kammy/src/tool/assets.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Assets tool: browse and manage project assets. 6 + 7 + use eframe::egui; 8 + 9 + use super::{Tool, ToolContext}; 10 + 11 + /// A file browser for project assets. 12 + #[derive(Debug)] 13 + pub struct AssetsTool; 14 + 15 + impl Tool for AssetsTool { 16 + fn title(&self) -> &'static str { 17 + "Assets" 18 + } 19 + 20 + fn icon(&self) -> &'static str { 21 + egui_phosphor::regular::FOLDER_OPEN 22 + } 23 + 24 + fn ui(&mut self, ui: &mut egui::Ui, _ctx: &mut ToolContext<'_>) { 25 + ui.label("Coming soon"); 26 + } 27 + }
+27
crates/kammy/src/tool/hierarchy.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Hierarchy tool: tree view of the document's structure. 6 + 7 + use eframe::egui; 8 + 9 + use super::{Tool, ToolContext}; 10 + 11 + /// A tree view showing the active document's structure. 12 + #[derive(Debug)] 13 + pub struct HierarchyTool; 14 + 15 + impl Tool for HierarchyTool { 16 + fn title(&self) -> &'static str { 17 + "Hierarchy" 18 + } 19 + 20 + fn icon(&self) -> &'static str { 21 + egui_phosphor::regular::TREE_STRUCTURE 22 + } 23 + 24 + fn ui(&mut self, ui: &mut egui::Ui, _ctx: &mut ToolContext<'_>) { 25 + ui.label("Coming soon"); 26 + } 27 + }
+37
crates/kammy/src/tool/inspector.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Inspector tool: displays property UI provided by editors via the 6 + //! [`Inspect`](crate::editor::Inspect) trait. 7 + 8 + use eframe::egui; 9 + 10 + use super::{Tool, ToolContext}; 11 + 12 + /// A tool that renders the current [`Inspect`](crate::editor::Inspect) 13 + /// object's UI. 14 + /// 15 + /// The Inspector doesn't own data or undo history. It displays whatever 16 + /// property UI has been set by the active editor (e.g. when the user selects 17 + /// an item in a todo list or an object in a future 3D modeler). 18 + #[derive(Debug)] 19 + pub struct InspectorTool; 20 + 21 + impl Tool for InspectorTool { 22 + fn title(&self) -> &'static str { 23 + "Inspector" 24 + } 25 + 26 + fn icon(&self) -> &'static str { 27 + egui_phosphor::regular::MAGNIFYING_GLASS 28 + } 29 + 30 + fn ui(&mut self, ui: &mut egui::Ui, ctx: &mut ToolContext<'_>) { 31 + if let Some(inspect) = &mut ctx.inspect { 32 + inspect.ui(ui); 33 + } else { 34 + ui.label("Nothing selected"); 35 + } 36 + } 37 + }
+17
crates/loroscope/Cargo.toml
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + [package] 6 + name = "loroscope" 7 + version = "0.1.0" 8 + edition = "2024" 9 + license = "MIT" 10 + 11 + [dependencies] 12 + loro = { workspace = true } 13 + loroscope_macros = { path = "../loroscope_macros" } 14 + paste = "1" 15 + 16 + [lints] 17 + workspace = true
+47
crates/loroscope/README.md
··· 1 + <!-- 2 + SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 3 + 4 + SPDX-License-Identifier: AGPL-3.0-or-later 5 + --> 6 + 7 + # Loroscope 8 + 9 + Typed structs for [Loro](https://loro.dev/) CRDTs. 10 + 11 + [Loro](https://loro.dev/) is a CRDT library — it gives you conflict-free 12 + replicated containers (lists, maps, trees, rich text, etc.) with undo/redo, 13 + sync, and time travel. But working with it directly means string-keyed 14 + container lookups and manual `LoroValue` matching. 15 + 16 + `#[loroscope]` generates typed accessors from a struct definition, so field 17 + access is checked at compile time. 18 + 19 + ## Example 20 + 21 + ```rust 22 + use loroscope::loroscope; 23 + 24 + #[loroscope] 25 + struct TodoItem { 26 + title: Text, 27 + done: bool, 28 + } 29 + 30 + #[loroscope] 31 + struct App { 32 + todos: List<TodoItem>, 33 + } 34 + 35 + let app = App::new(); 36 + 37 + let item = app.todos().push_new(); 38 + item.title().insert(0, "Buy milk").unwrap(); 39 + item.set_done(false); 40 + 41 + assert_eq!(app.todos().len(), 1); 42 + assert!(!app.todos().get(0).unwrap().done()); 43 + 44 + // The underlying LoroDoc is always available for export, import, 45 + // undo, subscriptions, etc. 46 + let _doc = app.doc(); 47 + ```
+106
crates/loroscope/src/lib.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Typed structs for [Loro](https://loro.dev/) CRDTs. 6 + //! 7 + //! [Loro](https://loro.dev/) is a CRDT library — it gives you conflict-free 8 + //! replicated containers (lists, maps, trees, rich text, etc.) with undo/redo, 9 + //! sync, and time travel. But working with it directly means string-keyed 10 + //! container lookups and manual [`LoroValue`](loro::LoroValue) matching. 11 + //! 12 + //! `#[loroscope]` generates typed accessors from a struct definition, so field 13 + //! access is checked at compile time. 14 + //! 15 + //! # Example 16 + //! 17 + //! ``` 18 + //! use loroscope::loroscope; 19 + //! 20 + //! #[loroscope] 21 + //! struct TodoItem { 22 + //! pub title: Text, 23 + //! pub done: bool, 24 + //! } 25 + //! 26 + //! #[loroscope] 27 + //! struct App { 28 + //! pub todos: List<TodoItem>, 29 + //! } 30 + //! 31 + //! let app = App::new(); 32 + //! 33 + //! let item = app.todos().push_new(); 34 + //! item.title().insert(0, "Buy milk").unwrap(); 35 + //! item.set_done(false); 36 + //! 37 + //! assert_eq!(app.todos().len(), 1); 38 + //! assert!(!app.todos().get(0).unwrap().done()); 39 + //! 40 + //! // The underlying LoroDoc is always available for export, import, 41 + //! // undo, subscriptions, etc. 42 + //! let _doc = app.doc(); 43 + //! ``` 44 + //! 45 + //! # Field types 46 + //! 47 + //! | Type | Generated methods | 48 + //! |---|---| 49 + //! | `f64`, `i64`, `bool`, `String` | `field() -> T`, `set_field(T)` | 50 + //! | [`Text`], [`Counter`] | `field() -> T` (get-or-create) | 51 + //! | [`List<T>`], [`Map<V>`], [`MovableList<T>`] | `field() -> Wrapper<T>` (get-or-create) | 52 + //! | [`Tree<T>`] | `field() -> Tree<T>` (get-or-create, `T` must be a `#[loroscope]` struct) | 53 + //! | `LoroList`, `LoroMap`, `LoroText`, … | `field() -> LoroX` (get-or-create) | 54 + //! | Any `#[loroscope]` struct | `field() -> T` (get-or-create) | 55 + //! | `Option<primitive>` | `field() -> Option<T>`, `set_field(T)`, `unset_field()` | 56 + //! | `Option<any other type>` | `field() -> Option<T>`, `field_or_init() -> T`, `unset_field()` | 57 + //! 58 + //! # `String` vs [`Text`] 59 + //! 60 + //! `String` fields store a plain string *value* — they are replaced entirely 61 + //! on each `set_` call. [`Text`] fields store a rich-text *container* that 62 + //! supports character-level insertion, deletion, and concurrent editing. 63 + //! Use `String` for short, rarely-edited labels; use [`Text`] for anything 64 + //! collaboratively edited. 65 + 66 + #![deny(missing_docs)] 67 + #![deny(unreachable_pub)] 68 + #![deny(clippy::unwrap_used)] 69 + #![deny(clippy::doc_markdown)] 70 + 71 + pub use loroscope_macros::loroscope; 72 + 73 + /// A rich-text container. Type alias for [`loro::LoroText`]. 74 + pub type Text = loro::LoroText; 75 + 76 + /// A CRDT counter. Type alias for [`loro::LoroCounter`]. 77 + pub type Counter = loro::LoroCounter; 78 + 79 + mod list; 80 + mod map; 81 + mod movable_list; 82 + mod tree; 83 + 84 + pub use list::List; 85 + pub use loro::{TreeID, TreeParentId}; 86 + pub use map::Map; 87 + pub use movable_list::MovableList; 88 + pub use tree::Tree; 89 + 90 + /// Trait implemented automatically by `#[loroscope]` structs. 91 + /// 92 + /// This allows structs to be used as elements in [`List<T>`], [`Map<V>`], 93 + /// and [`MovableList<T>`]. You do not need to implement this trait manually. 94 + pub trait FromLoroMap: Sized { 95 + /// Creates a typed view from a [`loro::LoroMap`]. 96 + fn from_loro_map(map: loro::LoroMap) -> Self; 97 + } 98 + 99 + #[doc(hidden)] 100 + pub mod __private { 101 + pub use loro::{ 102 + Container, ContainerTrait, LoroCounter, LoroDoc, LoroList, LoroMap, LoroMovableList, 103 + LoroText, LoroTree, LoroValue, ValueOrContainer, 104 + }; 105 + pub use paste::paste; 106 + }
+289
crates/loroscope/src/list.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + clippy::missing_panics_doc, 7 + clippy::unwrap_used, 8 + reason = "construction asserts containers are attached" 9 + )] 10 + 11 + use std::fmt; 12 + use std::marker::PhantomData; 13 + 14 + use loro::{LoroList, LoroMap, LoroMovableList, LoroTree, LoroValue}; 15 + 16 + use crate::FromLoroMap; 17 + 18 + /// A typed list where every element is of type `T`. 19 + /// 20 + /// Use this as a field type in a `#[loroscope]` struct: 21 + /// 22 + /// ``` 23 + /// use loroscope::loroscope; 24 + /// 25 + /// #[loroscope] 26 + /// struct Item { 27 + /// pub name: String, 28 + /// } 29 + /// 30 + /// #[loroscope] 31 + /// struct Project { 32 + /// pub items: List<Item>, 33 + /// } 34 + /// 35 + /// let project = Project::new(); 36 + /// project.items().push_new().set_name("first"); 37 + /// assert_eq!(project.items().len(), 1); 38 + /// ``` 39 + /// 40 + /// `T` can be a `#[loroscope]` struct, a primitive (`f64`, `i64`, `bool`, 41 + /// `String`), or a Loro container type (`LoroText`, `LoroCounter`, 42 + /// `LoroTree`). 43 + pub struct List<T> { 44 + list: LoroList, 45 + _phantom: PhantomData<T>, 46 + } 47 + 48 + impl<T> Clone for List<T> { 49 + fn clone(&self) -> Self { 50 + Self { 51 + list: self.list.clone(), 52 + _phantom: PhantomData, 53 + } 54 + } 55 + } 56 + 57 + impl<T> fmt::Debug for List<T> { 58 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 59 + f.debug_struct("List").field("len", &self.len()).finish() 60 + } 61 + } 62 + 63 + impl<T> List<T> { 64 + /// Creates a typed view from a [`LoroList`]. 65 + /// 66 + /// # Panics 67 + /// 68 + /// Panics if `list` is not attached to a [`LoroDoc`](loro::LoroDoc). 69 + #[must_use] 70 + pub fn new(list: LoroList) -> Self { 71 + assert!( 72 + list.is_attached(), 73 + "List requires an attached LoroList (one that belongs to a LoroDoc)" 74 + ); 75 + Self { 76 + list, 77 + _phantom: PhantomData, 78 + } 79 + } 80 + 81 + /// Returns the number of elements. 82 + #[must_use] 83 + pub fn len(&self) -> usize { 84 + self.list.len() 85 + } 86 + 87 + /// Returns `true` if the list is empty. 88 + #[must_use] 89 + pub fn is_empty(&self) -> bool { 90 + self.list.is_empty() 91 + } 92 + 93 + /// Returns a reference to the underlying [`LoroList`]. 94 + #[must_use] 95 + pub fn raw(&self) -> &LoroList { 96 + &self.list 97 + } 98 + 99 + /// Deletes `len` elements starting at `pos`. 100 + pub fn delete(&self, pos: usize, len: usize) { 101 + self.list.delete(pos, len).unwrap(); 102 + } 103 + 104 + /// Removes all elements from the list. 105 + pub fn clear(&self) { 106 + self.list.clear().unwrap(); 107 + } 108 + } 109 + 110 + impl<T: FromLoroMap> List<T> { 111 + /// Returns the element at `index`, or `None` if out of bounds. 112 + pub fn get(&self, index: usize) -> Option<T> { 113 + self.list 114 + .get(index) 115 + .and_then(|v| v.into_container().ok()) 116 + .and_then(|c| c.into_map().ok()) 117 + .map(T::from_loro_map) 118 + } 119 + 120 + /// Returns an iterator over all elements. 121 + pub fn iter(&self) -> impl Iterator<Item = T> { 122 + let mut items = Vec::with_capacity(self.len()); 123 + self.list.for_each(|voc| { 124 + if let Some(map) = voc.into_container().ok().and_then(|c| c.into_map().ok()) { 125 + items.push(T::from_loro_map(map)); 126 + } 127 + }); 128 + items.into_iter() 129 + } 130 + 131 + /// Inserts a new element at `pos` and returns it. 132 + pub fn insert_new(&self, pos: usize) -> T { 133 + T::from_loro_map(self.list.insert_container(pos, LoroMap::new()).unwrap()) 134 + } 135 + 136 + /// Appends a new element and returns it. 137 + pub fn push_new(&self) -> T { 138 + T::from_loro_map(self.list.push_container(LoroMap::new()).unwrap()) 139 + } 140 + } 141 + 142 + macro_rules! impl_primitive { 143 + ($ty:ty, $variant:pat => $expr:expr) => { 144 + impl List<$ty> { 145 + /// Returns the element at `index`, or `None` if out of bounds. 146 + pub fn get(&self, index: usize) -> Option<$ty> { 147 + self.list 148 + .get(index) 149 + .and_then(|v| v.into_value().ok()) 150 + .and_then(|v| match v { 151 + $variant => Some($expr), 152 + _ => None, 153 + }) 154 + } 155 + 156 + /// Returns an iterator over all elements. 157 + pub fn iter(&self) -> impl Iterator<Item = $ty> { 158 + self.list.to_vec().into_iter().filter_map(|v| match v { 159 + $variant => Some($expr), 160 + _ => None, 161 + }) 162 + } 163 + } 164 + }; 165 + } 166 + 167 + impl_primitive!(f64, LoroValue::Double(d) => d); 168 + impl_primitive!(i64, LoroValue::I64(i) => i); 169 + impl_primitive!(bool, LoroValue::Bool(b) => b); 170 + impl_primitive!(String, LoroValue::String(s) => s.to_string()); 171 + 172 + macro_rules! impl_push_insert { 173 + ($($value_ty:ty => $param_ty:ty),* $(,)?) => {$( 174 + impl List<$value_ty> { 175 + /// Appends a value to the end of the list. 176 + pub fn push(&self, val: $param_ty) { 177 + self.list.push(val).unwrap(); 178 + } 179 + 180 + /// Inserts a value at `pos`. 181 + pub fn insert(&self, pos: usize, val: $param_ty) { 182 + self.list.insert(pos, val).unwrap(); 183 + } 184 + } 185 + )*}; 186 + } 187 + 188 + impl_push_insert!(f64 => f64, i64 => i64, bool => bool, String => &str); 189 + 190 + macro_rules! impl_container { 191 + ($ty:ty, $variant:ident) => { 192 + impl List<$ty> { 193 + /// Returns the container at `index`, or `None` if out of bounds. 194 + pub fn get(&self, index: usize) -> Option<$ty> { 195 + self.list 196 + .get(index) 197 + .and_then(|v| v.into_container().ok()) 198 + .and_then(|c| c.$variant().ok()) 199 + } 200 + 201 + /// Appends a new empty container and returns it. 202 + pub fn push_new(&self) -> $ty { 203 + self.list.push_container(<$ty>::new()).unwrap() 204 + } 205 + 206 + /// Returns an iterator over all elements. 207 + pub fn iter(&self) -> impl Iterator<Item = $ty> { 208 + let mut items = Vec::with_capacity(self.len()); 209 + self.list.for_each(|voc| { 210 + if let Some(c) = voc.into_container().ok().and_then(|c| c.$variant().ok()) { 211 + items.push(c); 212 + } 213 + }); 214 + items.into_iter() 215 + } 216 + } 217 + }; 218 + } 219 + 220 + impl_container!(loro::LoroText, into_text); 221 + impl_container!(loro::LoroCounter, into_counter); 222 + impl_container!(loro::LoroTree, into_tree); 223 + 224 + macro_rules! impl_wrapper { 225 + ($wrapper:ident < $($param:ident),+ >, $loro_ty:ty, $variant:ident) => { 226 + impl<$($param),+> List<crate::$wrapper<$($param),+>> { 227 + /// Returns the element at `index`, or `None` if out of bounds. 228 + pub fn get(&self, index: usize) -> Option<crate::$wrapper<$($param),+>> { 229 + self.list 230 + .get(index) 231 + .and_then(|v| v.into_container().ok()) 232 + .and_then(|c| c.$variant().ok()) 233 + .map(crate::$wrapper::new) 234 + } 235 + 236 + /// Appends a new empty element and returns it. 237 + pub fn push_new(&self) -> crate::$wrapper<$($param),+> { 238 + crate::$wrapper::new( 239 + self.list 240 + .push_container(<$loro_ty>::new()) 241 + .unwrap(), 242 + ) 243 + } 244 + 245 + /// Returns an iterator over all elements. 246 + pub fn iter(&self) -> impl Iterator<Item = crate::$wrapper<$($param),+>> { 247 + let mut items = Vec::with_capacity(self.len()); 248 + self.list.for_each(|voc| { 249 + if let Some(c) = voc.into_container().ok().and_then(|c| c.$variant().ok()) { 250 + items.push(crate::$wrapper::new(c)); 251 + } 252 + }); 253 + items.into_iter() 254 + } 255 + } 256 + }; 257 + } 258 + 259 + impl_wrapper!(List<T>, LoroList, into_list); 260 + impl_wrapper!(Map<V>, LoroMap, into_map); 261 + impl_wrapper!(MovableList<T>, LoroMovableList, into_movable_list); 262 + 263 + // Tree needs a manual impl because Tree<T> requires T: FromLoroMap. 264 + impl<T: FromLoroMap> List<crate::Tree<T>> { 265 + /// Returns the element at `index`, or `None` if out of bounds. 266 + pub fn get(&self, index: usize) -> Option<crate::Tree<T>> { 267 + self.list 268 + .get(index) 269 + .and_then(|v| v.into_container().ok()) 270 + .and_then(|c| c.into_tree().ok()) 271 + .map(crate::Tree::new) 272 + } 273 + 274 + /// Appends a new empty element and returns it. 275 + pub fn push_new(&self) -> crate::Tree<T> { 276 + crate::Tree::new(self.list.push_container(LoroTree::new()).unwrap()) 277 + } 278 + 279 + /// Returns an iterator over all elements. 280 + pub fn iter(&self) -> impl Iterator<Item = crate::Tree<T>> { 281 + let mut items = Vec::with_capacity(self.len()); 282 + self.list.for_each(|voc| { 283 + if let Some(c) = voc.into_container().ok().and_then(|c| c.into_tree().ok()) { 284 + items.push(crate::Tree::new(c)); 285 + } 286 + }); 287 + items.into_iter() 288 + } 289 + }
+261
crates/loroscope/src/map.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + clippy::missing_panics_doc, 7 + clippy::unwrap_used, 8 + reason = "construction asserts containers are attached" 9 + )] 10 + 11 + use std::fmt; 12 + use std::marker::PhantomData; 13 + 14 + use loro::{LoroList, LoroMap, LoroMovableList, LoroTree, LoroValue}; 15 + 16 + use crate::FromLoroMap; 17 + 18 + /// A typed string-keyed map where every value is of type `V`. 19 + /// 20 + /// Use this as a field type in a `#[loroscope]` struct: 21 + /// 22 + /// ``` 23 + /// use loroscope::loroscope; 24 + /// 25 + /// #[loroscope] 26 + /// struct Settings { 27 + /// pub values: Map<i64>, 28 + /// } 29 + /// 30 + /// let settings = Settings::new(); 31 + /// settings.values().insert("volume", 80); 32 + /// assert_eq!(settings.values().get("volume"), Some(80)); 33 + /// ``` 34 + /// 35 + /// `V` can be a `#[loroscope]` struct, a primitive (`f64`, `i64`, `bool`, 36 + /// `String`), a Loro container type (`LoroText`, `LoroCounter`, `LoroTree`), 37 + /// or another collection ([`List<T>`](crate::List), 38 + /// [`MovableList<T>`](crate::MovableList), `Map<V>`). 39 + pub struct Map<V> { 40 + map: LoroMap, 41 + _phantom: PhantomData<V>, 42 + } 43 + 44 + impl<V> Clone for Map<V> { 45 + fn clone(&self) -> Self { 46 + Self { 47 + map: self.map.clone(), 48 + _phantom: PhantomData, 49 + } 50 + } 51 + } 52 + 53 + impl<V> fmt::Debug for Map<V> { 54 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 55 + f.debug_struct("Map").field("len", &self.len()).finish() 56 + } 57 + } 58 + 59 + impl<V> Map<V> { 60 + /// Creates a typed view from a [`LoroMap`]. 61 + /// 62 + /// # Panics 63 + /// 64 + /// Panics if `map` is not attached to a [`LoroDoc`](loro::LoroDoc). 65 + #[must_use] 66 + pub fn new(map: LoroMap) -> Self { 67 + assert!( 68 + map.is_attached(), 69 + "Map requires an attached LoroMap (one that belongs to a LoroDoc)" 70 + ); 71 + Self { 72 + map, 73 + _phantom: PhantomData, 74 + } 75 + } 76 + 77 + /// Returns the number of entries. 78 + #[must_use] 79 + pub fn len(&self) -> usize { 80 + self.map.len() 81 + } 82 + 83 + /// Returns `true` if the map is empty. 84 + #[must_use] 85 + pub fn is_empty(&self) -> bool { 86 + self.map.is_empty() 87 + } 88 + 89 + /// Returns a reference to the underlying [`LoroMap`]. 90 + #[must_use] 91 + pub fn raw(&self) -> &LoroMap { 92 + &self.map 93 + } 94 + 95 + /// Deletes the entry for `key`. 96 + pub fn delete(&self, key: &str) { 97 + self.map.delete(key).unwrap(); 98 + } 99 + 100 + /// Removes all entries from the map. 101 + pub fn clear(&self) { 102 + self.map.clear().unwrap(); 103 + } 104 + 105 + /// Returns an iterator over the keys in the map. 106 + pub fn keys(&self) -> impl Iterator<Item = String> + '_ { 107 + self.map.keys().map(|s| s.to_string()) 108 + } 109 + } 110 + 111 + impl<V: FromLoroMap> Map<V> { 112 + /// Returns the value for `key`, or `None` if the key is missing. 113 + pub fn get(&self, key: &str) -> Option<V> { 114 + self.map 115 + .get(key) 116 + .and_then(|v| v.into_container().ok()) 117 + .and_then(|c| c.into_map().ok()) 118 + .map(V::from_loro_map) 119 + } 120 + 121 + /// Returns the value for `key`, creating it if it doesn't exist. 122 + pub fn get_or_create(&self, key: &str) -> V { 123 + V::from_loro_map( 124 + self.map 125 + .get_or_create_container(key, LoroMap::new()) 126 + .unwrap(), 127 + ) 128 + } 129 + 130 + /// Returns an iterator over all key-value pairs. 131 + pub fn iter(&self) -> impl Iterator<Item = (String, V)> { 132 + let mut items = Vec::with_capacity(self.len()); 133 + self.map.for_each(|key, voc| { 134 + if let Some(map) = voc.into_container().ok().and_then(|c| c.into_map().ok()) { 135 + items.push((key.to_owned(), V::from_loro_map(map))); 136 + } 137 + }); 138 + items.into_iter() 139 + } 140 + } 141 + 142 + macro_rules! impl_primitive { 143 + ($ty:ty, $variant:pat => $expr:expr) => { 144 + impl Map<$ty> { 145 + /// Returns the value for `key`, or `None` if missing. 146 + pub fn get(&self, key: &str) -> Option<$ty> { 147 + self.map 148 + .get(key) 149 + .and_then(|v| v.into_value().ok()) 150 + .and_then(|v| match v { 151 + $variant => Some($expr), 152 + _ => None, 153 + }) 154 + } 155 + 156 + /// Returns an iterator over all key-value pairs. 157 + pub fn iter(&self) -> impl Iterator<Item = (String, $ty)> { 158 + let mut items = Vec::with_capacity(self.len()); 159 + self.map.for_each(|key, voc| { 160 + if let Some(v) = voc.into_value().ok().and_then(|v| match v { 161 + $variant => Some($expr), 162 + _ => None, 163 + }) { 164 + items.push((key.to_owned(), v)); 165 + } 166 + }); 167 + items.into_iter() 168 + } 169 + } 170 + }; 171 + } 172 + 173 + impl_primitive!(f64, LoroValue::Double(d) => d); 174 + impl_primitive!(i64, LoroValue::I64(i) => i); 175 + impl_primitive!(bool, LoroValue::Bool(b) => b); 176 + impl_primitive!(String, LoroValue::String(s) => s.to_string()); 177 + 178 + macro_rules! impl_insert { 179 + ($($value_ty:ty => $param_ty:ty),* $(,)?) => {$( 180 + impl Map<$value_ty> { 181 + /// Inserts a value for the given key, overwriting any previous value. 182 + pub fn insert(&self, key: &str, val: $param_ty) { 183 + self.map.insert(key, val).unwrap(); 184 + } 185 + } 186 + )*}; 187 + } 188 + 189 + impl_insert!(f64 => f64, i64 => i64, bool => bool, String => &str); 190 + 191 + macro_rules! impl_container { 192 + ($ty:ty, $variant:ident) => { 193 + impl Map<$ty> { 194 + /// Returns the container for `key`, or `None` if missing. 195 + pub fn get(&self, key: &str) -> Option<$ty> { 196 + self.map 197 + .get(key) 198 + .and_then(|v| v.into_container().ok()) 199 + .and_then(|c| c.$variant().ok()) 200 + } 201 + 202 + /// Returns the container for `key`, creating it if it doesn't exist. 203 + pub fn get_or_create(&self, key: &str) -> $ty { 204 + self.map.get_or_create_container(key, <$ty>::new()).unwrap() 205 + } 206 + } 207 + }; 208 + } 209 + 210 + impl_container!(loro::LoroText, into_text); 211 + impl_container!(loro::LoroCounter, into_counter); 212 + impl_container!(loro::LoroTree, into_tree); 213 + 214 + macro_rules! impl_wrapper { 215 + ($wrapper:ident < $($param:ident),+ >, $loro_ty:ty, $variant:ident) => { 216 + impl<$($param),+> Map<crate::$wrapper<$($param),+>> { 217 + /// Returns the value for `key`, or `None` if missing. 218 + pub fn get(&self, key: &str) -> Option<crate::$wrapper<$($param),+>> { 219 + self.map 220 + .get(key) 221 + .and_then(|v| v.into_container().ok()) 222 + .and_then(|c| c.$variant().ok()) 223 + .map(crate::$wrapper::new) 224 + } 225 + 226 + /// Returns the value for `key`, creating it if it doesn't exist. 227 + pub fn get_or_create(&self, key: &str) -> crate::$wrapper<$($param),+> { 228 + crate::$wrapper::new( 229 + self.map 230 + .get_or_create_container(key, <$loro_ty>::new()) 231 + .unwrap(), 232 + ) 233 + } 234 + } 235 + }; 236 + } 237 + 238 + impl_wrapper!(List<T>, LoroList, into_list); 239 + impl_wrapper!(MovableList<T>, LoroMovableList, into_movable_list); 240 + impl_wrapper!(Map<V>, LoroMap, into_map); 241 + 242 + // Tree needs a manual impl because Tree<T> requires T: FromLoroMap. 243 + impl<T: FromLoroMap> Map<crate::Tree<T>> { 244 + /// Returns the value for `key`, or `None` if missing. 245 + pub fn get(&self, key: &str) -> Option<crate::Tree<T>> { 246 + self.map 247 + .get(key) 248 + .and_then(|v| v.into_container().ok()) 249 + .and_then(|c| c.into_tree().ok()) 250 + .map(crate::Tree::new) 251 + } 252 + 253 + /// Returns the value for `key`, creating it if it doesn't exist. 254 + pub fn get_or_create(&self, key: &str) -> crate::Tree<T> { 255 + crate::Tree::new( 256 + self.map 257 + .get_or_create_container(key, LoroTree::new()) 258 + .unwrap(), 259 + ) 260 + } 261 + }
+305
crates/loroscope/src/movable_list.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + clippy::missing_panics_doc, 7 + clippy::unwrap_used, 8 + reason = "construction asserts containers are attached" 9 + )] 10 + 11 + use std::fmt; 12 + use std::marker::PhantomData; 13 + 14 + use loro::{LoroList, LoroMap, LoroMovableList, LoroTree, LoroValue}; 15 + 16 + use crate::FromLoroMap; 17 + 18 + /// A typed list that supports reordering and in-place updates. 19 + /// 20 + /// Unlike [`List`](crate::List), elements can be moved with [`mov`](Self::mov) 21 + /// and replaced with `set`. 22 + /// 23 + /// Use this as a field type in a `#[loroscope]` struct: 24 + /// 25 + /// ``` 26 + /// use loroscope::loroscope; 27 + /// 28 + /// #[loroscope] 29 + /// struct Song { 30 + /// pub title: String, 31 + /// } 32 + /// 33 + /// #[loroscope] 34 + /// struct Playlist { 35 + /// pub songs: MovableList<Song>, 36 + /// } 37 + /// 38 + /// let playlist = Playlist::new(); 39 + /// playlist.songs().push_new().set_title("First"); 40 + /// playlist.songs().push_new().set_title("Second"); 41 + /// playlist.songs().mov(1, 0); // reorder 42 + /// ``` 43 + /// 44 + /// `T` can be a `#[loroscope]` struct, a primitive (`f64`, `i64`, `bool`, 45 + /// `String`), or a Loro container type (`LoroText`, `LoroCounter`, 46 + /// `LoroTree`). 47 + pub struct MovableList<T> { 48 + list: LoroMovableList, 49 + _phantom: PhantomData<T>, 50 + } 51 + 52 + impl<T> Clone for MovableList<T> { 53 + fn clone(&self) -> Self { 54 + Self { 55 + list: self.list.clone(), 56 + _phantom: PhantomData, 57 + } 58 + } 59 + } 60 + 61 + impl<T> fmt::Debug for MovableList<T> { 62 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 63 + f.debug_struct("MovableList") 64 + .field("len", &self.len()) 65 + .finish() 66 + } 67 + } 68 + 69 + impl<T> MovableList<T> { 70 + /// Creates a typed view from a [`LoroMovableList`]. 71 + /// 72 + /// # Panics 73 + /// 74 + /// Panics if `list` is not attached to a [`LoroDoc`](loro::LoroDoc). 75 + #[must_use] 76 + pub fn new(list: LoroMovableList) -> Self { 77 + assert!( 78 + list.is_attached(), 79 + "MovableList requires an attached LoroMovableList (one that belongs to a LoroDoc)" 80 + ); 81 + Self { 82 + list, 83 + _phantom: PhantomData, 84 + } 85 + } 86 + 87 + /// Returns the number of elements. 88 + #[must_use] 89 + pub fn len(&self) -> usize { 90 + self.list.len() 91 + } 92 + 93 + /// Returns `true` if the list is empty. 94 + #[must_use] 95 + pub fn is_empty(&self) -> bool { 96 + self.list.is_empty() 97 + } 98 + 99 + /// Returns a reference to the underlying [`LoroMovableList`]. 100 + #[must_use] 101 + pub fn raw(&self) -> &LoroMovableList { 102 + &self.list 103 + } 104 + 105 + /// Moves the element at index `from` to index `to`. 106 + pub fn mov(&self, from: usize, to: usize) { 107 + self.list.mov(from, to).unwrap(); 108 + } 109 + 110 + /// Deletes `len` elements starting at `pos`. 111 + pub fn delete(&self, pos: usize, len: usize) { 112 + self.list.delete(pos, len).unwrap(); 113 + } 114 + 115 + /// Removes all elements from the list. 116 + pub fn clear(&self) { 117 + self.list.clear().unwrap(); 118 + } 119 + } 120 + 121 + impl<T: FromLoroMap> MovableList<T> { 122 + /// Returns the element at `index`, or `None` if out of bounds. 123 + pub fn get(&self, index: usize) -> Option<T> { 124 + self.list 125 + .get(index) 126 + .and_then(|v| v.into_container().ok()) 127 + .and_then(|c| c.into_map().ok()) 128 + .map(T::from_loro_map) 129 + } 130 + 131 + /// Returns an iterator over all elements. 132 + pub fn iter(&self) -> impl Iterator<Item = T> { 133 + let mut items = Vec::with_capacity(self.len()); 134 + self.list.for_each(|voc| { 135 + if let Some(map) = voc.into_container().ok().and_then(|c| c.into_map().ok()) { 136 + items.push(T::from_loro_map(map)); 137 + } 138 + }); 139 + items.into_iter() 140 + } 141 + 142 + /// Inserts a new element at `pos` and returns it. 143 + pub fn insert_new(&self, pos: usize) -> T { 144 + T::from_loro_map(self.list.insert_container(pos, LoroMap::new()).unwrap()) 145 + } 146 + 147 + /// Appends a new element and returns it. 148 + pub fn push_new(&self) -> T { 149 + T::from_loro_map(self.list.push_container(LoroMap::new()).unwrap()) 150 + } 151 + } 152 + 153 + macro_rules! impl_primitive { 154 + ($ty:ty, $variant:pat => $expr:expr) => { 155 + impl MovableList<$ty> { 156 + /// Returns the element at `index`, or `None` if out of bounds. 157 + pub fn get(&self, index: usize) -> Option<$ty> { 158 + self.list 159 + .get(index) 160 + .and_then(|v| v.into_value().ok()) 161 + .and_then(|v| match v { 162 + $variant => Some($expr), 163 + _ => None, 164 + }) 165 + } 166 + 167 + /// Returns an iterator over all elements. 168 + pub fn iter(&self) -> impl Iterator<Item = $ty> { 169 + self.list.to_vec().into_iter().filter_map(|v| match v { 170 + $variant => Some($expr), 171 + _ => None, 172 + }) 173 + } 174 + } 175 + }; 176 + } 177 + 178 + impl_primitive!(f64, LoroValue::Double(d) => d); 179 + impl_primitive!(i64, LoroValue::I64(i) => i); 180 + impl_primitive!(bool, LoroValue::Bool(b) => b); 181 + impl_primitive!(String, LoroValue::String(s) => s.to_string()); 182 + 183 + macro_rules! impl_push_set_insert { 184 + ($($value_ty:ty => $param_ty:ty),* $(,)?) => {$( 185 + impl MovableList<$value_ty> { 186 + /// Appends a value to the end of the list. 187 + pub fn push(&self, val: $param_ty) { 188 + self.list.push(val).unwrap(); 189 + } 190 + 191 + /// Replaces the value at `index`. 192 + pub fn set(&self, index: usize, val: $param_ty) { 193 + self.list.set(index, val).unwrap(); 194 + } 195 + 196 + /// Inserts a value at `pos`. 197 + pub fn insert(&self, pos: usize, val: $param_ty) { 198 + self.list.insert(pos, val).unwrap(); 199 + } 200 + } 201 + )*}; 202 + } 203 + 204 + impl_push_set_insert!(f64 => f64, i64 => i64, bool => bool, String => &str); 205 + 206 + macro_rules! impl_container { 207 + ($ty:ty, $variant:ident) => { 208 + impl MovableList<$ty> { 209 + /// Returns the container at `index`, or `None` if out of bounds. 210 + pub fn get(&self, index: usize) -> Option<$ty> { 211 + self.list 212 + .get(index) 213 + .and_then(|v| v.into_container().ok()) 214 + .and_then(|c| c.$variant().ok()) 215 + } 216 + 217 + /// Appends a new empty container and returns it. 218 + pub fn push_new(&self) -> $ty { 219 + self.list.push_container(<$ty>::new()).unwrap() 220 + } 221 + 222 + /// Returns an iterator over all elements. 223 + pub fn iter(&self) -> impl Iterator<Item = $ty> { 224 + let mut items = Vec::with_capacity(self.len()); 225 + self.list.for_each(|voc| { 226 + if let Some(c) = voc.into_container().ok().and_then(|c| c.$variant().ok()) { 227 + items.push(c); 228 + } 229 + }); 230 + items.into_iter() 231 + } 232 + } 233 + }; 234 + } 235 + 236 + impl_container!(loro::LoroText, into_text); 237 + impl_container!(loro::LoroCounter, into_counter); 238 + impl_container!(loro::LoroTree, into_tree); 239 + 240 + macro_rules! impl_wrapper { 241 + ($wrapper:ident < $($param:ident),+ >, $loro_ty:ty, $variant:ident) => { 242 + impl<$($param),+> MovableList<crate::$wrapper<$($param),+>> { 243 + /// Returns the element at `index`, or `None` if out of bounds. 244 + pub fn get(&self, index: usize) -> Option<crate::$wrapper<$($param),+>> { 245 + self.list 246 + .get(index) 247 + .and_then(|v| v.into_container().ok()) 248 + .and_then(|c| c.$variant().ok()) 249 + .map(crate::$wrapper::new) 250 + } 251 + 252 + /// Appends a new empty element and returns it. 253 + pub fn push_new(&self) -> crate::$wrapper<$($param),+> { 254 + crate::$wrapper::new( 255 + self.list 256 + .push_container(<$loro_ty>::new()) 257 + .unwrap(), 258 + ) 259 + } 260 + 261 + /// Returns an iterator over all elements. 262 + pub fn iter(&self) -> impl Iterator<Item = crate::$wrapper<$($param),+>> { 263 + let mut items = Vec::with_capacity(self.len()); 264 + self.list.for_each(|voc| { 265 + if let Some(c) = voc.into_container().ok().and_then(|c| c.$variant().ok()) { 266 + items.push(crate::$wrapper::new(c)); 267 + } 268 + }); 269 + items.into_iter() 270 + } 271 + } 272 + }; 273 + } 274 + 275 + impl_wrapper!(List<T>, LoroList, into_list); 276 + impl_wrapper!(Map<V>, LoroMap, into_map); 277 + impl_wrapper!(MovableList<T>, LoroMovableList, into_movable_list); 278 + 279 + // Tree needs a manual impl because Tree<T> requires T: FromLoroMap. 280 + impl<T: FromLoroMap> MovableList<crate::Tree<T>> { 281 + /// Returns the element at `index`, or `None` if out of bounds. 282 + pub fn get(&self, index: usize) -> Option<crate::Tree<T>> { 283 + self.list 284 + .get(index) 285 + .and_then(|v| v.into_container().ok()) 286 + .and_then(|c| c.into_tree().ok()) 287 + .map(crate::Tree::new) 288 + } 289 + 290 + /// Appends a new empty element and returns it. 291 + pub fn push_new(&self) -> crate::Tree<T> { 292 + crate::Tree::new(self.list.push_container(LoroTree::new()).unwrap()) 293 + } 294 + 295 + /// Returns an iterator over all elements. 296 + pub fn iter(&self) -> impl Iterator<Item = crate::Tree<T>> { 297 + let mut items = Vec::with_capacity(self.len()); 298 + self.list.for_each(|voc| { 299 + if let Some(c) = voc.into_container().ok().and_then(|c| c.into_tree().ok()) { 300 + items.push(crate::Tree::new(c)); 301 + } 302 + }); 303 + items.into_iter() 304 + } 305 + }
+206
crates/loroscope/src/tree.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + clippy::missing_panics_doc, 7 + clippy::unwrap_used, 8 + reason = "construction asserts containers are attached" 9 + )] 10 + 11 + use std::fmt; 12 + use std::marker::PhantomData; 13 + 14 + use loro::{LoroTree, TreeID, TreeParentId}; 15 + 16 + use crate::FromLoroMap; 17 + 18 + /// A typed tree (hierarchy) where each node's metadata is of type `T`. 19 + /// 20 + /// Use this as a field type in a `#[loroscope]` struct: 21 + /// 22 + /// ``` 23 + /// use loroscope::loroscope; 24 + /// 25 + /// #[loroscope] 26 + /// struct FileNode { 27 + /// pub name: Text, 28 + /// pub size: i64, 29 + /// } 30 + /// 31 + /// #[loroscope] 32 + /// struct Project { 33 + /// pub files: Tree<FileNode>, 34 + /// } 35 + /// 36 + /// let project = Project::new(); 37 + /// let (root_id, root) = project.files().create_root(); 38 + /// root.name().insert(0, "root").unwrap(); 39 + /// root.set_size(42); 40 + /// assert_eq!(project.files().get(root_id).unwrap().size(), 42); 41 + /// ``` 42 + /// 43 + /// Each tree node has a [`TreeID`] and an associated metadata map that is 44 + /// converted to `T` via [`FromLoroMap`]. Structural operations (move, delete, 45 + /// parent/child queries) and typed metadata access (`get`, `create_root`, 46 + /// etc.) are all available since `T` is always required to implement 47 + /// [`FromLoroMap`]. 48 + /// 49 + /// Fractional indexing is enabled by default so positional methods 50 + /// ([`mov_to`](Self::mov_to), [`mov_after`](Self::mov_after), 51 + /// [`mov_before`](Self::mov_before), [`create_at`](Self::create_at)) 52 + /// always work. 53 + pub struct Tree<T: FromLoroMap> { 54 + tree: LoroTree, 55 + _phantom: PhantomData<T>, 56 + } 57 + 58 + impl<T: FromLoroMap> Clone for Tree<T> { 59 + fn clone(&self) -> Self { 60 + Self { 61 + tree: self.tree.clone(), 62 + _phantom: PhantomData, 63 + } 64 + } 65 + } 66 + 67 + impl<T: FromLoroMap> fmt::Debug for Tree<T> { 68 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 69 + f.debug_struct("Tree") 70 + .field("roots", &self.roots().len()) 71 + .finish() 72 + } 73 + } 74 + 75 + impl<T: FromLoroMap> Tree<T> { 76 + /// Creates a typed view from a [`LoroTree`]. 77 + /// 78 + /// Enables fractional indexing (jitter=0) so that positional operations 79 + /// are always available. 80 + /// 81 + /// # Panics 82 + /// 83 + /// Panics if `tree` is not attached to a [`LoroDoc`](loro::LoroDoc). 84 + #[must_use] 85 + pub fn new(tree: LoroTree) -> Self { 86 + assert!( 87 + tree.is_attached(), 88 + "Tree requires an attached LoroTree (one that belongs to a LoroDoc)" 89 + ); 90 + tree.enable_fractional_index(0); 91 + Self { 92 + tree, 93 + _phantom: PhantomData, 94 + } 95 + } 96 + 97 + /// Returns `true` if the tree has no (non-deleted) root nodes. 98 + #[must_use] 99 + pub fn is_empty(&self) -> bool { 100 + self.tree.roots().is_empty() 101 + } 102 + 103 + /// Returns a reference to the underlying [`LoroTree`]. 104 + #[must_use] 105 + pub fn raw(&self) -> &LoroTree { 106 + &self.tree 107 + } 108 + 109 + /// Returns all root node IDs (excluding deleted nodes). 110 + #[must_use] 111 + pub fn roots(&self) -> Vec<TreeID> { 112 + self.tree.roots() 113 + } 114 + 115 + /// Returns the children of `parent`, or `None` if the node doesn't exist. 116 + #[must_use] 117 + pub fn children(&self, parent: TreeID) -> Option<Vec<TreeID>> { 118 + self.tree.children(parent) 119 + } 120 + 121 + /// Returns the number of children of `parent`, or `None` if the node 122 + /// doesn't exist. 123 + #[must_use] 124 + pub fn children_num(&self, parent: TreeID) -> Option<usize> { 125 + self.tree.children_num(parent) 126 + } 127 + 128 + /// Returns the parent of `target`, or `None` if the node doesn't exist. 129 + #[must_use] 130 + pub fn parent(&self, target: TreeID) -> Option<TreeParentId> { 131 + self.tree.parent(target) 132 + } 133 + 134 + /// Returns whether the tree contains `target` (including deleted nodes). 135 + #[must_use] 136 + pub fn contains(&self, target: TreeID) -> bool { 137 + self.tree.contains(target) 138 + } 139 + 140 + /// Marks a node as deleted. 141 + pub fn delete(&self, target: TreeID) { 142 + self.tree.delete(target).unwrap(); 143 + } 144 + 145 + /// Moves `target` to be a child of `parent`. 146 + pub fn mov(&self, target: TreeID, parent: TreeID) { 147 + self.tree.mov(target, parent).unwrap(); 148 + } 149 + 150 + /// Moves `target` to be a root node. 151 + pub fn mov_to_root(&self, target: TreeID) { 152 + self.tree.mov(target, TreeParentId::Root).unwrap(); 153 + } 154 + 155 + /// Moves `target` to position `index` under `parent`. 156 + pub fn mov_to(&self, target: TreeID, parent: TreeID, index: usize) { 157 + self.tree.mov_to(target, parent, index).unwrap(); 158 + } 159 + 160 + /// Moves `target` to the position immediately after `after`. 161 + pub fn mov_after(&self, target: TreeID, after: TreeID) { 162 + self.tree.mov_after(target, after).unwrap(); 163 + } 164 + 165 + /// Moves `target` to the position immediately before `before`. 166 + pub fn mov_before(&self, target: TreeID, before: TreeID) { 167 + self.tree.mov_before(target, before).unwrap(); 168 + } 169 + 170 + /// Returns the typed metadata for `id`, or `None` if the node doesn't 171 + /// exist or has been deleted. 172 + pub fn get(&self, id: TreeID) -> Option<T> { 173 + // Only return data for nodes that are live (have a non-Deleted parent). 174 + let parent = self.tree.parent(id)?; 175 + if parent == TreeParentId::Deleted { 176 + return None; 177 + } 178 + self.tree.get_meta(id).ok().map(T::from_loro_map) 179 + } 180 + 181 + /// Creates a new root node and returns its ID together with the typed 182 + /// metadata view. 183 + pub fn create_root(&self) -> (TreeID, T) { 184 + let id = self.tree.create(TreeParentId::Root).unwrap(); 185 + let meta = self.tree.get_meta(id).unwrap(); 186 + (id, T::from_loro_map(meta)) 187 + } 188 + 189 + /// Creates a new child node under `parent` and returns its ID together 190 + /// with the typed metadata view. 191 + pub fn create_child(&self, parent: TreeID) -> (TreeID, T) { 192 + let id = self.tree.create(parent).unwrap(); 193 + let meta = self.tree.get_meta(id).unwrap(); 194 + (id, T::from_loro_map(meta)) 195 + } 196 + 197 + /// Creates a new child node at position `index` under `parent` and 198 + /// returns its ID together with the typed metadata view. 199 + /// 200 + /// Requires fractional indexing to be enabled (it is by default). 201 + pub fn create_at(&self, parent: TreeID, index: usize) -> (TreeID, T) { 202 + let id = self.tree.create_at(parent, index).unwrap(); 203 + let meta = self.tree.get_meta(id).unwrap(); 204 + (id, T::from_loro_map(meta)) 205 + } 206 + }
+263
crates/loroscope/tests/collections.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow(missing_docs, clippy::unwrap_used, clippy::expect_used)] 6 + 7 + use loroscope::{List, loroscope}; 8 + 9 + #[loroscope] 10 + struct NpcStats { 11 + pub hp: i64, 12 + pub attack: i64, 13 + pub defense: i64, 14 + } 15 + 16 + #[loroscope] 17 + struct Npc { 18 + pub name: Text, 19 + pub x: f64, 20 + pub y: f64, 21 + pub hp: i64, 22 + pub visible: bool, 23 + pub stats: NpcStats, 24 + } 25 + 26 + #[loroscope] 27 + struct Project { 28 + pub npcs: List<Npc>, 29 + pub name: Text, 30 + pub settings: Map<i64>, 31 + } 32 + 33 + #[test] 34 + fn list_operations() { 35 + let project = Project::new(); 36 + 37 + let npc1 = project.npcs().push_new(); 38 + npc1.set_hp(10); 39 + let npc2 = project.npcs().push_new(); 40 + npc2.set_hp(20); 41 + 42 + assert_eq!(project.npcs().len(), 2); 43 + assert!(!project.npcs().is_empty()); 44 + assert_eq!(project.npcs().get(0).unwrap().hp(), 10); 45 + assert_eq!(project.npcs().get(1).unwrap().hp(), 20); 46 + 47 + let hps: Vec<i64> = project.npcs().iter().map(|n: Npc| n.hp()).collect(); 48 + assert_eq!(hps, vec![10, 20]); 49 + } 50 + 51 + #[test] 52 + fn map_operations() { 53 + let project = Project::new(); 54 + 55 + project.settings().insert("volume", 80); 56 + project.settings().insert("brightness", 50); 57 + 58 + assert_eq!(project.settings().get("volume"), Some(80)); 59 + assert_eq!(project.settings().get("brightness"), Some(50)); 60 + assert_eq!(project.settings().get("nonexistent"), None); 61 + assert_eq!(project.settings().len(), 2); 62 + } 63 + 64 + #[test] 65 + fn list_delete_and_clear() { 66 + let project = Project::new(); 67 + let list = project.npcs(); 68 + 69 + list.push_new().set_hp(1); 70 + list.push_new().set_hp(2); 71 + list.push_new().set_hp(3); 72 + assert_eq!(list.len(), 3); 73 + 74 + list.delete(1, 1); 75 + assert_eq!(list.len(), 2); 76 + assert_eq!(list.get(0).unwrap().hp(), 1); 77 + assert_eq!(list.get(1).unwrap().hp(), 3); 78 + 79 + list.clear(); 80 + assert_eq!(list.len(), 0); 81 + assert!(list.is_empty()); 82 + } 83 + 84 + #[test] 85 + fn list_insert_new() { 86 + let project = Project::new(); 87 + let list = project.npcs(); 88 + 89 + list.push_new().set_hp(1); 90 + list.push_new().set_hp(3); 91 + 92 + let mid = list.insert_new(1); 93 + mid.set_hp(2); 94 + 95 + assert_eq!(list.len(), 3); 96 + assert_eq!(list.get(0).unwrap().hp(), 1); 97 + assert_eq!(list.get(1).unwrap().hp(), 2); 98 + assert_eq!(list.get(2).unwrap().hp(), 3); 99 + } 100 + 101 + #[loroscope] 102 + struct PrimList { 103 + pub scores: List<i64>, 104 + } 105 + 106 + #[test] 107 + fn list_primitive_insert() { 108 + let data = PrimList::new(); 109 + let list = data.scores(); 110 + 111 + list.push(10); 112 + list.push(30); 113 + list.insert(1, 20); 114 + 115 + assert_eq!(list.len(), 3); 116 + assert_eq!(list.get(0), Some(10)); 117 + assert_eq!(list.get(1), Some(20)); 118 + assert_eq!(list.get(2), Some(30)); 119 + } 120 + 121 + #[test] 122 + fn map_delete_clear_keys() { 123 + let project = Project::new(); 124 + let map = project.settings(); 125 + 126 + map.insert("a", 1); 127 + map.insert("b", 2); 128 + map.insert("c", 3); 129 + assert_eq!(map.len(), 3); 130 + 131 + map.delete("b"); 132 + assert_eq!(map.len(), 2); 133 + assert_eq!(map.get("b"), None); 134 + 135 + let mut keys: Vec<String> = map.keys().collect(); 136 + keys.sort(); 137 + assert_eq!(keys, vec!["a", "c"]); 138 + 139 + map.clear(); 140 + assert!(map.is_empty()); 141 + } 142 + 143 + #[test] 144 + fn map_iter_primitives() { 145 + let project = Project::new(); 146 + let map = project.settings(); 147 + 148 + map.insert("x", 10); 149 + map.insert("y", 20); 150 + 151 + let mut pairs: Vec<(String, i64)> = map.iter().collect(); 152 + pairs.sort_by_key(|(k, _)| k.clone()); 153 + assert_eq!(pairs, vec![("x".into(), 10), ("y".into(), 20)]); 154 + } 155 + 156 + #[loroscope] 157 + struct NestedMap { 158 + pub items: Map<Npc>, 159 + } 160 + 161 + #[test] 162 + fn map_iter_structs() { 163 + let data = NestedMap::new(); 164 + let map = data.items(); 165 + 166 + let npc = map.get_or_create("hero"); 167 + npc.set_hp(100); 168 + let npc = map.get_or_create("villain"); 169 + npc.set_hp(50); 170 + 171 + let mut pairs: Vec<(String, i64)> = map.iter().map(|(k, v)| (k, v.hp())).collect(); 172 + pairs.sort_by_key(|(k, _)| k.clone()); 173 + assert_eq!(pairs, vec![("hero".into(), 100), ("villain".into(), 50)]); 174 + } 175 + 176 + #[loroscope] 177 + struct MovableData { 178 + pub items: MovableList<Npc>, 179 + pub scores: MovableList<i64>, 180 + } 181 + 182 + #[test] 183 + fn movable_list_delete_clear_insert() { 184 + let data = MovableData::new(); 185 + let list = data.items(); 186 + 187 + list.push_new().set_hp(1); 188 + list.push_new().set_hp(2); 189 + list.push_new().set_hp(3); 190 + 191 + list.delete(1, 1); 192 + assert_eq!(list.len(), 2); 193 + 194 + let mid = list.insert_new(1); 195 + mid.set_hp(99); 196 + assert_eq!(list.get(1).unwrap().hp(), 99); 197 + 198 + list.clear(); 199 + assert!(list.is_empty()); 200 + } 201 + 202 + #[test] 203 + fn movable_list_primitive_insert() { 204 + let data = MovableData::new(); 205 + let list = data.scores(); 206 + 207 + list.push(10); 208 + list.push(30); 209 + list.insert(1, 20); 210 + 211 + assert_eq!(list.get(0), Some(10)); 212 + assert_eq!(list.get(1), Some(20)); 213 + assert_eq!(list.get(2), Some(30)); 214 + } 215 + 216 + #[loroscope] 217 + struct NestedCollections { 218 + pub grid: List<List<i64>>, 219 + pub named_lists: Map<List<Npc>>, 220 + } 221 + 222 + #[test] 223 + fn nested_list_of_lists() { 224 + let data = NestedCollections::new(); 225 + let grid = data.grid(); 226 + 227 + let row0 = grid.push_new(); 228 + row0.push(1); 229 + row0.push(2); 230 + 231 + let row1 = grid.push_new(); 232 + row1.push(3); 233 + row1.push(4); 234 + 235 + assert_eq!(grid.len(), 2); 236 + assert_eq!(grid.get(0).unwrap().get(0), Some(1)); 237 + assert_eq!(grid.get(1).unwrap().get(1), Some(4)); 238 + } 239 + 240 + #[test] 241 + fn nested_map_of_lists() { 242 + let data = NestedCollections::new(); 243 + let named = data.named_lists(); 244 + 245 + let team_a = named.get_or_create("team_a"); 246 + team_a.push_new().set_hp(10); 247 + team_a.push_new().set_hp(20); 248 + 249 + assert_eq!(named.get("team_a").unwrap().len(), 2); 250 + } 251 + 252 + #[test] 253 + fn wrapper_debug_impls() { 254 + let project = Project::new(); 255 + 256 + let list_dbg = format!("{:?}", project.npcs()); 257 + assert!(list_dbg.contains("List")); 258 + assert!(list_dbg.contains("len")); 259 + 260 + let map_dbg = format!("{:?}", project.settings()); 261 + assert!(map_dbg.contains("Map")); 262 + assert!(map_dbg.contains("len")); 263 + }
+222
crates/loroscope/tests/enums.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + missing_docs, 7 + clippy::unwrap_used, 8 + clippy::expect_used, 9 + clippy::float_cmp 10 + )] 11 + 12 + use loroscope::loroscope; 13 + 14 + #[loroscope] 15 + #[derive(Debug)] 16 + enum Status { 17 + Idle, 18 + Moving { x: f64, y: f64 }, 19 + Attacking { target: Text, damage: i64 }, 20 + Loaded(String), 21 + } 22 + 23 + #[loroscope] 24 + struct Entity { 25 + pub name: Text, 26 + pub status: Status, 27 + } 28 + 29 + #[test] 30 + fn unit_variant() { 31 + let entity = Entity::new(); 32 + 33 + // Default is first variant (Idle) 34 + assert!(matches!(entity.status(), Status::Idle)); 35 + 36 + // Explicitly set to Idle 37 + entity.set_status_idle(); 38 + assert!(matches!(entity.status(), Status::Idle)); 39 + } 40 + 41 + #[test] 42 + fn struct_variant() { 43 + let entity = Entity::new(); 44 + 45 + let m = entity.set_status_moving(); 46 + m.set_x(1.0); 47 + m.set_y(2.0); 48 + 49 + match entity.status() { 50 + Status::Moving(m) => { 51 + assert_eq!(m.x(), 1.0); 52 + assert_eq!(m.y(), 2.0); 53 + } 54 + other => panic!("expected Moving, got {other:?}"), 55 + } 56 + } 57 + 58 + #[test] 59 + fn container_field() { 60 + let entity = Entity::new(); 61 + 62 + let a = entity.set_status_attacking(); 63 + a.set_damage(50); 64 + a.target().insert(0, "dragon").expect("insert"); 65 + 66 + match entity.status() { 67 + Status::Attacking(a) => { 68 + assert_eq!(a.damage(), 50); 69 + assert_eq!(a.target().to_string(), "dragon"); 70 + } 71 + other => panic!("expected Attacking, got {other:?}"), 72 + } 73 + } 74 + 75 + #[test] 76 + fn tuple_variant() { 77 + let entity = Entity::new(); 78 + 79 + let l = entity.set_status_loaded(); 80 + l.set_value("save1"); 81 + 82 + match entity.status() { 83 + Status::Loaded(l) => { 84 + assert_eq!(l.value(), "save1".to_owned()); 85 + } 86 + other => panic!("expected Loaded, got {other:?}"), 87 + } 88 + } 89 + 90 + #[test] 91 + fn field_mutation() { 92 + let entity = Entity::new(); 93 + 94 + let m = entity.set_status_moving(); 95 + m.set_x(1.0); 96 + m.set_y(2.0); 97 + 98 + match entity.status() { 99 + Status::Moving(m) => { 100 + m.set_x(m.x() + 10.0); 101 + m.set_y(m.y() + 20.0); 102 + } 103 + other => panic!("expected Moving, got {other:?}"), 104 + } 105 + 106 + match entity.status() { 107 + Status::Moving(m) => { 108 + assert_eq!(m.x(), 11.0); 109 + assert_eq!(m.y(), 22.0); 110 + } 111 + other => panic!("expected Moving, got {other:?}"), 112 + } 113 + } 114 + 115 + #[test] 116 + fn variant_switching_preserves_data() { 117 + let entity = Entity::new(); 118 + 119 + let m = entity.set_status_moving(); 120 + m.set_x(1.0); 121 + m.set_y(2.0); 122 + 123 + // Switch to Attacking 124 + entity.set_status_attacking(); 125 + 126 + // Switch back to Moving — starts fresh (old values cleared) 127 + entity.set_status_moving(); 128 + match entity.status() { 129 + Status::Moving(m) => { 130 + assert_eq!(m.x(), 0.0); 131 + assert_eq!(m.y(), 0.0); 132 + } 133 + other => panic!("expected Moving, got {other:?}"), 134 + } 135 + } 136 + 137 + #[test] 138 + fn as_struct_field() { 139 + let entity = Entity::new(); 140 + entity.name().insert(0, "hero").expect("insert"); 141 + 142 + let m = entity.set_status_moving(); 143 + m.set_x(5.0); 144 + m.set_y(10.0); 145 + 146 + assert_eq!(entity.name().to_string(), "hero"); 147 + match entity.status() { 148 + Status::Moving(m) => { 149 + assert_eq!(m.x(), 5.0); 150 + assert_eq!(m.y(), 10.0); 151 + } 152 + other => panic!("expected Moving, got {other:?}"), 153 + } 154 + } 155 + 156 + #[loroscope] 157 + struct StatusList { 158 + pub items: List<Status>, 159 + } 160 + 161 + #[test] 162 + fn in_list() { 163 + let data = StatusList::new(); 164 + let list = data.items(); 165 + 166 + let status_map = list.push_new(); 167 + assert!(matches!(status_map, Status::Idle)); 168 + 169 + assert_eq!(list.len(), 1); 170 + } 171 + 172 + #[test] 173 + fn matches_macro() { 174 + let entity = Entity::new(); 175 + entity.set_status_moving(); 176 + 177 + assert!(matches!(entity.status(), Status::Moving(_))); 178 + assert!(!matches!(entity.status(), Status::Idle)); 179 + assert!(!matches!(entity.status(), Status::Attacking(_))); 180 + } 181 + 182 + #[test] 183 + fn debug() { 184 + let entity = Entity::new(); 185 + let m = entity.set_status_moving(); 186 + m.set_x(1.0); 187 + m.set_y(2.0); 188 + 189 + let debug_str = format!("{:?}", entity.status()); 190 + assert!(debug_str.contains("Status::Moving")); 191 + assert!(debug_str.contains("x: 1.0")); 192 + assert!(debug_str.contains("y: 2.0")); 193 + 194 + entity.set_status_idle(); 195 + let debug_str = format!("{:?}", entity.status()); 196 + assert!(debug_str.contains("Status::Idle")); 197 + } 198 + 199 + #[test] 200 + fn setter_returns_accessor() { 201 + let entity = Entity::new(); 202 + 203 + let m = entity.set_status_moving(); 204 + m.set_x(99.0); 205 + 206 + match entity.status() { 207 + Status::Moving(m) => assert_eq!(m.x(), 99.0), 208 + other => panic!("expected Moving, got {other:?}"), 209 + } 210 + } 211 + 212 + #[test] 213 + fn variant_accessor_raw() { 214 + let entity = Entity::new(); 215 + let m = entity.set_status_moving(); 216 + m.set_x(1.0); 217 + m.set_y(2.0); 218 + 219 + let raw = m.raw(); 220 + assert!(raw.get("x").is_some()); 221 + assert!(raw.get("y").is_some()); 222 + }
+135
crates/loroscope/tests/option.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + missing_docs, 7 + clippy::unwrap_used, 8 + clippy::expect_used, 9 + clippy::float_cmp 10 + )] 11 + 12 + use loroscope::loroscope; 13 + 14 + #[loroscope] 15 + struct NpcStats { 16 + pub hp: i64, 17 + pub attack: i64, 18 + pub defense: i64, 19 + } 20 + 21 + #[loroscope] 22 + struct Npc { 23 + pub name: Text, 24 + pub hp: i64, 25 + } 26 + 27 + #[loroscope] 28 + struct PlayerConfig { 29 + pub name: String, 30 + pub max_hp: Option<i64>, 31 + pub speed: Option<f64>, 32 + pub active: Option<bool>, 33 + pub nickname: Option<String>, 34 + } 35 + 36 + #[test] 37 + fn option_fields() { 38 + let config = PlayerConfig::new(); 39 + 40 + assert_eq!(config.max_hp(), None); 41 + assert_eq!(config.speed(), None); 42 + assert_eq!(config.active(), None); 43 + assert_eq!(config.nickname(), None); 44 + 45 + config.set_max_hp(100); 46 + config.set_speed(3.5); 47 + config.set_active(true); 48 + config.set_nickname("ace"); 49 + 50 + assert_eq!(config.max_hp(), Some(100)); 51 + assert_eq!(config.speed(), Some(3.5)); 52 + assert_eq!(config.active(), Some(true)); 53 + assert_eq!(config.nickname(), Some("ace".to_owned())); 54 + 55 + config.unset_max_hp(); 56 + assert_eq!(config.max_hp(), None); 57 + } 58 + 59 + #[loroscope] 60 + struct OptionalContainers { 61 + pub bio: Option<Text>, 62 + pub score: Option<Counter>, 63 + pub allies: Option<List<Npc>>, 64 + pub extra: Option<NpcStats>, 65 + } 66 + 67 + #[test] 68 + fn text() { 69 + let data = OptionalContainers::new(); 70 + 71 + assert!(data.bio().is_none()); 72 + 73 + let bio = data.bio_or_init(); 74 + bio.insert(0, "hello").unwrap(); 75 + assert_eq!(data.bio().unwrap().to_string(), "hello"); 76 + 77 + data.unset_bio(); 78 + assert!(data.bio().is_none()); 79 + } 80 + 81 + #[test] 82 + fn counter() { 83 + let data = OptionalContainers::new(); 84 + 85 + assert!(data.score().is_none()); 86 + 87 + let counter = data.score_or_init(); 88 + counter.increment(5.0).unwrap(); 89 + assert_eq!(data.score().unwrap().get(), 5.0); 90 + 91 + data.unset_score(); 92 + assert!(data.score().is_none()); 93 + } 94 + 95 + #[test] 96 + fn generic_container() { 97 + let data = OptionalContainers::new(); 98 + 99 + assert!(data.allies().is_none()); 100 + 101 + let list = data.allies_or_init(); 102 + let npc = list.push_new(); 103 + npc.set_hp(42); 104 + assert_eq!(data.allies().unwrap().get(0).unwrap().hp(), 42); 105 + 106 + data.unset_allies(); 107 + assert!(data.allies().is_none()); 108 + } 109 + 110 + #[test] 111 + fn nested_struct() { 112 + let data = OptionalContainers::new(); 113 + 114 + assert!(data.extra().is_none()); 115 + 116 + let stats = data.extra_or_init(); 117 + stats.set_hp(100); 118 + stats.set_attack(50); 119 + assert_eq!(data.extra().unwrap().hp(), 100); 120 + 121 + data.unset_extra(); 122 + assert!(data.extra().is_none()); 123 + } 124 + 125 + #[test] 126 + fn create_is_idempotent() { 127 + let data = OptionalContainers::new(); 128 + 129 + let bio1 = data.bio_or_init(); 130 + bio1.insert(0, "hello").unwrap(); 131 + 132 + // Second create returns the same container, not a new one 133 + let bio2 = data.bio_or_init(); 134 + assert_eq!(bio2.to_string(), "hello"); 135 + }
+286
crates/loroscope/tests/structs.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow( 6 + missing_docs, 7 + clippy::unwrap_used, 8 + clippy::expect_used, 9 + clippy::float_cmp 10 + )] 11 + 12 + use loroscope::loroscope; 13 + 14 + #[loroscope] 15 + struct NpcStats { 16 + pub hp: i64, 17 + pub attack: i64, 18 + pub defense: i64, 19 + } 20 + 21 + #[loroscope] 22 + struct Npc { 23 + pub name: Text, 24 + pub x: f64, 25 + pub y: f64, 26 + pub hp: i64, 27 + pub visible: bool, 28 + pub stats: NpcStats, 29 + } 30 + 31 + #[loroscope] 32 + struct Project { 33 + pub npcs: List<Npc>, 34 + pub name: Text, 35 + pub settings: Map<i64>, 36 + } 37 + 38 + #[test] 39 + fn primitive_fields() { 40 + let project = Project::new(); 41 + 42 + let npc = project.npcs().push_new(); 43 + npc.set_x(42.0); 44 + npc.set_y(100.0); 45 + npc.set_hp(20); 46 + npc.set_visible(true); 47 + 48 + assert_eq!(npc.x(), 42.0); 49 + assert_eq!(npc.y(), 100.0); 50 + assert_eq!(npc.hp(), 20); 51 + assert!(npc.visible()); 52 + } 53 + 54 + #[test] 55 + fn nested_structs() { 56 + let project = Project::new(); 57 + 58 + let npc = project.npcs().push_new(); 59 + let stats = npc.stats(); 60 + stats.set_hp(100); 61 + stats.set_attack(50); 62 + stats.set_defense(30); 63 + 64 + assert_eq!(stats.hp(), 100); 65 + assert_eq!(stats.attack(), 50); 66 + assert_eq!(stats.defense(), 30); 67 + } 68 + 69 + #[test] 70 + fn default_values() { 71 + let project = Project::new(); 72 + 73 + let npc = project.npcs().push_new(); 74 + assert_eq!(npc.x(), 0.0); 75 + assert_eq!(npc.y(), 0.0); 76 + assert_eq!(npc.hp(), 0); 77 + assert!(!npc.visible()); 78 + } 79 + 80 + #[test] 81 + fn shared_views() { 82 + let project1 = Project::new(); 83 + let doc = project1.doc(); 84 + let project2 = Project::from(doc.get_map("Project")); 85 + 86 + let npc = project1.npcs().push_new(); 87 + npc.set_hp(42); 88 + doc.commit(); 89 + 90 + let npc2 = project2.npcs().get(0).unwrap(); 91 + assert_eq!(npc2.hp(), 42); 92 + } 93 + 94 + #[test] 95 + fn undo_manager() { 96 + let project = Project::new(); 97 + let doc = project.doc(); 98 + 99 + let npc = project.npcs().push_new(); 100 + npc.set_hp(10); 101 + doc.commit(); 102 + 103 + let mut undo = loro::UndoManager::new(&doc); 104 + 105 + npc.set_hp(99); 106 + doc.commit(); 107 + assert_eq!(npc.hp(), 99); 108 + 109 + undo.undo().unwrap(); 110 + assert_eq!(npc.hp(), 10); 111 + } 112 + 113 + #[loroscope] 114 + struct RawExample { 115 + pub items: LoroList, 116 + pub metadata: LoroMap, 117 + pub notes: LoroText, 118 + } 119 + 120 + #[test] 121 + fn raw_loro_types() { 122 + let example = RawExample::new(); 123 + 124 + example.items().push(42).unwrap(); 125 + example.items().push("hello").unwrap(); 126 + assert_eq!(example.items().len(), 2); 127 + 128 + example.metadata().insert("key", "value").unwrap(); 129 + assert_eq!(example.metadata().len(), 1); 130 + 131 + example.notes().insert(0, "hello world").unwrap(); 132 + assert_eq!(example.notes().to_string(), "hello world"); 133 + } 134 + 135 + #[test] 136 + fn raw_and_doc_accessor() { 137 + let project = Project::new(); 138 + 139 + let _raw_map: &loro::LoroMap = project.raw(); 140 + let _doc: loro::LoroDoc = project.doc(); 141 + 142 + let npc = project.npcs().push_new(); 143 + let _raw_map: &loro::LoroMap = npc.raw(); 144 + let _doc: loro::LoroDoc = npc.doc(); 145 + 146 + npc.raw().insert("custom_field", 999).unwrap(); 147 + } 148 + 149 + #[loroscope] 150 + #[derive(Debug, Clone)] 151 + struct SimplePoint { 152 + pub x: f64, 153 + pub y: f64, 154 + } 155 + 156 + #[test] 157 + fn derive_debug() { 158 + let point = SimplePoint::new(); 159 + point.set_x(1.5); 160 + point.set_y(2.5); 161 + 162 + let debug_str = format!("{point:?}"); 163 + assert!(debug_str.contains("SimplePoint")); 164 + assert!(debug_str.contains("x: 1.5")); 165 + assert!(debug_str.contains("y: 2.5")); 166 + } 167 + 168 + #[test] 169 + fn derive_clone() { 170 + let point = SimplePoint::new(); 171 + let point2 = point.clone(); 172 + point.set_x(42.0); 173 + // Clone shares the same underlying CRDT, so both see the change 174 + assert_eq!(point2.x(), 42.0); 175 + } 176 + 177 + #[test] 178 + fn sync_export_import() { 179 + use loro::ExportMode; 180 + 181 + let alice = Project::new(); 182 + let alice_doc = alice.doc(); 183 + let npc = alice.npcs().push_new(); 184 + npc.set_hp(10); 185 + alice_doc.commit(); 186 + 187 + let bob = Project::new(); 188 + let bob_doc = bob.doc(); 189 + bob_doc 190 + .import(&alice_doc.export(ExportMode::all_updates()).unwrap()) 191 + .unwrap(); 192 + 193 + let npc = alice.npcs().push_new(); 194 + npc.set_hp(20); 195 + alice_doc.commit(); 196 + 197 + let npc = bob.npcs().push_new(); 198 + npc.set_hp(30); 199 + bob_doc.commit(); 200 + 201 + bob_doc 202 + .import(&alice_doc.export(ExportMode::all_updates()).unwrap()) 203 + .unwrap(); 204 + alice_doc 205 + .import(&bob_doc.export(ExportMode::all_updates()).unwrap()) 206 + .unwrap(); 207 + 208 + assert_eq!(alice.npcs().len(), 3); 209 + assert_eq!(bob.npcs().len(), 3); 210 + } 211 + 212 + #[test] 213 + fn from_doc() { 214 + let project = Project::new(); 215 + let doc = project.doc(); 216 + 217 + project.settings().insert("vol", 80); 218 + doc.commit(); 219 + 220 + let project2 = Project::from_doc(&doc); 221 + assert_eq!(project2.settings().get("vol"), Some(80)); 222 + } 223 + 224 + #[loroscope(key = "my_custom_key")] 225 + struct CustomKey { 226 + pub value: i64, 227 + } 228 + 229 + #[test] 230 + fn key_attribute() { 231 + use loro::LoroValue; 232 + 233 + let ck = CustomKey::new(); 234 + ck.set_value(42); 235 + 236 + let doc = ck.doc(); 237 + let map = doc.get_map("my_custom_key"); 238 + let val = map 239 + .get("value") 240 + .and_then(|v| v.into_value().ok()) 241 + .and_then(|v| match v { 242 + LoroValue::I64(i) => Some(i), 243 + _ => None, 244 + }); 245 + assert_eq!(val, Some(42)); 246 + 247 + let ck2 = CustomKey::from_doc(&doc); 248 + assert_eq!(ck2.value(), 42); 249 + } 250 + 251 + #[loroscope] 252 + struct AutoClone { 253 + pub val: i64, 254 + } 255 + 256 + #[test] 257 + fn auto_clone() { 258 + let a = AutoClone::new(); 259 + let b = a.clone(); 260 + a.set_val(42); 261 + assert_eq!(b.val(), 42); 262 + } 263 + 264 + mod visibility_test { 265 + use loroscope::loroscope; 266 + 267 + #[loroscope] 268 + pub struct Mixed { 269 + pub public_field: i64, 270 + private_field: i64, 271 + } 272 + 273 + #[test] 274 + fn private_field_accessible_within_module() { 275 + let m = Mixed::new(); 276 + m.set_private_field(10); 277 + assert_eq!(m.private_field(), 10); 278 + } 279 + } 280 + 281 + #[test] 282 + fn public_field_accessible_outside_module() { 283 + let m = visibility_test::Mixed::new(); 284 + m.set_public_field(42); 285 + assert_eq!(m.public_field(), 42); 286 + }
+157
crates/loroscope/tests/tree.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + #![allow(missing_docs, clippy::unwrap_used, clippy::expect_used)] 6 + 7 + use loroscope::loroscope; 8 + 9 + #[loroscope] 10 + struct FileNode { 11 + pub name: Text, 12 + pub size: i64, 13 + } 14 + 15 + #[loroscope] 16 + struct FileSystem { 17 + pub files: Tree<FileNode>, 18 + } 19 + 20 + #[test] 21 + fn create_and_get() { 22 + let fs = FileSystem::new(); 23 + let tree = fs.files(); 24 + 25 + let (root_id, root) = tree.create_root(); 26 + root.name().insert(0, "root").unwrap(); 27 + root.set_size(100); 28 + 29 + let retrieved = tree.get(root_id).unwrap(); 30 + assert_eq!(retrieved.name().to_string(), "root"); 31 + assert_eq!(retrieved.size(), 100); 32 + } 33 + 34 + #[test] 35 + fn structure_queries() { 36 + let fs = FileSystem::new(); 37 + let tree = fs.files(); 38 + 39 + let (root_id, root) = tree.create_root(); 40 + root.name().insert(0, "root").unwrap(); 41 + 42 + let (child1_id, child1) = tree.create_child(root_id); 43 + child1.name().insert(0, "child1").unwrap(); 44 + 45 + let (child2_id, child2) = tree.create_child(root_id); 46 + child2.name().insert(0, "child2").unwrap(); 47 + 48 + assert_eq!(tree.roots(), vec![root_id]); 49 + assert!(!tree.is_empty()); 50 + 51 + let children = tree.children(root_id).unwrap(); 52 + assert_eq!(children.len(), 2); 53 + assert!(children.contains(&child1_id)); 54 + assert!(children.contains(&child2_id)); 55 + 56 + assert_eq!(tree.children_num(root_id), Some(2)); 57 + 58 + assert_eq!( 59 + tree.parent(child1_id), 60 + Some(loroscope::TreeParentId::Node(root_id)) 61 + ); 62 + assert_eq!(tree.parent(root_id), Some(loroscope::TreeParentId::Root)); 63 + 64 + assert!(tree.contains(root_id)); 65 + assert!(tree.contains(child1_id)); 66 + } 67 + 68 + #[test] 69 + fn move_operations() { 70 + let fs = FileSystem::new(); 71 + let tree = fs.files(); 72 + 73 + let (root1_id, _) = tree.create_root(); 74 + let (root2_id, _) = tree.create_root(); 75 + let (child_id, _) = tree.create_child(root1_id); 76 + 77 + tree.mov(child_id, root2_id); 78 + assert_eq!( 79 + tree.parent(child_id), 80 + Some(loroscope::TreeParentId::Node(root2_id)) 81 + ); 82 + assert_eq!(tree.children_num(root1_id), Some(0)); 83 + assert_eq!(tree.children_num(root2_id), Some(1)); 84 + 85 + tree.mov_to_root(child_id); 86 + assert_eq!(tree.parent(child_id), Some(loroscope::TreeParentId::Root)); 87 + assert_eq!(tree.roots().len(), 3); 88 + } 89 + 90 + #[test] 91 + fn positional_operations() { 92 + let fs = FileSystem::new(); 93 + let tree = fs.files(); 94 + 95 + let (root_id, _) = tree.create_root(); 96 + let (a_id, a) = tree.create_child(root_id); 97 + a.name().insert(0, "a").unwrap(); 98 + let (b_id, b) = tree.create_child(root_id); 99 + b.name().insert(0, "b").unwrap(); 100 + 101 + let (c_id, c) = tree.create_at(root_id, 0); 102 + c.name().insert(0, "c").unwrap(); 103 + 104 + let children = tree.children(root_id).unwrap(); 105 + assert_eq!(children[0], c_id); 106 + 107 + tree.mov_to(b_id, root_id, 0); 108 + let children = tree.children(root_id).unwrap(); 109 + assert_eq!(children[0], b_id); 110 + 111 + tree.mov_after(a_id, c_id); 112 + let children = tree.children(root_id).unwrap(); 113 + let c_pos = children.iter().position(|id| *id == c_id).unwrap(); 114 + let a_pos = children.iter().position(|id| *id == a_id).unwrap(); 115 + assert_eq!(a_pos, c_pos + 1); 116 + 117 + tree.mov_before(b_id, c_id); 118 + let children = tree.children(root_id).unwrap(); 119 + let b_pos = children.iter().position(|id| *id == b_id).unwrap(); 120 + let c_pos = children.iter().position(|id| *id == c_id).unwrap(); 121 + assert_eq!(b_pos + 1, c_pos); 122 + } 123 + 124 + #[test] 125 + fn delete() { 126 + let fs = FileSystem::new(); 127 + let tree = fs.files(); 128 + 129 + let (root_id, _) = tree.create_root(); 130 + let (child_id, _) = tree.create_child(root_id); 131 + 132 + tree.delete(child_id); 133 + 134 + assert!(tree.get(child_id).is_none()); 135 + assert_eq!(tree.children_num(root_id), Some(0)); 136 + } 137 + 138 + #[test] 139 + fn get_nonexistent() { 140 + let fs = FileSystem::new(); 141 + let tree = fs.files(); 142 + 143 + let fake_id = loroscope::TreeID { 144 + peer: 999, 145 + counter: 999, 146 + }; 147 + assert!(tree.get(fake_id).is_none()); 148 + assert!(!tree.contains(fake_id)); 149 + } 150 + 151 + #[test] 152 + fn debug_impl() { 153 + let fs = FileSystem::new(); 154 + let tree_dbg = format!("{:?}", fs.files()); 155 + assert!(tree_dbg.contains("Tree")); 156 + assert!(tree_dbg.contains("roots")); 157 + }
+17
crates/loroscope_macros/Cargo.toml
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + [package] 6 + name = "loroscope_macros" 7 + version = "0.1.0" 8 + edition = "2024" 9 + license = "MIT" 10 + 11 + [lib] 12 + proc-macro = true 13 + 14 + [dependencies] 15 + syn = { version = "2", features = ["full"] } 16 + quote = "1" 17 + proc-macro2 = "1"
+1400
crates/loroscope_macros/src/lib.rs
··· 1 + // SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + // 3 + // SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + //! Proc-macro implementation for the `loroscope` crate. 6 + //! 7 + //! Depend on `loroscope` rather than using this crate directly. 8 + 9 + use proc_macro::TokenStream; 10 + use quote::{format_ident, quote}; 11 + use syn::punctuated::Punctuated; 12 + use syn::{GenericArgument, Ident, ItemEnum, ItemStruct, Meta, PathArguments, Type, Visibility}; 13 + 14 + /// Defines a typed struct or enum over a Loro CRDT document. 15 + /// 16 + /// # Example 17 + /// 18 + /// ```ignore 19 + /// use loroscope::loroscope; 20 + /// 21 + /// #[loroscope] 22 + /// struct Player { 23 + /// pub name: Text, 24 + /// pub score: i64, 25 + /// } 26 + /// 27 + /// let player = Player::new(); 28 + /// player.set_score(100); 29 + /// assert_eq!(player.score(), 100); 30 + /// ``` 31 + /// 32 + /// # Attribute arguments 33 + /// 34 + /// | Argument | Description | 35 + /// |---|---| 36 + /// | `key = "custom"` | Override the map key used in the `LoroDoc`. Defaults to the struct name. | 37 + /// 38 + /// ```ignore 39 + /// #[loroscope(key = "my_key")] 40 + /// struct Data { 41 + /// pub value: i64, 42 + /// } 43 + /// ``` 44 + /// 45 + /// # Field types 46 + /// 47 + /// | Type | Generated methods | 48 + /// |---|---| 49 + /// | `f64`, `i64`, `bool`, `String` | `field() -> T`, `set_field(T)` | 50 + /// | [`Text`], [`Counter`] | `field() -> T` (get-or-create) | 51 + /// | [`List<T>`], [`Map<V>`], [`MovableList<T>`] | `field() -> Wrapper<T>` (get-or-create) | 52 + /// | [`Tree<T>`] | `field() -> Tree<T>` (get-or-create, `T` must be a `#[loroscope]` struct) | 53 + /// | `LoroList`, `LoroMap`, `LoroText`, … | `field() -> LoroX` (get-or-create) | 54 + /// | Any `#[loroscope]` struct | `field() -> T` (get-or-create) | 55 + /// | `Option<primitive>` | `field() -> Option<T>`, `set_field(T)`, `unset_field()` | 56 + /// | `Option<any other type>` | `field() -> Option<T>`, `field_or_init() -> T`, `unset_field()` | 57 + /// 58 + /// # Field visibility 59 + /// 60 + /// The visibility of each generated accessor matches the visibility of the 61 + /// field in the input struct. For example, `pub name: Text` generates 62 + /// `pub fn name()`, while a private field `name: Text` generates a private 63 + /// accessor. 64 + /// 65 + /// # Generated methods 66 + /// 67 + /// - `new()` — creates a new [`LoroDoc`](loro::LoroDoc) and returns 68 + /// a typed view into it. 69 + /// - `from_doc(doc)` — creates a typed view from an existing 70 + /// [`LoroDoc`](loro::LoroDoc). 71 + /// - `doc()` — returns the [`LoroDoc`](loro::LoroDoc) this struct belongs to. 72 + /// - `raw()` — returns a reference to the underlying [`LoroMap`](loro::LoroMap). 73 + /// 74 + /// # `String` vs [`Text`] 75 + /// 76 + /// `String` fields store a plain string *value* — they're replaced entirely 77 + /// on each `set_`. [`Text`] fields store a rich-text *container* that 78 + /// supports character-level insertion, deletion, and concurrent editing. 79 + /// Use `String` for short, rarely-edited labels; use [`Text`] for anything 80 + /// collaboratively edited. 81 + /// 82 + /// # Derives 83 + /// 84 + /// `Clone` is always derived. `Debug` is handled specially: if listed, it 85 + /// prints the struct using its field accessors rather than exposing internals. 86 + /// Other derive macros are forwarded unchanged. 87 + /// 88 + /// # Type resolution 89 + /// 90 + /// The macro uses heuristic name matching to categorize field types. It 91 + /// recognises bare names (`Text`, `List`, `LoroMap`, …) and paths qualified 92 + /// with `loroscope::` or `loro::`. Types with any other prefix are assumed 93 + /// to be nested `#[loroscope]` structs. 94 + /// 95 + #[proc_macro_attribute] 96 + pub fn loroscope(attr: TokenStream, item: TokenStream) -> TokenStream { 97 + // Parse optional attribute arguments (e.g. `key = "custom_key"`). 98 + let mut map_key_override: Option<String> = None; 99 + if !attr.is_empty() { 100 + use syn::parse::Parser; 101 + let parser = syn::meta::parser(|meta| { 102 + if meta.path.is_ident("key") { 103 + let value: syn::LitStr = meta.value()?.parse()?; 104 + map_key_override = Some(value.value()); 105 + Ok(()) 106 + } else { 107 + Err(meta.error("unsupported loroscope attribute")) 108 + } 109 + }); 110 + if let Err(e) = parser.parse(attr) { 111 + return e.to_compile_error().into(); 112 + } 113 + } 114 + 115 + let item2: proc_macro2::TokenStream = item.into(); 116 + 117 + // Try to parse as struct first, then enum. 118 + if let Ok(input) = syn::parse2::<ItemStruct>(item2.clone()) { 119 + generate_struct(input, map_key_override).into() 120 + } else if let Ok(input) = syn::parse2::<ItemEnum>(item2) { 121 + generate_enum(input, map_key_override).into() 122 + } else { 123 + syn::Error::new( 124 + proc_macro2::Span::call_site(), 125 + "#[loroscope] can only be applied to structs or enums", 126 + ) 127 + .to_compile_error() 128 + .into() 129 + } 130 + } 131 + 132 + // Derive info parsing (shared between struct and enum codegen) 133 + 134 + struct DeriveInfo<'a> { 135 + has_debug: bool, 136 + other_derives: Vec<syn::Path>, 137 + other_attrs: Vec<&'a syn::Attribute>, 138 + } 139 + 140 + fn parse_derive_info(attrs: &[syn::Attribute]) -> DeriveInfo<'_> { 141 + let mut has_debug = false; 142 + let mut other_derives: Vec<syn::Path> = Vec::new(); 143 + let mut other_attrs: Vec<&syn::Attribute> = Vec::new(); 144 + 145 + for attr in attrs { 146 + if attr.path().is_ident("derive") { 147 + if let Meta::List(meta_list) = &attr.meta 148 + && let Ok(paths) = meta_list 149 + .parse_args_with(Punctuated::<syn::Path, syn::token::Comma>::parse_terminated) 150 + { 151 + for path in paths { 152 + if path.is_ident("Debug") { 153 + has_debug = true; 154 + } else if path.is_ident("Clone") { 155 + // Silently consumed — Clone is always generated. 156 + } else { 157 + other_derives.push(path); 158 + } 159 + } 160 + } 161 + } else { 162 + other_attrs.push(attr); 163 + } 164 + } 165 + 166 + DeriveInfo { 167 + has_debug, 168 + other_derives, 169 + other_attrs, 170 + } 171 + } 172 + 173 + fn derive_attr_tokens(derives: &[syn::Path]) -> proc_macro2::TokenStream { 174 + if derives.is_empty() { 175 + quote!() 176 + } else { 177 + quote!(#[derive(#(#derives),*)]) 178 + } 179 + } 180 + 181 + // Struct codegen 182 + 183 + fn generate_struct( 184 + input: ItemStruct, 185 + map_key_override: Option<String>, 186 + ) -> proc_macro2::TokenStream { 187 + let struct_name = &input.ident; 188 + let struct_name_str = struct_name.to_string(); 189 + let vis = &input.vis; 190 + let map_key = map_key_override.unwrap_or_else(|| struct_name.to_string()); 191 + 192 + let DeriveInfo { 193 + has_debug, 194 + other_derives, 195 + other_attrs, 196 + } = parse_derive_info(&input.attrs); 197 + 198 + let derive_attr = derive_attr_tokens(&other_derives); 199 + 200 + let fields = match &input.fields { 201 + syn::Fields::Named(f) => &f.named, 202 + _ => { 203 + return syn::Error::new_spanned(&input, "expected named fields").to_compile_error(); 204 + } 205 + }; 206 + 207 + let mut accessors = Vec::new(); 208 + let mut setter_invocations = Vec::new(); 209 + 210 + for field in fields { 211 + let field_name = field.ident.as_ref().expect("named fields"); 212 + let field_name_str = field_name.to_string(); 213 + let field_ty = &field.ty; 214 + let field_vis = &field.vis; 215 + 216 + let category = match categorize_type(field_ty) { 217 + Ok(cat) => cat, 218 + Err(e) => return e.to_compile_error(), 219 + }; 220 + 221 + match category { 222 + TypeCategory::Primitive(prim) => { 223 + accessors.push(gen_primitive_getter( 224 + field_vis, 225 + field_name, 226 + &field_name_str, 227 + &prim, 228 + false, 229 + )); 230 + accessors.push(gen_primitive_setter( 231 + field_vis, 232 + field_name, 233 + &field_name_str, 234 + &prim, 235 + )); 236 + } 237 + TypeCategory::Optional(inner, inner_ty) => { 238 + let or_init_name = 239 + Ident::new(&format!("{}_or_init", field_name), field_name.span()); 240 + match *inner { 241 + TypeCategory::Primitive(prim) => { 242 + accessors.push(gen_primitive_getter( 243 + field_vis, 244 + field_name, 245 + &field_name_str, 246 + &prim, 247 + true, 248 + )); 249 + accessors.push(gen_primitive_setter( 250 + field_vis, 251 + field_name, 252 + &field_name_str, 253 + &prim, 254 + )); 255 + } 256 + TypeCategory::NonGenericContainer(container) => { 257 + accessors.push(gen_optional_container_getter( 258 + field_vis, 259 + field_name, 260 + &field_name_str, 261 + &container, 262 + )); 263 + accessors.push(gen_non_generic_container_getter( 264 + field_vis, 265 + &or_init_name, 266 + &field_name_str, 267 + &container, 268 + )); 269 + } 270 + TypeCategory::GenericContainer(container, type_args) => { 271 + accessors.push(gen_optional_generic_getter( 272 + field_vis, 273 + field_name, 274 + &field_name_str, 275 + &container, 276 + &type_args, 277 + )); 278 + accessors.push(gen_generic_container_getter( 279 + field_vis, 280 + &or_init_name, 281 + &field_name_str, 282 + &container, 283 + &type_args, 284 + )); 285 + } 286 + TypeCategory::NestedLoroscope => { 287 + accessors.push(gen_optional_nested_getter( 288 + field_vis, 289 + field_name, 290 + &field_name_str, 291 + &inner_ty, 292 + )); 293 + accessors.push(gen_nested_getter( 294 + field_vis, 295 + &or_init_name, 296 + &field_name_str, 297 + &inner_ty, 298 + )); 299 + } 300 + TypeCategory::Optional(..) => { 301 + unreachable!("nested Option checked in categorize_type") 302 + } 303 + } 304 + accessors.push(gen_optional_unsetter( 305 + field_vis, 306 + field_name, 307 + &field_name_str, 308 + )); 309 + } 310 + TypeCategory::NonGenericContainer(container) => { 311 + accessors.push(gen_non_generic_container_getter( 312 + field_vis, 313 + field_name, 314 + &field_name_str, 315 + &container, 316 + )); 317 + } 318 + TypeCategory::GenericContainer(container, type_args) => { 319 + accessors.push(gen_generic_container_getter( 320 + field_vis, 321 + field_name, 322 + &field_name_str, 323 + &container, 324 + &type_args, 325 + )); 326 + } 327 + TypeCategory::NestedLoroscope => { 328 + accessors.push(gen_nested_getter( 329 + field_vis, 330 + field_name, 331 + &field_name_str, 332 + field_ty, 333 + )); 334 + 335 + // Generate setter macro invocation for nested loroscope types 336 + // (this is how enum setter methods get added to the parent struct). 337 + if let Some(type_name) = extract_type_name(field_ty) { 338 + let macro_name = format_ident!("__loroscope_setters_{}", type_name); 339 + let vis_tokens = quote!(#field_vis); 340 + setter_invocations.push(quote! { 341 + #macro_name!(#struct_name, #vis_tokens, #field_name, #field_name_str); 342 + }); 343 + } 344 + } 345 + } 346 + } 347 + 348 + // Generate a custom Debug impl that prints as if the original fields exist. 349 + let debug_impl = if has_debug { 350 + let debug_fields: Vec<_> = fields 351 + .iter() 352 + .map(|field| { 353 + let name = field.ident.as_ref().expect("named fields"); 354 + let name_str = name.to_string(); 355 + quote! { .field(#name_str, &self.#name()) } 356 + }) 357 + .collect(); 358 + 359 + quote! { 360 + impl ::core::fmt::Debug for #struct_name { 361 + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { 362 + f.debug_struct(#struct_name_str) 363 + #(#debug_fields)* 364 + .finish() 365 + } 366 + } 367 + } 368 + } else { 369 + quote!() 370 + }; 371 + 372 + // No-op setter macro — structs that aren't enums generate this so that 373 + // the setter invocation from parent structs compiles uniformly. 374 + let noop_macro_name = format_ident!("__loroscope_setters_{}", struct_name); 375 + 376 + quote! { 377 + #(#other_attrs)* 378 + #derive_attr 379 + #vis struct #struct_name { 380 + #[doc(hidden)] 381 + _map: ::loroscope::__private::LoroMap, 382 + } 383 + 384 + impl ::core::clone::Clone for #struct_name { 385 + fn clone(&self) -> Self { 386 + Self { _map: self._map.clone() } 387 + } 388 + } 389 + 390 + impl ::core::convert::From<::loroscope::__private::LoroMap> for #struct_name { 391 + fn from(map: ::loroscope::__private::LoroMap) -> Self { 392 + use ::loroscope::__private::ContainerTrait as _; 393 + assert!(map.is_attached(), "loroscope types require an attached LoroMap"); 394 + Self { _map: map } 395 + } 396 + } 397 + 398 + impl ::loroscope::FromLoroMap for #struct_name { 399 + fn from_loro_map(map: ::loroscope::__private::LoroMap) -> Self { 400 + use ::loroscope::__private::ContainerTrait as _; 401 + assert!(map.is_attached(), "loroscope types require an attached LoroMap"); 402 + Self { _map: map } 403 + } 404 + } 405 + 406 + #debug_impl 407 + 408 + #[allow(clippy::unwrap_used, clippy::missing_panics_doc)] 409 + impl #struct_name { 410 + /// Creates a new [`LoroDoc`](loro::LoroDoc) and returns a typed view into it. 411 + pub fn new() -> Self { 412 + let doc = ::loroscope::__private::LoroDoc::new(); 413 + let map = doc.get_map(#map_key); 414 + Self { _map: map } 415 + } 416 + 417 + /// Creates a typed view from an existing [`LoroDoc`](loro::LoroDoc). 418 + pub fn from_doc(doc: &::loroscope::__private::LoroDoc) -> Self { 419 + let map = doc.get_map(#map_key); 420 + Self { _map: map } 421 + } 422 + 423 + /// Returns the [`LoroDoc`](loro::LoroDoc) this struct belongs to. 424 + pub fn doc(&self) -> ::loroscope::__private::LoroDoc { 425 + use ::loroscope::__private::ContainerTrait; 426 + self._map.doc().unwrap() 427 + } 428 + 429 + /// Returns a reference to the underlying [`LoroMap`](loro::LoroMap). 430 + pub fn raw(&self) -> &::loroscope::__private::LoroMap { 431 + &self._map 432 + } 433 + 434 + #(#accessors)* 435 + } 436 + 437 + #(#setter_invocations)* 438 + 439 + #[doc(hidden)] 440 + #[macro_export] 441 + macro_rules! #noop_macro_name { 442 + ($struct_name:ident, $vis:vis, $field:ident, $key:expr) => {}; 443 + } 444 + } 445 + } 446 + 447 + // Enum codegen 448 + 449 + fn generate_enum(input: ItemEnum, map_key_override: Option<String>) -> proc_macro2::TokenStream { 450 + if map_key_override.is_some() { 451 + return syn::Error::new_spanned( 452 + &input.ident, 453 + "#[loroscope(key = ...)] is not supported on enums", 454 + ) 455 + .to_compile_error(); 456 + } 457 + 458 + let enum_name = &input.ident; 459 + let enum_name_str = enum_name.to_string(); 460 + let vis = &input.vis; 461 + 462 + let DeriveInfo { 463 + has_debug, 464 + other_derives, 465 + other_attrs, 466 + } = parse_derive_info(&input.attrs); 467 + 468 + let derive_attr = derive_attr_tokens(&other_derives); 469 + 470 + // Collect variant info 471 + let mut variant_infos: Vec<VariantInfo> = Vec::new(); 472 + for variant in &input.variants { 473 + match parse_variant_info(enum_name, variant) { 474 + Ok(info) => variant_infos.push(info), 475 + Err(e) => return e.to_compile_error(), 476 + } 477 + } 478 + 479 + // Build clean enum variants 480 + let enum_variants: Vec<_> = variant_infos 481 + .iter() 482 + .map(|vi| { 483 + let name = &vi.name; 484 + if vi.is_unit { 485 + quote!(#name) 486 + } else { 487 + let accessor_name = &vi.accessor_struct_name; 488 + quote!(#name(#accessor_name)) 489 + } 490 + }) 491 + .collect(); 492 + 493 + // Build variant accessor structs 494 + let mut accessor_structs = Vec::new(); 495 + let mut accessor_from_loro_map_impls = Vec::new(); 496 + 497 + for vi in &variant_infos { 498 + if vi.is_unit { 499 + continue; 500 + } 501 + 502 + let accessor_name = &vi.accessor_struct_name; 503 + 504 + // Generate field accessors 505 + let mut accessors = Vec::new(); 506 + for fi in &vi.fields { 507 + match &fi.category { 508 + TypeCategory::Primitive(prim) => { 509 + accessors.push(gen_primitive_getter( 510 + &fi.vis, 511 + &fi.accessor_name, 512 + &fi.map_key, 513 + prim, 514 + false, 515 + )); 516 + accessors.push(gen_primitive_setter( 517 + &fi.vis, 518 + &fi.accessor_name, 519 + &fi.map_key, 520 + prim, 521 + )); 522 + } 523 + TypeCategory::NonGenericContainer(container) => { 524 + accessors.push(gen_non_generic_container_getter( 525 + &fi.vis, 526 + &fi.accessor_name, 527 + &fi.map_key, 528 + container, 529 + )); 530 + } 531 + TypeCategory::GenericContainer(container, type_args) => { 532 + accessors.push(gen_generic_container_getter( 533 + &fi.vis, 534 + &fi.accessor_name, 535 + &fi.map_key, 536 + container, 537 + type_args, 538 + )); 539 + } 540 + TypeCategory::NestedLoroscope => { 541 + accessors.push(gen_nested_getter( 542 + &fi.vis, 543 + &fi.accessor_name, 544 + &fi.map_key, 545 + &fi.ty, 546 + )); 547 + } 548 + TypeCategory::Optional(inner, inner_ty) => { 549 + let or_init_name = format_ident!("{}_or_init", fi.accessor_name); 550 + match inner.as_ref() { 551 + TypeCategory::Primitive(prim) => { 552 + accessors.push(gen_primitive_getter( 553 + &fi.vis, 554 + &fi.accessor_name, 555 + &fi.map_key, 556 + prim, 557 + true, 558 + )); 559 + accessors.push(gen_primitive_setter( 560 + &fi.vis, 561 + &fi.accessor_name, 562 + &fi.map_key, 563 + prim, 564 + )); 565 + } 566 + TypeCategory::NonGenericContainer(container) => { 567 + accessors.push(gen_optional_container_getter( 568 + &fi.vis, 569 + &fi.accessor_name, 570 + &fi.map_key, 571 + container, 572 + )); 573 + accessors.push(gen_non_generic_container_getter( 574 + &fi.vis, 575 + &or_init_name, 576 + &fi.map_key, 577 + container, 578 + )); 579 + } 580 + TypeCategory::GenericContainer(container, type_args) => { 581 + accessors.push(gen_optional_generic_getter( 582 + &fi.vis, 583 + &fi.accessor_name, 584 + &fi.map_key, 585 + container, 586 + type_args, 587 + )); 588 + accessors.push(gen_generic_container_getter( 589 + &fi.vis, 590 + &or_init_name, 591 + &fi.map_key, 592 + container, 593 + type_args, 594 + )); 595 + } 596 + TypeCategory::NestedLoroscope => { 597 + accessors.push(gen_optional_nested_getter( 598 + &fi.vis, 599 + &fi.accessor_name, 600 + &fi.map_key, 601 + inner_ty, 602 + )); 603 + accessors.push(gen_nested_getter( 604 + &fi.vis, 605 + &or_init_name, 606 + &fi.map_key, 607 + inner_ty, 608 + )); 609 + } 610 + TypeCategory::Optional(..) => { 611 + unreachable!("nested Option checked in categorize_type") 612 + } 613 + } 614 + accessors.push(gen_optional_unsetter( 615 + &fi.vis, 616 + &fi.accessor_name, 617 + &fi.map_key, 618 + )); 619 + } 620 + } 621 + } 622 + 623 + accessor_structs.push(quote! { 624 + #[derive(::core::clone::Clone)] 625 + #vis struct #accessor_name { 626 + #[doc(hidden)] 627 + _map: ::loroscope::__private::LoroMap, 628 + } 629 + 630 + #[allow(clippy::unwrap_used, clippy::missing_panics_doc)] 631 + impl #accessor_name { 632 + /// Returns a reference to the underlying [`LoroMap`](loro::LoroMap). 633 + pub fn raw(&self) -> &::loroscope::__private::LoroMap { 634 + &self._map 635 + } 636 + 637 + #(#accessors)* 638 + } 639 + }); 640 + 641 + accessor_from_loro_map_impls.push(quote! { 642 + impl ::loroscope::FromLoroMap for #accessor_name { 643 + fn from_loro_map(map: ::loroscope::__private::LoroMap) -> Self { 644 + use ::loroscope::__private::ContainerTrait as _; 645 + assert!(map.is_attached(), "loroscope types require an attached LoroMap"); 646 + Self { _map: map } 647 + } 648 + } 649 + }); 650 + } 651 + 652 + // Build FromLoroMap for the enum itself 653 + let first_variant_name_str = variant_infos 654 + .first() 655 + .map(|vi| vi.name.to_string()) 656 + .unwrap_or_default(); 657 + let first_variant_is_unit = variant_infos.first().map(|vi| vi.is_unit).unwrap_or(true); 658 + 659 + let default_arm = if first_variant_is_unit { 660 + let first_name = &variant_infos[0].name; 661 + quote!(#enum_name::#first_name) 662 + } else { 663 + let first_name = &variant_infos[0].name; 664 + let first_accessor = &variant_infos[0].accessor_struct_name; 665 + quote! { 666 + { 667 + let sub = map.get_or_create_container( 668 + #first_variant_name_str, 669 + ::loroscope::__private::LoroMap::new(), 670 + ).unwrap(); 671 + #enum_name::#first_name(#first_accessor { _map: sub }) 672 + } 673 + } 674 + }; 675 + 676 + let from_map_arms: Vec<_> = variant_infos 677 + .iter() 678 + .map(|vi| { 679 + let name = &vi.name; 680 + let name_str = name.to_string(); 681 + if vi.is_unit { 682 + quote! { 683 + Some(#name_str) => #enum_name::#name, 684 + } 685 + } else { 686 + let accessor_name = &vi.accessor_struct_name; 687 + quote! { 688 + Some(#name_str) => { 689 + let sub = map.get_or_create_container( 690 + #name_str, 691 + ::loroscope::__private::LoroMap::new(), 692 + ).unwrap(); 693 + #enum_name::#name(#accessor_name { _map: sub }) 694 + } 695 + } 696 + } 697 + }) 698 + .collect(); 699 + 700 + // Build Clone impl for the enum 701 + let clone_arms: Vec<_> = variant_infos 702 + .iter() 703 + .map(|vi| { 704 + let name = &vi.name; 705 + if vi.is_unit { 706 + quote!(#enum_name::#name => #enum_name::#name) 707 + } else { 708 + quote!(#enum_name::#name(inner) => #enum_name::#name(inner.clone())) 709 + } 710 + }) 711 + .collect(); 712 + 713 + // Build Debug impl for the enum 714 + let debug_impl = if has_debug { 715 + let debug_arms: Vec<_> = variant_infos 716 + .iter() 717 + .map(|vi| { 718 + let name = &vi.name; 719 + let name_str = name.to_string(); 720 + let qualified = format!("{}::{}", enum_name_str, name_str); 721 + if vi.is_unit { 722 + quote!(#enum_name::#name => f.write_str(#qualified)) 723 + } else { 724 + let debug_fields: Vec<_> = vi 725 + .fields 726 + .iter() 727 + .map(|fi| { 728 + let fname = &fi.accessor_name; 729 + let fname_str = fname.to_string(); 730 + quote! { .field(#fname_str, &inner.#fname()) } 731 + }) 732 + .collect(); 733 + quote! { 734 + #enum_name::#name(inner) => { 735 + f.debug_struct(#qualified) 736 + #(#debug_fields)* 737 + .finish() 738 + } 739 + } 740 + } 741 + }) 742 + .collect(); 743 + 744 + quote! { 745 + impl ::core::fmt::Debug for #enum_name { 746 + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { 747 + match self { 748 + #(#debug_arms,)* 749 + } 750 + } 751 + } 752 + } 753 + } else { 754 + quote!() 755 + }; 756 + 757 + // Build setter macro_rules 758 + let setter_macro_name = format_ident!("__loroscope_setters_{}", enum_name); 759 + let setter_arms: Vec<_> = variant_infos 760 + .iter() 761 + .map(|vi| gen_setter_arm(enum_name, vi)) 762 + .collect(); 763 + 764 + quote! { 765 + #(#other_attrs)* 766 + #derive_attr 767 + #vis enum #enum_name { 768 + #(#enum_variants,)* 769 + } 770 + 771 + impl ::core::clone::Clone for #enum_name { 772 + fn clone(&self) -> Self { 773 + match self { 774 + #(#clone_arms,)* 775 + } 776 + } 777 + } 778 + 779 + impl ::loroscope::FromLoroMap for #enum_name { 780 + #[allow(clippy::unwrap_used)] 781 + fn from_loro_map(map: ::loroscope::__private::LoroMap) -> Self { 782 + use ::loroscope::__private::ContainerTrait as _; 783 + assert!(map.is_attached(), "loroscope types require an attached LoroMap"); 784 + let type_str = map.get("type") 785 + .and_then(|v| v.into_value().ok()) 786 + .and_then(|v| match v { 787 + ::loroscope::__private::LoroValue::String(s) => Some(s.to_string()), 788 + _ => None, 789 + }); 790 + match type_str.as_deref() { 791 + #(#from_map_arms)* 792 + _ => #default_arm, 793 + } 794 + } 795 + } 796 + 797 + #debug_impl 798 + 799 + #(#accessor_structs)* 800 + #(#accessor_from_loro_map_impls)* 801 + 802 + #[doc(hidden)] 803 + #[macro_export] 804 + macro_rules! #setter_macro_name { 805 + ($struct_name:ident, $vis:vis, $field:ident, $key:expr) => { 806 + ::loroscope::__private::paste! { 807 + #(#setter_arms)* 808 + } 809 + }; 810 + } 811 + } 812 + } 813 + 814 + // Enum helpers 815 + 816 + struct VariantInfo { 817 + name: Ident, 818 + is_unit: bool, 819 + accessor_struct_name: Ident, 820 + fields: Vec<FieldInfo>, 821 + } 822 + 823 + struct FieldInfo { 824 + accessor_name: Ident, 825 + map_key: String, 826 + ty: Type, 827 + vis: Visibility, 828 + category: TypeCategory, 829 + } 830 + 831 + fn parse_variant_info( 832 + enum_name: &Ident, 833 + variant: &syn::Variant, 834 + ) -> Result<VariantInfo, syn::Error> { 835 + let name = variant.ident.clone(); 836 + let accessor_struct_name = format_ident!("{}{}", enum_name, name); 837 + 838 + match &variant.fields { 839 + syn::Fields::Unit => Ok(VariantInfo { 840 + name, 841 + is_unit: true, 842 + accessor_struct_name, 843 + fields: Vec::new(), 844 + }), 845 + syn::Fields::Named(named) => { 846 + let mut fields = Vec::new(); 847 + for field in &named.named { 848 + let field_name = field.ident.as_ref().expect("named field"); 849 + let category = categorize_type(&field.ty)?; 850 + fields.push(FieldInfo { 851 + accessor_name: field_name.clone(), 852 + map_key: field_name.to_string(), 853 + ty: field.ty.clone(), 854 + vis: Visibility::Public(syn::token::Pub::default()), 855 + category, 856 + }); 857 + } 858 + Ok(VariantInfo { 859 + name, 860 + is_unit: false, 861 + accessor_struct_name, 862 + fields, 863 + }) 864 + } 865 + syn::Fields::Unnamed(unnamed) => { 866 + let mut fields = Vec::new(); 867 + for (i, field) in unnamed.unnamed.iter().enumerate() { 868 + let category = categorize_type(&field.ty)?; 869 + let accessor_name = if unnamed.unnamed.len() == 1 { 870 + format_ident!("value") 871 + } else { 872 + format_ident!("field_{}", i) 873 + }; 874 + fields.push(FieldInfo { 875 + accessor_name, 876 + map_key: i.to_string(), 877 + ty: field.ty.clone(), 878 + vis: Visibility::Public(syn::token::Pub::default()), 879 + category, 880 + }); 881 + } 882 + Ok(VariantInfo { 883 + name, 884 + is_unit: false, 885 + accessor_struct_name, 886 + fields, 887 + }) 888 + } 889 + } 890 + } 891 + 892 + /// Generates a setter arm for the `__loroscope_setters_` macro_rules. 893 + fn gen_setter_arm(_enum_name: &Ident, vi: &VariantInfo) -> proc_macro2::TokenStream { 894 + let variant_name = &vi.name; 895 + let variant_name_str = variant_name.to_string(); 896 + let variant_snake = pascal_to_snake(&variant_name_str); 897 + let variant_snake_ident = format_ident!("{}", variant_snake); 898 + 899 + if vi.is_unit { 900 + // Unit variant: set_field_variantname(&self) 901 + quote! { 902 + #[allow(clippy::unwrap_used, clippy::missing_panics_doc)] 903 + impl $struct_name { 904 + /// Switches to this variant. 905 + $vis fn [<set_ $field _ #variant_snake_ident>](&self) { 906 + let sub = self._map.get_or_create_container( 907 + $key, ::loroscope::__private::LoroMap::new() 908 + ).unwrap(); 909 + sub.insert("type", #variant_name_str).unwrap(); 910 + } 911 + } 912 + } 913 + } else { 914 + let accessor_name = &vi.accessor_struct_name; 915 + 916 + quote! { 917 + #[allow(clippy::unwrap_used, clippy::missing_panics_doc)] 918 + impl $struct_name { 919 + /// Switches to this variant and returns the variant accessor. 920 + $vis fn [<set_ $field _ #variant_snake_ident>](&self) -> #accessor_name { 921 + let sub = self._map.get_or_create_container( 922 + $key, ::loroscope::__private::LoroMap::new() 923 + ).unwrap(); 924 + sub.insert("type", #variant_name_str).unwrap(); 925 + let variant_sub = sub.get_or_create_container( 926 + #variant_name_str, ::loroscope::__private::LoroMap::new() 927 + ).unwrap(); 928 + variant_sub.clear().unwrap(); 929 + #accessor_name { _map: variant_sub } 930 + } 931 + } 932 + } 933 + } 934 + } 935 + 936 + /// Converts `PascalCase` to `snake_case`. 937 + fn pascal_to_snake(name: &str) -> String { 938 + let mut result = String::new(); 939 + for (i, ch) in name.chars().enumerate() { 940 + if ch.is_uppercase() { 941 + if i > 0 { 942 + result.push('_'); 943 + } 944 + result.push(ch.to_lowercase().next().expect("lowercase")); 945 + } else { 946 + result.push(ch); 947 + } 948 + } 949 + result 950 + } 951 + 952 + /// Extracts the type name (last path segment ident) from a Type. 953 + fn extract_type_name(ty: &Type) -> Option<Ident> { 954 + if let Type::Path(type_path) = ty { 955 + type_path.path.segments.last().map(|s| s.ident.clone()) 956 + } else { 957 + None 958 + } 959 + } 960 + 961 + // Type categorization 962 + 963 + enum TypeCategory { 964 + Primitive(PrimitiveKind), 965 + NonGenericContainer(NonGenericContainerKind), 966 + GenericContainer(GenericContainerKind, Vec<Type>), 967 + NestedLoroscope, 968 + /// `Option<T>` — stores the inner category and the inner `Type` for codegen. 969 + Optional(Box<TypeCategory>, Box<Type>), 970 + } 971 + 972 + enum PrimitiveKind { 973 + F64, 974 + I64, 975 + Bool, 976 + String, 977 + } 978 + 979 + enum NonGenericContainerKind { 980 + Text, 981 + Counter, 982 + LoroTree, 983 + LoroList, 984 + LoroMap, 985 + LoroMovableList, 986 + } 987 + 988 + enum GenericContainerKind { 989 + List, 990 + Map, 991 + MovableList, 992 + Tree, 993 + } 994 + 995 + /// Known crate-level prefixes. If a multi-segment path has one of these as 996 + /// the segment immediately before the type name, we treat the final segment 997 + /// the same as a bare import. For any other prefix (e.g. `foo::Text`) we 998 + /// conservatively fall back to [`TypeCategory::NestedLoroscope`]. 999 + const KNOWN_PREFIXES: &[&str] = &["loroscope", "loro"]; 1000 + 1001 + fn categorize_type(ty: &Type) -> Result<TypeCategory, syn::Error> { 1002 + if let Type::Path(type_path) = ty { 1003 + let segments = &type_path.path.segments; 1004 + let last_segment = match segments.last() { 1005 + Some(s) => s, 1006 + None => return Ok(TypeCategory::NestedLoroscope), 1007 + }; 1008 + 1009 + // For multi-segment paths (e.g. `loroscope::Text`, `loro::LoroMap`), 1010 + // only proceed if the parent segment is a known crate prefix. 1011 + // Proc macros cannot do real name resolution, so this is a heuristic. 1012 + if segments.len() > 1 { 1013 + let parent = segments[segments.len() - 2].ident.to_string(); 1014 + if !KNOWN_PREFIXES.contains(&parent.as_str()) { 1015 + return Ok(TypeCategory::NestedLoroscope); 1016 + } 1017 + } 1018 + 1019 + let ident = last_segment.ident.to_string(); 1020 + 1021 + match ident.as_str() { 1022 + "f64" => Ok(TypeCategory::Primitive(PrimitiveKind::F64)), 1023 + "i64" => Ok(TypeCategory::Primitive(PrimitiveKind::I64)), 1024 + "bool" => Ok(TypeCategory::Primitive(PrimitiveKind::Bool)), 1025 + "String" => Ok(TypeCategory::Primitive(PrimitiveKind::String)), 1026 + "Option" => { 1027 + let type_args = extract_type_args(&last_segment.arguments); 1028 + if let [inner_ty] = type_args.as_slice() { 1029 + let inner_cat = categorize_type(inner_ty)?; 1030 + if matches!(inner_cat, TypeCategory::Optional(..)) { 1031 + return Err(syn::Error::new_spanned( 1032 + ty, 1033 + "nested Option<Option<...>> is not supported", 1034 + )); 1035 + } 1036 + Ok(TypeCategory::Optional( 1037 + Box::new(inner_cat), 1038 + Box::new(inner_ty.clone()), 1039 + )) 1040 + } else { 1041 + Err(syn::Error::new_spanned( 1042 + ty, 1043 + "Option must have exactly one type argument", 1044 + )) 1045 + } 1046 + } 1047 + "Text" | "LoroText" => Ok(TypeCategory::NonGenericContainer( 1048 + NonGenericContainerKind::Text, 1049 + )), 1050 + "Counter" | "LoroCounter" => Ok(TypeCategory::NonGenericContainer( 1051 + NonGenericContainerKind::Counter, 1052 + )), 1053 + "LoroTree" => Ok(TypeCategory::NonGenericContainer( 1054 + NonGenericContainerKind::LoroTree, 1055 + )), 1056 + "LoroList" => Ok(TypeCategory::NonGenericContainer( 1057 + NonGenericContainerKind::LoroList, 1058 + )), 1059 + "LoroMap" => Ok(TypeCategory::NonGenericContainer( 1060 + NonGenericContainerKind::LoroMap, 1061 + )), 1062 + "LoroMovableList" => Ok(TypeCategory::NonGenericContainer( 1063 + NonGenericContainerKind::LoroMovableList, 1064 + )), 1065 + "List" | "Map" | "MovableList" | "Tree" => { 1066 + let kind = match ident.as_str() { 1067 + "List" => GenericContainerKind::List, 1068 + "Map" => GenericContainerKind::Map, 1069 + "MovableList" => GenericContainerKind::MovableList, 1070 + "Tree" => GenericContainerKind::Tree, 1071 + _ => unreachable!(), 1072 + }; 1073 + let type_args = extract_type_args(&last_segment.arguments); 1074 + Ok(TypeCategory::GenericContainer(kind, type_args)) 1075 + } 1076 + _ => Ok(TypeCategory::NestedLoroscope), 1077 + } 1078 + } else { 1079 + Ok(TypeCategory::NestedLoroscope) 1080 + } 1081 + } 1082 + 1083 + fn extract_type_args(args: &PathArguments) -> Vec<Type> { 1084 + match args { 1085 + PathArguments::AngleBracketed(ab) => ab 1086 + .args 1087 + .iter() 1088 + .filter_map(|a| { 1089 + if let GenericArgument::Type(t) = a { 1090 + Some(t.clone()) 1091 + } else { 1092 + None 1093 + } 1094 + }) 1095 + .collect(), 1096 + _ => Vec::new(), 1097 + } 1098 + } 1099 + 1100 + // Code generation — primitives 1101 + 1102 + fn gen_primitive_getter( 1103 + vis: &Visibility, 1104 + field_name: &Ident, 1105 + field_name_str: &str, 1106 + prim: &PrimitiveKind, 1107 + optional: bool, 1108 + ) -> proc_macro2::TokenStream { 1109 + let (rust_ty, variant, convert) = match prim { 1110 + PrimitiveKind::F64 => (quote!(f64), quote!(Double), quote!(v)), 1111 + PrimitiveKind::I64 => (quote!(i64), quote!(I64), quote!(v)), 1112 + PrimitiveKind::Bool => (quote!(bool), quote!(Bool), quote!(v)), 1113 + PrimitiveKind::String => (quote!(String), quote!(String), quote!(v.to_string())), 1114 + }; 1115 + 1116 + let (return_ty, tail) = if optional { 1117 + (quote!(Option<#rust_ty>), quote!()) 1118 + } else { 1119 + (quote!(#rust_ty), quote!(.unwrap_or_default())) 1120 + }; 1121 + 1122 + let doc = if optional { 1123 + format!("Returns the `{field_name_str}` value, or `None` if not set.") 1124 + } else { 1125 + format!("Returns the `{field_name_str}` value, or the default if not set.") 1126 + }; 1127 + 1128 + quote! { 1129 + #[doc = #doc] 1130 + #vis fn #field_name(&self) -> #return_ty { 1131 + self._map.get(#field_name_str) 1132 + .and_then(|v| v.into_value().ok()) 1133 + .and_then(|v| match v { 1134 + ::loroscope::__private::LoroValue::#variant(v) => Some(#convert), 1135 + _ => None, 1136 + }) 1137 + #tail 1138 + } 1139 + } 1140 + } 1141 + 1142 + fn gen_primitive_setter( 1143 + vis: &Visibility, 1144 + field_name: &Ident, 1145 + field_name_str: &str, 1146 + prim: &PrimitiveKind, 1147 + ) -> proc_macro2::TokenStream { 1148 + let setter_name = Ident::new(&format!("set_{}", field_name), field_name.span()); 1149 + let param_ty = match prim { 1150 + PrimitiveKind::F64 => quote!(f64), 1151 + PrimitiveKind::I64 => quote!(i64), 1152 + PrimitiveKind::Bool => quote!(bool), 1153 + PrimitiveKind::String => quote!(&str), 1154 + }; 1155 + 1156 + let doc = format!("Sets the `{field_name_str}` value."); 1157 + 1158 + quote! { 1159 + #[doc = #doc] 1160 + #vis fn #setter_name(&self, val: #param_ty) { 1161 + self._map.insert(#field_name_str, val).unwrap(); 1162 + } 1163 + } 1164 + } 1165 + 1166 + // Code generation — optional unsetter 1167 + 1168 + fn gen_optional_unsetter( 1169 + vis: &Visibility, 1170 + field_name: &Ident, 1171 + field_name_str: &str, 1172 + ) -> proc_macro2::TokenStream { 1173 + let unsetter_name = Ident::new(&format!("unset_{}", field_name), field_name.span()); 1174 + let doc = format!("Removes the `{field_name_str}` value, so the getter will return `None`."); 1175 + 1176 + quote! { 1177 + #[doc = #doc] 1178 + #vis fn #unsetter_name(&self) { 1179 + self._map.delete(#field_name_str).unwrap(); 1180 + } 1181 + } 1182 + } 1183 + 1184 + // Code generation — non-generic containers 1185 + 1186 + /// Returns `(loro_type, loroscope_type, into_variant)` for a non-generic container. 1187 + fn non_generic_container_info( 1188 + container: &NonGenericContainerKind, 1189 + ) -> ( 1190 + proc_macro2::TokenStream, 1191 + proc_macro2::TokenStream, 1192 + proc_macro2::TokenStream, 1193 + ) { 1194 + match container { 1195 + NonGenericContainerKind::Text => ( 1196 + quote!(::loroscope::__private::LoroText), 1197 + quote!(::loroscope::Text), 1198 + quote!(into_text), 1199 + ), 1200 + NonGenericContainerKind::Counter => ( 1201 + quote!(::loroscope::__private::LoroCounter), 1202 + quote!(::loroscope::Counter), 1203 + quote!(into_counter), 1204 + ), 1205 + NonGenericContainerKind::LoroTree => ( 1206 + quote!(::loroscope::__private::LoroTree), 1207 + quote!(::loroscope::__private::LoroTree), 1208 + quote!(into_tree), 1209 + ), 1210 + NonGenericContainerKind::LoroList => ( 1211 + quote!(::loroscope::__private::LoroList), 1212 + quote!(::loroscope::__private::LoroList), 1213 + quote!(into_list), 1214 + ), 1215 + NonGenericContainerKind::LoroMap => ( 1216 + quote!(::loroscope::__private::LoroMap), 1217 + quote!(::loroscope::__private::LoroMap), 1218 + quote!(into_map), 1219 + ), 1220 + NonGenericContainerKind::LoroMovableList => ( 1221 + quote!(::loroscope::__private::LoroMovableList), 1222 + quote!(::loroscope::__private::LoroMovableList), 1223 + quote!(into_movable_list), 1224 + ), 1225 + } 1226 + } 1227 + 1228 + /// Get-or-create getter for non-generic containers. Used directly as the 1229 + /// getter for non-optional fields, and as the `_or_init` method for optional 1230 + /// fields (caller passes the appropriate `fn_name`). 1231 + fn gen_non_generic_container_getter( 1232 + vis: &Visibility, 1233 + fn_name: &Ident, 1234 + field_name_str: &str, 1235 + container: &NonGenericContainerKind, 1236 + ) -> proc_macro2::TokenStream { 1237 + let (loro_type, loroscope_type, _) = non_generic_container_info(container); 1238 + let doc = format!("Returns the `{field_name_str}` container, creating it if necessary."); 1239 + 1240 + quote! { 1241 + #[doc = #doc] 1242 + #vis fn #fn_name(&self) -> #loroscope_type { 1243 + self._map.get_or_create_container(#field_name_str, #loro_type::new()) 1244 + .unwrap() 1245 + } 1246 + } 1247 + } 1248 + 1249 + /// Read-only getter for `Option<Container>` — returns `None` if the key 1250 + /// hasn't been created yet. 1251 + fn gen_optional_container_getter( 1252 + vis: &Visibility, 1253 + field_name: &Ident, 1254 + field_name_str: &str, 1255 + container: &NonGenericContainerKind, 1256 + ) -> proc_macro2::TokenStream { 1257 + let (_, loroscope_type, into_variant) = non_generic_container_info(container); 1258 + let doc = format!( 1259 + "Returns the `{field_name_str}` container, or `None` if it hasn't been initialized." 1260 + ); 1261 + 1262 + quote! { 1263 + #[doc = #doc] 1264 + #vis fn #field_name(&self) -> Option<#loroscope_type> { 1265 + self._map.get(#field_name_str) 1266 + .and_then(|v| v.into_container().ok()) 1267 + .and_then(|c| c.#into_variant().ok()) 1268 + } 1269 + } 1270 + } 1271 + 1272 + // Code generation — generic containers 1273 + 1274 + /// Returns `(loro_container, wrapper_path, into_variant)` for a generic container. 1275 + fn generic_container_info( 1276 + container: &GenericContainerKind, 1277 + ) -> ( 1278 + proc_macro2::TokenStream, 1279 + proc_macro2::TokenStream, 1280 + proc_macro2::TokenStream, 1281 + ) { 1282 + match container { 1283 + GenericContainerKind::List => ( 1284 + quote!(::loroscope::__private::LoroList), 1285 + quote!(::loroscope::List), 1286 + quote!(into_list), 1287 + ), 1288 + GenericContainerKind::Map => ( 1289 + quote!(::loroscope::__private::LoroMap), 1290 + quote!(::loroscope::Map), 1291 + quote!(into_map), 1292 + ), 1293 + GenericContainerKind::MovableList => ( 1294 + quote!(::loroscope::__private::LoroMovableList), 1295 + quote!(::loroscope::MovableList), 1296 + quote!(into_movable_list), 1297 + ), 1298 + GenericContainerKind::Tree => ( 1299 + quote!(::loroscope::__private::LoroTree), 1300 + quote!(::loroscope::Tree), 1301 + quote!(into_tree), 1302 + ), 1303 + } 1304 + } 1305 + 1306 + /// Get-or-create getter for generic containers. Used directly as the getter 1307 + /// for non-optional fields, and as the `_or_init` method for optional fields. 1308 + fn gen_generic_container_getter( 1309 + vis: &Visibility, 1310 + fn_name: &Ident, 1311 + field_name_str: &str, 1312 + container: &GenericContainerKind, 1313 + type_args: &[Type], 1314 + ) -> proc_macro2::TokenStream { 1315 + let (loro_container, wrapper_path, _) = generic_container_info(container); 1316 + let doc = format!("Returns the `{field_name_str}` container, creating it if necessary."); 1317 + 1318 + quote! { 1319 + #[doc = #doc] 1320 + #vis fn #fn_name(&self) -> #wrapper_path<#(#type_args),*> { 1321 + #wrapper_path::new( 1322 + self._map.get_or_create_container(#field_name_str, #loro_container::new()) 1323 + .unwrap() 1324 + ) 1325 + } 1326 + } 1327 + } 1328 + 1329 + /// Read-only getter for `Option<Wrapper<T>>` — returns `None` if the key 1330 + /// hasn't been created yet. 1331 + fn gen_optional_generic_getter( 1332 + vis: &Visibility, 1333 + field_name: &Ident, 1334 + field_name_str: &str, 1335 + container: &GenericContainerKind, 1336 + type_args: &[Type], 1337 + ) -> proc_macro2::TokenStream { 1338 + let (_, wrapper_path, into_variant) = generic_container_info(container); 1339 + let doc = format!( 1340 + "Returns the `{field_name_str}` container, or `None` if it hasn't been initialized." 1341 + ); 1342 + 1343 + quote! { 1344 + #[doc = #doc] 1345 + #vis fn #field_name(&self) -> Option<#wrapper_path<#(#type_args),*>> { 1346 + self._map.get(#field_name_str) 1347 + .and_then(|v| v.into_container().ok()) 1348 + .and_then(|c| c.#into_variant().ok()) 1349 + .map(#wrapper_path::new) 1350 + } 1351 + } 1352 + } 1353 + 1354 + // Code generation — nested loroscope structs 1355 + 1356 + /// Get-or-create getter for nested `#[loroscope]` structs. Used directly as 1357 + /// the getter for non-optional fields, and as the `_or_init` method for optional. 1358 + fn gen_nested_getter( 1359 + vis: &Visibility, 1360 + fn_name: &Ident, 1361 + field_name_str: &str, 1362 + field_ty: &Type, 1363 + ) -> proc_macro2::TokenStream { 1364 + let doc = format!("Returns the `{field_name_str}` sub-document, creating it if necessary."); 1365 + 1366 + quote! { 1367 + #[doc = #doc] 1368 + #vis fn #fn_name(&self) -> #field_ty { 1369 + ::loroscope::FromLoroMap::from_loro_map( 1370 + self._map.get_or_create_container( 1371 + #field_name_str, 1372 + ::loroscope::__private::LoroMap::new(), 1373 + ).unwrap() 1374 + ) 1375 + } 1376 + } 1377 + } 1378 + 1379 + /// Read-only getter for `Option<NestedStruct>` — returns `None` if the key 1380 + /// hasn't been created yet. 1381 + fn gen_optional_nested_getter( 1382 + vis: &Visibility, 1383 + field_name: &Ident, 1384 + field_name_str: &str, 1385 + inner_ty: &Type, 1386 + ) -> proc_macro2::TokenStream { 1387 + let doc = format!( 1388 + "Returns the `{field_name_str}` sub-document, or `None` if it hasn't been initialized." 1389 + ); 1390 + 1391 + quote! { 1392 + #[doc = #doc] 1393 + #vis fn #field_name(&self) -> Option<#inner_ty> { 1394 + self._map.get(#field_name_str) 1395 + .and_then(|v| v.into_container().ok()) 1396 + .and_then(|c| c.into_map().ok()) 1397 + .map(::loroscope::FromLoroMap::from_loro_map) 1398 + } 1399 + } 1400 + }
+109
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-parts": { 4 + "inputs": { 5 + "nixpkgs-lib": "nixpkgs-lib" 6 + }, 7 + "locked": { 8 + "lastModified": 1769996383, 9 + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", 10 + "owner": "hercules-ci", 11 + "repo": "flake-parts", 12 + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "hercules-ci", 17 + "repo": "flake-parts", 18 + "type": "github" 19 + } 20 + }, 21 + "font-switzer": { 22 + "flake": false, 23 + "locked": { 24 + "narHash": "sha256-ADBhrScwCiztffKwnsTKNm5CBIfEibhUTGZQfuofk4I=", 25 + "type": "file", 26 + "url": "https://api.fontshare.com/v2/fonts/download/switzer" 27 + }, 28 + "original": { 29 + "type": "file", 30 + "url": "https://api.fontshare.com/v2/fonts/download/switzer" 31 + } 32 + }, 33 + "nixpkgs": { 34 + "locked": { 35 + "lastModified": 1771369470, 36 + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", 37 + "owner": "NixOS", 38 + "repo": "nixpkgs", 39 + "rev": "0182a361324364ae3f436a63005877674cf45efb", 40 + "type": "github" 41 + }, 42 + "original": { 43 + "owner": "NixOS", 44 + "ref": "nixos-unstable", 45 + "repo": "nixpkgs", 46 + "type": "github" 47 + } 48 + }, 49 + "nixpkgs-lib": { 50 + "locked": { 51 + "lastModified": 1769909678, 52 + "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", 53 + "owner": "nix-community", 54 + "repo": "nixpkgs.lib", 55 + "rev": "72716169fe93074c333e8d0173151350670b824c", 56 + "type": "github" 57 + }, 58 + "original": { 59 + "owner": "nix-community", 60 + "repo": "nixpkgs.lib", 61 + "type": "github" 62 + } 63 + }, 64 + "nixpkgs_2": { 65 + "locked": { 66 + "lastModified": 1770107345, 67 + "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", 68 + "owner": "nixos", 69 + "repo": "nixpkgs", 70 + "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", 71 + "type": "github" 72 + }, 73 + "original": { 74 + "owner": "nixos", 75 + "ref": "nixpkgs-unstable", 76 + "repo": "nixpkgs", 77 + "type": "github" 78 + } 79 + }, 80 + "root": { 81 + "inputs": { 82 + "flake-parts": "flake-parts", 83 + "font-switzer": "font-switzer", 84 + "nixpkgs": "nixpkgs", 85 + "treefmt-nix": "treefmt-nix" 86 + } 87 + }, 88 + "treefmt-nix": { 89 + "inputs": { 90 + "nixpkgs": "nixpkgs_2" 91 + }, 92 + "locked": { 93 + "lastModified": 1770228511, 94 + "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", 95 + "owner": "numtide", 96 + "repo": "treefmt-nix", 97 + "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", 98 + "type": "github" 99 + }, 100 + "original": { 101 + "owner": "numtide", 102 + "repo": "treefmt-nix", 103 + "type": "github" 104 + } 105 + } 106 + }, 107 + "root": "root", 108 + "version": 7 109 + }
+122
flake.nix
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + { 6 + inputs = { 7 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 8 + flake-parts.url = "github:hercules-ci/flake-parts"; 9 + treefmt-nix.url = "github:numtide/treefmt-nix"; 10 + font-switzer = { 11 + url = "https://api.fontshare.com/v2/fonts/download/switzer"; 12 + flake = false; 13 + }; 14 + }; 15 + 16 + outputs = 17 + inputs@{ flake-parts, ... }: 18 + flake-parts.lib.mkFlake { inherit inputs; } { 19 + systems = [ 20 + "x86_64-linux" 21 + "aarch64-linux" 22 + "x86_64-darwin" 23 + "aarch64-darwin" 24 + ]; 25 + 26 + imports = [ 27 + inputs.treefmt-nix.flakeModule 28 + ]; 29 + 30 + perSystem = 31 + { config, pkgs, ... }: 32 + let 33 + font-switzer = pkgs.runCommand "font-switzer" { nativeBuildInputs = [ pkgs.unzip ]; } '' 34 + unzip ${inputs.font-switzer} -d $out 35 + ''; 36 + in 37 + { 38 + checks.reuse = pkgs.runCommand "reuse-lint" { nativeBuildInputs = [ pkgs.reuse ]; } '' 39 + cd ${./.} 40 + reuse lint 41 + touch $out 42 + ''; 43 + 44 + treefmt = { 45 + projectRootFile = "flake.nix"; 46 + 47 + programs.rustfmt.enable = true; 48 + programs.nixfmt.enable = true; 49 + 50 + settings.formatter.reuse-annotate = { 51 + command = pkgs.writeShellScriptBin "reuse-annotate" '' 52 + name=$(${pkgs.git}/bin/git config user.name) 53 + email=$(${pkgs.git}/bin/git config user.email) 54 + exec ${pkgs.reuse}/bin/reuse annotate \ 55 + --license "AGPL-3.0-or-later" \ 56 + --copyright "$name <$email>" \ 57 + --skip-existing \ 58 + --skip-unrecognised \ 59 + "$@" 60 + ''; 61 + includes = [ "*" ]; 62 + excludes = [ 63 + "flake.lock" 64 + "Cargo.lock" 65 + "LICENSE" 66 + "NOTICE" 67 + "LICENSES/*" 68 + ]; 69 + }; 70 + 71 + settings.global.excludes = [ 72 + "target/*" 73 + ".jj/*" 74 + ".git/*" 75 + ".direnv/*" 76 + ]; 77 + }; 78 + 79 + devShells.default = pkgs.mkShell { 80 + packages = [ 81 + pkgs.rustc 82 + pkgs.cargo 83 + pkgs.clippy 84 + pkgs.rustfmt 85 + pkgs.rust-analyzer 86 + pkgs.reuse 87 + config.treefmt.build.wrapper 88 + pkgs.pkg-config 89 + pkgs.dioxus-cli 90 + pkgs.just 91 + ]; 92 + 93 + buildInputs = with pkgs; [ 94 + wayland 95 + libxkbcommon 96 + libGL 97 + libx11 98 + libxcursor 99 + libxrandr 100 + libxi 101 + ]; 102 + 103 + SWITZER_FONT_DIR = "${font-switzer}"; 104 + RUST_BACKTRACE = "1"; 105 + 106 + # https://github.com/DioxusLabs/dioxus/issues/4962 107 + RUSTFLAGS = 108 + if pkgs.stdenv.hostPlatform.isx86_64 then "-Ctarget-cpu=x86-64" else "-Ctarget-cpu=generic"; 109 + 110 + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ 111 + pkgs.wayland 112 + pkgs.libxkbcommon 113 + pkgs.libGL 114 + pkgs.libx11 115 + pkgs.libxcursor 116 + pkgs.libxrandr 117 + pkgs.libxi 118 + ]; 119 + }; 120 + }; 121 + }; 122 + }
+11
justfile
··· 1 + run: 2 + dx serve --hot-patch -p kammy 3 + 4 + fmt: 5 + nix fmt 6 + 7 + test: 8 + cargo test 9 + 10 + check: 11 + cargo clippy
+5
rustfmt.toml
··· 1 + # SPDX-FileCopyrightText: 2026 Alex Bates <alex@bates64.com> 2 + # 3 + # SPDX-License-Identifier: AGPL-3.0-or-later 4 + 5 + max_width = 100