From 4a528eb4b7f1555a04045fc437da086a0e8f77ab Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Sun, 24 Mar 2024 16:29:24 +0100 Subject: [PATCH] wip --- .cargo/config.toml | 2 +- Cargo.lock | 3588 ++++++++++++++++++++++++++++++-- Cargo.toml | 4 +- editor/.gitignore | 2 + editor/Cargo.toml | 22 + editor/README.md | 3 + editor/src/default_layer.ron | 25 + editor/src/default_layout.ron | 25 + editor/src/main.rs | 395 ++++ editor/src/mat.rs | 98 + editor/src/serial.rs | 5 + editor/src/serial/port.rs | 144 ++ editor/src/serial/scan.rs | 141 ++ left/.cargo/config.toml | 2 + left/Cargo.toml | 6 +- left/build.rs | 2 +- left/src/main.rs | 31 +- lib/.cargo/config.toml | 2 + lib/Cargo.toml | 19 +- lib/src/atomics.rs | 2 +- lib/src/button.rs | 107 + lib/src/event.rs | 6 +- lib/src/keyboard.rs | 64 +- lib/src/keyboard/lights.rs | 2 +- lib/src/keypress_handler.rs | 8 +- lib/src/keys.rs | 269 +++ lib/src/layer.rs | 12 + lib/src/layout.rs | 36 + lib/src/lib.rs | 7 +- lib/src/logger.rs | 63 +- lib/src/panic_handler.rs | 2 +- lib/src/rtt.rs | 42 +- lib/src/serial_proto.rs | 71 + lib/src/usb.rs | 11 +- lib/src/usb/keyboard.rs | 1 + lib/src/usb/keyboard/report.rs | 8 +- lib/src/usb/logger.rs | 55 - lib/src/usb/serial.rs | 219 ++ lib/src/util.rs | 187 ++ right/.cargo/config.toml | 2 + right/Cargo.toml | 6 +- right/build.rs | 2 +- right/layers.ron | 34 +- right/src/main.rs | 34 +- 44 files changed, 5438 insertions(+), 328 deletions(-) create mode 100644 editor/.gitignore create mode 100644 editor/Cargo.toml create mode 100644 editor/README.md create mode 100644 editor/src/default_layer.ron create mode 100644 editor/src/default_layout.ron create mode 100644 editor/src/main.rs create mode 100644 editor/src/mat.rs create mode 100644 editor/src/serial.rs create mode 100644 editor/src/serial/port.rs create mode 100644 editor/src/serial/scan.rs create mode 100644 left/.cargo/config.toml create mode 100644 lib/.cargo/config.toml create mode 100644 lib/src/button.rs create mode 100644 lib/src/keys.rs create mode 100644 lib/src/layer.rs create mode 100644 lib/src/layout.rs create mode 100644 lib/src/serial_proto.rs delete mode 100644 lib/src/usb/logger.rs create mode 100644 lib/src/usb/serial.rs create mode 100644 right/.cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml index 3926882..a465450 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [build] -target = "thumbv6m-none-eabi" +#target = "thumbv6m-none-eabi" [target.thumbv6m-none-eabi] rustflags = [ diff --git a/Cargo.lock b/Cargo.lock index f80e0a2..6df5617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,126 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + +[[package]] +name = "accesskit" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cb10ed32c63247e4e39a8f42e8e30fb9442fbf7878c8e4a9849e7e381619bea" +dependencies = [ + "enumn", + "serde", +] + +[[package]] +name = "accesskit_consumer" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" +dependencies = [ + "accesskit", +] + +[[package]] +name = "accesskit_macos" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2 0.3.0-beta.3", + "once_cell", +] + +[[package]] +name = "accesskit_unix" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" +dependencies = [ + "accesskit", + "accesskit_consumer", + "async-channel", + "async-once-cell", + "atspi", + "futures-lite 1.13.0", + "once_cell", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" +dependencies = [ + "accesskit", + "accesskit_consumer", + "once_cell", + "paste", + "static_assertions", + "windows 0.48.0", +] + +[[package]] +name = "accesskit_winit" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "winit", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.2" @@ -11,12 +131,130 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-activity" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" +dependencies = [ + "android-properties", + "bitflags 2.4.2", + "cc", + "cesu8", + "jni", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum 0.7.2", + "thiserror", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "arboard" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1faa3c733d9a3dd6fbaf85da5d162a2e03b2e0033a90dceb0e2a90fdd1e5380a" +dependencies = [ + "clipboard-win", + "log", + "objc", + "objc-foundation", + "objc_id", + "parking_lot", + "thiserror", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ascii-canvas" version = "3.0.0" @@ -26,6 +264,192 @@ dependencies = [ "term", ] +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] + +[[package]] +name = "async-broadcast" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +dependencies = [ + "concurrent-queue", + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.3.0", + "async-task", + "concurrent-queue", + "fastrand 2.0.1", + "futures-lite 2.2.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.27", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +dependencies = [ + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.2.0", + "parking", + "polling 3.5.0", + "rustix 0.38.31", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", +] + +[[package]] +name = "async-once-cell" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.31", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.3.1", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.31", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-task" +version = "4.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" + +[[package]] +name = "async-trait" +version = "0.1.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + [[package]] name = "atomic-polyfill" version = "1.0.3" @@ -35,6 +459,60 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atspi" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-connection" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" +dependencies = [ + "atspi-common", + "atspi-proxies", + "futures-lite 1.13.0", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +dependencies = [ + "atspi-common", + "serde", + "zbus", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -47,6 +525,21 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "bare-metal" version = "0.2.5" @@ -58,9 +551,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bit-set" @@ -91,18 +584,93 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] [[package]] -name = "bytemuck" -version = "1.14.0" +name = "block" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +dependencies = [ + "objc-sys 0.3.2", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys 0.1.0-beta.1", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys 0.2.1", + "objc2 0.4.1", +] + +[[package]] +name = "blocking" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel", + "async-lock 3.3.0", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.2.0", + "piper", + "tracing", +] + +[[package]] +name = "bumpalo" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" + +[[package]] +name = "bytemuck" +version = "1.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" dependencies = [ "bytemuck_derive", ] @@ -115,7 +683,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] @@ -124,18 +692,160 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "calloop" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +dependencies = [ + "bitflags 2.4.2", + "log", + "polling 3.5.0", + "rustix 0.38.31", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop", + "rustix 0.38.31", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "clap" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.0", +] + +[[package]] +name = "clap_derive" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "clipboard-win" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ec832972fefb8cf9313b45a0d1945e29c9c251f1d4c6eafc5fe2124c02d2e81" +dependencies = [ + "error-code", +] + [[package]] name = "cobs" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" +dependencies = [ + "bitflags 1.3.2", + "block", + "core-foundation", + "core-graphics-types", + "libc", + "objc", +] + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -146,6 +856,18 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "colored" version = "2.1.0" @@ -156,6 +878,96 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core-graphics" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "cortex-m" version = "0.7.7" @@ -189,20 +1001,44 @@ dependencies = [ ] [[package]] -name = "crc-any" -version = "2.4.3" +name = "cpufeatures" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774646b687f63643eb0f4bf13dc263cb581c8c9e57973b6ddf78bda3994d88df" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc-any" +version = "2.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01a5e1f881f6fb6099a7bdf949e946719fd4f1fefa56264890574febf0eb6d0" dependencies = [ "debug-helper", ] +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + [[package]] name = "critical-section" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + [[package]] name = "crunchy" version = "0.2.2" @@ -210,10 +1046,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "darling" -version = "0.20.3" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + +[[package]] +name = "darling" +version = "0.20.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -221,27 +1073,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.41", + "strsim 0.10.0", + "syn 2.0.49", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] @@ -252,19 +1104,50 @@ checksum = "f578e8e2c440e7297e008bb5486a3a8a194775224bbc23729b0dbdfaeebf162e" [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "diff" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -286,6 +1169,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.1", +] + [[package]] name = "document-features" version = "0.2.8" @@ -296,10 +1194,171 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.9.0" +name = "downcast-rs" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "ecolor" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03cfe80b1890e1a8cdbffc6044d6872e814aaf6011835a2a5e2db0e5c5c4ef4e" +dependencies = [ + "bytemuck", + "serde", +] + +[[package]] +name = "editor" +version = "0.1.0" +dependencies = [ + "clap", + "eframe", + "egui", + "egui_extras", + "eyre", + "log", + "msgpck", + "pretty_env_logger", + "ron", + "serde", + "tangentbord1-lib", + "tokio", +] + +[[package]] +name = "eframe" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c456c1bb6d13bf68b780257484703d750c70a23ff891ba35f4d6e23a4dbdf26f" +dependencies = [ + "bytemuck", + "cocoa", + "directories-next", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "glow", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc", + "parking_lot", + "percent-encoding", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", + "ron", + "serde", + "static_assertions", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "winapi", + "winit", +] + +[[package]] +name = "egui" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180f595432a5b615fc6b74afef3955249b86cfea72607b40740a4cd60d5297d0" +dependencies = [ + "accesskit", + "ahash", + "epaint", + "log", + "nohash-hasher", + "ron", + "serde", +] + +[[package]] +name = "egui-wgpu" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f2d75e1e70228e7126f828bac05f9fe0e7ea88e9660c8cebe609bb114c61d4" +dependencies = [ + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "thiserror", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4d44f8d89f70d4480545eb2346b76ea88c3022e9f4706cebc799dbe8b004a2" +dependencies = [ + "accesskit_winit", + "arboard", + "egui", + "log", + "raw-window-handle 0.6.0", + "serde", + "smithay-clipboard", + "web-time", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_extras" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4a6962241a76da5be5e64e41b851ee1c95fda11f76635522a3c82b119b5475" +dependencies = [ + "egui", + "enum-map", + "log", + "mime_guess2", + "serde", +] + +[[package]] +name = "egui_glow" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08e3be8728b4c59493dbfec041c657e6725bdeafdbd49aef3f1dbb9e551fa01" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "memoffset 0.9.0", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "emath" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6916301ecf80448f786cdf3eb51d9dbdd831538732229d49119e2d4312eaaf09" +dependencies = [ + "bytemuck", + "serde", +] [[package]] name = "embassy-embedded-hal" @@ -341,7 +1400,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] @@ -602,6 +1661,89 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", + "serde", +] + +[[package]] +name = "enum-map-derive" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "enumflags2" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "enumn" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "epaint" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b9fdf617dd7f58b0c8e6e9e4a1281f730cde0831d40547da446b2bb76a47af" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "log", + "nohash-hasher", + "parking_lot", + "serde", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -619,10 +1761,109 @@ dependencies = [ ] [[package]] -name = "fixed" -version = "1.24.0" +name = "error-code" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c69ce7e7c0f17aa18fdd9d0de39727adb9c6281f2ad12f57cbe54ae6e76e7d" +checksum = "281e452d3bad4005426416cdba5ccfd4f5c1280e10099e21db27f7c1c28347fc" + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.1.0", + "pin-project-lite", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fdeflate" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "fixed" +version = "1.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29e5681dc8556fb9df1409e95eae050e12e8776394313da3546dcb8cf390c73" dependencies = [ "az", "bytemuck", @@ -636,6 +1877,16 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -643,10 +1894,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "futures" -version = "0.3.29" +name = "foreign-types" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -658,9 +1945,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -668,64 +1955,132 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", + "futures-io", "futures-macro", "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", ] [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + [[package]] name = "glam" version = "0.25.0" @@ -735,6 +2090,135 @@ dependencies = [ "libm", ] +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" +dependencies = [ + "bitflags 2.4.2", + "cfg_aliases", + "cgl", + "core-foundation", + "dispatch", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "icrate", + "libloading 0.8.1", + "objc2 0.4.1", + "once_cell", + "raw-window-handle 0.5.2", + "wayland-sys", + "windows-sys 0.48.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle 0.5.2", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" +dependencies = [ + "gl_generator", + "windows-sys 0.48.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.4.2", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.4.2", +] + +[[package]] +name = "gpu-allocator" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows 0.52.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +dependencies = [ + "bitflags 2.4.2", + "gpu-descriptor-types", + "hashbrown", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +dependencies = [ + "bitflags 2.4.2", +] + [[package]] name = "half" version = "2.3.1" @@ -768,6 +2252,25 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.4.2", + "com", + "libc", + "libloading 0.8.1", + "thiserror", + "widestring", + "winapi", +] [[package]] name = "heapless" @@ -794,10 +2297,54 @@ dependencies = [ ] [[package]] -name = "hermit-abi" -version = "0.3.3" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2 0.3.0", + "dispatch", + "objc2 0.4.1", +] [[package]] name = "ident_case" @@ -806,26 +2353,75 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "indexmap" -version = "2.1.0" +name = "idna" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "image" +version = "0.24.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "num-traits", + "png", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown", ] [[package]] -name = "is-terminal" -version = "0.4.9" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys 0.48.0", ] +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -841,6 +2437,63 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading 0.8.1", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "lalrpop" version = "0.19.12" @@ -880,9 +2533,29 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] [[package]] name = "libm" @@ -896,9 +2569,20 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", - "redox_syscall", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.2", + "libc", + "redox_syscall 0.4.1", ] [[package]] @@ -909,9 +2593,15 @@ checksum = "9afa463f5405ee81cdb9cc2baf37e08ec7e4c8209442b5d72c04cfb2cd6e6286" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "litrs" @@ -936,10 +2626,139 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "memchr" -version = "2.6.4" +name = "malloc_buf" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" +dependencies = [ + "bitflags 2.4.2", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess2" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a3333bb1609500601edc766a39b4c1772874a4ce26022f4d866854dc020c41" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "msgpck" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6e2c8858cf21d8abcbdb1411de79e31f1852df1f41e541408b8b5e9e00dc391" +dependencies = [ + "msgpck_derive", +] + +[[package]] +name = "msgpck_derive" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687c80ccc0022b2297bd3f8dcffe5668fe73079edb885fd06fcadbd022e27822" +dependencies = [ + "proc-macro2", + "quote", + "strum", + "syn 2.0.49", +] + +[[package]] +name = "naga" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8878eb410fc90853da3908aebfe61d73d26d4437ef850b70050461f939509899" +dependencies = [ + "bit-set", + "bitflags 2.4.2", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "num-traits", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", +] [[package]] name = "nb" @@ -956,6 +2775,37 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" +[[package]] +name = "ndk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +dependencies = [ + "bitflags 2.4.2", + "jni-sys", + "log", + "ndk-sys", + "num_enum 0.7.2", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -963,21 +2813,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] -name = "num-traits" -version = "0.2.17" +name = "nix" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "num_enum" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", ] [[package]] @@ -992,20 +2885,162 @@ dependencies = [ ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "num_enum_derive" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", + "objc_exception", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe31e5425d3d0b89a15982c024392815da40689aceb34bad364d58732bcfd649" +dependencies = [ + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys 0.3.2", + "objc2-encode 3.0.0", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "orbclient" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" +dependencies = [ + "libredox 0.0.2", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" version = "0.12.1" @@ -1024,7 +3059,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -1035,6 +3070,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + [[package]] name = "petgraph" version = "0.6.4" @@ -1073,7 +3114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76e09694b50f89f302ed531c1f2a7569f0be5867aee4ab4f8f729bbeec0078e3" dependencies = [ "arrayvec", - "num_enum", + "num_enum 0.5.11", "paste", ] @@ -1106,6 +3147,66 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "png" +version = "0.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c2378060fb13acff3ba0325b83442c1d2c44fbb76df481160ddc1687cce160" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "portable-atomic" version = "1.6.0" @@ -1133,12 +3234,44 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + [[package]] name = "precomputed-hash" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "pretty_env_logger" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" +dependencies = [ + "env_logger", + "log", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1165,27 +3298,87 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] -name = "quote" -version = "1.0.33" +name = "profiling" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" + +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] [[package]] name = "redox_syscall" @@ -1203,15 +3396,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "libredox", + "libredox 0.0.1", "thiserror", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -1221,9 +3414,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -1242,6 +3435,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "renderdoc-sys" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" + [[package]] name = "rgb" version = "0.8.37" @@ -1258,7 +3457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.1", + "bitflags 2.4.2", "serde", "serde_derive", ] @@ -1292,6 +3491,18 @@ dependencies = [ "ufmt-write", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc_version" version = "0.2.3" @@ -1307,19 +3518,33 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] name = "rustix" -version = "0.38.28" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ - "bitflags 2.4.1", + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +dependencies = [ + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -1329,12 +3554,40 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sctk-adwaita" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "semver" version = "0.9.0" @@ -1346,9 +3599,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "semver-parser" @@ -1358,29 +3611,66 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] -name = "simple_logger" -version = "4.3.0" +name = "serde_repr" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0ca6504625ee1aa5fda33913d2005eab98c7a42dd85f116ecce3ff54c9d3ef" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simple_logger" +version = "4.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e7e46c8c90251d47d08b28b8a419ffb4aede0f87c2eea95e17d1d5bacbf3ef1" dependencies = [ "colored", "log", @@ -1395,10 +3685,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] -name = "smallvec" -version = "1.11.2" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smart-leds" @@ -1418,6 +3726,71 @@ dependencies = [ "rgb", ] +[[package]] +name = "smithay-client-toolkit" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" +dependencies = [ + "bitflags 2.4.2", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.31", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb62b280ce5a5cba847669933a0948d00904cf83845c944eae96a4738cea1a6" +dependencies = [ + "libc", + "smithay-client-toolkit", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -1427,6 +3800,15 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.4.2", +] + [[package]] name = "ssmarshal" version = "1.0.0" @@ -1443,6 +3825,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "static_cell" version = "1.3.0" @@ -1452,6 +3840,12 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + [[package]] name = "string_cache" version = "0.8.7" @@ -1471,6 +3865,34 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.49", +] + [[package]] name = "syn" version = "1.0.109" @@ -1484,9 +3906,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.41" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -1507,14 +3929,12 @@ dependencies = [ "postcard", "ron", "tangentbord1-lib", - "tgnt", ] [[package]] name = "tangentbord1-lib" version = "0.1.0" dependencies = [ - "atomic-polyfill", "bytemuck", "cortex-m", "cortex-m-rt", @@ -1537,9 +3957,11 @@ dependencies = [ "heapless 0.7.17", "libm", "log", + "msgpck", "once_cell", "pio", "pio-proc", + "portable-atomic", "postcard", "ron", "rtt-target", @@ -1547,7 +3969,6 @@ dependencies = [ "simple_logger", "smart-leds", "static_cell", - "tgnt", "usb-device", "usbd-hid", ] @@ -1566,7 +3987,18 @@ dependencies = [ "postcard", "ron", "tangentbord1-lib", - "tgnt", +] + +[[package]] +name = "tempfile" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +dependencies = [ + "cfg-if", + "fastrand 2.0.1", + "rustix 0.38.31", + "windows-sys 0.52.0", ] [[package]] @@ -1582,49 +4014,43 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] -[[package]] -name = "tgnt" -version = "0.1.0" -dependencies = [ - "serde", -] - [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.49", ] [[package]] name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -1640,10 +4066,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -1656,24 +4083,198 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + +[[package]] +name = "type-map" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" +dependencies = [ + "rustc-hash", +] + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset 0.9.0", + "tempfile", + "winapi", +] + [[package]] name = "ufmt-write" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e87a2ed6b42ec5e28cc3b94c09982969e9227600b2e3dcbc1db927a84c06bd69" +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-width" version = "0.1.11" @@ -1686,6 +4287,17 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "usb-device" version = "0.2.9" @@ -1727,6 +4339,12 @@ dependencies = [ "usbd-hid-descriptors", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "vcell" version = "0.1.3" @@ -1754,12 +4372,347 @@ dependencies = [ "vcell", ] +[[package]] +name = "waker-fn" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.49", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" + +[[package]] +name = "wayland-backend" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" +dependencies = [ + "cc", + "downcast-rs", + "rustix 0.38.31", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" +dependencies = [ + "bitflags 2.4.2", + "rustix 0.38.31", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71ce5fa868dd13d11a0d04c5e2e65726d0897be8de247c0c5a65886e283231ba" +dependencies = [ + "rustix 0.38.31", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.4.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b2391658b02c27719fc5a0a73d6e696285138e8b12fba9d4baa70451023c71" +dependencies = [ + "core-foundation", + "home", + "jni", + "log", + "ndk-context", + "objc", + "raw-window-handle 0.5.2", + "url", + "web-sys", +] + +[[package]] +name = "wgpu" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe9a310dcf2e6b85f00c46059aaeaf4184caa8e29a1ecd4b7a704c3482332d" +dependencies = [ + "arrayvec", + "cfg-if", + "cfg_aliases", + "js-sys", + "log", + "parking_lot", + "profiling", + "raw-window-handle 0.6.0", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b15e451d4060ada0d99a64df44e4d590213496da7c4f245572d51071e8e30ed" +dependencies = [ + "arrayvec", + "bit-vec", + "bitflags 2.4.2", + "cfg_aliases", + "codespan-reporting", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.0", + "rustc-hash", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bb47856236bfafc0bc591a925eb036ac19cd987624a447ff353e7a7e7e6f72" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bitflags 2.4.2", + "cfg_aliases", + "core-graphics-types", + "glow", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.8.1", + "log", + "metal", + "naga", + "objc", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.0", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "895fcbeb772bfb049eb80b2d6e47f6c9af235284e9703c96fc0218a42ffd5af2" +dependencies = [ + "bitflags 2.4.2", + "js-sys", + "web-sys", +] + +[[package]] +name = "widestring" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" + [[package]] name = "winapi" version = "0.3.9" @@ -1791,6 +4744,67 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-implement" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-interface" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -1809,6 +4823,21 @@ dependencies = [ "windows-targets 0.52.0", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -1839,6 +4868,12 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -1851,6 +4886,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -1863,6 +4904,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -1875,6 +4922,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -1887,6 +4940,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -1899,6 +4958,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -1911,6 +4976,12 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -1922,3 +4993,258 @@ name = "windows_x86_64_msvc" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winit" +version = "0.29.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.4.2", + "bytemuck", + "calloop", + "cfg_aliases", + "core-foundation", + "core-graphics", + "cursor-icon", + "icrate", + "js-sys", + "libc", + "log", + "memmap2", + "ndk", + "ndk-sys", + "objc2 0.4.1", + "once_cell", + "orbclient", + "percent-encoding", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", + "redox_syscall 0.3.5", + "rustix 0.38.31", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.48.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.1", + "once_cell", + "rustix 0.38.31", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" + +[[package]] +name = "xcursor" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" + +[[package]] +name = "xdg-home" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.4.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" + +[[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] +name = "zbus" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c45d06ae3b0f9ba1fb2671268b975557d8f5a84bb5ec6e43964f87e763d8bca8" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "byteorder", + "derivative", + "enumflags2", + "event-listener 2.5.3", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "once_cell", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "winapi", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a1ba45ed0ad344b85a2bb5a1fe9830aed23d67812ea39a586e7d0136439c7d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "zvariant" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/Cargo.toml b/Cargo.toml index 06c67db..cd17426 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,9 @@ -[patch.'https://git.nubo.sh/hulthe/tgnt.git'.tgnt] -path = "../tgnt" - [workspace] members = [ "lib", "left", "right", + "editor", ] resolver = "2" diff --git a/editor/.gitignore b/editor/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/editor/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/editor/Cargo.toml b/editor/Cargo.toml new file mode 100644 index 0000000..87d7c79 --- /dev/null +++ b/editor/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "editor" +version = "0.1.0" +edition = "2021" + +[dependencies.tangentbord1] +path = "../lib" +package = "tangentbord1-lib" +features = ["std"] + +[dependencies] +clap = { version = "4.5.1", features = ["derive"] } +eframe = { version = "0.26.2", features = ["persistence", "ron", "serde"] } +egui = { version = "0.26.2", features = ["persistence", "ron", "serde"] } +egui_extras = { version = "0.26.2" } +msgpck = { version = "0.2.8", features = ["alloc"] } +eyre = "0.6.12" +log = "0.4.20" +pretty_env_logger = "0.5.0" +ron = { version = "0.8.0" } +serde = { version = "1.0.156", features = ["derive"] } +tokio = { version = "1.36.0", features = ["full"] } diff --git a/editor/README.md b/editor/README.md new file mode 100644 index 0000000..9de00e7 --- /dev/null +++ b/editor/README.md @@ -0,0 +1,3 @@ +# tgnt + +Keyboard configuration library and editor. diff --git a/editor/src/default_layer.ron b/editor/src/default_layer.ron new file mode 100644 index 0000000..feac760 --- /dev/null +++ b/editor/src/default_layer.ron @@ -0,0 +1,25 @@ +Layer( + buttons: [ + Keycode(0x04), + Keycode(0x05), + Keycode(0x06), + Keycode(0x07), + Keycode(0x08), + + Keycode(0x09), + Keycode(0x0A), + Keycode(0x0B), + Keycode(0x0C), + Keycode(0x0D), + + Keycode(0x0E), + Keycode(0x0F), + Keycode(0x10), + Keycode(0x11), + ModTap( keycode: 0x12, modifier: LMod), + + Modifier(LShift), + Modifier(LCtrl), + NextLayer, + ], +) diff --git a/editor/src/default_layout.ron b/editor/src/default_layout.ron new file mode 100644 index 0000000..bbb8546 --- /dev/null +++ b/editor/src/default_layout.ron @@ -0,0 +1,25 @@ +Layout( + buttons: [ + (x: 0.0, y: 0.4), + (x: 1.0, y: 0.2), + (x: 2.0, y: 0.0), + (x: 3.0, y: 0.2), + (x: 4.0, y: 0.4), + + (x: 0.0, y: 1.4), + (x: 1.0, y: 1.2), + (x: 2.0, y: 1.0), + (x: 3.0, y: 1.2), + (x: 4.0, y: 1.4), + + (x: 0.0, y: 2.4), + (x: 1.0, y: 2.2), + (x: 2.0, y: 2.0), + (x: 3.0, y: 2.2), + (x: 4.0, y: 2.4), + + (x: 3.0, y: 3.2), + (x: 4.0, y: 3.4), + (x: 5.0, y: 3.6), + ] +) diff --git a/editor/src/main.rs b/editor/src/main.rs new file mode 100644 index 0000000..e46b316 --- /dev/null +++ b/editor/src/main.rs @@ -0,0 +1,395 @@ +mod mat; +mod serial; + +use clap::Parser; +use egui::{Button, Color32, Frame, Rect, ScrollArea, Slider, TextEdit, Vec2}; +use eyre::eyre; +use mat::Mat; +use serde::{Deserialize, Serialize}; +use serial::{connect_to_serial, scan_for_serial}; +use std::{collections::VecDeque, path::PathBuf}; +use tangentbord1::{ + layer::Layer, + layout::Layout, + serial_proto::owned::{ChangeLayer, DeviceMsg, LogRecord}, +}; +use tokio::{ + runtime::Runtime, + sync::{ + mpsc::{self, Receiver}, + oneshot::{self, error::TryRecvError}, + }, + task::spawn_blocking, +}; + +#[derive(Parser)] +struct Opt { + /// Path to device serial port + device: Option, +} + +fn main() -> eyre::Result<()> { + let _opt = Opt::parse(); + + pretty_env_logger::init(); + + let rt = Runtime::new().unwrap(); + let _enter_rt = rt.enter(); + + log::info!("starting application"); + let native_options = eframe::NativeOptions::default(); + eframe::run_native( + "tgnt keyboard editor", + native_options, + Box::new(|cc| Box::new(App::new(cc))), + ) + .map_err(|e| eyre!("Failed to run program: {e:?}"))?; + + rt.shutdown_background(); + + Ok(()) +} + +/// We derive Deserialize/Serialize so we can persist app state on shutdown. +#[derive(Deserialize, Serialize)] +#[serde(default)] // if we add new fields, give them default values when deserializing old state +pub struct App { + layout: RonEdit, + + layers: Mat>, + + u1: f32, + margin: f32, + + #[serde(skip)] + serial: SerialState, +} + +struct SerialState { + scan_task: Option, String>>>, + dev: Result, String>, + reader: Option>, + logs: VecDeque, + active_layer: Option<(u16, u16)>, +} + +#[derive(Deserialize, Serialize, Clone)] +struct RonEdit { + pub t: T, + pub ron: String, + pub error: String, +} + +impl RonEdit { + pub fn new(t: T) -> Self { + RonEdit { + ron: ron::ser::to_string_pretty(&t, Default::default()).unwrap(), + error: String::new(), + t, + } + } +} + +impl Default for RonEdit { + fn default() -> Self { + RonEdit::new(Default::default()) + } +} + +impl Default for App { + fn default() -> Self { + Self { + layers: Default::default(), + layout: Default::default(), + u1: 75.0, + margin: 0.05, + + serial: Default::default(), + } + } +} + +impl Default for SerialState { + fn default() -> Self { + Self { + scan_task: Default::default(), + dev: Ok(None), + reader: Default::default(), + logs: Default::default(), + active_layer: None, + } + } +} + +impl App { + /// Called once before the first frame. + pub fn new(cc: &eframe::CreationContext<'_>) -> Self { + // This is also where you can customize the look and feel of egui using + // `cc.egui_ctx.set_visuals` and `cc.egui_ctx.set_fonts`. + + // Load previous app state (if any). + // Note that you must enable the `persistence` feature for this to work. + if let Some(storage) = cc.storage { + return eframe::get_value(storage, eframe::APP_KEY).unwrap_or_default(); + } + + let layer_str = include_str!("default_layer.ron"); + let layer: Layer = ron::from_str(&layer_str).expect("Failed to deserialize default layer"); + + let layout_str = include_str!("default_layout.ron"); + let layout: Layout = + ron::from_str(&layout_str).expect("Failed to deserialize default layout"); + + let mut layers = Mat::default(); + layers.push_row(RonEdit::new(layer)); + + Self { + layers, + layout: RonEdit::new(layout), + ..Self::default() + } + } +} + +impl eframe::App for App { + /// Called by the frame work to save state before shutdown. + fn save(&mut self, storage: &mut dyn eframe::Storage) { + eframe::set_value(storage, eframe::APP_KEY, self); + } + + /// Called each time the UI needs repainting, which may be many times per second. + /// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`. + fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + let Self { + margin, + u1, + layout, + layers, + serial: + SerialState { + scan_task: scan_serial_task, + dev: serial_devs, + reader: serial_reader, + logs: serial_logs, + active_layer, + }, + } = self; + + while let Some(rx) = scan_serial_task { + match rx.try_recv() { + Ok(r) => { + *serial_devs = r; + *scan_serial_task = None; + } + Err(TryRecvError::Empty) => break, + Err(TryRecvError::Closed) => { + *scan_serial_task = None; + break; + } + } + } + + while let Some(rx) = serial_reader { + match rx.try_recv() { + Ok(DeviceMsg::Log(record)) => { + serial_logs.push_back(record); + if serial_logs.len() > 10 { + serial_logs.pop_front(); + } + } + Ok(DeviceMsg::ChangeLayer(ChangeLayer { x, y })) => { + *active_layer = Some((x, y)); + } + Ok(_) => {} + Err(mpsc::error::TryRecvError::Empty) => break, + Err(mpsc::error::TryRecvError::Disconnected) => { + *serial_reader = None; + break; + } + } + } + + #[cfg(not(target_arch = "wasm32"))] // no File->Quit on web pages! + egui::TopBottomPanel::top("top_panel").show(ctx, |ui| { + // The top panel is often a good place for a menu bar: + egui::menu::bar(ui, |ui| { + ui.menu_button("File", |ui| { + if ui.button("Quit").clicked() { + todo!("implement quit") + } + }); + }); + }); + + egui::SidePanel::left("side_panel") + .resizable(true) + .width_range(250.0..=500.0) + .show(ctx, |ui| { + ScrollArea::vertical().show(ui, |ui| { + ui.heading("Side Panel"); + + ui.collapsing("Serial", |ui| { + match serial_devs { + Ok(Some(dev)) => { + if serial_reader.is_none() + && ui.button(format!("Connect to {dev:?}")).clicked() + { + *serial_reader = + Some(connect_to_serial(dev.clone(), ctx.clone())); + }; + } + Ok(None) => { + ui.label("No devices found."); + } + Err(e) => { + ui.code_editor(e); + } + } + + if ui.button("scan for serial device").clicked() + && scan_serial_task.is_none() + { + let (tx, rx) = oneshot::channel(); + let ctx = ctx.clone(); + spawn_blocking(move || { + let r = scan_for_serial().map_err(|e| e.to_string()); + let _ = tx.send(r); + ctx.request_repaint(); + }); + + *scan_serial_task = Some(rx); + } + + if scan_serial_task.is_some() { + ui.label("Scanning..."); + } + + ScrollArea::both().show(ui, |ui| { + for log in &*serial_logs { + ui.group(|ui| { + ui.horizontal(|ui| { + ui.label(&log.level); + ui.label(&log.message); + }); + }); + } + }) + }); + + ui.label("u1"); + ui.add(Slider::new(u1, 20.0..=150.0)); + ui.label("margin"); + ui.add(Slider::new(margin, 0.0..=0.4)); + + ui.collapsing("Layout", |ui| { + if ui + .add(TextEdit::multiline(&mut layout.ron).code_editor()) + .changed() + { + layout.error.clear(); + match ron::from_str(&layout.ron) { + Ok(new) => layout.t = new, + Err(e) => layout.error = e.to_string(), + } + } + + if !layout.error.is_empty() { + ui.add( + TextEdit::multiline(&mut layout.error) + .interactive(false) + .text_color(Color32::RED), + ); + } + }); + + for x in 0..layers.width() { + for y in 0..layers.height() { + let layer = layers.get_mut(x, y).unwrap(); + ui.collapsing(format!("Layer {x},{y}"), |ui| { + if ui + .add(TextEdit::multiline(&mut layer.ron).code_editor()) + .changed() + { + layer.error.clear(); + match ron::from_str(&layer.ron) { + Ok(new) => layer.t = new, + Err(e) => layer.error = e.to_string(), + } + } + + if !layer.error.is_empty() { + ui.add( + TextEdit::multiline(&mut layer.error) + .interactive(false) + .text_color(Color32::RED), + ); + } + }); + } + } + + if ui.button("Add layer row").clicked() { + layers.push_row(RonEdit::default()); + } + + ui.menu_button("Delete layer row", |ui| { + for r in 0..layers.height() { + if ui.button(format!("row {r}")).clicked() { + layers.remove_row(r); + } + } + }); + + if ui.button("Add layer column").clicked() { + layers.push_col(RonEdit::default()); + } + + ui.menu_button("Delete layer column", |ui| { + for c in 0..layers.width() { + if ui.button(format!("column {c}")).clicked() { + layers.remove_col(c); + } + } + }); + }); + }); + + egui::CentralPanel::default().show(ctx, |ui| { + ScrollArea::both().show(ui, |ui| { + for (i, layer) in layers.iter_cf().enumerate() { + let x = (i / layers.height()) as u16; + let y = (i % layers.height()) as u16; + + if Some((x, y)) == *active_layer { + ui.visuals_mut().widgets.inactive.bg_stroke = + (1.0, Color32::DARK_GREEN).into(); + } + + Frame::none().show(ui, |ui| { + for (i, geometry) in layout.t.buttons.iter().enumerate() { + let margin = *margin * *u1; + let size = Vec2::new( + *u1 * geometry.w - margin * 2.0, + *u1 * geometry.h - margin * 2.0, + ); + let offset = + Vec2::new(*u1 * geometry.x + margin, *u1 * geometry.y + margin); + let rect = Rect::from_min_size(ui.min_rect().min + offset, size); + + let button = if let Some(button) = layer.t.buttons.get(i) { + Button::new(button.to_string()) + } else { + Button::new("") + }; + + ui.put(rect, button); + } + }); + + ui.visuals_mut().widgets = Default::default(); + ui.separator(); + } + }) + }); + } +} diff --git a/editor/src/mat.rs b/editor/src/mat.rs new file mode 100644 index 0000000..42d5b66 --- /dev/null +++ b/editor/src/mat.rs @@ -0,0 +1,98 @@ +use serde::{Deserialize, Serialize}; + +/// 2-dimensional dynamically sized matrix +#[derive(Default, Deserialize, Serialize)] +pub struct Mat { + rows: Vec>, +} + +#[allow(dead_code)] +impl Mat { + /// Iterater over entries, rows first. + pub fn iter_rf(&self) -> impl Iterator { + todo!(); + #[allow(unreachable_code)] + [].into_iter() + } + + /// Iterater over entries, columns first. + pub fn iter_cf(&self) -> impl Iterator { + let height = self.height(); + (0..self.width()) + .flat_map(move |x| (0..height).map(move |y| (x, y))) + .map(|(x, y)| &self.rows[y][x]) + } + + pub fn get_mut(&mut self, x: usize, y: usize) -> Option<&mut T> { + if x >= self.width() || y >= self.height() { + return None; + } + + Some(&mut self.rows[y][x]) + } + + /// Get the width & height of the matrix + pub fn height(&self) -> usize { + self.rows.len() + } + + /// Get the width & height of the matrix + pub fn width(&self) -> usize { + self.rows.get(0).map(|row| row.len()).unwrap_or(0) + } + + /// Get the width & height of the matrix + pub fn size(&self) -> (usize, usize) { + (self.width(), self.height()) + } + + pub fn push_row(&mut self, t: T) + where + T: Clone, + { + let width = self.width(); + if width == 0 { + self.rows.push(vec![t]); + } else { + self.rows.push(vec![t; width]) + } + } + + pub fn push_col(&mut self, t: T) + where + T: Clone, + { + let height = self.height(); + if height == 0 { + self.rows.push(vec![t]); + } else { + self.rows.iter_mut().for_each(|row| row.push(t.clone())); + } + } + + pub fn remove_row(&mut self, y: usize) { + if y >= self.height() { + panic!("row {y} out of matrix bounds"); + } + + if self.height() == 1 { + self.rows.clear(); + } else { + self.rows.remove(y); + } + } + + pub fn remove_col(&mut self, x: usize) { + if x >= self.width() { + panic!("col {x} out of matrix bounds"); + } + + if self.width() == 1 { + self.rows.clear(); + } else { + for row in self.rows.iter_mut() { + row.remove(x); + } + } + } +} diff --git a/editor/src/serial.rs b/editor/src/serial.rs new file mode 100644 index 0000000..a966be3 --- /dev/null +++ b/editor/src/serial.rs @@ -0,0 +1,5 @@ +mod port; +mod scan; + +pub use port::connect_to_serial; +pub use scan::scan_for_serial; diff --git a/editor/src/serial/port.rs b/editor/src/serial/port.rs new file mode 100644 index 0000000..399e38a --- /dev/null +++ b/editor/src/serial/port.rs @@ -0,0 +1,144 @@ +use std::{future::pending, path::PathBuf, time::Duration}; + +use egui::Context; +use eyre::{bail, Context as EyreContext}; +use msgpck::{MsgPack, MsgUnpack, UnpackErr}; +use tangentbord1::serial_proto::owned::{DeviceMsg, HostMsg}; +use tokio::{ + fs::File, + io::{AsyncReadExt, AsyncWriteExt}, + process::Command, + select, + sync::mpsc::{self, Receiver, Sender}, + time::{sleep, Instant}, +}; + +const MAX_MESSAGE_SIZE: usize = 16 * 1024; +const MESSAGE_TIMEOUT: Duration = Duration::from_millis(30); + +pub fn connect_to_serial(dev: PathBuf, ctx: Context) -> Receiver { + let (tx, rx) = mpsc::channel(12); + tokio::spawn(async { + if let Err(e) = read_serial(dev, tx, ctx).await { + log::error!("serial read task exited with error: {e:#?}"); + } + }); + rx +} + +async fn read_serial(dev: PathBuf, tx: Sender, ctx: Context) -> eyre::Result<()> { + log::debug!("configuring keyboard serial device"); + let out = Command::new("stty") + .arg("-F") + .arg(&dev) + .args(["115200", "raw", "-clocal", "-echo"]) + .output() + .await + .wrap_err("failed to configure serial device, couldn't execute stty")?; + + if !out.status.success() { + bail!("failed to configure serial device"); + } + + log::debug!("opening keyboard serial device"); + let mut file = File::options() + .create(false) + .read(true) + .append(true) + .open(dev) + .await?; + + log::debug!("requesting keyboard layers"); + for p in HostMsg::GetLayers.pack() { + log::debug!("packing {:x?}", p); + file.write_all(p.as_bytes()).await?; + } + + let mut buf = Vec::with_capacity(MAX_MESSAGE_SIZE); + let mut last_read = Instant::now(); + + loop { + // if buffer is not empty, this future will sleep until the pending message times out + let timeout = async { + if buf.is_empty() { + pending().await + } else { + let timeout_at = last_read + MESSAGE_TIMEOUT; + sleep(Instant::now() - timeout_at).await; + } + }; + + // try to read some bytes from the file + let mut tmp = [0u8; 1024]; + let n = select! { + n = file.read(&mut tmp) => n?, + + // need to continuously poll read if nothing is happening + _ = sleep(Duration::from_millis(20)) => continue, + + _ = timeout => { + log::warn!("message timeout, clearing buffer"); + buf.clear(); + continue; + } + }; + + // exit on eof + if n == 0 { + break; + } + + last_read = Instant::now(); + buf.extend_from_slice(&tmp[..n]); + + // make sure we're not just reading garbage forever + if buf.len() > MAX_MESSAGE_SIZE { + log::warn!("max message size exceeded"); + buf.clear(); + continue; + } + + // try to parse messages from the read bytes + loop { + let mut reader = &mut &buf[..]; + let record = match DeviceMsg::unpack(&mut reader) { + Ok(r) => r, + + // we probably have not gotten the entire message yet, go back to reading bytes. + // if the message is corrupted, we will eventually hit MESSAGE_TIMEOUT or + // MAX_MESSAGE_SIZE. + Err(UnpackErr::UnexpectedEof) => break, + + // on any other error, the message is corrupt. clear the buffer. + Err(e) => { + log::warn!("corrupt message: {e:?}"); + buf.clear(); + break; + } + }; + + // remove the decoded bytes from buf + if reader.is_empty() { + buf.clear(); + } else { + let bytes_read = buf.len() - reader.len(); + buf.rotate_left(bytes_read); + buf.truncate(buf.len() - bytes_read); + } + + if let Err(_) = tx.send(record).await { + log::info!("channel closed, closing serial thingy"); + return Ok(()); + } + + // if there are no more bytes, stop trying to decode messages. + if buf.is_empty() { + break; + } + } + + ctx.request_repaint(); + } + + Ok(()) +} diff --git a/editor/src/serial/scan.rs b/editor/src/serial/scan.rs new file mode 100644 index 0000000..14b7107 --- /dev/null +++ b/editor/src/serial/scan.rs @@ -0,0 +1,141 @@ +use std::{ + collections::HashMap, + fs::read_dir, + path::{Path, PathBuf}, + process::Command, + str, +}; + +use eyre::Context; + +/// Scan for the keyboard serial device +pub fn scan_for_serial() -> eyre::Result> { + log::info!("scanning for keyboard serial device"); + + let mut syspaths = vec![]; + + // Reqursively scan all "/sys/bus/usb/devices/usb*" folders for files called "dev" + // and get the paths to the parent folders of those "dev" files. + for f in read_dir("/sys/bus/usb/devices/")? { + let f = f?; + let file_name = f.file_name(); + let Some(name) = file_name.to_str() else { + continue; + }; + + if !name.starts_with("usb") { + continue; + } + + let mut paths = scan_usb_for_devs(&f.path())?; + syspaths.append(&mut paths); + } + + log::debug!("checking these devices: {syspaths:#?}"); + + for syspath in syspaths { + let syspath = syspath.to_string_lossy(); + let devname = Command::new("udevadm") + .args(["info", "-q", "name", "-p", &syspath]) + .output() + .wrap_err("failed to run udevadmn to query dev name")?; + + let devname = str::from_utf8(&devname.stdout) + .wrap_err("failed to parse udevadm output as utf-8")? + .trim(); + + let devname = Path::new(devname); + + // Ignore USB hubs and such + if devname.starts_with("bus/") { + continue; + } + + let devpath = Path::new("/dev").join(devname); + + let properties = Command::new("udevadm") + .args(["info", "-q", "property", "--export", "-p", &syspath]) + .output() + .wrap_err("failed to run udevadmn to query properities")?; + + let properties = str::from_utf8(&properties.stdout) + .wrap_err("failed to parse udevadm output as utf-8")?; + + let properties = parse_env(properties); + let Some(properties) = parse_properties(&properties) else { + continue; + }; + + log::debug!("{devpath:?}: {properties:#?}"); + + let is_serial_device = [ + properties.model == "Tangentbord1", + properties.vendor == "Tux", + properties.vendor_id == "b00b", + properties.usb_type == "generic", + properties.usb_driver == "cdc_acm", + ] + .into_iter() + .all(|b| b); + + if is_serial_device { + return Ok(Some(devpath)); + } + } + + Ok(None) +} + +#[allow(dead_code)] +#[derive(Debug)] +struct Properties<'a> { + model: &'a str, + serial: &'a str, + serial_short: &'a str, + vendor: &'a str, + vendor_id: &'a str, + usb_type: &'a str, + usb_driver: &'a str, +} + +fn parse_properties<'a>(properties: &HashMap<&'a str, &'a str>) -> Option> { + Some(Properties { + model: *properties.get("ID_MODEL")?, + serial: *properties.get("ID_SERIAL")?, + serial_short: *properties.get("ID_SERIAL_SHORT")?, + vendor: *properties.get("ID_VENDOR")?, + vendor_id: *properties.get("ID_VENDOR_ID")?, + usb_type: *properties.get("ID_USB_TYPE")?, + usb_driver: *properties.get("ID_USB_DRIVER")?, + }) +} + +fn parse_env(s: &str) -> HashMap<&str, &str> { + s.lines() + .filter_map(|line| { + let (key, val) = line.split_once('=')?; + let val = val.trim_matches('\''); + Some((key, val)) + }) + .collect() +} + +fn scan_usb_for_devs(p: &Path) -> eyre::Result> { + let mut out = vec![]; + + for f in read_dir(p)? { + let f = f?; + let meta = f.metadata()?; + let path = f.path(); + if meta.is_dir() { + let mut results = scan_usb_for_devs(&path)?; + out.append(&mut results); + } else if meta.is_file() && f.file_name() == "dev" { + if let Some(parent) = path.parent() { + out.push(parent.to_owned()); + } + } + } + + Ok(out) +} diff --git a/left/.cargo/config.toml b/left/.cargo/config.toml new file mode 100644 index 0000000..b10f29d --- /dev/null +++ b/left/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "thumbv6m-none-eabi" diff --git a/left/Cargo.toml b/left/Cargo.toml index cb9ae06..1b0cabc 100644 --- a/left/Cargo.toml +++ b/left/Cargo.toml @@ -10,7 +10,6 @@ path = "../lib" package = "tangentbord1-lib" [dependencies] -tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } cortex-m-rt = "0.7" embassy-rp = { version = "0.1.0", features = ["time-driver", "critical-section-impl"] } embassy-executor = { version = "0.5.0", features = ["nightly", "executor-thread", "integrated-timers", "arch-cortex-m"] } @@ -21,6 +20,9 @@ log = "0.4.17" postcard = { version = "1.0.4", features = ["alloc"] } [build-dependencies] -tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } ron = "0.8.0" postcard = { version = "1", features = ["use-std"] } + +[build-dependencies.tangentbord1] +path = "../lib" +package = "tangentbord1-lib" diff --git a/left/build.rs b/left/build.rs index 454c784..3b34d3f 100644 --- a/left/build.rs +++ b/left/build.rs @@ -13,7 +13,7 @@ use std::io::Write; use std::path::PathBuf; use std::{env, fs}; -use tgnt::layer::Layer; +use tangentbord1::layer::Layer; fn main() { memory(); diff --git a/left/src/main.rs b/left/src/main.rs index eb8f73c..738af49 100644 --- a/left/src/main.rs +++ b/left/src/main.rs @@ -18,29 +18,19 @@ use tangentbord1::{ event::Half, interrupts::Irqs, keyboard::KeyboardConfig, - logger::Logger, + layer::Layer, + logger::LogMultiplexer, rgb::Rgb, util::stall, ws2812::Ws2812, {allocator, rtt, uart, usb}, }; -use tgnt::layer::Layer; #[embassy_executor::main] async fn main(_spawner: Spawner) { let half = Half::Left; let rtt_write = rtt::init_rtt_logger(); - let logger = Logger { - outputs: [rtt_write], - }; - logger.init(); - - log::error!("log_level: error"); - log::warn!("log_level: warn"); - log::info!("log_level: info"); - log::debug!("log_level: debug"); - log::trace!("log_level: trace"); allocator::init(); @@ -102,7 +92,18 @@ async fn main(_spawner: Spawner) { neopixel.write(&[Rgb::new(0x00, 0x99, 0x99)]).await; - usb::setup_logger_and_keyboard(board.USB, events1).await; + let usb_logger = usb::setup_logger_and_keyboard(board.USB, events1).await; + + let logger = LogMultiplexer { + outputs: [rtt_write, usb_logger], + }; + logger.init(); + + log::error!("log_level: error"); + log::warn!("log_level: warn"); + log::info!("log_level: info"); + log::debug!("log_level: debug"); + log::trace!("log_level: trace"); neopixel.write(&[Rgb::new(0x00, 0x00, 0xFF)]).await; Timer::after_secs(5).await; @@ -112,7 +113,5 @@ async fn main(_spawner: Spawner) { Timer::after_millis(10).await; } - loop { - Timer::after_secs(5).await; - } + stall().await } diff --git a/lib/.cargo/config.toml b/lib/.cargo/config.toml new file mode 100644 index 0000000..b10f29d --- /dev/null +++ b/lib/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "thumbv6m-none-eabi" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 9370901..7f3bff8 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -6,12 +6,10 @@ description = "Keyboard firmware" edition = "2021" [dependencies] -tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } +#tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } cortex-m = "0.7.6" cortex-m-rt = "0.7" embedded-hal = "0.2.5" -usb-device = "0.2.9" -usbd-hid = "0.6.1" static_cell = "1.0.0" embedded-io-async = "*" futures = { version = "0.3", default-features = false, features = ["async-await"] } @@ -19,9 +17,6 @@ embassy-executor = { version = "0.5.0", features = ["nightly", "nightly", "execu embassy-sync = "0.5.0" embassy-time = "0.3.0" embassy-futures = "0.1.1" -embassy-usb = { version = "0.1.0", features = ["usbd-hid"] } -embassy-usb-logger = "0.1.0" -embassy-usb-driver = "0.1.0" log = "0.4.17" pio = "0.2.1" pio-proc = "0.2.1" @@ -32,13 +27,15 @@ fixed = "1.23.1" rtt-target = "0.4.0" heapless = "0.7.16" once_cell = { version = "1.17.1", default-features = false } -atomic-polyfill = "1.0.2" critical-section = "1.1.1" crc-any = "2.4.3" serde = { version = "1.0.163", default-features = false, features = ["derive"] } bytemuck = { version = "1.13.1", features = ["derive"] } libm = "0.2.8" glam = { version = "0.25.0", default-features = false, features = ["libm"] } +msgpck = { version = "0.2.8", features = ["alloc"] } +#atomic-polyfill = "1.0.2" +portable-atomic = { version = "1.6.0", default-features = false } [target.'cfg(target_arch = "x86_64")'.dependencies] embassy-executor = { version = "0.5.0", features = ["arch-std"] } @@ -48,12 +45,18 @@ simple_logger = "4" [target.thumbv6m-none-eabi.dependencies] embassy-rp = { version = "0.1.0", features = ["time-driver", "critical-section-impl"] } embassy-executor = { version = "0.5.0", features = ["arch-cortex-m"] } +embassy-usb = { version = "0.1.0", features = ["usbd-hid"] } +embassy-usb-logger = "0.1.0" +embassy-usb-driver = "0.1.0" +usb-device = "0.2.9" +usbd-hid = "0.6.1" [build-dependencies] -tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } +#tgnt = { git = "https://git.nubo.sh/hulthe/tgnt.git", default-features = false } ron = "0.8.0" postcard = { version = "1", features = ["use-std"] } [features] +std = [] default = ["n-key-rollover"] n-key-rollover=[] diff --git a/lib/src/atomics.rs b/lib/src/atomics.rs index 8d368ac..5be308a 100644 --- a/lib/src/atomics.rs +++ b/lib/src/atomics.rs @@ -1,4 +1,4 @@ -use atomic_polyfill::{AtomicU32, Ordering}; +use portable_atomic::{AtomicU32, Ordering}; pub struct AtomicCoord { inner: AtomicU32, diff --git a/lib/src/button.rs b/lib/src/button.rs new file mode 100644 index 0000000..71a7568 --- /dev/null +++ b/lib/src/button.rs @@ -0,0 +1,107 @@ +use core::fmt::{self, Debug, Display}; +use msgpck::{MsgPack, MsgUnpack}; +use serde::{Deserialize, Serialize}; + +use crate::keys::Key; + +#[repr(u8)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack)] +pub enum Modifier { + LCtrl = 0x01, + LShift = 0x02, + LAlt = 0x04, + LMod = 0x08, + RCtrl = 0x10, + RShift = 0x20, + RAlt = 0x40, + RMod = 0x80, +} + +impl From for u8 { + fn from(modifier: Modifier) -> Self { + modifier as u8 + } +} + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack)] +#[non_exhaustive] +pub enum Button { + Mod(Modifier), + Key(Key), + ModTap(Key, Modifier), + Compose2(CompShift, Key, CompShift, Key), + Compose3(CompShift, Key, CompShift, Key, CompShift, Key), + Layer(LayerShift, LayerDir, u16), + None, +} + +/// Whether a key should be shift modified as part of a compose chain. +#[derive( + Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack, +)] +pub enum CompShift { + /// Do not shift the key. + #[default] + Lower, + + /// Shift the key. + Upper, + + /// Shift the key if shift is being held down. + Variable, +} + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack)] +pub enum LayerDir { + Left, + Right, + Up, + Down, +} + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack)] +pub enum LayerShift { + Move, + Peek, +} + +impl Display for Button { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let cs = |cs: &CompShift| match cs { + CompShift::Lower => "", + CompShift::Upper => "⇧", + CompShift::Variable => "⇧?", + }; + + match self { + Button::Mod(modifier) => Debug::fmt(&modifier, f), + Button::Key(key) => write!(f, "{key:?}"), + Button::ModTap(key, modifier) => write!(f, "{key:?}/{modifier}"), + Button::Compose2(cs1, k1, cs2, k2) => { + write!(f, "⎄ {}{k1:?} {}{k2:?}", cs(cs1), cs(cs2)) + } + Button::Compose3(cs1, k1, cs2, k2, cs3, k3) => { + write!(f, "⎄ {}{k1:?} {}{k2:?} {}{k3:?}", cs(cs1), cs(cs2), cs(cs3)) + } + Button::Layer(..) => write!(f, "Lr"), + Button::None => write!(f, "Ø"), + } + } +} + +impl Display for Modifier { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let s = match self { + Modifier::LCtrl => "⎈", + Modifier::LShift => "⇧", + Modifier::LAlt => "⎇", + Modifier::LMod => "◆", + Modifier::RCtrl => "⎈", + Modifier::RShift => "⇧", + Modifier::RAlt => "⎇", + Modifier::RMod => "◆", + }; + + write!(f, "{s}") + } +} diff --git a/lib/src/event.rs b/lib/src/event.rs index b755b03..6cf98eb 100644 --- a/lib/src/event.rs +++ b/lib/src/event.rs @@ -1,7 +1,6 @@ +use crate::{button::Button, keys::Key}; use core::time::Duration; - use serde::{Deserialize, Serialize}; -use tgnt::{button::Button, keys::Key}; pub mod switch { use super::*; @@ -35,9 +34,8 @@ pub mod switch { } pub mod button { - use tgnt::button::Modifier; - use super::*; + use crate::button::Modifier; /// A usb keyboard button was pressed or released. /// diff --git a/lib/src/keyboard.rs b/lib/src/keyboard.rs index c8e9f89..155db58 100644 --- a/lib/src/keyboard.rs +++ b/lib/src/keyboard.rs @@ -2,7 +2,7 @@ mod lights; use core::sync::atomic::Ordering; -use alloc::{boxed::Box, vec::Vec}; +use alloc::vec::Vec; use embassy_executor::Spawner; use embassy_rp::{ gpio::{AnyPin, Input, Pin, Pull}, @@ -12,19 +12,22 @@ use embassy_sync::pubsub::{ImmediatePublisher, PubSubChannel, Subscriber}; use embassy_time::{Duration, Instant, Timer}; use log::{debug, error, info, warn}; use static_cell::StaticCell; -use tgnt::{ - button::{Button, LayerDir, LayerShift}, - layer::Layer, -}; use crate::{ atomics::AtomicCoord, + button::{Button, LayerDir, LayerShift}, event::{ switch::{Event, EventKind}, Half, }, + layer::{Layer, Layers}, lights::Lights, - util::CS, + serial_proto::{ + borrowed::DeviceMsg, + owned::{ChangeLayer, SwitchPress, SwitchRelease}, + }, + usb::serial::serial_send, + util::{SwapCell, SwapCellRead, CS}, ws2812::Ws2812, }; @@ -45,7 +48,8 @@ struct State { half: Half, current_layer: AtomicCoord, layer_cols: usize, - layers: &'static [Vec], + layer_rows: usize, + layers: SwapCellRead, /// Array of LED indices of each switch led_map: [usize; SWITCH_COUNT], lights: Lights, @@ -89,17 +93,7 @@ impl KeyboardConfig { self.layers.len() ); - static STATE: StaticCell = StaticCell::new(); - let state = STATE.init_with(|| State { - half: self.half, - current_layer: AtomicCoord::new(), - layer_cols: self.layers.iter().map(|row| row.len()).max().unwrap_or(0), - layers: Box::leak(self.layers.into_boxed_slice()), - lights: Lights::new(self.led_driver), - led_map: self.led_map, - }); - - for (y, row) in state.layers.iter().enumerate() { + for (y, row) in self.layers.iter().enumerate() { for (x, layer) in row.iter().enumerate() { if layer.buttons.len() != SWITCH_COUNT { warn!( @@ -110,6 +104,24 @@ impl KeyboardConfig { } } + let layer_cols = self.layers.iter().map(|row| row.len()).max().unwrap_or(0); + let layer_rows = self.layers.len(); + + static LAYERS: StaticCell> = StaticCell::new(); + let layers = LAYERS.init_with(|| SwapCell::new(self.layers)); + let (layers_read, layers_write) = layers.split(); + + static STATE: StaticCell = StaticCell::new(); + let state = STATE.init_with(|| State { + half: self.half, + current_layer: AtomicCoord::new(), + layer_cols, + layer_rows, + layers: layers_read, + lights: Lights::new(self.led_driver), + led_map: self.led_map, + }); + for (i, pin) in self.pins.into_iter().enumerate() { if spawner.spawn(switch_task(i, pin, state)).is_err() { error!("failed to spawn switch task, pool_size mismatch?"); @@ -200,8 +212,8 @@ async fn switch_task(switch_num: usize, pin: AnyPin, state: &'static State) -> ! // get current layer let (x, y) = state.current_layer.load(Ordering::Relaxed); - let Some(Layer { buttons }) = state - .layers + let layers = state.layers.read(); + let Some(Layer { buttons }) = layers .get(usize::from(y)) .and_then(|row| row.get(usize::from(x))) else { @@ -210,14 +222,18 @@ async fn switch_task(switch_num: usize, pin: AnyPin, state: &'static State) -> ! continue; }; + let button = buttons.get(switch_num).cloned(); + drop(layers); + // and current button - let Some(button) = buttons.get(switch_num) else { + let Some(button) = button else { warn!("no button defined for switch {switch_num}"); pin.wait_for_high().await; continue; }; debug!("switch {switch_num} button {button:?} pressed"); + serial_send(&DeviceMsg::SwitchPress(SwitchPress(switch_num as u16))); let ev = |kind| Event { source: state.half, @@ -234,6 +250,7 @@ async fn switch_task(switch_num: usize, pin: AnyPin, state: &'static State) -> ! let released_after = pressed_at.elapsed(); debug!("switch {switch_num} button {button:?} released"); + serial_send(&DeviceMsg::SwitchRelease(SwitchRelease(switch_num as u16))); events.publish_immediate(ev(EventKind::Release { button: button.clone(), @@ -247,7 +264,7 @@ async fn switch_task(switch_num: usize, pin: AnyPin, state: &'static State) -> ! #[embassy_executor::task] async fn layer_switch_task(mut events: KbEvents, state: &'static State) { let col_count = state.layer_cols as u16; - let row_count = state.layers.len() as u16; + let row_count = state.layer_rows as u16; let Some(last_row) = row_count.checked_sub(1) else { error!("no layers specified"); return; @@ -282,6 +299,7 @@ async fn layer_switch_task(mut events: KbEvents, state: &'static State) { }; state.current_layer.store(nx, ny, Ordering::Relaxed); + serial_send(&DeviceMsg::ChangeLayer(ChangeLayer { x: nx, y: ny })); debug!("switched to layer ({nx}, {ny})"); } } @@ -289,7 +307,7 @@ async fn layer_switch_task(mut events: KbEvents, state: &'static State) { /// Random functions for testing #[allow(dead_code)] pub mod test { - use tgnt::{button::Button, keys::Key}; + use crate::{button::Button, keys::Key}; pub fn letter_to_key(c: char) -> Button { if !c.is_ascii() { diff --git a/lib/src/keyboard/lights.rs b/lib/src/keyboard/lights.rs index 65f1dde..c7abe8f 100644 --- a/lib/src/keyboard/lights.rs +++ b/lib/src/keyboard/lights.rs @@ -2,9 +2,9 @@ use core::future::pending; use embassy_time::{Duration, Instant, Timer}; use futures::{select_biased, FutureExt}; -use tgnt::button::Button; use crate::{ + button::Button, lights::shaders::{PowerOffAnim, PowerOnAnim, Shader, Shaders}, rgb::Rgb, usb::{UsbEvent, USB_EVENTS}, diff --git a/lib/src/keypress_handler.rs b/lib/src/keypress_handler.rs index eb3e25c..3eb6fdd 100644 --- a/lib/src/keypress_handler.rs +++ b/lib/src/keypress_handler.rs @@ -1,13 +1,15 @@ use core::future::pending; +use crate::{ + button::Button, + event::{button, switch, Half}, + keys::Key, +}; use embassy_sync::pubsub::{publisher::Pub, subscriber::Sub, PubSubBehavior, WaitResult}; use embassy_time::{Duration, Instant, Timer}; use futures::FutureExt; use heapless::Deque; use log::{debug, error}; -use tgnt::{button::Button, keys::Key}; - -use crate::event::{button, switch, Half}; /// The time a ModTap button takes to resolve as a Mod while being held down. const MOD_TAP_TIME: Duration = Duration::from_millis(150); diff --git a/lib/src/keys.rs b/lib/src/keys.rs new file mode 100644 index 0000000..048dcaf --- /dev/null +++ b/lib/src/keys.rs @@ -0,0 +1,269 @@ +use msgpck::{MsgPack, MsgUnpack}; +use serde::{Deserialize, Serialize}; + +#[repr(u8)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, MsgPack, MsgUnpack)] +#[non_exhaustive] +// https://usb.org/sites/default/files/hut1_3_0.pdf +pub enum Key { + A = 0x04, + B = 0x05, + C = 0x06, + D = 0x07, + E = 0x08, + F = 0x09, + G = 0x0A, + H = 0x0B, + I = 0x0C, + J = 0x0D, + K = 0x0E, + L = 0x0F, + M = 0x10, + N = 0x11, + O = 0x12, + P = 0x13, + Q = 0x14, + R = 0x15, + S = 0x16, + T = 0x17, + U = 0x18, + V = 0x19, + W = 0x1A, + X = 0x1B, + Y = 0x1C, + Z = 0x1D, + + /// Keyboard 1 and ! + D1 = 0x1E, + /// Keyboard 2 and @ + D2 = 0x1F, + /// Keyboard 3 and # + D3 = 0x20, + /// Keyboard 4 and $ + D4 = 0x21, + /// Keyboard 5 and % + D5 = 0x22, + /// Keyboard 6 and ∧ + D6 = 0x23, + /// Keyboard 7 and & + D7 = 0x24, + /// Keyboard 8 and * + D8 = 0x25, + /// Keyboard 9 and ( + D9 = 0x26, + /// Keyboard 0 and ) + D0 = 0x27, + + Return = 0x28, + Escape = 0x29, + /// Keyboard DELETE (Backspace) + Backspace = 0x2A, + Tab = 0x2B, + + /// Keyboard Spacebar + Space = 0x2C, + /// Keyboard - and (underscore) + Dash = 0x2D, + /// Keyboard = and +2 + Equal = 0x2E, + /// Keyboard [ and { + LBracket = 0x2F, + /// Keyboard ] and } + RBracket = 0x30, + /// Keyboard \and | + BackslashPipe = 0x31, + /// Keyboard Non-US # and ̃ + Pound = 0x32, + /// Keyboard ; and : + Colon = 0x33, + /// Keyboard ‘ and “ + Apostrophe = 0x34, + /// Keyboard Grave Accent and Tilde + Accent = 0x35, + /// Keyboard , and < + Comma = 0x36, + /// Keyboard . and > + Period = 0x37, + /// Keyboard / and ? + Slash = 0x38, + CapsLock = 0x39, + + F1 = 0x3A, + F2 = 0x3B, + F3 = 0x3C, + F4 = 0x3D, + F5 = 0x3E, + F6 = 0x3F, + F7 = 0x40, + F8 = 0x41, + F9 = 0x42, + F10 = 0x43, + F11 = 0x44, + F12 = 0x45, + + /// Keyboard PrintScreen + PrintScreen = 0x46, + /// Keyboard Scroll Lock + ScrollLock = 0x47, + /// Keyboard Pause + Pause = 0x48, + /// Keyboard Insert + Insert = 0x49, + /// Keyboard Home + Home = 0x4A, + /// Keyboard PageUp + PageUp = 0x4B, + /// Keyboard Delete Forward + Delete = 0x4C, + /// KeyboardEnd7 + End = 0x4D, + /// Keyboard PageDown7 + PageDown7 = 0x4E, + /// Keyboard RightArrow7 + RightArrow7 = 0x4F, + /// Keyboard LeftArrow7 + LeftArrow7 = 0x50, + /// Keyboard DownArrow7 + DownArrow7 = 0x51, + /// Keyboard UpArrow7 + UpArrow7 = 0x52, + /// Keypad Num Lock and Clear6 + KeypadNumLock = 0x53, + /// Keypad / + KeypadSlash = 0x54, + /// Keypad * + KeypadAsterisk = 0x55, + /// Keypad - + KeypadMinus = 0x56, + /// Keypad + + KeypadPlus = 0x57, + /// KeypadEnter + KeypadEnter = 0x58, + /// Keypad 1 and End + Keypad1 = 0x59, + /// Keypad 2 and Down Arrow + Keypad2 = 0x5A, + /// Keypad 3 and PageDn + Keypad3 = 0x5B, + /// Keypad 4 and Left Arrow + Keypad4 = 0x5C, + /// Keypad 5 + Keypad5 = 0x5D, + /// Keypad 6 and Right Arrow + Keypad6 = 0x5E, + /// Keypad 7 and Home + Keypad7 = 0x5F, + /// Keypad 8 and Up Arrow + Keypad8 = 0x60, + /// Keypad 9 and PageUp + Keypad9 = 0x61, + /// Keypad 0 and Insert + Keypad0 = 0x62, + + /// Keypad . and Delete + KbPeriod = 0x63, + /// Keyboard Non-US \ and | + NonUsBackslashPipe = 0x64, + Application = 0x65, + Power = 0x66, + /// Keypad = + KpEqual = 0x67, + F13 = 0x68, + F14 = 0x69, + F15 = 0x6A, + F16 = 0x6B, + F17 = 0x6C, + F18 = 0x6D, + F19 = 0x6E, + F20 = 0x6F, + F21 = 0x70, + F22 = 0x71, + F23 = 0x72, + F24 = 0x73, + Execute = 0x74, + Help = 0x75, + Menu = 0x76, + Select = 0x77, + Stop = 0x78, + Again = 0x79, + Undo = 0x7A, + Cut = 0x7B, + Copy = 0x7C, + Paste = 0x7D, + Find = 0x7E, + Mute = 0x7F, + VolumeUp = 0x80, + VolumeDown = 0x81, + /// Keyboard Locking Caps Lock + LockingCapsLock = 0x82, + /// Keyboard Locking Num Lock + LockingNumLock = 0x83, + /// Keyboard Locking Scroll Lock + LockingScrollLock = 0x84, + /// Keypad , + KpComma = 0x85, + /// Keypad Equal Sign + KpEqualSIgn = 0x86, + + International1 = 0x87, + International2 = 0x88, + International3 = 0x89, + International4 = 0x8A, + International5 = 0x8B, + International6 = 0x8C, + International7 = 0x8D, + International8 = 0x8E, + International9 = 0x8F, + Lang1 = 0x90, + Lang2 = 0x91, + Lang3 = 0x92, + Lang4 = 0x93, + Lang5 = 0x94, + Lang6 = 0x95, + Lang7 = 0x96, + Lang8 = 0x97, + Lang9 = 0x98, + /// Keyboard Alternative Erase + AltErase = 0x99, + /// Keyboard SysReq/Attention + SysReq = 0x9A, + Cancel = 0x9B, + Clear = 0x9C, + Prior = 0x9D, + /// Keyboard Return + Return2 = 0x9E, + /// Keyboard Separator + Separator = 0x9F, + + /// Keyboard Out + Out = 0xA0, + /// Keyboard Oper + Oper = 0xA1, + /// Keyboard Clear/Again + ClearAgain = 0xA2, + /// Keyboard CrSel/Props + CrSel = 0xA3, + /// Keyboard ExSel + ExSel = 0xA4, + // + // NOTE: the usb keyboard/keypad page allegedly har characters in the rage above A4, + // like the ones below, but they don't seem to work + ///// Keypad { + //LCurly = 0xB8, + ///// Keypad } + //RCurly = 0xB9, + // + // NOTE: Not sure if these are required + //LCtrl = 0xE0, + //LShift = 0xE1, + //LAlt = 0xE2, + //RCtrl = 0xE4, + //RShift = 0xE5, + //RAlt = 0xE6, +} + +impl From for u8 { + fn from(key: Key) -> u8 { + key as u8 + } +} diff --git a/lib/src/layer.rs b/lib/src/layer.rs new file mode 100644 index 0000000..f1d0624 --- /dev/null +++ b/lib/src/layer.rs @@ -0,0 +1,12 @@ +use alloc::vec::Vec; +use msgpck::{MsgPack, MsgUnpack}; +use serde::{Deserialize, Serialize}; + +use crate::button::Button; + +#[derive(Default, Debug, Serialize, Deserialize, Clone, MsgPack, MsgUnpack)] +pub struct Layer { + pub buttons: Vec