diff --git a/.cargo/config.toml b/.cargo/config.toml index 128f924..9e92fd9 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,5 @@ [build] rustflags = ["-Clink-arg=-fuse-ld=lld"] + +[resolver] +incompatible-rust-versions = "fallback" diff --git a/.gitignore b/.gitignore index 54b2c93..6a1edeb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,6 @@ debug/ target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..b776432 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2360 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[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 = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cc" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "color-eyre" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + +[[package]] +name = "compact_str" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags 2.13.2", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csscolorparser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +dependencies = [ + "lab", + "phf", +] + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.6", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "deltae" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[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 = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "either" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + +[[package]] +name = "eyre" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08309dbcc659c5549a24ddb9b27027640641b282ef5768267c7e675558986a3" +dependencies = [ + "autocfg", + "indenter", + "once_cell", +] + +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +dependencies = [ + "bit-set", + "regex", +] + +[[package]] +name = "filedescriptor" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" +dependencies = [ + "libc", + "thiserror 1.0.69", + "winapi", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "finl_unicode" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bb028c8b4148c9ee0cca68fcd9add6044e81d3619f48577ddf13a263d047a2" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flexi_logger" +version = "0.29.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a5a6882b2e137c4f2664562995865084eb5a00611fba30c582ef10354c4ad8" +dependencies = [ + "chrono", + "log", + "nu-ansi-term", + "regex", + "thiserror 2.0.21", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "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 = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + +[[package]] +name = "instability" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3b5acc1e2fd9375041a388da33d1eb8aed5f7a8c0dd3543e3ea2805adfbe20" +dependencies = [ + "darling", + "indoc", + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "io-kit-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" +dependencies = [ + "core-foundation-sys", + "mach2", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "kasuari" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +dependencies = [ + "hashbrown 0.16.1", + "portable-atomic", + "thiserror 2.0.21", +] + +[[package]] +name = "lab" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libudev" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0" +dependencies = [ + "libc", + "libudev-sys", +] + +[[package]] +name = "libudev-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "line-clipping" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "lru" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5" +dependencies = [ + "hashbrown 0.17.1", +] + +[[package]] +name = "mac_address" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b367b50a9be9a5d3b5718c1da74e5d6b9c17647f89752ee2562a470cc3c4eb1a" +dependencies = [ + "nix 0.30.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmem" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64a92489e2744ce060c349162be1c5f33c6969234104dbd99ddb5feb08b8c15" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owo-colors" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c45bb4a6ae1280ec0803b1ef9d3455eb50f01efbbe1447ab020f1d54fba9d8" + +[[package]] +name = "packed_struct" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36b29691432cc9eff8b282278473b63df73bea49bc3ec5e67f31a3ae9c3ec190" +dependencies = [ + "bitvec", + "packed_struct_codegen", + "serde", +] + +[[package]] +name = "packed_struct_codegen" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cd6706dfe50d53e0f6aa09e12c034c44faacd23e966ae5a209e8bdb8f179f98" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "palette" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64" +dependencies = [ + "approx", + "libm", + "palette_derive", + "palette_math", +] + +[[package]] +name = "palette_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be" +dependencies = [ + "by_address", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "palette_math" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12" +dependencies = [ + "libm", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pest" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d3aca230fad2e6f6317ca0a72724338c4960cb97168a85cdee66df4a9a21a8" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284b60557f2c4a2e72ad3f2d34d42685a2fa4a6a61d0d2a10c0ae2a5e916c2cf" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9d1f08a115309ee99268cf85e5228e0e56aa9caf8841ec12866b6be07c3109" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pest_meta" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed93ba1a9ffcca32130a5188701c81c0c49cf00d4b7c5007d5148951d743adcb" +dependencies = [ + "pest", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "ratatui" +version = "0.30.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3274ba0a2c5e1bcad2a2005d20f4dc59dad26b2eb0940fb094500dba4099d57d" +dependencies = [ + "instability", + "ratatui-core", + "ratatui-crossterm", + "ratatui-macros", + "ratatui-termina", + "ratatui-termwiz", + "ratatui-widgets", + "serde", +] + +[[package]] +name = "ratatui-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c" +dependencies = [ + "bitflags 2.13.2", + "compact_str", + "critical-section", + "hashbrown 0.17.1", + "itertools", + "kasuari", + "lru", + "palette", + "serde", + "strum", + "thiserror 2.0.21", + "unicode-segmentation", + "unicode-truncate", + "unicode-width", +] + +[[package]] +name = "ratatui-crossterm" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0" +dependencies = [ + "cfg-if", + "crossterm", + "instability", + "ratatui-core", +] + +[[package]] +name = "ratatui-macros" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7dc68daa7498a43e4d68e0eb078427e10c38fbcfbb1e42d955f1fa2140d814" +dependencies = [ + "ratatui-core", + "ratatui-widgets", +] + +[[package]] +name = "ratatui-termina" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bf912d9e66f057a759d92e386a280ea886b352ab757d6ac4d653c7ed2c43c2" +dependencies = [ + "instability", + "ratatui-core", + "termina", +] + +[[package]] +name = "ratatui-termwiz" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf03e0380b7744054d6cb74224fe3adf062a029754933f575ca1e3b4c2ce977" +dependencies = [ + "ratatui-core", + "termwiz", +] + +[[package]] +name = "ratatui-widgets" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1" +dependencies = [ + "bitflags 2.13.2", + "hashbrown 0.17.1", + "indoc", + "instability", + "itertools", + "line-clipping", + "ratatui-core", + "serde", + "strum", + "time", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "rustc-demangle" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serialport" +version = "4.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba5f8f29aa20853c4e3e85a33ec580eb66be1f057142e77a333834a318bacf2" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "core-foundation", + "core-foundation-sys", + "io-kit-sys", + "libudev", + "mach2", + "nix 0.26.4", + "scopeguard", + "unescaper", + "windows-sys 0.52.0", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "termina" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9048a889effe34a5cddee0af7f53285198b16dca3be510858d38dfdb3e62a04e" +dependencies = [ + "bitflags 2.13.2", + "parking_lot", + "rustix", + "signal-hook", + "windows-sys 0.61.2", +] + +[[package]] +name = "terminfo" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" +dependencies = [ + "fnv", + "nom", + "phf", + "phf_codegen", +] + +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + +[[package]] +name = "termwiz" +version = "0.23.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" +dependencies = [ + "anyhow", + "base64", + "bitflags 2.13.2", + "fancy-regex", + "filedescriptor", + "finl_unicode", + "fixedbitset", + "hex", + "lazy_static", + "libc", + "log", + "memmem", + "nix 0.29.0", + "num-derive", + "num-traits", + "ordered-float", + "pest", + "pest_derive", + "phf", + "sha2", + "signal-hook", + "siphasher", + "terminfo", + "termios", + "thiserror 1.0.69", + "ucd-trie", + "unicode-segmentation", + "vtparse", + "wezterm-bidi", + "wezterm-blob-leases", + "wezterm-color-types", + "wezterm-dynamic", + "wezterm-input-types", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "tiny-wb" +version = "0.1.1" +dependencies = [ + "chrono", + "color-eyre", + "flexi_logger", + "log", + "memchr", + "packed_struct", + "ratatui", + "serde", + "serialport", + "strum", + "thiserror 2.0.21", + "toml 0.8.23", + "winresource", +] + +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-error" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unescaper" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7285e83a80ce76f5e7bce79fa41f68d78ba62d1003cf27bf748ab24413808cf4" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "unicode-ident" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-truncate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" +dependencies = [ + "itertools", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" +dependencies = [ + "atomic", + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vtparse" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9b2acfb050df409c972a37d3b8e08cdea3bddb0c09db9d53137e504cfabed0" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.6", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wezterm-bidi" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0a6e355560527dd2d1cf7890652f4f09bb3433b6aadade4c9b5ed76de5f3ec" +dependencies = [ + "log", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-blob-leases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" +dependencies = [ + "getrandom 0.3.4", + "mac_address", + "sha2", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "wezterm-color-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296" +dependencies = [ + "csscolorparser", + "deltae", + "lazy_static", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-dynamic" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2ab60e120fd6eaa68d9567f3226e876684639d22a4219b313ff69ec0ccd5ac" +dependencies = [ + "log", + "ordered-float", + "strsim", + "thiserror 1.0.69", + "wezterm-dynamic-derive", +] + +[[package]] +name = "wezterm-dynamic-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c0cf2d539c645b448eaffec9ec494b8b19bd5077d9e58cb1ae7efece8d575b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "wezterm-input-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e" +dependencies = [ + "bitflags 1.3.2", + "euclid", + "lazy_static", + "serde", + "wezterm-dynamic", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winresource" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e2aaaf8cfa92078c0c0375423d631f82f2f57979c2884fdd5f604a11e45329" +dependencies = [ + "toml 0.7.8", + "version_check", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] diff --git a/Cargo.toml b/Cargo.toml index f52a8b7..d9d8d86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,26 +2,24 @@ name = "tiny-wb" version = "0.1.1" edition = "2021" +rust-version = "1.88.0" +license = "MIT" [dependencies] chrono = "0.4.38" -clap = { version = "4.5.17", features = ["derive"] } color-eyre = "0.6.3" flexi_logger = "0.29.0" # human-panic = "2.0.1" log = { version = "0.4.22", features = ["release_max_level_error"] } # log = { version = "0.4.22"} memchr = "2.7.4" -once_cell = "1.19.0" packed_struct = "0.10.1" -ratatui = "0.28.1" -ratatui-splash-screen = "0.1.4" +ratatui = "=0.30.2" serde = { version = "1.0.210", features = ["derive"] } serialport = "4.5.0" -strum = { version = "0.26.3", features = ["derive"] } -thiserror = "1.0.63" +strum = { version = "0.28.0", features = ["derive"] } +thiserror = "2.0.21" toml = "0.8.19" -tui-textarea = "0.6.1" [profile.release] opt-level = "z" @@ -53,4 +51,4 @@ incremental = false panic = "abort" [build-dependencies] -winresource = "0.1.17" +winresource = "=0.1.17" diff --git a/Jenkinsfile b/Jenkinsfile index 53895a2..0277470 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,13 @@ pipeline { RUST_BACKTRACE = '1' + // LTS-like compatibility floor verified by the dedicated MSRV stage. + MSRV = '1.88.0' + + // Supply-chain tools are pinned for reproducible policy behavior. + CARGO_AUDIT_VERSION = '0.22.2' + CARGO_DENY_VERSION = '0.20.2' + // Keep CI build products separate. CARGO_TARGET_DIR = "${WORKSPACE}/target-ci" @@ -51,8 +58,25 @@ pipeline { --component rustfmt \ --component clippy + rustup toolchain install "${MSRV}" \ + --profile minimal + rustup default stable + INSTALLED_AUDIT_VERSION="$(cargo audit --version 2>/dev/null | awk '{print $NF}' || true)" + if [ "${INSTALLED_AUDIT_VERSION}" != "${CARGO_AUDIT_VERSION}" ]; then + cargo install --locked \ + --version "${CARGO_AUDIT_VERSION}" \ + cargo-audit + fi + + INSTALLED_DENY_VERSION="$(cargo deny --version 2>/dev/null | awk '{print $NF}' || true)" + if [ "${INSTALLED_DENY_VERSION}" != "${CARGO_DENY_VERSION}" ]; then + cargo install --locked \ + --version "${CARGO_DENY_VERSION}" \ + cargo-deny + fi + # --------------------------------------------------------- # LLD # --------------------------------------------------------- @@ -91,6 +115,18 @@ pipeline { echo "Clippy:" cargo clippy --version + echo + echo "MSRV:" + rustc +"${MSRV}" --version + + echo + echo "cargo-audit:" + cargo audit --version + + echo + echo "cargo-deny:" + cargo deny --version + echo echo "Compiler:" cc --version || true @@ -114,6 +150,45 @@ pipeline { } } + stage('Cargo Audit') { + steps { + sh ''' + set -eu + + echo "Auditing the locked dependency graph with RustSec..." + + cargo audit --deny warnings + ''' + } + } + + stage('Cargo Deny') { + steps { + sh ''' + set -eu + + echo "Checking dependency licenses, sources and policy..." + + cargo deny check + ''' + } + } + + stage('MSRV') { + steps { + sh ''' + set -eu + + echo "Checking tiny-wb with Rust ${MSRV}..." + + cargo +"${MSRV}" check \ + --locked \ + --all-targets \ + --all-features + ''' + } + } + stage('Format') { steps { sh ''' @@ -137,6 +212,7 @@ pipeline { echo "Checking tiny-wb..." cargo check \ + --locked \ --all-targets \ --all-features ''' @@ -151,6 +227,7 @@ pipeline { echo "Running tests..." cargo test \ + --locked \ --all-targets \ --all-features ''' @@ -165,8 +242,11 @@ pipeline { echo "Running Clippy..." cargo clippy \ + --locked \ --all-targets \ - --all-features + --all-features \ + -- \ + -D warnings ''' } } @@ -179,6 +259,7 @@ pipeline { echo "Building tiny-wb release..." cargo build \ + --locked \ --release \ --all-features @@ -259,7 +340,7 @@ pipeline { conclusion: 'SUCCESS', name: 'Rust CI', summary: 'tiny-wb passed CI.', - text: 'Formatting, compilation checks, tests, Clippy and the release build completed successfully. The release runtime smoke test is currently diagnostic only.', + text: 'RustSec audit, dependency policy, MSRV, formatting, compilation checks, tests, Clippy and the release build completed successfully. The release runtime smoke test is currently diagnostic only.', title: 'Build Successful' ) @@ -271,7 +352,7 @@ pipeline { conclusion: 'FAILURE', name: 'Rust CI', summary: 'tiny-wb failed CI.', - text: 'Formatting, compilation, tests, Clippy, or the release build failed. Check the Jenkins log.', + text: 'RustSec audit, dependency policy, MSRV, formatting, compilation, tests, Clippy, or the release build failed. Check the Jenkins log.', title: 'Build Failed' ) @@ -290,4 +371,4 @@ pipeline { echo '⚠️ tiny-wb CI is unstable.' } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index b3684b7..2b3f702 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,95 @@ # tiny-wb -Simple tinySA to Workbench converter +`tiny-wb` is an interactive terminal application that acquires a frequency +sweep from a tinySA over its USB serial console and exports the result as CSV. +It is written in Rust and uses Ratatui for the interface. -# First window -> Selection +The current implementation is primarily shaped around the original **tinySA +Basic** command set and its 0–960 MHz low/high input ranges. The tinySA Ultra +family uses much of the same console protocol, but model detection and the +Ultra frequency ranges are not implemented yet; see the compatibility notes +before connecting an Ultra or Ultra+. -Starts with the most likely com port selected (last used, then usual suspect, then port 0) -Enter selects it (in the validation sense) -Selects the first likely baudrate (same algo) -Enter selects it -Selects the validate text box +## Documentation -First selection should be enter, then with L/R U/D (or mouse?) you can change the params -(P) to select a port (B) to select a baudrate (Enter) to be put on the selection +- [Documentation index](docs/README.md) — where to start and source policy +- [Project architecture](docs/architecture.md) — components, state, data flow, + files, dependencies, and extension points +- [tinySA field guide](docs/tinysa-field-guide.md) — models, RF architecture, + specifications, safe operation, measurement practice, calibration, and + firmware +- [USB console and `scanraw` protocol](docs/usb-protocol.md) — framing, + commands, binary decoding, synchronization, and a worked example +- [tiny-wb compatibility and operations](docs/tiny-wb-operations.md) — current + behavior, setup, controls, files, troubleshooting, and known limitations +- [Security, dependency policy, and MSRV](docs/security-and-ci.md) — Rust 1.88 + compatibility floor, locked builds, RustSec, licenses, and CI gates +- [Upstream source catalogue](docs/sources.md) — authoritative links and what + each source is used for -# Second window -> Customisation +The documentation was checked against the official tinySA wiki and firmware +source on 2026-10-04. Instrument firmware evolves, so `help`, `version`, and +`info` on the connected unit remain the final authority for its command set. -Tab/L/R for navigation, Enter to change a parameter -Starts with selected and either (L/R/U/D) to be put on the fields +## Build and run -# Third window -> Result +Install Rust 1.88.0 or newer, connect and power on the instrument, then run: -Show a progress bar, then show a nice message with a prompt to ask where to save, then exits +```console +cargo run --release +``` -# References +On Linux the USB CDC device is commonly `/dev/ttyACM0`; on Windows it appears +as a COM port. The user running `tiny-wb` must have permission to open it. -* First line is discardable as it contains only a repead of sent command -* Read needs to stop on "ch>" 99, 104, 62 -* Need to send resume afterward -* Doc: https://tinysa.org/wiki/pmwiki.php?n=Main.USBInterface -* Working example: http://athome.kaashoek.com/tinySA/python/ -* Firmwares: All firmware files are located in http://athome.kaashoek.com/tinySA/DFU/ -* QT5 GUI:https://github.com/g4ixt/QtTinySA?tab=readme-ov-file -* TUI: Rattatui -* ProgressB: Indicatif -* Version: tinySA4: Ultra, tinySA_ Tiny -* Scan will start with 123 and end with 125 -* https://groups.io/g/tinysa -* https://github.com/Ho-Ro/tinySA/blob/main/sa_cmd.c -* NANOVNA: https://github.com/ttrftech/NanoVNA?tab=readme-ov-file +The interface uses arrow keys or Vim-style `h`, `j`, `k`, `l`. Left/right +selects a field, up/down changes its value, Enter advances, and `q` or Escape +quits. Scan frequencies shown in the UI are MHz. The selected settings are +stored in `config.toml`; scan results are written in the current directory as +`scan_YYYYMMDD HH_MM_SS.csv`. + +## Current scan flow + +At a high level, `tiny-wb`: + +1. opens the selected serial port; +2. identifies the instrument with `version` and `info`; +3. configures repeat count, raw-value zero offset, input mode, and sweep; +4. requests a binary `scanraw` acquisition; +5. decodes each level sample into dBm and writes `frequency_MHz,dBm`; +6. resumes the instrument sweep and plots the acquired points. + +For the exact command sequence and compatibility implications, read +[USB console and `scanraw` protocol](docs/usb-protocol.md) and +[tiny-wb compatibility and operations](docs/tiny-wb-operations.md). + +## Safety + +Do not connect an unknown RF source directly to a tinySA. Use external +attenuation for transmitters and a DC block where a DC component may be +present. The Ultra family has an absolute RF input limit of +6 dBm at 0 dB +internal attenuation; the Basic limit is +10 dBm. These are damage limits, +not recommended measurement levels. See the [safe-operation section](docs/tinysa-field-guide.md#safe-operation-read-before-connecting-a-signal). + +## Development + +The Jenkins pipeline checks formatting, compilation, tests, Clippy, and a +release build. Run the equivalent local checks with: + +```console +cargo fmt --all -- --check +cargo audit --deny warnings +cargo deny check +cargo +1.88.0 check --locked --all-targets --all-features +cargo check --locked --all-targets --all-features +cargo test --locked --all-targets --all-features +cargo clippy --locked --all-targets --all-features -- -D warnings +``` + +The application is currently a binary crate rather than a reusable library. +Protocol work is concentrated in `src/scan.rs`; UI state and rendering are in +`src/ui.rs`, `src/ui_struct.rs`, and `src/structs.rs`. + +## License + +See [LICENSE](LICENSE). diff --git a/build.rs b/build.rs index 14b46ac..5e96024 100644 --- a/build.rs +++ b/build.rs @@ -14,7 +14,7 @@ fn main() -> io::Result<()> { } let output = Command::new("git") - .args(&["rev-parse", "--short", "HEAD"]) + .args(["rev-parse", "--short", "HEAD"]) .output() .unwrap(); let git_hash = String::from_utf8(output.stdout).unwrap(); diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..eafa384 --- /dev/null +++ b/deny.toml @@ -0,0 +1,36 @@ +[graph] +all-features = true + +[advisories] +ignore = [] + +[licenses] +allow = [ + "Apache-2.0", + "MIT", + "MPL-2.0", + "Unicode-3.0", + "Zlib", +] +confidence-threshold = 0.8 +exceptions = [] +clarify = [] + +[bans] +multiple-versions = "warn" +wildcards = "deny" +allow = [] +deny = [] +skip = [] +skip-tree = [] + +[sources] +unknown-registry = "deny" +unknown-git = "deny" +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +allow-git = [] + +[sources.allow-org] +github = [] +gitlab = [] +bitbucket = [] diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..47c7b18 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,44 @@ +# tiny-wb technical documentation + +This directory is the local reference for the project and the instruments it +controls. It is deliberately split by concern so that maintainers normally do +not need to reread the upstream wiki before changing the code. + +## Reading order + +1. [Project architecture](architecture.md) explains what `tiny-wb` does and + how control and data move through the Rust application. +2. [tinySA field guide](tinysa-field-guide.md) identifies the hardware, + explains the RF signal paths, and covers safe and accurate use. +3. [USB console and `scanraw` protocol](usb-protocol.md) is the implementation + reference for serial commands and binary acquisition. +4. [tiny-wb compatibility and operations](tiny-wb-operations.md) maps those + facts onto the behavior, restrictions, and failure modes of this repository. +5. [Security, dependency policy, and MSRV](security-and-ci.md) documents the + reproducible-build and supply-chain gates. +6. [Upstream source catalogue](sources.md) records the primary references and + their scope. + +## Scope and authority + +There are three different kinds of statement in these documents: + +- **Instrument facts** come from the official tinySA wiki or the upstream + firmware source. +- **Application facts** come from the code in this repository. +- **Engineering conclusions** are called out as implications, risks, or + recommendations. + +The material was verified on **2026-10-04**. Specifications and console +commands can change with firmware and hardware revisions. When a connected +device disagrees with this documentation, record its `version`, `info`, and +`help` output and treat those results plus the matching firmware source as +authoritative. + +## Why this is not an mdBook yet + +The documentation is a small, navigable set of Markdown files with direct +cross-links. Adding mdBook configuration and a CI publication stage now would +introduce a new build dependency without improving navigation. If the guide +grows into many chapters, the files are already organized so that a future +`SUMMARY.md` can include them with little restructuring. diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..1ce11a6 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,196 @@ +# Project architecture + +## Purpose and boundary + +`tiny-wb` is a single-process desktop terminal application. Its job is narrow: +collect an amplitude-versus-frequency sweep from a tinySA through the USB +serial console, persist the sweep as CSV, and show the result in a terminal +chart. + +It is not currently a general tinySA controller, live spectrum display, +firmware updater, calibration utility, or Rust protocol library. It changes a +small amount of temporary instrument state during acquisition and restores +continuous sweeping with `resume`; it does not restore every preceding device +setting. + +## Runtime data flow + +```text +keyboard + | + v +Ratatui event loop (AppInfo) + | selected port, baud, MHz range, points, repeat + v +ConnectionInfo (shared Arc> state) + | + +---- UI thread: render progress, device info, errors, chart + | + `---- scan worker thread + | + v + serialport / USB CDC + | + v + tinySA shell ---- text responses ending in "ch>" + | + `------------ scanraw binary frame + | + v + parser -> Vec<(MHz, dBm)> + | + +-> timestamped CSV + `-> final Ratatui chart +``` + +The UI remains responsive because scanning runs in a worker thread. Clones of +`ConnectionInfo` share progress, status, returned data, messages, file name, +and error state through `Arc>` values. The selected connection and +scan parameters themselves are copied into the worker. + +## Source map + +| File | Responsibility | +| --- | --- | +| `src/main.rs` | Start file logging and error reporting, initialize/restore the terminal, enumerate serial ports, and run the application. | +| `src/ui.rs` | Construct defaults, drive the event/render loop, transition screens, spawn the scan worker, plot results, and map errors to user messages. | +| `src/ui_struct.rs` | Define UI state, selectable fields, baud-rate and port lists, numeric bounds, colors, and navigation helpers. | +| `src/structs.rs` | Define configuration persistence, shared connection state, status values, and application/protocol error types. | +| `src/scan.rs` | Open the serial port, issue shell commands, find prompts, request `scanraw`, parse binary samples, convert levels, and write CSV. | +| `build.rs` | Embed the Git short hash and, on Windows, compile the application icon resource. | +| `Jenkinsfile` | Run formatting, checks, tests, Clippy, release build, and a non-fatal interactive-binary smoke diagnostic. | + +## UI state machine + +`AppState` advances in one direction during a normal run: + +```text +InitialConfig -> FinalConfig -> Finished -> EndWindow -> exit + | | | + `---------------+-------------+-> Error -> exit +``` + +- `InitialConfig` selects a serial port and baud rate. +- `FinalConfig` selects start/stop MHz, sample count, and repeat count. +- Enter from `FinalConfig` writes `config.toml`, fills `ConnectionInfo`, and + spawns the worker. +- `Finished` is somewhat counter-intuitively the in-progress screen. It polls + shared status while the worker runs. +- `EndWindow` plots the collected samples and reports success. +- `Error` presents the mapped failure and exits on confirmation. + +Defaults are 240–960 MHz, 10,001 points, one measurement per frequency, and +115,200 baud. The UI permits 0–960 MHz in 10 MHz steps, 101–1,000,001 points in +100-point steps, and repeat values from 1–1,000. A valid `config.toml` overrides +the defaults. Frequencies are converted from UI MHz to protocol Hz only when +`ConnectionInfo` is filled. + +## Acquisition pipeline + +`scan_with_progress` performs these operations: + +1. Validate the requested range and choose Basic `low` or `high` input mode. +2. Open the selected port with a 3 s read timeout. +3. Drain stale input until the shell prompt is seen or reading times out. +4. Query `version`, `info`, `leveloffset`, `vbat`, `usart_cfg`, and `threads`. +5. Send `repeat N` and `zero 128`. +6. Query markers, pause the normal sweep, and set the input mode. +7. Set sweep start/stop, query the sweep, then run a 290-point textual `scan`. +8. Send `scanraw START STOP POINTS` without immediately consuming a text reply. +9. Read and parse its binary frame, update progress, and write CSV. +10. Send `resume`, set progress to 100%, and expose the samples to the UI. + +Step 7's textual `scan ... 290 101` does not contribute samples to the final +CSV; its response is read and discarded. It therefore needs a documented +reason or removal during a future protocol cleanup. + +## Protocol boundary + +Text commands are terminated with carriage return (`\r`). `send_cmd` sleeps, +then reads until it finds the ASCII prompt `ch>`, and sleeps again. This is a +timing-assisted, prompt-delimited request/response protocol. The application +does not currently: + +- parse command echo separately from command output; +- validate an explicit success status; +- retain bytes after a prompt found in the middle of a serial read; +- account for a prompt split across two read buffers; +- preserve partial results after a read timeout; +- negotiate capabilities from `version`, `info`, or `help`. + +The `scanraw` body is different: it is a binary `{...}` frame made of +three-byte sample records. See [USB console and `scanraw` protocol](usb-protocol.md). + +## Persistence and outputs + +`config.toml` is stored in the process working directory and contains: + +```toml +port = "/dev/ttyACM0" +baudrate = 115200 +start_frequency = 240 +stop_frequency = 960 +points = 10001 +repeat = 1 +``` + +Each acquisition immediately creates a timestamped CSV in the working +directory. It has no header. Column one is the application-computed frequency +in MHz and column two is level in dBm. Logs are produced by `flexi_logger` in +the working directory with its default file naming policy. + +## Important invariants and risks + +- A scan needs at least two points because host interpolation divides by + `points - 1`; the UI minimum of 101 enforces this, but the parser itself does + not. +- `read_port_with_progress` estimates `3 * points + 6` bytes. Progress is only + an estimate because command echo and prompt bytes are also present. +- The parser finds the first `{`, requires each subsequent full triple to start + with `x`, and stops on a triple whose first byte is `}`. End-frame validation + is currently commented out, so a truncated frame can be accepted. +- The firmware emits sample bytes little-endian even though one wiki sentence + labels them “MSB LSB.” The upstream C implementation and the Rust parser both + use low byte followed by high byte. +- Firmware computes `scanraw`'s step as `(stop - start) / points`, while the + host labels samples using `(stop - start) / (points - 1)`. The final host CSV + therefore labels its last point at `stop`, but current firmware measures its + last point one step below `stop`. This should be resolved in code, ideally by + testing against the target firmware version. +- `zero 128` deliberately asks firmware to encode the level around a 128 dB + offset and the host subtracts 128. Without that command, the documented + default offset is 128 for Basic and 174 for Ultra. +- Input-mode selection encodes Basic-only assumptions. Ultra has no `high` + input command, and the UI cannot request its ranges above 960 MHz. + +## Dependency roles + +- `ratatui` and `crossterm` (through Ratatui) provide terminal rendering and + input. +- `serialport` enumerates and opens the device. +- `packed_struct` decodes the three-byte sample representation. +- `memchr` locates `{` and the `ch>` prompt. +- `serde` and `toml` persist settings. +- `chrono` names scan files. +- `flexi_logger`, `log`, `color-eyre`, and `thiserror` cover diagnostics and + error propagation. +- `strum` derives iteration/counting for menu enums. + +The manifest intentionally contains only dependencies used by the current +binary. In particular, the parser uses `std::sync::OnceLock`; no external +`once_cell` dependency is needed. + +## Recommended evolution path + +The cleanest route to reliable multi-model support is to separate four layers: + +1. a byte-accurate transport that preserves unread bytes and uses deadlines; +2. a shell codec for echo, response, prompt, and binary frames; +3. a capability/model layer derived from `version`/`info` plus explicit + firmware quirks; +4. the TUI and CSV application built on a reusable acquisition API. + +Tests should cover prompt fragmentation, binary frames containing arbitrary +byte values, truncation, Basic versus Ultra offsets/modes, frequency labeling, +timeouts, and disconnects. Captured serial transcripts make good fixtures and +do not require hardware in CI. diff --git a/docs/security-and-ci.md b/docs/security-and-ci.md new file mode 100644 index 0000000..8008914 --- /dev/null +++ b/docs/security-and-ci.md @@ -0,0 +1,135 @@ +# Security, dependency policy, and MSRV + +This project applies a deliberately small supply-chain hardening policy. It +tracks the application lockfile, verifies a stable compatibility floor, and +runs `cargo-audit` plus `cargo-deny`. No other hardening tools are in scope. + +## Rust compatibility floor + +The declared and CI-tested minimum supported Rust version (MSRV) is +**Rust 1.88.0**. This is an LTS-like project policy rather than an upstream Rust +LTS designation: Rust itself does not publish LTS toolchains. + +The application code and the former Ratatui 0.28 dependency could be made to +compile with older compilers, but that graph contained the unmaintained `paste` +crate and `lru` releases covered by RustSec soundness advisories. Ratatui 0.30.0 +still locked an affected optional `lru` and a vulnerable `time`. Ratatui 0.30.2 +is the first tested upstream line that clears those findings, and it declares +Rust 1.88.0. The project therefore treats 1.88.0 as the lowest supported clean +graph rather than adding advisory exceptions or local dependency patches. + +`Cargo.toml` declares `rust-version = "1.88.0"`. CI installs that exact +toolchain and runs: + +```console +cargo +1.88.0 check --locked --all-targets --all-features +``` + +The normal CI jobs use current stable Rust, while the MSRV job prevents source +or dependency changes from silently raising the floor. `.cargo/config.toml` +asks modern Cargo to prefer dependency releases compatible with the declared +MSRV when the lockfile is deliberately refreshed. + +## Reproducible dependency graph + +`Cargo.lock` is tracked because tiny-wb is an executable. All CI compilation, +test, Clippy, and release-build commands use `--locked`; an uncommitted +resolution change is therefore a CI error. Do not update dependencies by +deleting the lockfile casually. After an intentional update, rerun every gate +in this document and review the lockfile diff. + +Unused direct dependencies were removed while establishing the lock: +`clap`, `once_cell`, `ratatui-splash-screen`, and `tui-textarea`. Removing them +reduces download/build surface and makes policy results describe code that the +application actually uses. + +## Pinned policy tools + +CI pins: + +| Tool | Version | CI command | +| --- | ---: | --- | +| `cargo-audit` | 0.22.2 | `cargo audit --deny warnings` | +| `cargo-deny` | 0.20.2 | `cargo deny check` | + +The setup stage checks the installed version and installs only when it does not +match exactly: + +```console +cargo install --locked --version 0.22.2 cargo-audit +cargo install --locked --version 0.20.2 cargo-deny +``` + +Installing the tools and running both gates requires network access. The audit +jobs must refresh advisory and registry information; CI must fail rather than +silently using a stale or unavailable database. + +## RustSec audit policy + +`cargo audit --deny warnings` evaluates the complete tracked lockfile against +the current RustSec database and crates.io yanked status. Warnings such as +unmaintained or unsound advisories are promoted to failures, as are +vulnerabilities, yanked packages, database refresh failures, and tool errors. + +There are no advisory ignores. If a future finding has no upgrade path, adding +an ignore requires an explicit maintainer decision documenting why tiny-wb is +unaffected and the condition that will remove the ignore. + +`cargo-audit` is dependency/advisory matching. It does not prove exploit +reachability, review application logic, scan native system libraries, or +replace timely dependency maintenance. + +## Dependency policy + +`deny.toml` is evaluated with all features and enforces: + +- license confidence of 0.8; +- only licenses currently needed by the resolved graph: Apache-2.0, MIT, + MPL-2.0, Unicode-3.0, and Zlib; +- denial of wildcard dependency requirements; +- warnings for duplicate crate versions; +- denial of unknown registries and Git sources; +- crates.io as the only allowed registry and no allowed Git sources; +- RustSec advisory checks with no ignores; +- empty crate bans, duplicate skips, license exceptions, and license + clarifications. + +The MPL-2.0 allowance is needed by `serialport`. It is a graph-wide allowed +license, not an exception for one crate. + +Duplicate warnings remain visible. The reviewed graph currently contains +transitive version splits for `bitflags`, `hashbrown`, `syn`, `toml`, +`toml_edit`, `windows-sys`, and `winnow`. They come from incompatible upstream +constraints in the serial, Ratatui, packed-struct, TOML, and Windows build +paths. No `skip` entries hide them. Direct `strum` and `thiserror` versions were +aligned with the graph where the duplicates were avoidable. + +`cargo-deny` relies on package metadata and configured source URLs. It does not +perform source-code review, establish legal advice, verify downloaded artifact +provenance, or find vulnerabilities outside its advisory check. + +## Local verification + +Run from the repository root, in this order: + +```console +cargo audit --deny warnings +cargo deny check +cargo fmt --all -- --check +cargo +1.88.0 check --locked --all-targets --all-features +cargo check --locked --all-targets --all-features +cargo test --locked --all-targets --all-features +cargo clippy --locked --all-targets --all-features -- -D warnings +cargo build --locked --release --all-features +``` + +The first two commands require the network. Duplicate-version warnings from +`cargo deny check` are expected to stay visible and should be reviewed whenever +the graph changes. + +## Scope limit + +This is intentionally “semi-hardened” CI. The repository does not add +`cargo-vet`, SBOM generation, dependency vendoring, registry proxies, +provenance/signing systems, or additional security scanners. Expanding that +scope needs a separate design and maintenance decision. diff --git a/docs/sources.md b/docs/sources.md new file mode 100644 index 0000000..cc34b45 --- /dev/null +++ b/docs/sources.md @@ -0,0 +1,84 @@ +# Upstream source catalogue + +This catalogue records the authoritative references used to build the local +guide. It was last checked on **2026-10-04**. Prefer these primary sources over +retailer listings, reposted manuals, videos, and forum recollections. + +## Official overview and model data + +- [tinySA official wiki home](https://www.tinysa.org/wiki/) — product-family + overview and navigation. +- [Model comparison](https://www.tinysa.org/wiki/pmwiki.php?n=TinySA4.Comparison) + — identify ZS405/ZS406/ZS407 and compare frequency, LNA, RBW, scan, generator, + storage, and phase-noise capabilities. +- [tinySA Basic specification](https://tinysa.org/wiki/pmwiki.php?n=Main.Specification) + — low/high input and output paths, level limits, filters, speed, and battery. +- [tinySA Ultra/Ultra+ specification](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.Specification) + — analyzer/generator ranges, attenuation, LNA, filters, accuracy, and hardware + revisions. + +## Architecture, limitations, and operation + +- [Ultra technical description](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.TechnicalDescription) + — mixer, IF, filter, detector, generator, and calibration-source signal paths. +- [Ultra mode](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.Ultra) — low-pass + bypass, mirror/spur elimination, sensitivity and bandwidth limitations, LO + leakage, and unlock behavior. +- [Ultra limitations](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.Limitations) + — RBW, speed, images, low-frequency sensitivity, LNA overload, and 48 MHz MCU + radiation. +- [Ultra menu tree](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.MenuTree) — + front-panel settings, presets, SD, sweep controls, calibration, expert + settings, and generator modes. +- [Ultra best-performance settings](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.BestSettings) + — recommended automatic expert controls and cautions. +- [RBW](https://tinysa.org/wiki/pmwiki.php?n=Main.RBW) — coverage, noise-floor, + resolution, and sweep-time trade-offs. +- [Attenuation](https://www.tinysa.org/wiki/pmwiki.php?n=Main.ATTENUATION) — + protection and overload/spur diagnosis. + +## Safety, first use, and maintenance + +- [Safe operation](https://tinysa.org/wiki/pmwiki.php?n=Main.SafeOperation) — + current DC-block, transmitter attenuation, and static precautions. +- [First use](https://tinysa.org/wiki/pmwiki.php?n=Main.FirstUse) — charging, + authenticity, self-test, calibration, and connection warnings. +- [Safe transmitter measurement](https://tinysa.org/wiki/pmwiki.php?n=Main.Transmitters) + — dBm examples and external attenuation strategy. +- [Firmware update](https://tinysa.org/wiki/pmwiki.php?n=Main.UpdatingTheFirmware) + — correct download trees, DFU tools/modes, recovery, and post-update steps. +- [Ultra battery guidance](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.Battery) + — charging current and the voltage needed for best RF performance. + +## USB protocol and firmware implementation + +- [Official USB interface](https://tinysa.org/wiki/pmwiki.php?n=Main.USBInterface) + — console syntax, command descriptions, `scan`, `scanraw`, framing, options, + and documented raw offsets. +- [Ultra console command example](https://tinysa.org/wiki/pmwiki.php?n=TinySA4.ConsoleCommands) + — Ultra build command inventory and example outputs; treat it as a snapshot, + not a promise for every firmware. +- [Upstream tinySA firmware repository](https://github.com/Ho-Ro/tinySA) — + implementation authority for a matching firmware revision. +- [`sa_cmd.c` raw source](https://raw.githubusercontent.com/Ho-Ro/tinySA/main/sa_cmd.c) + — mode parsing, `zero`, RBW, Ultra commands, and exact `scanraw` byte order and + step calculation. +- [`main.c` raw source](https://raw.githubusercontent.com/Ho-Ro/tinySA/main/main.c) + — shell command registration, prompt behavior context, and build-conditional + command availability. + +## Source-conflict policy + +When sources disagree: + +1. protect hardware using the most conservative official safety value; +2. use the comparison/specification page for the exact physical revision; +3. use on-device `version`, `info`, and `help` for the installed build; +4. use source at the matching firmware revision for byte-level behavior; +5. verify ambiguous scan semantics with a low-level known signal and preserve + the transcript as a regression fixture. + +The local docs intentionally record two known conflicts: the wiki's textual +“MSB LSB” description versus firmware's little-endian byte writes, and +endpoint-inclusive intuition versus the reviewed firmware's `span / points` +`scanraw` step. Both are explained in [the protocol guide](usb-protocol.md). diff --git a/docs/tiny-wb-operations.md b/docs/tiny-wb-operations.md new file mode 100644 index 0000000..0ab25c8 --- /dev/null +++ b/docs/tiny-wb-operations.md @@ -0,0 +1,243 @@ +# tiny-wb compatibility and operations + +This guide describes the application as it exists today. It is intentionally +more conservative than “the firmware probably accepts it”: a range is called +supported only when tiny-wb selects the right path, decodes it knowingly, and +can represent it in the UI. + +## Compatibility matrix + +| Instrument/use | Status | Reason | +| --- | --- | --- | +| tinySA Basic low input, range wholly below 350 MHz | Best-supported path | The client sends `mode low input`, uses the Basic-oriented range, and normalizes raw samples with `zero 128`. | +| tinySA Basic high input, range wholly from 350 to 960 MHz | Implemented | The client sends `mode high input`; the RF path itself is less accurate and more overload-prone than low input. | +| tinySA Basic crossing from 240–<350 MHz into 350–960 MHz | Implemented as high input | The whole scan is forced onto the high path; the low path is not stitched to it. | +| Basic span starting below 240 MHz and ending at/above 350 MHz | Rejected | One physical path cannot cover it under the client's policy. Split it into scans. | +| tinySA Ultra/Ultra+ below 350 MHz | Experimental, not declared supported | `mode low input` and `zero 128` are plausible, but the client neither detects nor tests the model. | +| tinySA Ultra/Ultra+ at or above 350 MHz | Not supported | The client sends Basic-only `mode high input`; Ultra has no such high input mode. | +| Ultra mode above the normal range | Not supported | UI stops at 960 MHz and never negotiates Ultra state/capabilities. | +| Generator control, live streaming, capture, calibration, firmware update | Out of scope | No corresponding application workflow exists. | + +At the exact 350 MHz boundary, the implementation's matching rules matter: +low accepts frequencies strictly below 350 MHz, while high accepts 350 MHz +through 960 MHz. A scan from 0 to exactly 350 MHz is rejected, but a scan from +240 to 350 MHz is assigned to the high path. + +## Required equipment + +- A genuine, powered tinySA Basic for the currently supported workflow. +- A data-capable USB cable. Charge-only cables do not enumerate a serial port. +- A host with permission to open the USB serial device. +- For conducted RF measurements: known-good 50-ohm coax/adapters, correctly + rated fixed attenuation, and a DC block when needed. +- For transmitter work: a suitable dummy load or sampler and power-rated + attenuation. Read the [safe-operation guide](tinysa-field-guide.md#safe-operation-read-before-connecting-a-signal) + before connecting a source. + +Do initial software/serial testing with no external RF source connected. This +separates communications failures from unsafe or overloaded RF setups. + +## Build and launch + +Use a current stable Rust toolchain: + +```console +cargo build --release +./target/release/tiny-wb +``` + +The program does not currently expose meaningful command-line options; it +starts the interactive terminal immediately. Run it from the directory where +you want `config.toml`, logs, and scan CSV files to appear. + +### Serial permissions + +On Linux, identify the device after plugging it in: + +```console +ls -l /dev/ttyACM* +``` + +The exact permission mechanism is distribution-specific (often a `dialout` or +`uucp` group, or a udev rule). Do not solve it by running the RF application as +root when a scoped device permission is available. + +On Windows, use Device Manager to find the COM port. Close serial terminals and +other tinySA applications before launching tiny-wb; only one process can +normally own the port. + +## User interface + +### Connection screen + +The application enumerates ports at startup. Selection priority is: + +1. the port saved in `config.toml`, if present; +2. common candidates (`/dev/ttyACM0`, `COM3`, `COM5`, `/dev/ttyS16`); +3. the first enumerated port. + +Baud choices range from 19,200 to 3,000,000; default is 115,200 unless a saved +value matches the built-in list. + +### Scan screen + +Fields and bounds are: + +| Field | Unit | Default | Step | Bounds | +| --- | --- | ---: | ---: | ---: | +| Start frequency | MHz | 240 | 10 | 0–960 | +| Stop frequency | MHz | 960 | 10 | 10–960 | +| Points | samples | 10,001 | 100 | 101–1,000,001 | +| Repeat | measurements/point | 1 | 1 | 1–1,000 | + +Left/right or `h`/`l` changes the selected field. Up/down or `k`/`j` changes +the selection/value. Enter advances to the next screen. `q` or Escape exits. + +Large point and repeat values can produce extremely long scans. Total time also +depends on RBW and instrument mode; the progress bar is based mainly on bytes +received, not a predictive time estimate. + +### Progress and result + +The scan runs on a worker thread while the UI displays shared progress and the +concatenated `version`/`info` response. On success, the final screen plots a +scatter trace. Its Y axis is fixed to −128–0 dBm, so valid results outside that +range are clipped visually even though CSV data may contain them. + +## Files + +### `config.toml` + +The current selection is saved before acquisition starts: + +```toml +port = "/dev/ttyACM0" +baudrate = 115200 +start_frequency = 240 +stop_frequency = 960 +points = 10001 +repeat = 1 +``` + +Frequencies in this file are MHz, unlike protocol frequencies (Hz). The file +is overwritten by the next run. A missing or invalid configuration falls back +to defaults; validate unexpected values before assuming they were loaded. + +### CSV + +The scanner writes `scan_YYYYMMDD HH_MM_SS.csv` in the working directory. It +has no header: + +```csv +240,-92.4375 +240.072,-91.96875 +``` + +Column one is MHz and column two is dBm. The file is created before full frame +validation, so an error can leave a partial or empty CSV. Also note the +[known frequency-label mismatch](usb-protocol.md#frequency-assignment). + +### Logs + +`flexi_logger` writes diagnostic logs to a file in the working directory. Logs +can contain instrument version/configuration details and port names. Attach the +relevant bounded excerpt—not an uncontrolled archive—when reporting a bug. + +## Instrument state changed by a run + +tiny-wb changes repeat count, raw zero offset, input mode, display sweep start +and stop, and pause/resume state. It also runs an auxiliary textual scan before +the raw scan. It does not snapshot and restore previous values. If preserving a +carefully tuned front-panel configuration matters, save it as an instrument +preset and reload it after tiny-wb exits. + +If acquisition fails after `pause`, error handling does not guarantee a final +`resume`; the front panel may remain paused. Send `resume`, use the UI, or +power-cycle/reload a preset after making the RF setup safe. + +## Troubleshooting + +### No serial port is listed + +- Confirm the device is powered on and the cable supports data. +- Try a direct USB port or known USB 2.0 hub/cable. +- Check OS device enumeration before debugging tiny-wb. +- On Linux, inspect `/dev/ttyACM*` and kernel logs; on Windows, Device Manager. + +### Port cannot be opened + +- Close other serial terminals and tinySA software. +- Check the selected COM/TTY name and user permissions. +- Unplug/reconnect if the device was just in DFU mode; DFU and CDC serial are + different USB personalities. + +### “No version found” or a timeout + +- Verify the selected port is the tinySA, not another CDC device. +- Wake/power the instrument and close auto-refreshing software. +- Manually send `version` in a serial terminal and confirm a `ch>` prompt. +- Record firmware version. The client relies on prompt timing and may fail on a + slow command or fragmented prompt even when the instrument is healthy. + +### Parse beginning/end/alignment error + +- Reduce point count and repeat to minimize transfer time. +- Disable any other process reading the port. +- Ensure the firmware implements the documented `scanraw` framing. +- Preserve a raw byte capture if possible. Do not convert it through UTF-8. +- Be aware that the current reader can mistake binary bytes equal to `ch>` for + the shell prompt or miss a prompt split between OS reads. + +### Trace is shifted in frequency + +The current host labels `points` samples over `points - 1` intervals, while the +reviewed firmware measures using a `span / points` step. Verify with a known +carrier, record firmware version, and use the firmware formula when correcting +the exported axis offline. + +### Levels are wrong by about 46 dB + +That is the difference between Ultra's documented default raw offset (174) and +Basic's (128). tiny-wb sends `zero 128`; a 46 dB shift suggests the firmware +did not accept/apply that command or the reply was not validated. Stop treating +the result as calibrated data and capture `version`, `info`, and the `zero` +command response. + +### Unexpected harmonics or spurs + +Assume overload or an image until disproved. Add attenuation, reduce span, +change RBW, use a filter/preselector, and compare paths where possible. Consult +the [measurement controls](tinysa-field-guide.md#measurement-controls-and-trade-offs). + +## Reproducible bug report checklist + +Include: + +- tiny-wb commit hash shown in the title; +- host OS and serial port type; +- exact tinySA model/rear label; +- `version`, `info`, and relevant `help` output; +- start/stop, points, repeat, and selected baud; +- RF setup, attenuation, DC block, expected maximum level, RBW, LNA, and Ultra + mode state where relevant; +- the smallest CSV/log excerpt that demonstrates the problem; +- whether the front panel was paused and whether `resume` recovered it. + +Never include a dangerous live-transmitter reproduction just to demonstrate a +software bug; substitute a low-level known source or recorded serial fixture. + +## Current engineering backlog implied by the documentation + +These are documentation-derived gaps, not changes made in this task: + +1. Parse `version`/`info` into a model and capability structure. +2. Add Ultra/Ultra+ ranges and correct mode syntax, or explicitly reject them. +3. Replace prompt searches with a persistent mixed text/binary framing state + machine. +4. Resolve the `scanraw` frequency denominator against real firmware fixtures. +5. Remove or justify the preliminary `scan ... 290 101` request. +6. Validate exact record count and closing delimiter before accepting/writing a + completed CSV. +7. Restore changed instrument state on success, cancellation, and error. +8. Put model/firmware/settings and column names in output metadata. +9. Add protocol tests based on captured Basic and Ultra transcripts. diff --git a/docs/tinysa-field-guide.md b/docs/tinysa-field-guide.md new file mode 100644 index 0000000..39071f6 --- /dev/null +++ b/docs/tinysa-field-guide.md @@ -0,0 +1,313 @@ +# tinySA and tinySA Ultra field guide + +This is the instrument-side reference for tiny-wb maintainers and users. It +summarizes the official documentation needed to identify, protect, configure, +and interpret the supported hardware. It does not replace the safety labels on +the device, and limits are not targets. + +## Names and model identification + +The product name is **tinySA** (tiny spectrum analyzer). The larger device is +**tinySA Ultra**—not “tinySAultra”—and newer variants are **tinySA Ultra+**. +Firmware and source code often use hardware-family names: + +| Product | How to identify it | Firmware/source shorthand | +| --- | --- | --- | +| tinySA Basic | 2.8-inch, 320×240 display; separate `LOW` and `HIGH` SMA ports | tinySA / `TINYSA3` | +| tinySA Ultra ZS405 | Front says `Ultra`; 4-inch, 480×320 display | tinySA4 / `TINYSA4` | +| tinySA Ultra+ ZS406 | Front says `Ultra+`; rear label says ZS406 | tinySA4 / `TINYSA4` | +| tinySA Ultra+ ZS407 | Front says `Ultra+`; rear label says ZS407 | tinySA4 / `TINYSA4` | + +“Ultra mode” is also the name of a high-frequency measurement mode on Ultra +hardware. Do not confuse the physical Ultra model with whether Ultra mode is +currently enabled. + +Counterfeits exist. Prefer the sellers listed by the official project. The +official first-use guidance recommends authentic firmware and the built-in +self-test as checks; a clone can be electrically unsafe or behave differently +at the console. + +## What the instrument is + +A tinySA is a swept, scalar spectrum analyzer and a signal generator. In +analyzer mode it steps a local oscillator across a range, passes the selected +mixing product through a resolution filter, measures power, and reports level +at each step. It measures magnitude versus frequency, not phase, and it is not +a real-time analyzer. Signals shorter than the time spent away from their +frequency may be missed. + +In generator mode the RF path is reconfigured to produce an output. Never +assume an SMA connector is an input merely because it was one earlier: confirm +the mode before connecting a device under test. + +## Model capability summary + +Values below summarize the official model comparison and specification pages. +Some limits depend on firmware, mode, frequency, attenuation, LNA state, and +hardware revision. + +| Capability | Basic | Ultra ZS405 | Ultra+ ZS406 | Ultra+ ZS407 | +| --- | --- | --- | --- | --- | +| Display | 2.8 in, 320×240 | 4 in, 480×320 | same | same | +| Normal analyzer range | low 100 kHz–350 MHz; high 240–960 MHz | 100 kHz–800 MHz | 100 kHz–900 MHz | 100 kHz–900 MHz | +| Extended analyzer range | none | Ultra mode to about 5.3 GHz; calibrated to 6 GHz | Ultra mode to about 5.4 GHz; calibrated to 6 GHz | Ultra mode and calibrated range to 7.3 GHz | +| Harmonic observation | none | about 10 GHz | about 10 GHz | about 11 GHz | +| RBW selections | roughly 3–600 kHz | 0.2–850 kHz | same | same | +| Maximum displayed points | 290 | 450 | 450 | 450 | +| Step attenuator | 0–31 dB on low path | 0–31 dB when LNA is off | same | same | +| Internal LNA | none on standard low path | nominal 20 dB to 4 GHz | same | 20 dB to 7.3 GHz, about 15 dB to 9 GHz | +| Sine generator | 100 kHz–350 MHz | 100 kHz–800 MHz | 100 kHz–900 MHz | 100 kHz–900 MHz | +| Higher-frequency generator | square 240–960 MHz | square to 4.4 GHz / RF test to 5.3 GHz | square to 4.4 GHz / RF test to 5.4 GHz | square around 6 GHz / RF test to 7.3 GHz | +| Storage/audio | no microSD; audio requires modification | microSD up to 32 GB; headphone output | same | same | + +The official Ultra specification lists ±2 dB absolute level accuracy after +level calibration over its main calibrated region, detector resolution of +0.5 dB, more than 1,000 points/s with the widest filters, and selectable +200 Hz, 1, 3, 10, 30, 100, 300, 600, and 850 kHz filters. Those headline values +do not mean every signal at every frequency is measured to ±2 dB: mismatch, +compression, images, correction tables, RBW, battery voltage, and Ultra-mode +limitations still apply. + +## RF architecture + +### tinySA Basic + +The Basic exposes two distinct bidirectional RF ports and four broad modes: + +- **Low input:** the higher-quality 100 kHz–350 MHz analyzer path with a + 0–31 dB step attenuator and input filtering. +- **High input:** a 240–960 MHz path with frequency-dependent impedance, no + input band filter, no adjustable step attenuator, lower intercept point, and + greater susceptibility to overload, images, and out-of-band signals. +- **Low output:** a filtered sine source over roughly 100 kHz–350 MHz. +- **High output:** a square-wave source over roughly 240–960 MHz. + +The 240–350 MHz overlap is useful: compare paths when a result is suspicious. +The low path is generally preferable where it covers the frequency. + +### tinySA Ultra and Ultra+ + +Ultra uses one main RF SMA path and a separate calibration/output connector. +In analyzer mode the signal path is conceptually: + +```text +RF SMA + -> select LNA or 0–31 dB attenuator + -> select 800 MHz low-pass filter, bypass, or direct path + -> swept first LO + mixer + -> ~980 MHz high-IF band-pass filter + -> receiver / second mixer + -> ~870 kHz low IF + -> selectable RBW filter + -> power detector +``` + +The low-pass filter suppresses aliases in the normal range. In Ultra mode it +is bypassed above its useful passband, allowing higher-frequency mixing but +also allowing many more images and spurs. Firmware makes multiple measurements +with shifted conditions to reject candidates that do not behave like a real +input signal. + +In generator mode a nominal 980 MHz source, filter/mixer network, switching, +and attenuation are reused to create the requested output. Above the normal +sine range the user trades spectral cleanliness, frequency granularity, level +accuracy, and maximum frequency between “cleanest” square-wave and “highest +accuracy” RF-test modes. + +The CAL source derives 30, 15, 10, 4, 3, 2, or 1 MHz from a temperature- +controlled 30 MHz oscillator. It is a useful internal reference, not a general +laboratory-grade calibrated generator across the analyzer's entire range. + +## Ultra mode and harmonic mode + +Ultra mode bypasses the input low-pass filter when needed and applies a +multi-measurement mirror/spur-removal algorithm. On the ZS405, the filter is +normally retained below roughly 750 MHz. Above that point scans slow down. + +It works best for stable, narrowband signals. Important failure modes are: + +- short bursts may be absent because repeated observations do not coincide; +- swept or hopping signals may be rejected or placed incorrectly; +- complex or wideband signals (official guidance flags roughly 600 kHz–1 MHz + width, depending on the page/firmware) can create false results; +- sensitivity deteriorates with frequency; +- bypassing the filter increases LO leakage at the RF connector, reported as + high as approximately −10 dBm; +- results beyond the level-calibrated range lack trustworthy + frequency-dependent amplitude correction. + +A band-limited antenna or external preselector can reject unwanted mixing +products before they enter the analyzer. This is often better than asking the +algorithm to disambiguate every possible image. + +Harmonic mode extends observation beyond the calibrated Ultra range by mixing +on a selected LO harmonic. Treat it as signal discovery, not calibrated level +metrology. The official best-settings guidance says harmonic selection should +normally remain at 3 and key expert settings should remain automatic. + +## Safe operation: read before connecting a signal + +Absolute maximum ratings prevent immediate damage; they do not guarantee +linearity or accurate measurement. Use the most conservative applicable limit. + +### Core rules + +- Keep Ultra/Ultra+ below **+6 dBm at 0 dB internal attenuation**. Basic's + published absolute RF limit at 0 dB attenuation is **+10 dBm**. The official + recommendation for automatic attenuation is no more than **0 dBm**, and best + accuracy is generally obtained with signal level below about **−25 dBm** at + the analyzer input stage. +- The latest official safe-operation table says to use a **DC block plus at + least 3 dB external attenuation above 5 V DC offset**. When the DC content is + unknown, use a suitably rated DC block. +- Do not trust the internal attenuator as the sole protection from a powerful + source. Place external attenuation directly at the analyzer so a failed + cable or incorrect mode cannot expose the input. +- Never connect a transmitter directly. The official minimum examples are + 40 dB attenuation for 1 W, 50 dB for 10 W, and 60 dB for 100 W. Real setups + must also account for peak/envelope power, attenuator power rating, mismatch, + transients, and harmonics. +- Avoid the supplied telescopic antenna where static discharge or a nearby + transmitter is possible. Do not touch objects with it. +- After Basic self-test/calibration, disconnect the cable between LOW and HIGH + before enabling an output. Driving a connected input can destroy the input + attenuator. +- Confirm whether the RF port is in analyzer or generator mode before every + connection change. + +### A practical transmitter setup + +Use a rated dummy load or directional/attenuating sampler, followed by +power-rated coarse attenuation, then a sacrificial fixed attenuator (the +official example uses 30 dB) immediately at the tinySA. Calculate the expected +level in dBm and leave margin for modulation peaks. For harmonic measurements, +an external high-pass/low-pass/band-pass filter may be required to prevent the +fundamental from generating analyzer distortion that looks like DUT harmonics. + +## Measurement controls and trade-offs + +### Frequency span and sample points + +Displayed or requested points are not identical to analog resolution. Point +spacing is approximately span divided by the number of intervals. Firmware may +insert hidden measurements so the RBW covers the span without gaps. More +points improve trace sampling but increase time and do not substitute for a +narrower RBW. + +### Resolution bandwidth (RBW) + +RBW is the bandwidth of the measurement filter: + +- narrower RBW separates nearby carriers and lowers displayed noise; +- narrower RBW takes longer, particularly below 30 kHz; +- wider RBW scans quickly and captures more energy from modulated signals, but + merges close signals and raises the displayed noise floor. + +Auto RBW is a good default. A wide span with a narrow fixed RBW can take a very +long time because firmware adds steps to maintain coverage. + +### Attenuation and overload diagnosis + +Internal attenuation trades sensitivity for headroom. Automatic mode aims to +keep the strongest signal at a safe internal level. To test whether a harmonic +or spur is generated inside the analyzer, increase external or internal +attenuation: + +- a real input signal, after compensation, should remain near the same + reported level; +- an internally generated intermodulation product often falls or disappears + disproportionately; +- the noise floor rises because attenuation reduces signal before the + receiver. + +The Basic high path has no normal adjustable attenuator and is easy to +overload. Strong out-of-band signals also reach it because it lacks an input +band filter. + +### LNA + +Ultra's LNA improves sensitivity for weak signals but disables the step +attenuator and greatly reduces overload headroom. Do not enable it around +unknown or strong signals. The model comparison reports a roughly −26.5 dBm +1 dB compression level with the LNA on for the ZS405, versus about +0.5 dBm +with it off. If a trace changes unexpectedly when the LNA is toggled, suspect +compression or intermodulation before assuming a real RF change. + +### Repeat and averaging + +The `repeat` console setting takes multiple measurements at each frequency and +reduces random noise at the cost of proportional scan time. Trace calculations +such as min hold, max hold, and averaging are separate firmware features. For +bursty signals, max hold across repeated sweeps is often more informative than +per-point averaging. + +### Spur and image checks + +When a line is questionable: + +1. change attenuation and see whether its corrected amplitude behaves like the + wanted signal; +2. change span/RBW and repeat the sweep; +3. switch the Basic path in the overlap region or use below/above-IF controls; +4. enable automatic spur removal; +5. add an external preselector or filter; +6. compare against a known source or another analyzer. + +Remember that the instrument's own 48 MHz MCU clock and harmonics can be +visible, especially with an antenna or low RBW. + +## First use, calibration, and health checks + +1. Charge the device. Ultra RF performance can degrade at low supply voltage; + official guidance recommends more than 3.9 V for best performance. +2. Record the hardware label and current `version`/`info` output. +3. If updating firmware, first run the self-test so pre-existing damage is not + confused with an update problem. +4. For the Basic self-test, connect LOW and HIGH with the supplied SMA cable + and run `CONFIG -> SELF TEST`. +5. Perform input level calibration as directed by the on-device menu. Basic low + level calibration uses the two ports connected; high-path calibration is a + separate procedure. Ultra correction/calibration varies by range and model. +6. Disconnect any calibration loop before enabling generator output. + +Calibration corrects systematic level error; it cannot remove front-end +overload, RF mismatch, an image, a damaged switch, insufficient shielding, or +an invalid Ultra-mode measurement. + +## Firmware update and recovery + +Use the firmware file for the exact family: + +- Basic: the `tinySA/DFU` tree; +- Ultra/Ultra+: the `tinySA4/DFU` tree. + +Do not flash a similarly named file from the other family. Configuration data +may be reset or become structurally incompatible, so record unusual correction +settings and expect to redo calibration when appropriate. + +Ultra enters recovery/DFU mode by holding the jog control while powering on; +the screen remains black. The Basic normally enters DFU from its menu, with a +documented PCB BOOT0 recovery procedure if an update is interrupted. The +official guide supports `dfu-util` and vendor tools. After updating, power-cycle +the unit, verify normal USB serial enumeration, check the version, clear stale +configuration when advised, and rerun self-test. + +## Settings baseline for Ultra + +For general use, leave these expert controls automatic unless a documented +experiment requires otherwise: spur removal, IF frequency, mixer drive, scan +speed, and below-IF choice. Keep harmonic at 3. The official best-settings page +also warns against casual AGC/LNA expert changes and against its then-current +FAST sweep mode. Because firmware evolves, confirm that advice against the +version installed on the instrument. + +## How this maps to tiny-wb + +tiny-wb currently chooses `mode low input` below 350 MHz and `mode high input` +above that, limits the UI to 960 MHz, and does not inspect the model. That is a +Basic-oriented policy. Ultra supports `mode [low] input`, has no Basic-style +high input, and needs capability-driven ranges. Until model support is added, +use [the compatibility matrix and cautions](tiny-wb-operations.md#compatibility-matrix). + +For the wire format and exact command behavior, continue with +[USB console and `scanraw` protocol](usb-protocol.md). diff --git a/docs/usb-protocol.md b/docs/usb-protocol.md new file mode 100644 index 0000000..59613e1 --- /dev/null +++ b/docs/usb-protocol.md @@ -0,0 +1,272 @@ +# USB console and `scanraw` protocol + +This document is the implementation reference for talking to tinySA firmware. +It combines the official USB-interface description with the behavior visible +in the upstream C source and in `src/scan.rs`. + +## Transport + +Connecting a powered tinySA by a data-capable USB cable exposes a virtual +serial port (USB CDC): commonly `/dev/ttyACM*` on Linux and `COM*` on Windows. +Drivers are built into most Linux systems and are normally installed +automatically on Windows. + +The on-device shell is a command stream, not a packet protocol: + +- commands are ASCII and are normally terminated by carriage return (`\r`); +- terminal input is commonly echoed, so a reply can begin with the command; +- ordinary output is text; +- the ready prompt is `ch>`; +- some commands (`capture`, display bulk data, and `scanraw`) place binary data + in the same byte stream; +- firmware performs limited parameter validation, so a prompt does not prove + that the intended operation occurred. + +The baud selector in tiny-wb controls how the host opens the serial device. +USB CDC and the optional internal TTL USART are different transports; +`usart_cfg` configures/reports the internal serial interface in firmware. Do +not infer the physical USB transfer speed from that value. + +## Shell grammar + +Common scalar syntax is: + +- frequency: integer/floating value, optionally suffixed `k`, `M`, or `G`; +- level: floating-point dB/dBm value; +- time: seconds, optionally suffixed `m` (milliseconds) or `u` + (microseconds). + +For software, plain integer Hz is the least ambiguous frequency representation. +Commands and availability vary by build; issue `help`, then record `version` +and `info` before relying on optional commands. + +## Commands relevant to tiny-wb + +| Command | Meaning and notes | +| --- | --- | +| `version` | Firmware version/build text. | +| `info` | Model/platform information when enabled in the build. | +| `help` | Commands compiled into this firmware. Prefer this over a hard-coded global list. | +| `mode low input` | Select Basic low input; on Ultra, firmware also accepts `mode input` and has no Basic high path. | +| `mode high input` | Select Basic high input. Not an Ultra input mode. | +| `pause` / `resume` | Stop/restart normal display sweeping. | +| `repeat 1..1000` | Measurements per frequency. More repeats reduce random noise and increase time. | +| `zero N` | Set the additive raw-sample encoding offset used by `scanraw`; not an RF zero/calibration operation. | +| `sweep start F`, `sweep stop F` | Change display sweep boundaries. `sweep` alone reports settings. | +| `scan START STOP [POINTS] [OUTMASK]` | Perform a scan with at most 290 points and optional textual output. Outmask bits are 1 frequencies, 2 measured data, and 4 stored data. | +| `scanraw START STOP [POINTS] [OPTIONS]` | Perform an arbitrary-point binary scan. Option bit 0 requests unbuffered writes; bit 1 repeats continuously. | +| `rbw auto` or `rbw VALUE` | Set resolution bandwidth in kHz in current firmware syntax. Valid ranges differ by model. | +| `attenuate auto` or `attenuate 0..31` | Select automatic/manual front-end attenuation where supported. | +| `spur off\|on[\|auto]` | Control spur removal; `auto` is Ultra-specific. | +| `lna off\|on` | Ultra optional LNA; reduces overload headroom and disables its step attenuator path. | +| `ultra off\|on\|auto\|start\|harm ...` | Ultra-family build only; control extended-frequency behavior. | +| `leveloffset`, `vbat`, `threads`, `usart_cfg`, `marker` | Diagnostic/status queries used by tiny-wb; exact output is firmware-dependent. | + +Avoid sending mutating calibration, output, correction, or configuration-save +commands until the model and active port are known. + +## `scanraw` request + +The request is: + +```text +scanraw START_HZ STOP_HZ POINTS [OPTIONS]\r +``` + +Constraints visible in upstream firmware: + +- at least start and stop are required; +- start must not exceed stop; +- points defaults to the current display sweep-point count; +- option values are bit flags: `1` unbuffered, `2` continuous, `3` both; +- waterfall is disabled before acquisition in current firmware; +- a continuous request must be explicitly aborted and needs a streaming parser. + +tiny-wb omits OPTIONS, so it requests one buffered acquisition. The firmware +buffers in small blocks internally; “buffered” does not mean the entire sweep +is delivered in a single USB transfer. + +## Binary response framing + +Ignoring command echo, line endings, and the final prompt, the firmware emits: + +```text +0x7b # '{' +0x78 LOW_BYTE HIGH_BYTE # 'x', sample 0, little-endian +0x78 LOW_BYTE HIGH_BYTE # 'x', sample 1 +... +0x7d # '}' +``` + +Thus the framed body length is `1 + 3 * points + 1` bytes. Each level is a +16-bit raw value. Although the official USB page describes the bytes in one +place as “MSB LSB,” the firmware source writes `val & 0xff` first and +`val >> 8` second. The repository correctly unpacks the value as little-endian. + +Payload bytes are arbitrary. A payload byte can equal `{`, `}`, `x`, `c`, `h`, +or `>`. Framing logic must only interpret `{` before the records, `x` at every +three-byte record boundary, and `}` after exactly the requested record count +(or after an explicitly aborted short frame). Searching binary payload for +text tokens is unsafe. + +## Level conversion and `zero` + +The documented default conversion is: + +```text +Basic dBm = raw_u16 / 32 - 128 +Ultra dBm = raw_u16 / 32 - 174 +``` + +This is a fixed-point value with 1/32 dB numeric steps. The detector itself has +coarser effective resolution, so the encoding precision is not the same as +measurement accuracy. + +Upstream firmware calculates the transmitted integer from the measured value +plus `config.ext_zero_level`; the `zero N` command changes that offset. tiny-wb +sends `zero 128` before every acquisition and always uses: + +```text +dBm = raw_u16 / 32 - 128 +``` + +That normalizes the wire representation to a Basic-style offset and can make +the conversion work on firmware honoring `zero`, including Ultra. A robust +client should still detect the model, verify the command response, and bind the +decoder offset to the value it successfully configured. If `zero 128` is +rejected or ignored, applying 128 to an Ultra default frame produces a 46 dB +error. + +### Worked record + +Suppose the three bytes are: + +```text +78 00 08 +``` + +`0x0800` is 2048. With `zero 128`: + +```text +2048 / 32 - 128 = -64 dBm +``` + +## Frequency assignment + +The upstream `cmd_scanraw` implementation calculates: + +```text +firmware_step = (stop - start) / points +frequency[i] = start + firmware_step * i for i = 0 .. points-1 +``` + +The arithmetic includes floating/intermediate and integer-frequency details +that vary with the firmware's `freq_t`, but the denominator is visibly +`points`, not `points - 1` in the reviewed source. Therefore the last measured +point is one nominal step below stop. + +tiny-wb currently labels output using: + +```text +host_step = (stop - start) / (points - 1) +frequency[i] = start + host_step * i +``` + +This labels the endpoints inclusively and disagrees with the reviewed firmware. +The discrepancy grows linearly through a sweep to almost one firmware step at +the last point. Before changing it, capture a known narrow carrier with the +target firmware and retain the `version` string; firmware behavior may change. + +## Prompt and synchronization behavior + +A reliable request/response state machine should: + +1. retain a persistent receive buffer across OS reads; +2. write the complete command plus `\r`; +3. parse optional echo and line endings; +4. for text commands, recognize `ch>` even when split across reads and retain + any bytes after it; +5. for `scanraw`, find the frame start in shell text, then consume exactly the + expected number of aligned records and the closing brace before looking for + the prompt; +6. use an overall deadline plus idle deadlines rather than treating one serial + timeout as a successfully completed short reply; +7. make cancellation explicit with the firmware's `abort` behavior; +8. return protocol errors that include command, stage, byte counts, and a + bounded hex/text diagnostic. + +Sleeping a fixed duration is not a protocol guarantee. Sweep time changes with +span, RBW, repeat, mode, signal-processing options, and firmware. + +## Current tiny-wb transaction + +The current code sends the following logical sequence (frequency placeholders +are decimal Hz): + +```text +version +info +leveloffset +vbat +usart_cfg +threads +repeat REPEAT +zero 128 +marker +pause +mode LOW_OR_HIGH input +sweep start START +sweep stop STOP +sweep +scan START STOP 290 101 +scanraw START STOP POINTS +resume +``` + +Every item except `scanraw` goes through the text helper and waits for `ch>`. +The `scanraw` reader also searches raw incoming chunks for `ch>` while the +binary body is in flight. Because arbitrary sample bytes can coincidentally +contain those three bytes, that is a correctness risk. The finder also cannot +detect `ch>` split across two read calls. A framed binary state machine should +replace this behavior. + +The `scan` outmask value `101` is outside the documented three-bit mask and its +returned data is discarded. It should not be copied into new clients without +first establishing why it is necessary. + +## Manual diagnostic session + +Use a serial terminal that can send carriage return, with every RF source +disconnected or safely attenuated. A minimally invasive identification session +is: + +```text +version +info +help +sweep +vbat +``` + +Save the exact transcript. Do not test `scanraw` in a terminal that assumes all +input is UTF-8; it returns binary and may corrupt the display or its own log. +Use a byte-oriented program and a bounded point count instead. + +## Compatibility rules for implementers + +- Identify capabilities; do not infer Ultra merely from a version prefix if + `info` gives an explicit model. +- Treat the command list as a firmware-build property. +- Keep Basic low/high path selection separate from Ultra normal/Ultra/harmonic + range selection. +- Make raw offset, valid frequency range, RBW limits, and legal mode syntax + model capabilities. +- Do not use UTF-8 strings for the mixed shell/binary receive buffer. +- Never use an unescaped textual prompt as a delimiter inside a binary frame. +- Restore or clearly report every instrument setting that the client changes. +- Include model, firmware version, configured offset, start/stop, point count, + repeat, RBW, attenuation, LNA, and Ultra state in future output metadata. + +See [Project architecture](architecture.md#important-invariants-and-risks) for +repository-specific parser risks and [tiny-wb operations](tiny-wb-operations.md) +for what users can safely expect today. diff --git a/src/main.rs b/src/main.rs index 58ff4dd..8dc8f51 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,6 @@ use structs::TinyError; use ui_struct::AppInfo; use flexi_logger::{FileSpec, Logger, WriteMode}; -use log; fn main() -> Result<(), TinyError> { let _logger = Logger::try_with_str("info, my::critical::module=trace") diff --git a/src/scan.rs b/src/scan.rs index 0b85167..84607ee 100644 --- a/src/scan.rs +++ b/src/scan.rs @@ -125,6 +125,7 @@ pub(crate) fn scan_with_progress(connection_info: ConnectionInfo) -> Result<(), Ok(()) } +/// Open the configured serial port and reflect failures in the shared status. fn acquire_port(connection_info: &ConnectionInfo) -> Result, TinyError> { let port = { connection_info.update_message("Opening connection"); @@ -149,13 +150,16 @@ fn mode_from(start: usize, stop: usize) -> Result { start, stop ))); } - match (start, stop) { - (350_000_000..=960_000_000, 350_000_000..=960_000_000) => Ok("high".to_string()), - (0..350_000_000, 0..350_000_000) => Ok("low".to_string()), - (240_000_000..350_000_000, 350_000_000..=960_000_000) => Ok("high".to_string()), - _ => Err(TinyError::BadScanFrequencies( + if start >= 350_000_000 && stop <= 960_000_000 { + Ok("high".to_string()) + } else if stop < 350_000_000 { + Ok("low".to_string()) + } else if (240_000_000..350_000_000).contains(&start) && stop <= 960_000_000 { + Ok("high".to_string()) + } else { + Err(TinyError::BadScanFrequencies( "Scan frequencies must either be in range (0MHz-240MHz) or (240MHz-960MHz)".to_owned(), - )), + )) } } @@ -303,7 +307,7 @@ pub fn parse_data( log::info!("The end looks like :{:?}", &v[end_tmp - 10..end_tmp]); let mut end = end_tmp; - let chunks_exact = data.chunks_exact(3); + let (chunks, _remainder) = data.as_chunks::<3>(); // if chunks_exact.remainder().is_empty() { // return Err(TinyError::ParseEnd( // "The data received doesn't have a end char (empty)".to_owned(), @@ -316,9 +320,8 @@ pub fn parse_data( // chunks_exact.remainder() // ))); // } - for (i, slice) in chunks_exact.enumerate() { - let s: &[u8; 3] = &[slice[0], slice[1], slice[2]]; - let d = DataPoint::unpack(s)?; + for (i, slice) in chunks.iter().enumerate() { + let d = DataPoint::unpack(slice)?; if d.align == b'}' { // Found an end and the rest is garbage end = i * 3; diff --git a/src/structs.rs b/src/structs.rs index fb02e8b..4c073c7 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -7,9 +7,6 @@ use std::{ }; use flexi_logger::FlexiLoggerError; -use log; -use serde; -use thiserror; use crate::ui_struct::AppInfo; @@ -102,6 +99,7 @@ pub enum TinyUIError { } #[derive(serde::Serialize, serde::Deserialize, Debug)] +/// Configuration persisted between tiny-wb sessions. pub(crate) struct SavedConfig { /// The default com port pub(crate) port: String, @@ -160,9 +158,11 @@ pub(crate) enum ConnectionStatus { ConnectionFailure, /// The connection is closed and the connection was a succes ClosedWithSuccess, + /// A scan command was accepted and acquisition has started. ScanStarted, } +/// Frequency and amplitude pairs returned by a scan. type ScanData = Vec<(f64, f64)>; #[derive(Debug, Clone)] diff --git a/src/ui.rs b/src/ui.rs index 13787ce..994b58f 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -3,7 +3,7 @@ use log::info; use ratatui::{ crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind}, layout::{Constraint, Layout, Rect}, - style::{Color, Modifier, Style, Stylize}, + style::{Color, Modifier, Style}, symbols::Marker, widgets::{Axis, Block, Chart, Dataset, GraphType, LineGauge, List, Paragraph, Wrap}, DefaultTerminal, Frame, @@ -68,7 +68,7 @@ impl<'a> AppInfo<'a> { ) -> Result<(), color_eyre::eyre::Error> { self.init_config()?; loop { - terminal.draw(|v| self.draw(v).inspect_err(|e| panic!("{}", e)).unwrap())?; + terminal.draw(|v| self.draw(v).unwrap_or_else(|e| panic!("{}", e)))?; let timeout = Duration::from_millis(16); if event::poll(timeout)? { if let Event::Key(key) = event::read()? { @@ -428,7 +428,9 @@ impl<'a> AppInfo<'a> { .unwrap_or(&TinyUIError::NoErrorSpecified) { TinyUIError::MenuSelectionError => "An error occured while trying to select a menu item", - TinyUIError::UninitializedItemList(i, _l, _ff) => &format!("The item {i} was left uninitialized"), + TinyUIError::UninitializedItemList(i, _l, _ff) => { + return Ok(format!("The item {i} was left uninitialized")); + } TinyUIError::KeyPress(_) => "An error occured while processing key events", TinyUIError::NoPortSelected => "No connection port was selected", TinyUIError::NoConnectionInfoCreated => { diff --git a/src/ui_struct.rs b/src/ui_struct.rs index 8a9239a..85052a4 100644 --- a/src/ui_struct.rs +++ b/src/ui_struct.rs @@ -50,6 +50,7 @@ pub(crate) struct AppInfo<'a> { } #[derive(Debug)] +/// Numeric input state with bounded keyboard increments. pub(crate) struct UIUsize { /// Current value held by the usize value: usize, @@ -153,9 +154,10 @@ macro_rules! mleft { }; } /// The selected item in the config -#[derive(Debug, EnumCount, FromRepr, Clone, Copy)] +#[derive(Debug, Default, EnumCount, FromRepr, Clone, Copy)] pub(crate) enum SelectedConfig { /// Selects the ports + #[default] Port, /// Selects the baudrate Baudrate, @@ -163,16 +165,11 @@ pub(crate) enum SelectedConfig { // Proceed, } -impl Default for SelectedConfig { - fn default() -> Self { - Self::Port - } -} - /// The selected item in the final menu -#[derive(Debug, EnumCount, FromRepr, Copy, Clone)] +#[derive(Debug, Default, EnumCount, FromRepr, Copy, Clone)] pub(crate) enum SelectedFinalConfig { /// Selects the start frequency + #[default] StartFreq, /// Selects the final frequency FinalFreq, @@ -184,12 +181,6 @@ pub(crate) enum SelectedFinalConfig { // Proceed, } -impl Default for SelectedFinalConfig { - fn default() -> Self { - Self::StartFreq - } -} - /// The list of all baudrates selectables #[derive(Debug)] pub(crate) struct BaudRateList {