From 88f647f41e551e4951d2079e2a1584535a3f4c66 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Thu, 19 Dec 2024 12:12:39 -0800 Subject: [PATCH] Use cargo-generate for hello-world tutorial (#709) Direct link: https://jm-hello-template.ratatui.pages.dev/tutorials/hello-ratatui/ --- Cargo.lock | 936 +++++++++++------- astro.config.mjs | 4 +- code/tutorials/hello-ratatui.png | 3 + .../hello.tape => hello-ratatui.tape} | 8 +- .../hello-ratatui/.github/dependabot.yml | 17 + .../hello-ratatui/.github/workflows/ci.yml | 89 ++ code/tutorials/hello-ratatui/Cargo.toml | 11 + code/tutorials/hello-ratatui/LICENSE | 21 + code/tutorials/hello-ratatui/README.md | 14 + code/tutorials/hello-ratatui/src/main.rs | 24 + code/tutorials/hello-world/Cargo.toml | 12 - code/tutorials/hello-world/src/main.rs | 35 - code/tutorials/hello.gif | 3 + src/content/docs/developer-guide/website.mdx | 4 +- src/content/docs/index.mdx | 8 +- .../docs/tutorials/counter-app/index.md | 4 +- .../tutorials/hello-ratatui/hello-ratatui.gif | 3 + .../tutorials/hello-ratatui/hello-ratatui.png | 3 + .../docs/tutorials/hello-ratatui/index.md | 144 +++ src/content/docs/tutorials/hello-world.md | 298 ------ src/content/docs/tutorials/index.md | 2 +- .../docs/tutorials/json-editor/index.md | 5 +- 22 files changed, 937 insertions(+), 711 deletions(-) create mode 100644 code/tutorials/hello-ratatui.png rename code/tutorials/{hello-world/hello.tape => hello-ratatui.tape} (56%) create mode 100644 code/tutorials/hello-ratatui/.github/dependabot.yml create mode 100644 code/tutorials/hello-ratatui/.github/workflows/ci.yml create mode 100644 code/tutorials/hello-ratatui/Cargo.toml create mode 100644 code/tutorials/hello-ratatui/LICENSE create mode 100644 code/tutorials/hello-ratatui/README.md create mode 100644 code/tutorials/hello-ratatui/src/main.rs delete mode 100644 code/tutorials/hello-world/Cargo.toml delete mode 100644 code/tutorials/hello-world/src/main.rs create mode 100644 code/tutorials/hello.gif create mode 100644 src/content/docs/tutorials/hello-ratatui/hello-ratatui.gif create mode 100644 src/content/docs/tutorials/hello-ratatui/hello-ratatui.png create mode 100644 src/content/docs/tutorials/hello-ratatui/index.md delete mode 100644 src/content/docs/tutorials/hello-world.md diff --git a/Cargo.lock b/Cargo.lock index bcfecb2a2..dcdcd2651 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -67,9 +67,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -82,36 +82,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -154,7 +154,7 @@ dependencies = [ "argh_shared", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -174,13 +174,13 @@ checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -198,14 +198,14 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -297,9 +297,9 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -309,9 +309,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cassowary" @@ -336,9 +336,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.8" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -354,9 +357,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -428,7 +431,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -475,9 +478,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "compact_str" @@ -515,14 +518,14 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] @@ -556,9 +559,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -588,9 +591,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -633,18 +636,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -661,9 +664,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" @@ -739,7 +742,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -750,7 +753,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -786,7 +789,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -796,7 +799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -819,7 +822,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -879,6 +882,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "dlv-list" version = "0.5.2" @@ -896,9 +910,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -917,19 +931,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "euclid" -version = "0.22.10" +version = "0.22.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" dependencies = [ "num-traits", ] @@ -974,9 +988,9 @@ checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filedescriptor" @@ -985,15 +999,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" dependencies = [ "libc", - "thiserror", + "thiserror 1.0.69", "winapi", ] [[package]] name = "finl_unicode" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "94c970b525906eb37d3940083aa65b95e481fc1857d467d13374e1d925cfc163" [[package]] name = "fixedbitset" @@ -1007,6 +1021,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "font8x8" version = "0.3.1" @@ -1084,7 +1104,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -1178,13 +1198,24 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1194,17 +1225,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "hello-world" -version = "0.0.0" +name = "hello-ratatui" +version = "0.1.0" dependencies = [ + "color-eyre", + "crossterm", "ratatui", ] [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -1255,9 +1288,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1289,9 +1322,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "human-panic" @@ -1306,14 +1339,14 @@ dependencies = [ "serde", "serde_derive", "toml", - "uuid 1.10.0", + "uuid 1.11.0", ] [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -1330,9 +1363,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "f6884a48c6826ec44f524c7456b163cebe9e55a18d7b5e307cb4f100371cc767" dependencies = [ "futures-util", "http", @@ -1349,9 +1382,9 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper", "hyper-util", @@ -1362,9 +1395,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1375,16 +1408,15 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower 0.4.13", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1403,6 +1435,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1411,12 +1561,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1427,12 +1588,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.3.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", ] [[package]] @@ -1443,19 +1604,23 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "instability" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c" +checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e" dependencies = [ + "darling", + "indoc", + "pretty_assertions", + "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] name = "iri-string" -version = "0.7.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f5f6c2df22c009ac44f6f1499308e7a3ac7ba42cd2378475cc691510e1eef1b" +checksum = "dc0f0a572e8ffe56e2ff4f769f32ffe919282c3916799f8b68688b6030063bea" dependencies = [ "memchr", "serde", @@ -1463,9 +1628,9 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ "hermit-abi", "libc", @@ -1498,16 +1663,17 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1573,17 +1739,6 @@ dependencies = [ "rand 0.3.23", ] -[[package]] -name = "libredox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" -dependencies = [ - "bitflags 2.6.0", - "libc", - "redox_syscall 0.4.1", -] - [[package]] name = "libredox" version = "0.1.3" @@ -1592,6 +1747,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -1610,13 +1766,19 @@ dependencies = [ "rand_chacha 0.3.1", ] +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "scopeguard", ] @@ -1628,11 +1790,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown", + "hashbrown 0.15.2", ] [[package]] @@ -1672,7 +1834,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -1681,7 +1843,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -1701,11 +1863,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "log", "wasi", @@ -1800,7 +1961,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -1814,9 +1975,9 @@ dependencies = [ [[package]] name = "numtoa" -version = "0.1.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" +checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f" [[package]] name = "object" @@ -1860,7 +2021,7 @@ dependencies = [ "serde_urlencoded", "snafu", "tokio", - "tower 0.5.1", + "tower", "tower-http", "tracing", "url", @@ -1869,9 +2030,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -1893,9 +2054,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "c65ee1f9701bf938026630b455d5315f490640234259037edb259798b3bcf85e" dependencies = [ "num-traits", ] @@ -1907,14 +2068,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" dependencies = [ "log", "serde", @@ -1954,7 +2115,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -1975,7 +2136,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -1988,9 +2149,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pem" @@ -2010,20 +2171,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.8", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -2031,22 +2192,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -2093,7 +2254,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -2107,29 +2268,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2139,9 +2300,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -2152,15 +2313,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -2201,9 +2362,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2537,18 +2698,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -2561,25 +2713,25 @@ checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", - "libredox 0.1.3", - "thiserror", + "libredox", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -2593,13 +2745,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2610,9 +2762,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -2673,7 +2825,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.85", + "syn 2.0.90", "unicode-ident", ] @@ -2699,27 +2851,27 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.23", + "semver 1.0.24", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", @@ -2732,32 +2884,21 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -2772,9 +2913,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2793,11 +2934,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2817,9 +2958,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "81d3f8c9bfcc3cbb6b0179eb57042d75b1582bdc65c3cb95f3fa999509c03cbc" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -2830,9 +2971,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" dependencies = [ "core-foundation-sys", "libc", @@ -2849,15 +2990,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "semver-parser" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" dependencies = [ "pest", ] @@ -2879,7 +3020,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -2906,9 +3047,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -2945,6 +3086,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -2983,15 +3130,15 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", "num-traits", - "thiserror", + "thiserror 1.0.69", "time", ] [[package]] name = "simplerand" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70455a0a21cb984df0f86033ca19f37cced497deb779603e7fa7b032f5b8897b" +checksum = "90b131e1d73750e4bf76d8d21e6e73ae5642381024ef2419d9ad7886b428df7e" dependencies = [ "lazy_static", ] @@ -3008,7 +3155,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -3019,30 +3166,30 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snafu" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b835cb902660db3415a672d862905e791e54d306c6e8189168c7f3d9ae1c79d" +checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5" +checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3054,6 +3201,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3100,7 +3253,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -3122,9 +3275,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.85" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -3133,15 +3286,26 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -3152,9 +3316,9 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ "rustix", "windows-sys 0.59.0", @@ -3175,12 +3339,12 @@ dependencies = [ [[package]] name = "termion" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ccce68e518d1173e80876edd54760b60b792750d0cab6444a79101c6ea03848" +checksum = "7eaa98560e51a2cf4f0bb884d8b2098a9ea11ecf3b7078e9c68242c74cc923a7" dependencies = [ "libc", - "libredox 0.0.2", + "libredox", "numtoa", "redox_termios", ] @@ -3226,7 +3390,7 @@ dependencies = [ "tempfile", "terminfo", "termios", - "thiserror", + "thiserror 1.0.69", "ucd-trie", "unicode-segmentation", "vtparse", @@ -3240,22 +3404,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" +dependencies = [ + "thiserror-impl 2.0.8", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -3311,30 +3495,25 @@ dependencies = [ ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "serde", - "serde_json", + "displaydoc", + "zerovec", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinytemplate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "tinyvec_macros", + "serde", + "serde_json", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.42.0" @@ -3361,17 +3540,16 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -3411,9 +3589,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -3424,24 +3602,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", @@ -3456,9 +3619,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ "bitflags 2.6.0", "bytes", @@ -3467,7 +3630,7 @@ dependencies = [ "http-body", "iri-string", "pin-project-lite", - "tower 0.5.1", + "tower", "tower-layer", "tower-service", "tracing", @@ -3504,7 +3667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror", + "thiserror 1.0.69", "time", "tracing-subscriber", ] @@ -3517,7 +3680,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", ] [[package]] @@ -3596,45 +3759,27 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-truncate" @@ -3667,9 +3812,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3677,6 +3822,18 @@ dependencies = [ "serde", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3694,9 +3851,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "atomic", "getrandom", @@ -3770,34 +3927,34 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3805,28 +3962,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -3863,8 +4020,8 @@ dependencies = [ "mac_address", "once_cell", "sha2", - "thiserror", - "uuid 1.10.0", + "thiserror 1.0.69", + "uuid 1.11.0", ] [[package]] @@ -3888,7 +4045,7 @@ dependencies = [ "log", "ordered-float", "strsim 0.10.0", - "thiserror", + "thiserror 1.0.69", "wezterm-dynamic-derive", ] @@ -4115,13 +4272,25 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "yaml-rust2" version = "0.8.1" @@ -4139,6 +4308,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4157,7 +4350,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", ] [[package]] @@ -4165,3 +4379,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] diff --git a/astro.config.mjs b/astro.config.mjs index 3a6837079..d18ed5737 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -91,8 +91,8 @@ export default defineConfig({ link: "/tutorials/", }, { - label: "Hello World", - link: "/tutorials/hello-world/", + label: "Hello Ratatui", + link: "/tutorials/hello-ratatui/", }, { label: "Counter App", diff --git a/code/tutorials/hello-ratatui.png b/code/tutorials/hello-ratatui.png new file mode 100644 index 000000000..f06ae9cf0 --- /dev/null +++ b/code/tutorials/hello-ratatui.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c90f88829204b1aa62c63fb0fb5021adb3cba92dc94787e3ec0dfc38aa25ffb +size 8355 diff --git a/code/tutorials/hello-world/hello.tape b/code/tutorials/hello-ratatui.tape similarity index 56% rename from code/tutorials/hello-world/hello.tape rename to code/tutorials/hello-ratatui.tape index abc07dbaf..b9e04810d 100644 --- a/code/tutorials/hello-world/hello.tape +++ b/code/tutorials/hello-ratatui.tape @@ -1,12 +1,12 @@ # A VHS tape. See https://github.com/charmbracelet/vhs -Output hello.gif +Output hello-ratatui.gif Set Theme "Aardvark Blue" -Set Width 800 +Set Width 1200 Set Height 450 -Type "cargo run" +Type "cargo run -p hello-ratatui" Enter Sleep 7s -Screenshot hello.png +Screenshot hello-ratatui.png Sleep 1s Type q Sleep 2s diff --git a/code/tutorials/hello-ratatui/.github/dependabot.yml b/code/tutorials/hello-ratatui/.github/dependabot.yml new file mode 100644 index 000000000..c2fabe10f --- /dev/null +++ b/code/tutorials/hello-ratatui/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Maintain dependencies for Cargo + - package-ecosystem: "cargo" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + # Maintain dependencies for GitHub Actions + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly diff --git a/code/tutorials/hello-ratatui/.github/workflows/ci.yml b/code/tutorials/hello-ratatui/.github/workflows/ci.yml new file mode 100644 index 000000000..eebd11131 --- /dev/null +++ b/code/tutorials/hello-ratatui/.github/workflows/ci.yml @@ -0,0 +1,89 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + - master + - develop + +env: + CARGO_TERM_COLOR: always + +# ensure that the workflow is only triggered once per PR, subsequent pushes to the PR will cancel +# and restart the workflow. See https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + fmt: + name: fmt + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: check formatting + run: cargo fmt -- --check + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 + clippy: + name: clippy + runs-on: ubuntu-latest + permissions: + checks: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Run clippy action + uses: clechasseur/rs-clippy-check@v3 + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 + doc: + # run docs generation on nightly rather than stable. This enables features like + # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an + # API be documented as only available in some specific platforms. + name: doc + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust nightly + uses: dtolnay/rust-toolchain@nightly + - name: Run cargo doc + run: cargo doc --no-deps --all-features + env: + RUSTDOCFLAGS: --cfg docsrs + test: + runs-on: ${{ matrix.os }} + name: test ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest] + steps: + # if your project needs OpenSSL, uncomment this to fix Windows builds. + # it's commented out by default as the install command takes 5-10m. + # - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + # if: runner.os == 'Windows' + # - run: vcpkg install openssl:x64-windows-static-md + # if: runner.os == 'Windows' + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + # enable this ci template to run regardless of whether the lockfile is checked in or not + - name: cargo generate-lockfile + if: hashFiles('Cargo.lock') == '' + run: cargo generate-lockfile + - name: cargo test --locked + run: cargo test --locked --all-features --all-targets + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 diff --git a/code/tutorials/hello-ratatui/Cargo.toml b/code/tutorials/hello-ratatui/Cargo.toml new file mode 100644 index 000000000..3bee1ad95 --- /dev/null +++ b/code/tutorials/hello-ratatui/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "hello-ratatui" +version = "0.1.0" +authors = ["Josh McKinney "] +license = "MIT" +edition = "2021" + +[dependencies] +color-eyre = "0.6.3" +crossterm = "0.28.1" +ratatui = "0.29.0" diff --git a/code/tutorials/hello-ratatui/LICENSE b/code/tutorials/hello-ratatui/LICENSE new file mode 100644 index 000000000..0f9490b3f --- /dev/null +++ b/code/tutorials/hello-ratatui/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Josh McKinney + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/tutorials/hello-ratatui/README.md b/code/tutorials/hello-ratatui/README.md new file mode 100644 index 000000000..3b08ff86c --- /dev/null +++ b/code/tutorials/hello-ratatui/README.md @@ -0,0 +1,14 @@ +# hello-ratatui + +This is a [Ratatui] app generated by the [Hello World template]. + +[Ratatui]: https://ratatui.rs +[Hello World Template]: https://github.com/ratatui/templates/tree/main/hello-world + +## License + +Copyright (c) Josh McKinney + +This project is licensed under the MIT license ([LICENSE] or ) + +[LICENSE]: ./LICENSE diff --git a/code/tutorials/hello-ratatui/src/main.rs b/code/tutorials/hello-ratatui/src/main.rs new file mode 100644 index 000000000..7ccca1df4 --- /dev/null +++ b/code/tutorials/hello-ratatui/src/main.rs @@ -0,0 +1,24 @@ +use color_eyre::Result; +use crossterm::event::{self, Event}; +use ratatui::{DefaultTerminal, Frame}; + +fn main() -> Result<()> { + color_eyre::install()?; + let terminal = ratatui::init(); + let result = run(terminal); + ratatui::restore(); + result +} + +fn run(mut terminal: DefaultTerminal) -> Result<()> { + loop { + terminal.draw(render)?; + if matches!(event::read()?, Event::Key(_)) { + break Ok(()); + } + } +} + +fn render(frame: &mut Frame) { + frame.render_widget("hello world", frame.area()); +} diff --git a/code/tutorials/hello-world/Cargo.toml b/code/tutorials/hello-world/Cargo.toml deleted file mode 100644 index 22c6201d3..000000000 --- a/code/tutorials/hello-world/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "hello-world" -version.workspace = true -edition.workspace = true -authors.workspace = true -license.workspace = true -publish.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -ratatui = "0.29.0" diff --git a/code/tutorials/hello-world/src/main.rs b/code/tutorials/hello-world/src/main.rs deleted file mode 100644 index 597689591..000000000 --- a/code/tutorials/hello-world/src/main.rs +++ /dev/null @@ -1,35 +0,0 @@ -// ANCHOR: imports -use std::io; - -use ratatui::{ - crossterm::event::{self, KeyCode, KeyEventKind}, - style::Stylize, - widgets::Paragraph, - DefaultTerminal, -}; -// ANCHOR_END: imports - -fn main() -> io::Result<()> { - let mut terminal = ratatui::init(); - terminal.clear()?; - let app_result = run(terminal); - ratatui::restore(); - app_result -} - -fn run(mut terminal: DefaultTerminal) -> io::Result<()> { - loop { - terminal.draw(|frame| { - let greeting = Paragraph::new("Hello Ratatui! (press 'q' to quit)") - .white() - .on_blue(); - frame.render_widget(greeting, frame.area()); - })?; - - if let event::Event::Key(key) = event::read()? { - if key.kind == KeyEventKind::Press && key.code == KeyCode::Char('q') { - return Ok(()); - } - } - } -} diff --git a/code/tutorials/hello.gif b/code/tutorials/hello.gif new file mode 100644 index 000000000..469ae0465 --- /dev/null +++ b/code/tutorials/hello.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:365ad70a037fdba27514dfcea090413694d3523e00abc69e1e16b576dcc71eed +size 1845297 diff --git a/src/content/docs/developer-guide/website.mdx b/src/content/docs/developer-guide/website.mdx index 018e5cdbc..cd393b1a6 100644 --- a/src/content/docs/developer-guide/website.mdx +++ b/src/content/docs/developer-guide/website.mdx @@ -86,14 +86,14 @@ Use the `remark-include-code` plugin to include code from a test file: ````markdown include=ignore ```rust -{{#include @code/tutorials/hello-world/src/main.rs:imports}} +{{#include @code/tutorials/hello-ratatui/src/main.rs}} ``` ```` This renders as: ```rust -{{#include @code/tutorials/hello-world/src/main.rs:imports}} +{{#include @code/tutorials/hello-ratatui/src/main.rs}} ``` ### svgbob diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 483453024..ea8f87293 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -9,8 +9,8 @@ hero: dark: ../../assets/hero-dark.png light: ../../assets/hero-light.png actions: - - text: Hello World Tutorial - link: /tutorials/hello-world + - text: Hello Ratatui Tutorial + link: /tutorials/hello-ratatui icon: right-arrow variant: primary - text: cargo add ratatui @@ -59,10 +59,10 @@ import { Card, CardGrid } from "@astrojs/starlight/components";

Next Steps

Get started with Ratatui by following the [installation guide]. If you're already set up, you - can jump straight into the [Hello World tutorial]. + can jump straight into the [Hello Ratatui tutorial]. [installation guide]: installation/ - [Hello World tutorial]: tutorials/hello-world/ + [Hello Ratatui tutorial]: tutorials/hello-ratatui/

diff --git a/src/content/docs/tutorials/counter-app/index.md b/src/content/docs/tutorials/counter-app/index.md index 8295d2492..8b5bc1f34 100644 --- a/src/content/docs/tutorials/counter-app/index.md +++ b/src/content/docs/tutorials/counter-app/index.md @@ -4,7 +4,7 @@ sidebar: order: 0 --- -The previous [hello world] tutorial introduced how to create a simple TUI that displayed some text +The previous [Hello Ratatui] tutorial introduced how to create a simple TUI that displayed some text and waited for the user to press a key. This tutorial will cover how to handle state and some more complex interactions. You will build a counter application that allows the user to increment and decrement a value on the screen. @@ -16,5 +16,5 @@ When you're finished the application will look like the following: The application will render the counter in a [`Paragraph`] widget. When the user presses the left and right arrow keys, the application will increment and decrement the value of the counter. -[hello world]: /tutorials/hello-world +[Hello Ratatui]: /tutorials/hello-ratatui [`Paragraph`]: https://docs.rs/ratatui/latest/ratatui/widgets/struct.Paragraph.html diff --git a/src/content/docs/tutorials/hello-ratatui/hello-ratatui.gif b/src/content/docs/tutorials/hello-ratatui/hello-ratatui.gif new file mode 100644 index 000000000..469ae0465 --- /dev/null +++ b/src/content/docs/tutorials/hello-ratatui/hello-ratatui.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:365ad70a037fdba27514dfcea090413694d3523e00abc69e1e16b576dcc71eed +size 1845297 diff --git a/src/content/docs/tutorials/hello-ratatui/hello-ratatui.png b/src/content/docs/tutorials/hello-ratatui/hello-ratatui.png new file mode 100644 index 000000000..f06ae9cf0 --- /dev/null +++ b/src/content/docs/tutorials/hello-ratatui/hello-ratatui.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c90f88829204b1aa62c63fb0fb5021adb3cba92dc94787e3ec0dfc38aa25ffb +size 8355 diff --git a/src/content/docs/tutorials/hello-ratatui/index.md b/src/content/docs/tutorials/hello-ratatui/index.md new file mode 100644 index 000000000..4a2b9d065 --- /dev/null +++ b/src/content/docs/tutorials/hello-ratatui/index.md @@ -0,0 +1,144 @@ +--- +title: Hello Ratatui +--- + +:::note + +Code for this tutorial is available to view at + + +::: + +This tutorial will lead you through creating a simple "Hello World" TUI app that displays some text +in the middle of the screen and waits for the user to press any key to exit. It demonstrates the +tasks that any application developed with Ratatui needs to undertake. + +We assume you have a basic understanding of the terminal, and have a text editor or IDE. If you +don't have a preference, [VSCode] with [rust-analyzer] makes a good default choice. + +[VSCode]: https://code.visualstudio.com/ +[rust-analyzer]: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer + +## Pre-requisites + +### Install Rust + +First install Rust if it is not already installed. See the [Installation] section of the official +Rust Book for more information. Most people use `rustup`, a command line tool for managing Rust +versions and associated tools. Ratatui requires at least Rust 1.74, but it's generally a good idea +to work with the latest stable version if you can. Once you've installed Rust, verify it's installed +by running: + +[Installation]: https://doc.rust-lang.org/book/ch01-01-installation.html + +```shell title="check rust version" +rustc --version +``` + +You should see output similar to the following (the exact version, date and commit hash will vary): + +```text +rustc 1.83.0 (90b35a623 2024-11-26) +``` + +### Install Cargo generate + +Ratatui has a few templates that make it easy to get started with a new project. [Cargo generate] is +a developer tool to help you get up and running quickly with a new Rust project by leveraging a +pre-existing git repository as a template. We will use it to create a new Ratatui project. + +[Cargo generate]: https://cargo-generate.github.io/cargo-generate/ + +Install `cargo-generate` by running the following command (or see the [installation instructions] +for other approaches to installing cargo-generate.) + +[installation instructions]: https://cargo-generate.github.io/cargo-generate/installation.html + +```shell +cargo install cargo-generate +``` + +## Create a New Project + +Let's create a new Rust project. In the terminal, navigate to a folder where you will store your +projects and run the following command to generate a new app using the simple ratatui template. (You +can find more information about this template in the [Hello World Template README]) + +[Hello World Template README]: https://github.com/ratatui/templates/blob/main/hello-world/README.md + +```shell title="create new rust project" +cargo generate ratatui/templates simple +``` + +You will be prompted for a project name to use. Enter `hello-ratatui`. + +```shell title="create new rust project" +$ cargo generate ratatui/templates +โš ๏ธ Favorite `ratatui/templates` not found in config, using it as a git repository: https://github.com/ratatui/templates.git +โœ” ๐Ÿคท Which sub-template should be expanded? ยท hello-world +๐Ÿคท Project Name: hello-ratatui +๐Ÿ”ง Destination: /Users/joshka/local/ratatui-website/code/tutorials/hello-ratatui ... +๐Ÿ”ง project-name: hello-ratatui ... +๐Ÿ”ง Generating template ... +๐Ÿ”ง Moving generated files into: `/Users/joshka/local/ratatui-website/code/tutorials/hello-ratatui`... +๐Ÿ”ง Initializing a fresh Git repository +โœจ Done! New project created /Users/joshka/local/ratatui-website/code/tutorials/hello-ratatui +``` + +### Examine the Project + +The `cargo generate` command creates a new folder called `hello-ratatui` with a basic binary +application in it. If you examine the folders and files created this will look like: + +```text +hello-ratatui/ +โ”œโ”€โ”€ src/ +โ”‚ โ””โ”€โ”€ main.rs +โ”œโ”€โ”€ Cargo.toml +โ”œโ”€โ”€ LICENSE +โ””โ”€โ”€ README.md +``` + +The `Cargo.toml` file is filled with some default values and the necessary dependencies (Ratatui and +Crossterm), and one useful dependency (Color-eyre) for nicer error handling. + +```rust title="cargo.toml" +{{#include @code/tutorials/hello-ratatui/Cargo.toml}} +``` + +The generate command created a default `main.rs` that runs the app: + +```rust title="main.rs" +{{#include @code/tutorials/hello-ratatui/src/main.rs}} +``` + +:::tip + +Before Ratatui 0.28.1, the setup of an app was quite a bit more complex. Older Ratatui apps may have +code that includes a lot of boilerplate code to set up the app. The latest version of Ratatui has +simplified this process to just calling `ratatui::init()` and `ratatui::restore()`. + +::: + +### Run the App + +Let's build and execute the project. Run: + +```shell title="run the app" +cd hello-ratatui +cargo run +``` + +You should see the build output and then a TUI app with a `Hello world` message. + +![hello](hello-ratatui.gif) + +You can press any key to exit and go back to your terminal as it was before. + +## Summary + +Congratulations! :tada: You have written a "hello world" terminal user interface with Ratatui. The +next sections will go into more detail about how Ratatui works. + +The next tutorial, [Counter App](/tutorials/counter-app/), introduces some more interactivity, and a +more robust approach to arranging your application code. diff --git a/src/content/docs/tutorials/hello-world.md b/src/content/docs/tutorials/hello-world.md deleted file mode 100644 index abc409860..000000000 --- a/src/content/docs/tutorials/hello-world.md +++ /dev/null @@ -1,298 +0,0 @@ ---- -title: Hello world ---- - -This tutorial will lead you through creating a simple "Hello World" TUI app that displays some text -in the middle of the screen and waits for the user to press q to exit. It demonstrates the necessary -tasks that any application developed with Ratatui needs to undertake. We assume you have a basic -understanding of the terminal, and have a text editor or Rust IDE. If you don't have a preference, -[VSCode] makes a good default choice. - -You're going to build the following: - -![hello](https://github.com/ratatui/ratatui-website/assets/381361/b324807e-915f-45b3-a4a2-d3b419eec387) - -The full code for this tutorial is available to view at - - -## Install Rust - -The first step is to install Rust. See the [Installation] section of the official Rust Book for more -information. Most people use `rustup`, a command line tool for managing Rust versions and associated -tools. - -Once you've installed Rust, verify it's installed by running: - -```shell title="check rust version" -rustc --version -``` - -You should see output similar to the following (the exact version, date and commit hash will vary): - -```text -rustc 1.80.1 (3f5fd8dd4 2024-08-06) -``` - -## Create a New Project - -Let's create a new Rust project. In the terminal, navigate to a folder where you will store your -projects and run: - -```shell title="create new rust project" -cargo new hello-ratatui -cd hello-ratatui -``` - -The `cargo new` command creates a new folder called `hello-ratatui` with a basic binary application -in it. You should see: - -```text -Created binary (application) `hello-ratatui` package -``` - -If you examine the folders and files created this will look like: - -```text -hello-ratatui/ -โ”œโ”€โ”€ src/ -โ”‚ โ””โ”€โ”€ main.rs -โ””โ”€โ”€ Cargo.toml -``` - -`cargo new` created a default `main.rs` with a small console program which prints "Hello, world!". - -```rust title="main.rs" -fn main() { - println!("Hello, world!"); -} -``` - -Let's build and execute the project. Run: - -```shell title="run the app" -cargo run -``` - -You should see: - -```text - Compiling hello-ratatui v0.1.0 (/Users/joshka/local/hello-ratatui) - Finished dev [unoptimized + debuginfo] target(s) in 0.18s - Running `target/debug/hello-ratatui` -Hello, world! -``` - -The default `main.rs` program is responsible for printing the last line. We're going to replace it -with something a little bit more exciting. - -## Install Ratatui - -First up, you need install the Ratatui crate into your project. You will also need to install a -[backend]. For this tutorial, use [Crossterm] as the backend as it's compatible with most operating -systems. To install the latest version of the `ratatui` and `crossterm` crates into the project run: - -```shell title="install ratatui and crossterm" -cargo add ratatui crossterm -``` - -Cargo will output the following (note the exact versions may be later than the ones in this -tutorial). - -```text - Updating crates.io index - Adding ratatui v0.28.1 to dependencies - Features: - + crossterm - + underline-color - - all-widgets - - document-features - - macros - - palette - - serde - - termion - - termwiz - - unstable - - unstable-rendered-line-info - - unstable-widget-ref - - widget-calendar - Updating crates.io index - Locking 66 packages to latest compatible versions - Adding hermit-abi v0.3.9 (latest: v0.4.0) - Adding linux-raw-sys v0.4.14 (latest: v0.6.5) - Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.2+wasi-0.2.1) - Adding windows-sys v0.52.0 (latest: v0.59.0) -``` - -If you examine the `Cargo.toml` file, you should see the new crates have been added to the -dependencies section: - -```toml title="Cargo.toml" -[dependencies] -ratatui = "0.28.1" -``` - -## Create a TUI Application - -Let's replace the default console application code which `cargo new` created with a Ratatui -application which displays a colored message in the middle of the screen and waits for the user to -press a key to exit. - -Note: a full copy of the code is available below in the [Run the application](#run-the-application) -section. - -### Add Imports - -First let's add the module imports necessary to run your application. - -- From `std` import the `io` module. -- From `ratatui` import: - - the [`crossterm::event`] module (and the KeyEvent and KeyEventKind types). See the [Crossterm - docs] for more information on these types. This is re-exported from the [Crossterm] crate. - - [`Stylize`], an extension trait which adds [style shorthands] to other types. - - [`Paragraph`] widget, which is used to display text. - - [`DefaultTerminal`] which provides the means to output to the terminal. - -In your editor, open `src/main.rs` and add the following at the top of the file. - -```rust title="main.rs" -{{#include @code/tutorials/hello-world/src/main.rs:imports}} -``` - -### Initialize the Terminal - -Next, add code to the main function to setup and restore the terminal state. - -Our application needs to do a few things in order to setup the terminal for use: - -- First, the application enters the [alternate screen], which is a secondary screen which allows - your application to render whatever it needs to, without disturbing the normal output of terminal - apps in your shell. -- Next, the application enables [raw mode], which turns off input and output processing by the - terminal. This gives your application control over when to print characters to the screen. -- The app then creates a [backend] and [`Terminal`] and then clears the screen. - -When the application is finished it needs to restore the terminal state by leaving the alternate -screen and disabling raw mode. - -:::caution - -If your app doesn't disable raw mode before exit, terminals can act weirdly when the mouse or -navigation keys are pressed. To fix this, on a Linux / macOS terminal type `reset`. On Windows, -you'll have to close the tab and open a new terminal. See the [panic hooks recipe] for more -information - -[panic hooks recipe]: /recipes/apps/panic-hooks/ - -::: - -Replace the existing `main` function with code to setup and restore the terminal: - -```rust title="main.rs" collapse={4-4,6-6} -{{#include @code/tutorials/hello-world/src/main.rs:main()}} -``` - -### Run a Main Loop - -The main part of an application is the main loop. The application repeatedly draws the ui and then -handles any events which have occurred. - -Create a method named `run()` and call it from the main function. - -```rust ins={4-4,6-6} title="main.rs" -{{#include @code/tutorials/hello-world/src/main.rs:main()}} -``` - -```rust title="main.rs" collapse={3-14} -{{#include @code/tutorials/hello-world/src/main.rs:run()}} -``` - -### Draw to the Terminal - -The [`Terminal::draw`] method is the main interaction point an app has with Ratatui. The `draw` -method accepts a closure (an anonymous method) with a single [`Frame`] parameter, and renders the -entire screen. Your application will create an area that is the full size of the terminal window and -render a new Paragraph with white foreground text and a blue background. - -Add the following code to the `run` method: - -```rust title="main.rs" collapse={9-14} ins={3-8} -{{#include @code/tutorials/hello-world/src/main.rs:run()}} -``` - -If you're wondering where to find the `white()` and `on_blue()` methods in the Ratatui doc, these -are defined in the [`Stylize`] extension trait as [style shorthands], rather than on the -[`Paragraph`] widget. - -### Handle Keyboard Events - -After Ratatui has drawn a frame, your application needs to check to see if any events have occurred. -These are things like keyboard presses, mouse events, resizes, etc. If the user has pressed the `q` -key, the app should break out of the loop. - -It's important to check that the event kind is `Press` otherwise Windows terminals will see each key -twice. - -Add the following code to the `run` method: - -```rust title="main.rs" collapse={3-9} ins={10-13} -{{#include @code/tutorials/hello-world/src/main.rs:run()}} -``` - -## Run the Application - -Your application should look like: - -```rust collapsed title="main.rs (click to expand)" -{{#include @code/tutorials/hello-world/src/main.rs}} -``` - -Make sure you save the file! Now you can run the app using: - -```shell title="run the app" -cargo run -``` - -You should see a TUI app with `Hello Ratatui! (press 'q' to quit)` show up in your terminal as a TUI -app. - -![hello](https://github.com/ratatui/ratatui-website/assets/381361/98eee556-6283-4aa5-a068-99392e1a5dda) - -You can press `q` to exit and go back to your terminal as it was before. - -Congratulations! :tada: - -You have written a "hello world" terminal user interface with Ratatui. The next sections will go -into more detail about how Ratatui works. - -:::tip - -Before Ratatui 0.28.1, the setup of an app was quite a bit more complex. You will likely see this in -existing applications for some time. - -::: - -:::note[Homework] - -Can you modify the example above to exit when pressing `q` _or_ when pressing `Q`? - -::: - -## Next Steps - -The next tutorial, [Counter App](/tutorials/counter-app/), introduces some more interactivity, and a -more robust approach to arranging your application code. - -[VSCode]: https://code.visualstudio.com/ -[Installation]: https://doc.rust-lang.org/book/ch01-01-installation.html -[raw mode]: /concepts/backends/raw-mode -[alternate screen]: /concepts/backends/alternate-screen -[backend]: /concepts/backends/comparison -[Crossterm]: https://crates.io/crates/crossterm -[Crossterm docs]: https://docs.rs/crossterm/0.27.0/crossterm/ -[`crossterm::event`]: https://docs.rs/crossterm/0.28.1/crossterm/event/index.html -[`DefaultTerminal`]: https://docs.rs/ratatui/latest/ratatui/type.DefaultTerminal.html -[`Stylize`]: https://docs.rs/ratatui/latest/ratatui/style/trait.Stylize.html -[`Paragraph`]: https://docs.rs/ratatui/latest/ratatui/widgets/struct.Paragraph.html -[`Terminal::draw`]: https://docs.rs/ratatui/latest/ratatui/struct.Terminal.html#method.draw -[`Frame`]: https://docs.rs/ratatui/latest/ratatui/struct.Frame.html -[style shorthands]: https://docs.rs/ratatui/latest/ratatui/style/#using-style-shorthands diff --git a/src/content/docs/tutorials/index.md b/src/content/docs/tutorials/index.md index 5999b357e..34849dae0 100644 --- a/src/content/docs/tutorials/index.md +++ b/src/content/docs/tutorials/index.md @@ -2,7 +2,7 @@ title: Tutorials --- -- [Hello World](./hello-world/): This tutorial takes you through the basics of creating a simple +- [Hello Ratatui](./hello-ratatui/): This tutorial takes you through the basics of creating a simple Ratatui application that displays "Hello World". - [Counter App](./counter-app/): This tutorial will set up the basics of a `ratatui` project by building a app that displays a counter. diff --git a/src/content/docs/tutorials/json-editor/index.md b/src/content/docs/tutorials/json-editor/index.md index a15ecd5ba..d34802ce6 100644 --- a/src/content/docs/tutorials/json-editor/index.md +++ b/src/content/docs/tutorials/json-editor/index.md @@ -4,9 +4,12 @@ sidebar: order: 0 --- -Now that we have covered some of the basics of a "hello world" and "counter" app, we are ready to +Now that we have covered some of the basics of a [Hello Ratatui] and [Counter] apps, we are ready to build and manage something more involved. +[Hello Ratatui]: /tutorials/hello-ratatui +[Counter]: /tutorials/counter-app + In this tutorial, we will be creating an application that gives the user a simple interface to enter key-value pairs, which will be converted and printed to `stdout` in json. The purpose of this application will be to give the user an interface to create correct json, instead of having to worry