From 616090aae3627405972e000d345b5a4fe5b7c8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 10:58:48 +0700 Subject: [PATCH 01/28] chore: pin the Rust toolchain to 1.100.0 One toolchain for CI, Docker, release builds and local work, so clippy and rustfmt give the same answer everywhere. Co-Authored-By: Claude Opus 5.5 --- rust-toolchain.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..a003f2a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,7 @@ +# One toolchain for CI, Docker, release builds and every machine. A drifting +# `stable` means local clippy and CI clippy disagree, and a release can fail on +# a lint nobody saw locally. Bump this deliberately, with the code-quality gate +# run on the new version. The MSRV is `rust-version` in Cargo.toml. +[toolchain] +channel = "1.100.0" +components = ["clippy", "rustfmt"] From d8d003f612ddf06982173f7f9bbaa1f835bc5cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 10:58:48 +0700 Subject: [PATCH 02/28] style: fix clippy 1.100 findings needless_range_loop in the suggestion fill passes and the grapheme clear become slice iteration; the test-only findings (bool asserts, field reassignment after Default, a redundant borrow in a log argument) are fixed so --all-targets is clean too. Co-Authored-By: Claude Opus 5.5 --- crates/flycontent/src/builder.rs | 8 ++++---- src/app/ui.rs | 14 +++++++++----- src/completions/tab_completion.rs | 2 +- src/grammar/dparser.rs | 24 ++++++++++++------------ src/settings.rs | 12 ++++++++---- 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/crates/flycontent/src/builder.rs b/crates/flycontent/src/builder.rs index 783b917..84ee41a 100644 --- a/crates/flycontent/src/builder.rs +++ b/crates/flycontent/src/builder.rs @@ -589,10 +589,10 @@ impl Contents { } // Clear all cells spanning this grapheme - for c in start_col..=end_col { - self.buf[row][c].cell.reset(); - self.buf[row][c].tag = T::default(); - self.buf[row][c].is_continuation = false; + for tagged in &mut self.buf[row][start_col..=end_col] { + tagged.cell.reset(); + tagged.tag = T::default(); + tagged.is_continuation = false; } // Set cursor to start_col and write the character using write_span_internal diff --git a/src/app/ui.rs b/src/app/ui.rs index 70fcec0..9097c8a 100644 --- a/src/app/ui.rs +++ b/src/app/ui.rs @@ -2004,13 +2004,16 @@ impl App<'_> { // Retroactive style/fill pass for the single row let suggestion_width = main_text_width; - for col_idx in (x as usize + 1)..(x as usize + 1 + inner_width) { - let cell = &mut content.buf[current_y as usize][col_idx]; + let first_col = x as usize + 1; + let row = &mut content.buf[current_y as usize]; + for (relative_col, cell) in row[first_col..first_col + inner_width] + .iter_mut() + .enumerate() + { if cell.cell.symbol().is_empty() { cell.cell.set_symbol(" "); } cell.tag = tag; - let relative_col = col_idx - (x as usize + 1); if relative_col < suggestion_width { cell.cell .set_style(Palette::convert_to_highlighted(cell.cell.style())); @@ -2053,8 +2056,9 @@ impl App<'_> { // Retroactive style/fill pass for the selected item rows to make sure they are highlighted properly let mut in_description = false; for row_idx in item_start_row..=item_end_row { - for col_idx in (x as usize + 1)..(x as usize + 1 + inner_width) { - let cell = &mut content.buf[row_idx as usize][col_idx]; + let first_col = x as usize + 1; + let row = &mut content.buf[row_idx as usize]; + for cell in &mut row[first_col..first_col + inner_width] { if !cell.cell.symbol().is_empty() && !cell.cell.style().add_modifier.contains(Modifier::REVERSED) { diff --git a/src/completions/tab_completion.rs b/src/completions/tab_completion.rs index eaa7344..198d921 100644 --- a/src/completions/tab_completion.rs +++ b/src/completions/tab_completion.rs @@ -2177,7 +2177,7 @@ mod tab_completion_tests { ); let outcome = apply_tab_complete_to_buffer(&mut buffer, &builder, &comp_context.word_under_cursor); - log::info!("Outcome of applying tab complete: {:?}", &outcome); + log::info!("Outcome of applying tab complete: {outcome:?}"); assert!(matches!(outcome, TabCompleteBufferOutcome::Pending { ref final_wuc } if final_wuc.as_ref() == "./fo/barA")); assert_eq!(buffer.buffer(), "mycmd ./fo/barA"); } diff --git a/src/grammar/dparser.rs b/src/grammar/dparser.rs index 9bbea8b..0771d96 100644 --- a/src/grammar/dparser.rs +++ b/src/grammar/dparser.rs @@ -2906,25 +2906,25 @@ mod test_keyword_bracket_color { let tokens = parser.tokens(); // echo - assert_eq!(tokens[0].annotations.is_glob, false); + assert!(!tokens[0].annotations.is_glob); // *.txt - assert_eq!(tokens[2].annotations.is_glob, true); + assert!(tokens[2].annotations.is_glob); // ./foo/ - assert_eq!(tokens[4].annotations.is_glob, false); + assert!(!tokens[4].annotations.is_glob); // { - assert_eq!(tokens[5].annotations.is_glob, true); + assert!(tokens[5].annotations.is_glob); // a,b - assert_eq!(tokens[6].annotations.is_glob, true); + assert!(tokens[6].annotations.is_glob); // } - assert_eq!(tokens[7].annotations.is_glob, true); + assert!(tokens[7].annotations.is_glob); // bar - assert_eq!(tokens[9].annotations.is_glob, false); + assert!(!tokens[9].annotations.is_glob); // [ - assert_eq!(tokens[10].annotations.is_glob, true); + assert!(tokens[10].annotations.is_glob); // 0-9 - assert_eq!(tokens[11].annotations.is_glob, true); + assert!(tokens[11].annotations.is_glob); // ] - assert_eq!(tokens[12].annotations.is_glob, true); + assert!(tokens[12].annotations.is_glob); } #[test] @@ -2934,12 +2934,12 @@ mod test_keyword_bracket_color { let tokens = parser.tokens(); // ls - assert_eq!(tokens[0].annotations.is_glob, false); + assert!(!tokens[0].annotations.is_glob); assert_eq!(tokens[0].annotations.command_word, Some("ls".to_string())); // All tokens inside @(...) should be marked is_glob = true for t in &tokens[2..] { - assert_eq!(t.annotations.is_glob, true); + assert!(t.annotations.is_glob); // '|' inside extglob should not create spurious command_word annotations assert_ne!(t.annotations.command_word, Some("bar".to_string())); assert_ne!(t.annotations.command_word, Some("baz2".to_string())); diff --git a/src/settings.rs b/src/settings.rs index 9542338..e931ec0 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -651,8 +651,10 @@ mod tests { #[test] fn test_settings_diff_detects_changed_history_jsonl_path() { - let mut settings = Settings::default(); - settings.history_jsonl_path = std::path::PathBuf::from("/tmp/test.jsonl"); + let settings = Settings { + history_jsonl_path: std::path::PathBuf::from("/tmp/test.jsonl"), + ..Settings::default() + }; let diff = settings.diff(); let changed: Vec<_> = diff.iter().filter(|e| !e.is_default).collect(); assert_eq!(changed.len(), 1); @@ -702,8 +704,10 @@ mod tests { #[test] fn test_settings_diff_detects_changed_delayed_startup_ms() { - let mut settings = Settings::default(); - settings.delayed_startup_ms = 300; + let settings = Settings { + delayed_startup_ms: 300, + ..Settings::default() + }; let diff = settings.diff(); let changed: Vec<_> = diff.iter().filter(|e| !e.is_default).collect(); assert_eq!(changed.len(), 1); From ebc42a18be6f9b9e8be93aa5c708b2986421c10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:04:13 +0700 Subject: [PATCH 03/28] chore(deps): upgrade every dependency to its latest release - nix 0.29 -> 0.32: unistd::read takes AsFd now; borrow the fd as the write path already does. - dirs 6 -> 7 (only Windows preference_dir changed). - clap 4.6.9, clap_complete 4.6.12, uuid 1.29 and a full lockfile refresh, including the ratatui and ansi-to-tui fork branches. - flycomp 754be16 -> 34e8e6e (no thread-local state, snakemake). - parking_lot stays at 0.12: termina still requires ^0.12, so 0.13 would link two copies of the lock crates and raise the MSRV to 1.95. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 479 ++++++++++++++++++++++++-------------------- Cargo.toml | 16 +- src/subshell_ipc.rs | 2 +- 3 files changed, 272 insertions(+), 225 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8cc8fef..3425be9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,7 +41,7 @@ dependencies = [ "ratatui-core", "simdutf8", "smallvec", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -110,19 +110,19 @@ dependencies = [ ] [[package]] -name = "arrayvec" -version = "0.7.8" +name = "ar_archive_writer" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" +checksum = "523e5e187fff36fcb8d1d19ccf0ca4ca43ec3d158316057f66dc6f72716bc5ec" +dependencies = [ + "object", +] [[package]] -name = "atomic" -version = "0.6.1" +name = "arrayvec" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" -dependencies = [ - "bytemuck", -] +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" [[package]] name = "autocfg" @@ -159,9 +159,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.1" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" dependencies = [ "serde_core", ] @@ -177,9 +177,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "by_address" @@ -187,12 +187,6 @@ 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" @@ -204,9 +198,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.4.2" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" +checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69" dependencies = [ "find-msvc-tools", "shlex", @@ -214,9 +208,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" @@ -226,12 +220,12 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", + "cpufeatures 0.3.1", "rand_core 0.10.1", ] @@ -250,9 +244,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +checksum = "844c5c0b65be192cb68d570cca1b21a6444431d24e39c084dc0336177015337c" dependencies = [ "clap_builder", "clap_derive", @@ -272,9 +266,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.11" +version = "4.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f" +checksum = "6a35200383f20018d41c14d1ab19c1727c697f544492143f7d93aa39f0187848" dependencies = [ "clap", "clap_lex", @@ -284,21 +278,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "e0921b3876b3a1df8a1c9f912e7f94342458022c2e84288015893d83c4d62a79" [[package]] name = "colorchoice" @@ -347,18 +341,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64" dependencies = [ "cfg-if", ] @@ -369,7 +363,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "crossterm_winapi", "mio", "parking_lot", @@ -386,13 +380,13 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "crossterm_winapi", "derive_more", "document-features", "mio", "parking_lot", - "rustix 1.1.4", + "rustix 1.1.6", "serde", "signal-hook", "signal-hook-mio", @@ -430,9 +424,9 @@ dependencies = [ [[package]] name = "ctor" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d" +checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" dependencies = [ "link-section", "linktime-proc-macro", @@ -440,9 +434,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" dependencies = [ "darling_core", "darling_macro", @@ -450,26 +444,26 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" dependencies = [ "ident_case", "proc-macro2", "quote", "strsim", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] name = "darling_macro" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ "darling_core", "quote", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] @@ -480,9 +474,9 @@ checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" [[package]] name = "deranged" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" [[package]] name = "derive_more" @@ -518,9 +512,9 @@ dependencies = [ [[package]] name = "dirs" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" dependencies = [ "dirs-sys", ] @@ -555,7 +549,7 @@ dependencies = [ "chrono", "rust_decimal", "serde", - "thiserror 2.0.20", + "thiserror 2.0.21", "time", "winnow", ] @@ -568,21 +562,21 @@ checksum = "1ff18235504129e34c411871066cfa4ad108ed6a28d5fb2417057aff7f99bee4" [[package]] name = "either" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "errno" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", "windows-sys 0.61.2", @@ -626,15 +620,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.10" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" [[package]] name = "finl_unicode" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9844ddc3a6e533d62bba727eb6c28b5d360921d5175e9ff0f1e621a5c590a4d5" +checksum = "09ded33109e99472f809cb7495544506eea45e366725dacf2a383e184f660456" [[package]] name = "fixedbitset" @@ -644,12 +638,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" dependencies = [ "crc32fast", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -667,7 +662,7 @@ dependencies = [ [[package]] name = "flycomp" version = "1.1.2" -source = "git+https://github.com/HalFrgrd/flycomp.git?rev=754be16d7a2130ad12b6d038d42a8933c92c103f#754be16d7a2130ad12b6d038d42a8933c92c103f" +source = "git+https://github.com/HalFrgrd/flycomp.git?rev=34e8e6e798fa35b4daa3d4c5586241e95d2dbacf#34e8e6e798fa35b4daa3d4c5586241e95d2dbacf" dependencies = [ "anyhow", "chrono", @@ -694,7 +689,7 @@ dependencies = [ "lscolors", "parse-style", "pulldown-cmark", - "rand 0.10.3", + "rand 0.10.4", "ratatui", "serde", "skim", @@ -726,11 +721,11 @@ dependencies = [ "log", "lscolors", "mimalloc", - "nix", + "nix 0.32.0", "parking_lot", "parse-style", "pulldown-cmark", - "rand 0.10.3", + "rand 0.10.4", "ratatui", "rmp-serde", "rusty-fork", @@ -792,17 +787,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.3.4" @@ -829,20 +813,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.2" 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" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" dependencies = [ "allocator-api2", "equivalent", @@ -893,34 +866,34 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "2.14.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.17.1", + "hashbrown", ] [[package]] name = "indoc" -version = "2.0.7" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1" dependencies = [ "rustversion", ] [[package]] name = "instability" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf84e73fa6f27f299dec58e13223cf70db80da872eb921d4f6138342a0eabc8" +checksum = "4c3b5acc1e2fd9375041a388da33d1eb8aed5f7a8c0dd3543e3ea2805adfbe20" dependencies = [ "darling", "indoc", "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] @@ -958,15 +931,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] name = "js-sys" -version = "0.3.104" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ "cfg-if", "futures-util", @@ -975,13 +948,13 @@ dependencies = [ [[package]] name = "kasuari" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +checksum = "72f14c90e40a6133f4805b83542a7ed7364f56070b447f56e7f4e90297122209" dependencies = [ - "hashbrown 0.16.1", + "hashbrown", "portable-atomic", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] @@ -992,9 +965,9 @@ checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "libc" @@ -1019,9 +992,9 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.19" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ "libc", ] @@ -1032,14 +1005,14 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] name = "link-section" -version = "0.19.3" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c29a617ce3df32c08497bdc1ab6e2376e0b17948ac166a2fbe5977c5954cd9" +checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" [[package]] name = "linktime-proc-macro" @@ -1061,9 +1034,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litrs" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" [[package]] name = "lock_api" @@ -1076,17 +1049,17 @@ dependencies = [ [[package]] name = "log" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "lru" -version = "0.18.2" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2f2f9b4ba7e6b24d95e7e899329d35be83bcded72c8540cdd5368932d1d90a" +checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5" dependencies = [ - "hashbrown 0.17.1", + "hashbrown", ] [[package]] @@ -1101,12 +1074,12 @@ dependencies = [ [[package]] name = "mac_address" -version = "1.1.8" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" +checksum = "f3d0581a75c45969c63afd2bb87b1d8b25cfcc556c7a918cf9bb13b0fe8d2381" dependencies = [ - "nix", - "winapi", + "nix 0.31.4", + "windows-sys 0.61.2", ] [[package]] @@ -1147,9 +1120,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.9" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" dependencies = [ "adler2", "simd-adler32", @@ -1157,9 +1130,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.2" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" dependencies = [ "libc", "log", @@ -1173,13 +1146,37 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nix" +version = "0.31.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc81ce8148d3b4f3274da811f11cdd824ae661ee4ef732cdb229825cf5be7f7" +dependencies = [ + "bitflags 2.13.2", "cfg-if", "cfg_aliases", "libc", "memoffset", ] +[[package]] +name = "nix" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -1236,9 +1233,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +checksum = "cabcc654086861f9e1bc5115258de62ef92c79b20f4615a1b0cc57c4e82027d4" dependencies = [ "libc", ] @@ -1249,6 +1246,15 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f" +[[package]] +name = "object" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.21.4" @@ -1340,25 +1346,26 @@ checksum = "10540d36f138f1416b40b8506a837f851658864110501cf1273a33eb2b687282" dependencies = [ "phf 0.14.0", "strum", - "thiserror 2.0.20", + "thiserror 2.0.21", "unicase", ] [[package]] name = "pest" -version = "2.8.8" +version = "2.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df728be843c7070fab6ab7c328c4e9e9d78e23bf749c0669c86ee7ebfa050a2" +checksum = "5ec53fd1d256900a9a771bf2720d42cef6f8bc91b4e25065fbd291e3e7222576" dependencies = [ "memchr", + "pest_stack_guard", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.8" +version = "2.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2dd6fc3b26b3462ee188aac870f5a41d398f1cd5e2408d16531bd71c9591fd" +checksum = "adcf794fd301ddc20818a6b4de85ed507f4b45300245cec948982e69e12e3bd7" dependencies = [ "pest", "pest_generator", @@ -1366,26 +1373,36 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.8" +version = "2.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7a9205cfb6f596a9e8b689c0a15f9ceb7a1aafae7aaf788150ac65b29975b6" +checksum = "c3073afae5db334c25dea9fc3e230a4f191e920c1df080cb9c0b37c9ce1dbb41" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] name = "pest_meta" -version = "2.8.8" +version = "2.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85abd351c0de1e8384fc791a0737111a350394937e92b956b743dac12429f57c" +checksum = "7bc7f614b3742541642af1685faaa910bf6333e3cd3729c2cccd118146a57327" dependencies = [ "pest", ] +[[package]] +name = "pest_stack_guard" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac6154fd4418b8f0b82532c59c26f303f9ca59a64c883e8ce3971fd82733439" +dependencies = [ + "psm", + "stacker", +] + [[package]] name = "phf" version = "0.11.3" @@ -1424,7 +1441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand 0.8.7", + "rand 0.8.8", ] [[package]] @@ -1485,9 +1502,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" [[package]] name = "portable-atomic" @@ -1497,9 +1514,9 @@ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "powerfmt" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" [[package]] name = "proc-macro2" @@ -1510,13 +1527,23 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622" +dependencies = [ + "ar_archive_writer", + "cc", +] + [[package]] name = "pulldown-cmark" version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db2be46835f013dd3f4fa7f5f7402c537787b54ebb6fe2b94bbdd7e2669bb7b" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "memchr", "unicase", ] @@ -1550,18 +1577,18 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" dependencies = [ "rand_core 0.6.4", ] [[package]] name = "rand" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -1602,9 +1629,9 @@ name = "ratatui-core" version = "0.1.2" source = "git+https://github.com/HalFrgrd/ratatui.git?branch=inline_viewport_improvments#d14aea579c647f23d5ec9d37600cafd22acee3f4" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "compact_str", - "hashbrown 0.17.1", + "hashbrown", "itertools 0.14.0", "kasuari", "log", @@ -1612,7 +1639,7 @@ dependencies = [ "palette", "serde", "strum", - "thiserror 2.0.20", + "thiserror 2.0.21", "unicode-segmentation", "unicode-truncate", "unicode-width", @@ -1674,8 +1701,8 @@ name = "ratatui-widgets" version = "0.3.2" source = "git+https://github.com/HalFrgrd/ratatui.git?branch=inline_viewport_improvments#d14aea579c647f23d5ec9d37600cafd22acee3f4" dependencies = [ - "bitflags 2.13.1", - "hashbrown 0.17.1", + "bitflags 2.13.2", + "hashbrown", "indoc", "instability", "itertools 0.14.0", @@ -1694,25 +1721,24 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", ] [[package]] name = "redox_users" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ - "getrandom 0.2.17", "libredox", - "thiserror 2.0.20", + "thiserror 2.0.21", ] [[package]] name = "regex" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" dependencies = [ "aho-corasick", "memchr", @@ -1722,9 +1748,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" dependencies = [ "aho-corasick", "memchr", @@ -1739,9 +1765,9 @@ checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" [[package]] name = "rmp" @@ -1764,9 +1790,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.42.1" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2a24f50780bc85f09cc6ac299bdf1424302742d77221106859c9d8b102126a" +checksum = "7653272e75dcac41dc199fbea6f5797633994fafd339943c06c9af16bf29cd3a" dependencies = [ "arrayvec", "num-traits", @@ -1787,7 +1813,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys 0.4.15", @@ -1796,11 +1822,11 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys 0.12.1", @@ -1870,7 +1896,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] @@ -1950,9 +1976,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" [[package]] name = "skim" @@ -1973,9 +1999,22 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.2" +version = "1.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" + +[[package]] +name = "stacker" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.61.2", +] [[package]] name = "static_assertions" @@ -2034,9 +2073,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -2052,7 +2091,7 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix 1.1.4", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -2061,9 +2100,9 @@ name = "termina" version = "0.3.3" source = "git+https://github.com/HalFrgrd/termina.git?rev=dfa34e768a46d298e4b06fff6242c3d571f7061f#dfa34e768a46d298e4b06fff6242c3d571f7061f" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.2", "parking_lot", - "rustix 1.1.4", + "rustix 1.1.6", "signal-hook", "windows-sys 0.61.2", ] @@ -2108,7 +2147,7 @@ checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" dependencies = [ "anyhow", "base64", - "bitflags 2.13.1", + "bitflags 2.13.2", "fancy-regex", "filedescriptor", "finl_unicode", @@ -2118,7 +2157,7 @@ dependencies = [ "libc", "log", "memmem", - "nix", + "nix 0.29.0", "num-derive", "num-traits", "ordered-float", @@ -2154,11 +2193,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "thiserror-impl 2.0.20", + "thiserror-impl 2.0.21", ] [[package]] @@ -2174,13 +2213,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.20" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.10", ] [[package]] @@ -2231,21 +2270,21 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "8f20bdbfc9915686faa18fb5bbe8b4552778505defbf9f12289beefbc44092a6" [[package]] name = "unicase" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" [[package]] name = "unicode-segmentation" @@ -2278,11 +2317,10 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.29.0" +version = "1.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" dependencies = [ - "atomic", "getrandom 0.4.3", "js-sys", "serde_core", @@ -2330,12 +2368,11 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.127" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -2343,9 +2380,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.127" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2353,22 +2390,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.127" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.127" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] @@ -2625,6 +2662,12 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + [[package]] name = "zmij" version = "1.0.23" diff --git a/Cargo.toml b/Cargo.toml index 11946b0..34c64cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,8 +9,8 @@ flybuffer = { path = "crates/flybuffer" } flycontent = { path = "crates/flycontent" } anyhow = "1.0" -clap = { version = "4.6.1", features = ["derive"] } -clap_complete = { version = "4.6.3", features = ["unstable-dynamic"] } +clap = { version = "4.6.9", features = ["derive"] } +clap_complete = { version = "4.6.12", features = ["unstable-dynamic"] } easing-function = "0.1" itertools = "0.15" log = "0.4" @@ -54,18 +54,22 @@ chrono = "0.4" clap.workspace = true clap_complete.workspace = true ctor = "1.0" -dirs = "6.0" +dirs = "7.0" duration-str = "0.21" easing-function.workspace = true flybuffer.workspace = true -flycomp = { git = "https://github.com/HalFrgrd/flycomp.git", rev = "754be16d7a2130ad12b6d038d42a8933c92c103f" } +flycomp = { git = "https://github.com/HalFrgrd/flycomp.git", rev = "34e8e6e798fa35b4daa3d4c5586241e95d2dbacf" } flycontent.workspace = true itertools.workspace = true libc = "0.2" log.workspace = true lscolors.workspace = true mimalloc = { version = "0.1", default-features = false, features = ["local_dynamic_tls"] } -nix = { version = "0.29", features = ["fs", "poll", "process", "signal", "user"] } +nix = { version = "0.32", features = ["fs", "poll", "process", "signal", "user"] } +# Held at 0.12: termina (^0.12, also in 0.4.0) would keep 0.12 in the graph, so +# 0.13 compiles parking_lot, parking_lot_core and lock_api twice into the dylib +# that every shell loads, and raises the MSRV to 1.95. Its gain is contended +# lock throughput, which a line editor does not hit. Move when termina does. parking_lot = "0.12" parse-style.workspace = true pulldown-cmark.workspace = true @@ -81,7 +85,7 @@ termina.workspace = true tui-scrollbar.workspace = true unicode-segmentation.workspace = true unicode-width.workspace = true -uuid = { version = "1.10", features = ["v7"] } +uuid = { version = "1.29", features = ["v7"] } [features] pre_bash_4_4 = [] diff --git a/src/subshell_ipc.rs b/src/subshell_ipc.rs index 4a1ecc6..903ff02 100644 --- a/src/subshell_ipc.rs +++ b/src/subshell_ipc.rs @@ -92,7 +92,7 @@ const MAX_PAYLOAD_SIZE: usize = 1024 * 1024 * 1024; // 1 GB limit fn read_exact_fd(fd: RawFd, mut buf: &mut [u8]) -> std::io::Result<()> { while !buf.is_empty() { - match nix::unistd::read(fd, buf) { + match nix::unistd::read(unsafe { BorrowedFd::borrow_raw(fd) }, buf) { Ok(0) => { return Err(std::io::Error::new( std::io::ErrorKind::UnexpectedEof, From 919cf2c63bb7fc22bb6095008274b1b6b6bbd916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:04:20 +0700 Subject: [PATCH 04/28] build: compile only the dependency features flyline uses ctor is needed only by the pre-4.4 build's load constructor, so it becomes optional behind pre_bash_4_4 (Cargo 1.100 flags it as unused in the default build). duration-str drops its default chrono/time/serde features; flyline calls only parse(). Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 3 --- Cargo.toml | 9 ++++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3425be9..36a5bd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -546,11 +546,8 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "027cd1402a609c71a9ac333c7e3d90ee042e7a131da1a83da8c60df323f12f61" dependencies = [ - "chrono", "rust_decimal", - "serde", "thiserror 2.0.21", - "time", "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index 34c64cf..ef5d40a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,9 +53,12 @@ anyhow.workspace = true chrono = "0.4" clap.workspace = true clap_complete.workspace = true -ctor = "1.0" +# Only the pre-4.4 build needs a load-time constructor (newer bash calls +# flyline_builtin_load itself). +ctor = { version = "1.0", optional = true } dirs = "7.0" -duration-str = "0.21" +# Only `parse` is used; the default features pull in chrono, time and serde. +duration-str = { version = "0.21", default-features = false } easing-function.workspace = true flybuffer.workspace = true flycomp = { git = "https://github.com/HalFrgrd/flycomp.git", rev = "34e8e6e798fa35b4daa3d4c5586241e95d2dbacf" } @@ -88,7 +91,7 @@ unicode-width.workspace = true uuid = { version = "1.29", features = ["v7"] } [features] -pre_bash_4_4 = [] +pre_bash_4_4 = ["dep:ctor"] [dev-dependencies] rusty-fork = "0.3.1" From c058ebf097a617bc801a262c861ab31973779e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:04:29 +0700 Subject: [PATCH 05/28] chore: declare rust-version 1.91 and share package settings The MSRV comes from the dependency tree (skim needs 1.91); edition and rust-version now live in [workspace.package]. flyline and flycontent are marked publish = false: the cdylib and its rendering crate are not crates.io packages. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 10 +++++++++- crates/flybuffer/Cargo.toml | 3 ++- crates/flycontent/Cargo.toml | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef5d40a..2fd5561 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,12 @@ members = [ "crates/flycontent", ] +[workspace.package] +edition = "2024" +# MSRV, set by the dependency tree (skim needs 1.91). CI checks it in the msrv +# job of code-quality.yml; everything else builds with rust-toolchain.toml. +rust-version = "1.91" + [workspace.dependencies] flybuffer = { path = "crates/flybuffer" } flycontent = { path = "crates/flycontent" } @@ -39,7 +45,9 @@ multiple_crate_versions = { level = "allow", priority = 1 } [package] name = "flyline" version = "1.11.0" -edition = "2024" +edition.workspace = true +rust-version.workspace = true +publish = false [lints] workspace = true diff --git a/crates/flybuffer/Cargo.toml b/crates/flybuffer/Cargo.toml index a81c4ab..759a709 100644 --- a/crates/flybuffer/Cargo.toml +++ b/crates/flybuffer/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "flybuffer" version = "0.1.0" -edition = "2024" +edition.workspace = true +rust-version.workspace = true description = "Simple text buffer library" license = "MIT" repository = "https://github.com/HalFrgrd/flyline" diff --git a/crates/flycontent/Cargo.toml b/crates/flycontent/Cargo.toml index 879fd61..f5db477 100644 --- a/crates/flycontent/Cargo.toml +++ b/crates/flycontent/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "flycontent" version = "0.1.0" -edition = "2024" +edition.workspace = true +rust-version.workspace = true +publish = false [lints] workspace = true From f5e11b8ac0c17a4b07b5f3ec7fb1cd8ec44993bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:04:29 +0700 Subject: [PATCH 06/28] chore(deps): update nixpkgs flake input to 2026-11-21 Co-Authored-By: Claude Opus 5.5 --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index fe90317..1b51811 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1783522502, - "narHash": "sha256-iffAls3iaNTyJC2faYcUXSI+Gp02cDjYl+MygxKl2GI=", + "lastModified": 1795234589, + "narHash": "sha256-f/VVvxf5RsQgWVhUtefoca5ktVg0DA2bnkMOcmSnozo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0bb7ec54c8483066ec9d7720e780a5caa71f8612", + "rev": "2786a2a72088ecf32aea5b3ec52099e6a7cff78f", "type": "github" }, "original": { From 9d718ed7d2616a6397ef04d620d42e381f1dffcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:06:57 +0700 Subject: [PATCH 07/28] ci: check advisories, licences, bans and sources with cargo deny deny.toml allows exactly the licences the tree needs, denies wildcard requirements and any registry or git source other than crates.io and the five HalFrgrd forks flyline builds from. The new supply-chain workflow runs cargo deny and cargo audit on dependency changes and nightly. chrono's unmaintained advisory (RUSTSEC-2026-0543) is ignored with a reason: prompt \D{format} strings are chrono strftime by contract and flycomp's build script uses it, so replacing it is its own change. Co-Authored-By: Claude Opus 5.5 --- .cargo/audit.toml | 6 ++++ .github/workflows/supply-chain.yml | 57 ++++++++++++++++++++++++++++++ deny.toml | 50 ++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 .cargo/audit.toml create mode 100644 .github/workflows/supply-chain.yml create mode 100644 deny.toml diff --git a/.cargo/audit.toml b/.cargo/audit.toml new file mode 100644 index 0000000..9c5241d --- /dev/null +++ b/.cargo/audit.toml @@ -0,0 +1,6 @@ +# cargo audit (supply-chain.yml) reads this; keep it in step with the +# [advisories] ignore list in deny.toml, which carries the reasons. +[advisories] +ignore = [ + "RUSTSEC-2026-0543", # chrono unmaintained +] diff --git a/.github/workflows/supply-chain.yml b/.github/workflows/supply-chain.yml new file mode 100644 index 0000000..e2df316 --- /dev/null +++ b/.github/workflows/supply-chain.yml @@ -0,0 +1,57 @@ +name: Supply chain + +# Advisories, licences, bans and sources of the dependency tree (deny.toml). +# Pull requests run it when the dependencies change; the schedule catches +# advisories published against a lockfile nobody touched. +on: + workflow_dispatch: + schedule: + - cron: "0 5 * * *" + push: + branches: [master] + paths: &deps + - "Cargo.toml" + - "Cargo.lock" + - "crates/*/Cargo.toml" + - "deny.toml" + - ".cargo/audit.toml" + - ".github/workflows/supply-chain.yml" + pull_request: + branches: [master] + paths: *deps + +concurrency: + group: supply-chain-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + CARGO_NET_RETRY: 5 + +jobs: + deny: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.100.0" + - uses: Swatinem/rust-cache@v2 + with: + key: supply-chain + - name: Install cargo-deny and cargo-audit + # Pinned; rust-cache keeps ~/.cargo/bin, so later runs skip the build. + run: cargo install --locked cargo-deny@0.22.0 cargo-audit@0.23.0 + - name: cargo deny + run: cargo deny check + - name: cargo audit + # cargo-deny checks the crates the build compiles; cargo-audit reads + # every Cargo.lock entry, including ones never compiled (weak optional + # dependencies of the git forks), so it sees what cargo-deny skips. + run: cargo audit diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..5877630 --- /dev/null +++ b/deny.toml @@ -0,0 +1,50 @@ +# `cargo deny check` runs in .github/workflows/supply-chain.yml. Every target +# triple is in the graph, so Linux-, Android- and macOS-only crates are all +# checked. + +[advisories] +yanked = "deny" +ignore = [ + # chrono is unmaintained (no fix exists). flyline's prompt `\D{format}` + # strings and `flyline` time formatting are chrono strftime by contract, + # and flycomp (build script) uses it too, so swapping to jiff or time is + # its own change. Not a vulnerability. + { id = "RUSTSEC-2026-0543", reason = "chrono unmaintained; migration tracked separately" }, +] + +[licenses] +# Exactly the licences the dependency tree needs; cargo-deny warns when one +# stops being used. Crates offering a choice (MIT OR Apache-2.0, …) are +# satisfied by one of these, so their other options need no entry. +allow = [ + "Apache-2.0", + "BSL-1.0", # ryu + "MIT", + "MPL-2.0", # termina, option-ext (dirs) + "Unicode-3.0", # unicode-ident + "Zlib", # foldhash +] + +[licenses.private] +# flyline and flycontent are `publish = false`; their licence is in +# LICENSE-MIT / LICENSE-GPLv3 and the README, not a crates.io field. +ignore = true + +[bans] +multiple-versions = "warn" +wildcards = "deny" +# Workspace path dependencies (flybuffer, flycontent) carry no version. +allow-wildcard-paths = true + +[sources] +unknown-registry = "deny" +unknown-git = "deny" +# The patched ratatui/termina and the skim/ansi-to-tui/flycomp forks have no +# crates.io release carrying flyline's changes. Nothing else may come from git. +allow-git = [ + "https://github.com/HalFrgrd/ansi-to-tui.git", + "https://github.com/HalFrgrd/flycomp.git", + "https://github.com/HalFrgrd/ratatui.git", + "https://github.com/HalFrgrd/skim", + "https://github.com/HalFrgrd/termina.git", +] From 17f04c14d7295abdeb76666abdb51513963b172d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:06:57 +0700 Subject: [PATCH 08/28] ci: lint on the pinned toolchain and check the MSRV Code Quality ran in a rust:1.94.1 container while the repo now pins 1.100.0; it now installs the pinned toolchain, caches the build, lints --all-targets with --locked, and drops the unneeded contents: write. Its push trigger named main, which this repo does not have; it is master now. A new msrv job checks 1.91 with RUSTUP_TOOLCHAIN overriding rust-toolchain.toml, for both the default and pre_bash_4_4 builds. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/code-quality.yml | 56 +++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 3dafd70..c08be63 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -5,7 +5,7 @@ run-name: Code Quality on: # yamllint disable-line rule:truthy workflow_dispatch: push: - branches: [ main ] + branches: [ master ] pull_request: branches: [ '**' ] @@ -21,24 +21,62 @@ defaults: permissions: contents: read +env: + CARGO_TERM_COLOR: always + CARGO_NET_RETRY: 5 + jobs: build: name: Check Code runs-on: ubuntu-latest - container: docker.io/rust:1.94.1-slim-trixie + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + + # Same version as rust-toolchain.toml, so this gate and local clippy agree. + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.100.0" + components: clippy, rustfmt + + - uses: Swatinem/rust-cache@v2 + with: + key: code-quality - permissions: - contents: write # Required to checkout the repository and push to a release + - name: Check Code + run: | + cargo fmt --all -- --check + cargo clippy --workspace --locked --quiet --all-features --all-targets -- -D warnings + cargo doc --workspace --locked --quiet --no-deps --document-private-items + msrv: + name: Check MSRV (1.91) + runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v7.0.1 with: persist-credentials: false - - name: Check Code + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.91.0" + + - uses: Swatinem/rust-cache@v2 + with: + key: msrv-1.91 + + - name: Check advertised minimum Rust version + # rust-toolchain.toml pins 1.100.0 for the workspace; this job must + # override it explicitly or rustup follows the file and the check + # below runs on the pinned version instead of exercising the MSRV. + env: + RUSTUP_TOOLCHAIN: "1.91.0" run: | - rustup component add clippy rustfmt rust-docs - cargo fmt --all -- --check - cargo clippy --workspace --quiet --all-features -- -D warnings - cargo doc --workspace --quiet --no-deps --document-private-items + rustc --version | grep -E '^rustc 1[.]91[.]0 ' + cargo check --workspace --locked --all-targets + cargo check --workspace --locked --all-targets --features pre_bash_4_4 From 1f0665a77106d7d7b41a73e98aa37350f8106b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:06:57 +0700 Subject: [PATCH 09/28] ci: give each pull request its own CI concurrency group One global group queued every PR behind the others and cancelled the pending run whenever a third arrived. A newer push now supersedes only its own PR's run; master and dispatch runs are never cancelled. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fba1021..8108399 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,12 @@ on: branches: [ "**" ] workflow_dispatch: +# A newer push to the same PR supersedes the older run. A single global group +# made every PR queue behind every other and cancelled whichever was pending. +# Never cancel master/dispatch runs. concurrency: - group: ci - cancel-in-progress: false + group: ci-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read From 48b25a9a1a4f2158a335ba6635378d0adc799705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:06:57 +0700 Subject: [PATCH 10/28] ci(release): build with the pinned toolchain and pin cross dtolnay/rust-toolchain@stable added the release targets to a toolchain rustup does not select inside the repo (rust-toolchain.toml wins), so they now go onto 1.100.0. cross is pinned to 0.2.5. Marking the release published no longer names HalFrgrd/flyline, which this repo's token cannot edit. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8b1519..51f8726 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,16 +70,20 @@ jobs: - name: Checkout uses: actions/checkout@v7 + # The version pinned in rust-toolchain.toml. `@stable` would install a + # different toolchain from the one rustup then selects in the repo, and + # the target would be added to the wrong one. - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@master with: + toolchain: "1.100.0" targets: ${{ matrix.target }} - name: Install cross if: matrix.build_tool == 'cross' uses: taiki-e/install-action@v2 with: - tool: cross + tool: cross@0.2.5 - name: Build ${{ matrix.target }}${{ matrix.suffix }} run: ${{ matrix.build_tool }} build --release --target ${{ matrix.target }} ${{ matrix.feature_flags }} @@ -136,7 +140,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release edit "${{ needs.create-release.outputs.version }}" --prerelease --draft=false --repo HalFrgrd/flyline + gh release edit "${{ needs.create-release.outputs.version }}" --prerelease --draft=false test-installation: name: test-installation (${{ matrix.target }}) From 1edef8fe7173f9142b34b17318c19dd1ca0cedfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:10:44 +0700 Subject: [PATCH 11/28] build(docker): use the pinned toolchain and current base images The 16.04 builder installs rustup without a default toolchain and then the version from rust-toolchain.toml, so release libraries are built with the compiler CI lints with; cargo-chef is pinned to 0.1.78. The help-text runner moves off EOL 20.04 and the demo base to 26.04 (help output is byte-identical). The bash-version image stays on 24.04 because GCC 15 cannot compile bash 3.2/4.4, and the install test keeps 22.04 as the older LTS; both now say why. Co-Authored-By: Claude Opus 5.5 --- docker/builder.Dockerfile | 10 +++++++--- docker/demo_base.Dockerfile | 2 +- docker/flyline_help.Dockerfile | 4 ++-- docker/install_test_ubuntu.Dockerfile | 3 ++- docker/specific_bash_version.Dockerfile | 3 +++ 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docker/builder.Dockerfile b/docker/builder.Dockerfile index 58af378..c13cbb3 100644 --- a/docker/builder.Dockerfile +++ b/docker/builder.Dockerfile @@ -19,11 +19,15 @@ RUN apt-get update && apt-get install -y \ binutils \ && rm -rf /var/lib/apt/lists/* -# Install Rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +# Install rustup only; the toolchain itself is the one pinned in +# rust-toolchain.toml, so the release library is built with the same compiler +# CI lints with. A toolchain bump invalidates this layer and everything below. +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none ENV PATH="/root/.cargo/bin:${PATH}" WORKDIR /app -RUN cargo install cargo-chef --locked +COPY rust-toolchain.toml ./ +RUN rustup toolchain install +RUN cargo install cargo-chef@0.1.78 --locked # Stage 2: Planner diff --git a/docker/demo_base.Dockerfile b/docker/demo_base.Dockerfile index 4020646..023a8ec 100644 --- a/docker/demo_base.Dockerfile +++ b/docker/demo_base.Dockerfile @@ -1,7 +1,7 @@ # Base image for demo generation # Use a recent Ubuntu base image -FROM ubuntu:24.04 AS demo-base +FROM ubuntu:26.04 AS demo-base # Create a non-root user for demos RUN useradd -m -s /bin/bash john diff --git a/docker/flyline_help.Dockerfile b/docker/flyline_help.Dockerfile index ca2fd6f..d9b2624 100644 --- a/docker/flyline_help.Dockerfile +++ b/docker/flyline_help.Dockerfile @@ -1,6 +1,6 @@ -FROM ubuntu:20.04 AS help-runner +FROM ubuntu:26.04 AS help-runner -# ubuntu:20.04 ships with bash 5.0; no extra install needed. +# Any bash >= 4.4 loads the library; the help text does not depend on its version. # Prevent interactive prompts during any potential package installation ENV DEBIAN_FRONTEND=noninteractive # Disable color output from clap so the saved text is plain ASCII diff --git a/docker/install_test_ubuntu.Dockerfile b/docker/install_test_ubuntu.Dockerfile index 197080f..b6f5623 100644 --- a/docker/install_test_ubuntu.Dockerfile +++ b/docker/install_test_ubuntu.Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:22.04 +# An older supported LTS on purpose; newer distros are covered by arch/alpine. +FROM ubuntu:22.04 ARG FLYLINE_INSTALL_VERSION diff --git a/docker/specific_bash_version.Dockerfile b/docker/specific_bash_version.Dockerfile index 9d7a57e..19632e7 100644 --- a/docker/specific_bash_version.Dockerfile +++ b/docker/specific_bash_version.Dockerfile @@ -1,3 +1,6 @@ +# Stays on 24.04 (GCC 13): 26.04's GCC 15 defaults to C23, where the K&R +# declarations in bash 3.2/4.4 sources are errors (mkbuiltins.c: "too many +# arguments to function 'xmalloc'"). FROM ubuntu:24.04 ARG DOCKER_BASH_VERSION From 89fc880183a37583acbff71c0f2ad7d4237ec94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:10:44 +0700 Subject: [PATCH 12/28] ci(dependabot): conventional commit prefixes and recorded holds Weekly cargo, github-actions and docker updates with the dependencies label and chore(deps)/ci prefixes. parking_lot >= 0.13 is ignored (see Cargo.toml), and so are Ubuntu tags, which are each pinned on purpose; the 16.04 -> 26.04 bump it just proposed would raise the glibc floor of every release build. Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 45 ++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ec9c974..fe9b160 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,22 +1,14 @@ -# 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/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - version: 2 - updates: - # Rust (Cargo) - package-ecosystem: "cargo" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 commit-message: - prefix: "cargo" + prefix: "chore(deps)" labels: - "dependencies" - - "ci" groups: cargo-minor-and-patch: patterns: @@ -24,18 +16,22 @@ updates: update-types: - "minor" - "patch" + ignore: + # termina still requires parking_lot ^0.12, so 0.13 would link two copies + # of the lock crates and raise the MSRV to 1.95; see the parking_lot line + # in Cargo.toml. + - dependency-name: "parking_lot" + versions: [">=0.13"] - # GitHub Actions - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 commit-message: - prefix: "gha" + prefix: "ci" labels: - "dependencies" - - "ci" groups: gha-minor-and-patch: patterns: @@ -44,21 +40,18 @@ updates: - "minor" - "patch" - # Docker - package-ecosystem: "docker" - directory: "docker/" + directory: "/docker" schedule: interval: "weekly" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 commit-message: - prefix: "docker" + prefix: "chore(deps)" labels: - "dependencies" - - "ci" - groups: - docker-minor-and-patch: - patterns: - - "*" - update-types: - - "minor" - - "patch" + ignore: + # Every Ubuntu tag is chosen on purpose and explained in its Dockerfile: + # 16.04 is the glibc 2.23 floor the release library targets, 22.04 is + # the older-LTS install test, and the bash-version images need a GCC + # that still compiles bash 3.2/4.4. Bump them by hand. + - dependency-name: "ubuntu" From 242dd25ac51d02bb2b25b3b1ff6f8078764219ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:20:13 +0700 Subject: [PATCH 13/28] build!: ship prebuilt libraries only for 64-bit Linux, Apple silicon and arm64 Android Drops the release builds for i686 and armv7 Linux, riscv64gc, powerpc64le, FreeBSD, the x86_64/armv7/i686 Android targets and Intel macOS, along with their cross Dockerfiles. install.sh now names the supported platforms and points everything else at a source build, which still works on those platforms. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 11 ----- Cargo.toml | 6 --- .../cross/armv7-linux-androideabi.Dockerfile | 7 --- docker/cross/i686-linux-android.Dockerfile | 7 --- docker/cross/x86_64-linux-android.Dockerfile | 7 --- install.sh | 44 ++++--------------- 6 files changed, 8 insertions(+), 74 deletions(-) delete mode 100644 docker/cross/armv7-linux-androideabi.Dockerfile delete mode 100644 docker/cross/i686-linux-android.Dockerfile delete mode 100644 docker/cross/x86_64-linux-android.Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51f8726..340b149 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,22 +48,11 @@ jobs: - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - # Additional Linux architectures - - { target: armv7-unknown-linux-gnueabihf, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: i686-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: riscv64gc-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: powerpc64le-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } # Linux pre_bash_4_4 - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "--features pre_bash_4_4", suffix: "_pre_bash_4_4" } - # FreeBSD (via cross) - - { target: x86_64-unknown-freebsd, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } # Android (via cross) - { target: aarch64-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: x86_64-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: armv7-linux-androideabi, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: i686-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } # macOS (native cargo) - - { target: x86_64-apple-darwin, os: macos-latest, build_tool: cargo, lib: libflyline.dylib, feature_flags: "", suffix: "" } - { target: aarch64-apple-darwin, os: macos-latest, build_tool: cargo, lib: libflyline.dylib, feature_flags: "", suffix: "" } steps: diff --git a/Cargo.toml b/Cargo.toml index 2fd5561..f5bf0dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,12 +118,6 @@ chrono = "0.4" dockerfile = "docker/cross/aarch64-linux-android.Dockerfile" [package.metadata.cross.target.aarch64-unknown-linux-gnu] dockerfile = "docker/cross/aarch64-unknown-linux-gnu.Dockerfile" -[package.metadata.cross.target.armv7-linux-androideabi] -dockerfile = "docker/cross/armv7-linux-androideabi.Dockerfile" -[package.metadata.cross.target.i686-linux-android] -dockerfile = "docker/cross/i686-linux-android.Dockerfile" -[package.metadata.cross.target.x86_64-linux-android] -dockerfile = "docker/cross/x86_64-linux-android.Dockerfile" [package.metadata.cross.target.x86_64-unknown-linux-gnu] dockerfile = "docker/cross/x86_64-unknown-linux-gnu.Dockerfile" diff --git a/docker/cross/armv7-linux-androideabi.Dockerfile b/docker/cross/armv7-linux-androideabi.Dockerfile deleted file mode 100644 index 2d06653..0000000 --- a/docker/cross/armv7-linux-androideabi.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ghcr.io/cross-rs/armv7-linux-androideabi:main - -# Create libunwind.a symlinks where the NDK gcc linker expects them -RUN find /android-ndk -name "libgcc.a" -exec sh -c 'for f; do ln -sf "$f" "$(dirname "$f")/libunwind.a"; done' _ {} + || true -RUN find /android-ndk -name "libunwind.a" -exec sh -c 'for f; do cp -f "$f" /android-ndk/sysroot/usr/lib/arm-linux-androideabi/ 2>/dev/null || true; done' _ {} + -RUN sh -c 'cc=$(find /android-ndk -name "*arm*clang" | head -n1); "$cc" -shared -o /android-ndk/sysroot/usr/lib/arm-linux-androideabi/libreadline.so -x c /dev/null' || true -RUN find /android-ndk -name "libc.so" -o -name "libc.a" -exec sh -c 'for f; do cp -f /android-ndk/sysroot/usr/lib/arm-linux-androideabi/libreadline.so "$(dirname "$f")/" 2>/dev/null || true; done' _ {} + diff --git a/docker/cross/i686-linux-android.Dockerfile b/docker/cross/i686-linux-android.Dockerfile deleted file mode 100644 index c56e9c1..0000000 --- a/docker/cross/i686-linux-android.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ghcr.io/cross-rs/i686-linux-android:main - -# Create libunwind.a symlinks where the NDK gcc linker expects them -RUN find /android-ndk -name "libgcc.a" -exec sh -c 'for f; do ln -sf "$f" "$(dirname "$f")/libunwind.a"; done' _ {} + || true -RUN find /android-ndk -name "libunwind.a" -exec sh -c 'for f; do cp -f "$f" /android-ndk/sysroot/usr/lib/i686-linux-android/ 2>/dev/null || true; done' _ {} + -RUN sh -c 'cc=$(find /android-ndk -name "i686-linux-android*-clang" | head -n1); "$cc" -shared -o /android-ndk/sysroot/usr/lib/i686-linux-android/libreadline.so -x c /dev/null' || true -RUN find /android-ndk -name "libc.so" -o -name "libc.a" -exec sh -c 'for f; do cp -f /android-ndk/sysroot/usr/lib/i686-linux-android/libreadline.so "$(dirname "$f")/" 2>/dev/null || true; done' _ {} + diff --git a/docker/cross/x86_64-linux-android.Dockerfile b/docker/cross/x86_64-linux-android.Dockerfile deleted file mode 100644 index 6b7c633..0000000 --- a/docker/cross/x86_64-linux-android.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ghcr.io/cross-rs/x86_64-linux-android:main - -# Create libunwind.a symlinks where the NDK gcc linker expects them -RUN find /android-ndk -name "libgcc.a" -exec sh -c 'for f; do ln -sf "$f" "$(dirname "$f")/libunwind.a"; done' _ {} + || true -RUN find /android-ndk -name "libunwind.a" -exec sh -c 'for f; do cp -f "$f" /android-ndk/sysroot/usr/lib/x86_64-linux-android/ 2>/dev/null || true; done' _ {} + -RUN sh -c 'cc=$(find /android-ndk -name "x86_64-linux-android*-clang" | head -n1); "$cc" -shared -o /android-ndk/sysroot/usr/lib/x86_64-linux-android/libreadline.so -x c /dev/null' || true -RUN find /android-ndk -name "libc.so" -o -name "libc.a" -exec sh -c 'for f; do cp -f /android-ndk/sysroot/usr/lib/x86_64-linux-android/libreadline.so "$(dirname "$f")/" 2>/dev/null || true; done' _ {} + diff --git a/install.sh b/install.sh index f6a7085..aaa700f 100755 --- a/install.sh +++ b/install.sh @@ -127,8 +127,7 @@ detect_os() { case "$os" in Linux) echo "linux" ;; Darwin) echo "darwin" ;; - FreeBSD) echo "freebsd" ;; - *) err "Unsupported OS: $os" ;; + *) err "Unsupported OS: $os. Prebuilt libraries exist for Linux, macOS and Android (Termux)." ;; esac } @@ -137,11 +136,7 @@ detect_arch() { case "$arch" in x86_64 | amd64) echo "x86_64" ;; aarch64 | arm64) echo "aarch64" ;; - armv7* | armhf) echo "armv7" ;; - i386 | i486 | i586 | i686) echo "i686" ;; - riscv64) echo "riscv64gc" ;; - ppc64le | powerpc64le) echo "powerpc64le" ;; - *) err "Unsupported architecture: $arch" ;; + *) err "Unsupported architecture: $arch. Prebuilt libraries exist for x86_64 and aarch64; build from source for others." ;; esac } @@ -261,7 +256,10 @@ main() { fi if [ "$OS" = "darwin" ]; then - TARGET="${ARCH}-apple-darwin" + if [ "$ARCH" != "aarch64" ]; then + err "Intel Macs have no prebuilt library; build from source with: cargo build --release --lib" + fi + TARGET="aarch64-apple-darwin" LIB_NAME="libflyline.dylib" # Flyline can run on the 3.2.57 version of Bash. @@ -279,45 +277,19 @@ main() { err "Then re-run the installer using Homebrew Bash." fi fi - elif [ "$OS" = "freebsd" ]; then - if [ "$ARCH" != "x86_64" ]; then - err "Unsupported FreeBSD architecture: $ARCH. Only x86_64 is supported." - fi - TARGET="x86_64-unknown-freebsd" - LIB_NAME="libflyline.so" elif [ "$OS" = "android" ]; then case "$ARCH" in aarch64) TARGET="aarch64-linux-android" ;; - x86_64) - TARGET="x86_64-linux-android" - ;; - armv7) - TARGET="armv7-linux-androideabi" - ;; - i686) - TARGET="i686-linux-android" - ;; *) - err "Unsupported Android architecture: $ARCH" + err "Unsupported Android architecture: $ARCH. Only aarch64 (arm64) is supported." ;; esac LIB_NAME="libflyline.so" else LIBC="$(detect_libc)" - case "$ARCH" in - armv7) - if [ "$LIBC" = "gnu" ]; then - TARGET="armv7-unknown-linux-gnueabihf" - else - err "Unsupported libc ($LIBC) for armv7. Only gnu (gnueabihf) is supported." - fi - ;; - *) - TARGET="${ARCH}-unknown-linux-${LIBC}" - ;; - esac + TARGET="${ARCH}-unknown-linux-${LIBC}" LIB_NAME="libflyline.so" fi From 1bc4f0b72b67660054c4228a4ccea5e34750a498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:37:21 +0700 Subject: [PATCH 14/28] feat!: require bash 4.4 or newer and test on 5.1-5.3 No supported Linux distro or Termux ships a bash older than 4.4 (the oldest are RHEL 9 and Ubuntu 22.04 with 5.1), and the pre-4.4 artifact only ever served x86_64 Linux. Removes the pre_bash_4_4 feature and its cfg branches, the ctor dependency, the _pre_bash_4_4 release artifact, its CI job and the bash 3.2.57 images. install.sh now stops on an old bash, still pointing macOS users at Homebrew bash. The integration matrix moves from 4.4-rc1/4.4.18/5.0/5.3 to 5.1/5.2/5.3: the oldest bash on a supported distro, Debian 13 / Ubuntu 24.04, and current upstream. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 45 +---------------- .github/workflows/code-quality.yml | 1 - .github/workflows/release.yml | 4 +- Cargo.lock | 23 --------- Cargo.toml | 6 --- docker-bake.hcl | 59 ++-------------------- docker/install_test_bash_3.2.57.Dockerfile | 9 ---- docker/specific_bash_version.Dockerfile | 2 +- install.sh | 48 ++++++++---------- nix/package.nix | 6 +-- src/bash_builtin.rs | 18 +------ src/completions/flags.rs | 23 +-------- src/shell/bash/funcs.rs | 40 ++------------- src/shell/bash/mod.rs | 3 -- src/shell/bash/symbols.rs | 22 +------- tests/docker_integration_tests.rs | 10 +--- 16 files changed, 37 insertions(+), 282 deletions(-) delete mode 100644 docker/install_test_bash_3.2.57.Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8108399..8ba8531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,11 +32,9 @@ jobs: files: docker-bake.hcl targets: | extract-integration-test-build-artifact - extract-pre-bash-4-4-integration-test-build-artifact lib-tests set: | extract-integration-test-build-artifact.output=type=local,dest=${{ runner.temp }}/docker/build - extract-pre-bash-4-4-integration-test-build-artifact.output=type=local,dest=${{ runner.temp }}/docker/build-pre-bash-4-4 *.cache-from=type=gha *.cache-to=type=gha,mode=max @@ -55,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - bash_version_slug: [ "4_4-rc1", "4_4_18", "5_0", "5_3" ] + bash_version_slug: [ "5_1", "5_2", "5_3" ] steps: - name: Set up Docker Buildx @@ -86,44 +84,3 @@ jobs: bash-integration-test-${{ matrix.bash_version_slug }}.cache-to=type=gha,mode=max built-artifact.cache-from=type=gha built-artifact.cache-to=type=gha,mode=max - - bash-integration-tests-pre-4-4: - name: Bash integration tests (pre-4.4) using built library - runs-on: ubuntu-latest - needs: - - build-ubuntu-1604 - strategy: - fail-fast: false - matrix: - bash_version_slug: [ "3_2_57" ] - - steps: - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - - name: Login to GHCR - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set lower case owner name - run: | - echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} - env: - OWNER: '${{ github.repository_owner }}' - - - name: Run integration tests - uses: docker/bake-action@v7 - with: - files: docker-bake.hcl - targets: bash-integration-test-${{ matrix.bash_version_slug }} - set: | - specific-bash-version-${{ matrix.bash_version_slug }}.cache-from=type=registry,ref=ghcr.io/${{ env.OWNER_LC }}/bash-${{ matrix.bash_version_slug }}:cache - ${{ github.event_name != 'pull_request' && format('specific-bash-version-{0}.cache-to=type=registry,ref=ghcr.io/{1}/bash-{0}:cache,mode=min', matrix.bash_version_slug, env.OWNER_LC) || '' }} - bash-integration-test-${{ matrix.bash_version_slug }}.cache-from=type=gha - bash-integration-test-${{ matrix.bash_version_slug }}.cache-to=type=gha,mode=max - built-artifact.cache-from=type=gha - built-artifact.cache-to=type=gha,mode=max - diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index c08be63..ff2c535 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -79,4 +79,3 @@ jobs: run: | rustc --version | grep -E '^rustc 1[.]91[.]0 ' cargo check --workspace --locked --all-targets - cargo check --workspace --locked --all-targets --features pre_bash_4_4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 340b149..cea32d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,8 +48,6 @@ jobs: - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - # Linux pre_bash_4_4 - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "--features pre_bash_4_4", suffix: "_pre_bash_4_4" } # Android (via cross) - { target: aarch64-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } # macOS (native cargo) @@ -138,7 +136,7 @@ jobs: strategy: fail-fast: false matrix: - target: [install-test-alpine, install-test-ubuntu, install-test-arch, install-test-termux, install-test-bash-3-2-57] + target: [install-test-alpine, install-test-ubuntu, install-test-arch, install-test-termux] steps: - uses: actions/checkout@v7 - name: Set up Docker Buildx diff --git a/Cargo.lock b/Cargo.lock index 36a5bd1..77533f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -422,16 +422,6 @@ dependencies = [ "phf 0.11.3", ] -[[package]] -name = "ctor" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" -dependencies = [ - "link-section", - "linktime-proc-macro", -] - [[package]] name = "darling" version = "0.24.1" @@ -706,7 +696,6 @@ dependencies = [ "chrono", "clap", "clap_complete", - "ctor", "dirs", "duration-str", "easing-function", @@ -1005,18 +994,6 @@ dependencies = [ "bitflags 2.13.2", ] -[[package]] -name = "link-section" -version = "0.19.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" - -[[package]] -name = "linktime-proc-macro" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e57c38c1e860fd37c604281cdfb1dd2216977fd76a50f85ba2f388ef3219616" - [[package]] name = "linux-raw-sys" version = "0.4.15" diff --git a/Cargo.toml b/Cargo.toml index f5bf0dd..b76755a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,9 +61,6 @@ anyhow.workspace = true chrono = "0.4" clap.workspace = true clap_complete.workspace = true -# Only the pre-4.4 build needs a load-time constructor (newer bash calls -# flyline_builtin_load itself). -ctor = { version = "1.0", optional = true } dirs = "7.0" # Only `parse` is used; the default features pull in chrono, time and serde. duration-str = { version = "0.21", default-features = false } @@ -98,9 +95,6 @@ unicode-segmentation.workspace = true unicode-width.workspace = true uuid = { version = "1.29", features = ["v7"] } -[features] -pre_bash_4_4 = ["dep:ctor"] - [dev-dependencies] rusty-fork = "0.3.1" diff --git a/docker-bake.hcl b/docker-bake.hcl index d1a1546..82c5337 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,9 +1,7 @@ +# The oldest bash on a supported distro is 5.1 (RHEL 9, Ubuntu 22.04); +# 5.2 is Debian 13 / Ubuntu 24.04, 5.3 is current upstream. variable "BASH_VERSION_MATRIX" { - default = ["4.4-rc1", "4.4.18", "5.0", "5.3"] -} - -variable "PRE_BASH_4_4_VERSION_MATRIX" { - default = ["3.2.57"] + default = ["5.1", "5.2", "5.3"] } variable "FLYLINE_INSTALL_VERSION" { @@ -38,16 +36,6 @@ target "extract-integration-test-build-artifact" { target = "flyline-built-artifact" } -target "extract-pre-bash-4-4-integration-test-build-artifact" { - context = "." - output = ["type=local,dest=docker/build-pre-bash-4-4-integration-test"] - dockerfile = "docker/builder.Dockerfile" - target = "flyline-built-artifact" - args = { - CARGO_FEATURES = "pre_bash_4_4" - } -} - target "lib-tests" { context = "." dockerfile = "docker/builder.Dockerfile" @@ -67,19 +55,6 @@ target "specific-bash-version" { tags = ["bash-${docker_bash_version}"] } -target "specific-bash-version-pre-4-4" { - context = "." - dockerfile = "docker/specific_bash_version.Dockerfile" - name = "specific-bash-version-${replace(docker_bash_version, ".", "_")}" - matrix = { - docker_bash_version = PRE_BASH_4_4_VERSION_MATRIX - } - args = { - DOCKER_BASH_VERSION = docker_bash_version - } - tags = ["bash-${docker_bash_version}"] -} - target "bash-integration-tests" { context = "." contexts = { @@ -96,23 +71,6 @@ target "bash-integration-tests" { } } -target "bash-integration-tests-pre-4-4" { - context = "." - contexts = { - built-artifact = "target:extract-pre-bash-4-4-integration-test-build-artifact", - specific-bash-version = "target:specific-bash-version-${replace(docker_bash_version, ".", "_")}" - } - name = "bash-integration-test-${replace(docker_bash_version, ".", "_")}" - tags = ["bash-integration-test-pre-4-4-${docker_bash_version}"] - matrix = { - docker_bash_version = PRE_BASH_4_4_VERSION_MATRIX - } - dockerfile = "docker/bash_integration_test.Dockerfile" - args = { - DOCKER_BASH_VERSION = docker_bash_version - } -} - @@ -302,17 +260,6 @@ target "install-test-termux" { } -target "install-test-bash-3-2-57" { - context = "." - contexts = { - specific-bash-version = "target:specific-bash-version-3_2_57" - } - dockerfile = "docker/install_test_bash_3.2.57.Dockerfile" - args = { - FLYLINE_INSTALL_VERSION = FLYLINE_INSTALL_VERSION - } -} - target "test-mimalloc-symbols" { context = "." dockerfile = "docker/arch_linux_mimalloc_symbols.Dockerfile" diff --git a/docker/install_test_bash_3.2.57.Dockerfile b/docker/install_test_bash_3.2.57.Dockerfile deleted file mode 100644 index 59cd9d4..0000000 --- a/docker/install_test_bash_3.2.57.Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM specific-bash-version - -ARG FLYLINE_INSTALL_VERSION - -RUN apt-get update && apt-get install -y curl util-linux && rm -rf /var/lib/apt/lists/* - -RUN FLYLINE_INSTALL_VERSION=${FLYLINE_INSTALL_VERSION} bash -c "curl -sSfL https://github.com/HalFrgrd/flyline/releases/download/${FLYLINE_INSTALL_VERSION}/install.sh | bash" - -RUN script -q -e -c "/bin/bash -i -c 'flyline --version'" /dev/null diff --git a/docker/specific_bash_version.Dockerfile b/docker/specific_bash_version.Dockerfile index 19632e7..7ce1205 100644 --- a/docker/specific_bash_version.Dockerfile +++ b/docker/specific_bash_version.Dockerfile @@ -1,5 +1,5 @@ # Stays on 24.04 (GCC 13): 26.04's GCC 15 defaults to C23, where the K&R -# declarations in bash 3.2/4.4 sources are errors (mkbuiltins.c: "too many +# declarations in bash 5.1 and older are errors (mkbuiltins.c: "too many # arguments to function 'xmalloc'"). FROM ubuntu:24.04 diff --git a/install.sh b/install.sh index aaa700f..49620e8 100755 --- a/install.sh +++ b/install.sh @@ -67,7 +67,7 @@ cleanup_flyline_install() { trap - EXIT 2>/dev/null || true fi unset -f expand_path say warn err err_no_exit need_cmd download get_latest_version detect_os detect_arch detect_libc detect_bash_version_parts is_bash_version_4_4_or_later is_system_bash_pre_4_4 find_homebrew_bash verify_bash_environment verify_sha256 cleanup_flyline_install is_sourced is_interactive main 2>/dev/null || true - unset REPO INSTALL_DIR BASHRC OS ARCH TARGET LIB_NAME VERSION LIB_PATH ENABLE_CMD TMP_DIR _FLYLINE_IS_SOURCED _FLYLINE_SAVED_OPTS _FLYLINE_SAVED_TRAP 2>/dev/null || true + unset REPO INSTALL_DIR BASHRC OS ARCH BREW_BASH TARGET LIB_NAME VERSION LIB_PATH ENABLE_CMD TMP_DIR _FLYLINE_IS_SOURCED _FLYLINE_SAVED_OPTS _FLYLINE_SAVED_TRAP 2>/dev/null || true fi } @@ -249,10 +249,24 @@ main() { OS="$(detect_os)" ARCH="$(detect_arch)" + # flyline needs bash >= 4.4, which calls _builtin_load on `enable -f`. + # Every supported Linux and Termux ships newer; macOS's /bin/bash is 3.2. if is_system_bash_pre_4_4; then - use_bash_pre_4_4=true - else - use_bash_pre_4_4=false + BREW_BASH="" + if [ "$OS" = "darwin" ]; then + BREW_BASH="$(find_homebrew_bash)" + fi + if [ -n "$BREW_BASH" ]; then + warn "Your system Bash is older than 4.4 and cannot load flyline." + warn "Ensure that you use $BREW_BASH for flyline." + elif [ "$OS" = "darwin" ]; then + err_no_exit "Your system Bash is older than 4.4 and cannot load flyline." + err_no_exit "To use flyline on macOS, please install a modern Bash using Homebrew:" + err_no_exit " brew install bash" + err "Then re-run the installer using Homebrew Bash." + else + err "flyline needs Bash 4.4 or newer; this Bash is older." + fi fi if [ "$OS" = "darwin" ]; then @@ -261,22 +275,6 @@ main() { fi TARGET="aarch64-apple-darwin" LIB_NAME="libflyline.dylib" - - # Flyline can run on the 3.2.57 version of Bash. - # However, the Bash binary on macOS is often compiled without linkable symbols required to load the Flyline plugin. - if $use_bash_pre_4_4; then - BREW_BASH="$(find_homebrew_bash)" - if [ -n "$BREW_BASH" ]; then - warn "Your system Bash is older than 4.4. This version won't have been compiled with custom plugin support." - warn "Ensure that you use $BREW_BASH for flyline." - use_bash_pre_4_4=false - else - err_no_exit "Your system Bash is older than 4.4 and lacks custom loadable plugin support." - err_no_exit "To use flyline on macOS, please install a modern Bash using Homebrew:" - err_no_exit " brew install bash" - err "Then re-run the installer using Homebrew Bash." - fi - fi elif [ "$OS" = "android" ]; then case "$ARCH" in aarch64) @@ -306,14 +304,8 @@ main() { ARCHIVE_STEM="libflyline-${VERSION}-${TARGET}" - if $use_bash_pre_4_4; then - say "Detected Bash < 4.4, using pre-bash-4.4 build..." - ARCHIVE="${ARCHIVE_STEM}_pre_bash_4_4.tar.gz" - ARCHIVE_SHA256="${ARCHIVE}.sha256" - else - ARCHIVE="${ARCHIVE_STEM}.tar.gz" - ARCHIVE_SHA256="${ARCHIVE}.sha256" - fi + ARCHIVE="${ARCHIVE_STEM}.tar.gz" + ARCHIVE_SHA256="${ARCHIVE}.sha256" DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${ARCHIVE}" SHA256_URL="https://github.com/${REPO}/releases/download/${VERSION}/${ARCHIVE_SHA256}" diff --git a/nix/package.nix b/nix/package.nix index 4e62a11..8a6cab2 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -39,10 +39,8 @@ rustPlatform.buildRustPackage { # The docker_integration_tests need Docker, which the sandbox lacks; skip them. checkFlags = [ - "--skip=test_bash_3_2_57" - "--skip=test_bash_4_4_18" - "--skip=test_bash_4_4_rc1" - "--skip=test_bash_5_0" + "--skip=test_bash_5_1" + "--skip=test_bash_5_2" "--skip=test_bash_5_3" ]; diff --git a/src/bash_builtin.rs b/src/bash_builtin.rs index e6824b5..461192c 100644 --- a/src/bash_builtin.rs +++ b/src/bash_builtin.rs @@ -1,9 +1,6 @@ use libc::{c_char, c_int}; use std::sync::Mutex; -#[cfg(feature = "pre_bash_4_4")] -use ctor::ctor; - use crate::shell::bash::{funcs as bash_funcs, symbols as bash_symbols}; use crate::{LongLived, SigchldGuard, app, cli, logging, settings}; @@ -228,16 +225,7 @@ pub static mut flyline_struct: bash_symbols::BashBuiltin = bash_symbols::BashBui handle: std::ptr::null(), }; -// On pre-bash-4.4 builds, register a shared-library constructor so that flyline -// is initialised as soon as the library is loaded via `enable -f`. -// On newer versions of bash `flyline_builtin_load` is called automatically by bash during enable. -#[cfg(feature = "pre_bash_4_4")] -#[ctor(unsafe)] -fn flyline_builtin_load_ctor() { - let _ = flyline_load_common(); -} - -#[cfg(not(feature = "pre_bash_4_4"))] +// Bash >= 4.4 calls `flyline_builtin_load` itself during `enable -f`. #[unsafe(no_mangle)] pub extern "C" fn flyline_builtin_load(_arg: *const c_char) -> c_int { flyline_load_common() @@ -425,9 +413,7 @@ fn flyline_load_common() -> c_int { SUCCESS } -// Its easier to just not unload on older bash versions -// Maybe I could use a fini_array function to unload, but I doubt its worth the effort. -#[cfg(not(feature = "pre_bash_4_4"))] +// Bash >= 4.4 calls `flyline_builtin_unload` during `enable -d`. #[unsafe(no_mangle)] pub extern "C" fn flyline_builtin_unload() { log::info!("flyline_builtin_unload called, unloading flyline"); diff --git a/src/completions/flags.rs b/src/completions/flags.rs index f094685..4a3f556 100644 --- a/src/completions/flags.rs +++ b/src/completions/flags.rs @@ -3,34 +3,19 @@ use std::path::Path; use crate::grammar::{QuoteType, find_quote_type}; -/* Values for COMPSPEC options field. */ -// In bash >= 4.4, COPT_NOQUOTE was inserted at (1<<4), shifting later values. -// In bash < 4.4: NOSPACE=(1<<4), BASHDEFAULT=(1<<5), PLUSDIRS=(1<<6) -// In bash >= 4.4: NOQUOTE=(1<<4), NOSPACE=(1<<5), BASHDEFAULT=(1<<6), PLUSDIRS=(1<<7), NOSORT=(1<<8), FULLQUOTE=(1<<9) +/* Values for COMPSPEC options field (pcomplete.h, bash >= 4.4). */ #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum CompspecOption { Reserved = 1 << 0, Default = 1 << 1, Filenames = 1 << 2, Dirnames = 1 << 3, - #[cfg(not(feature = "pre_bash_4_4"))] NoQuote = 1 << 4, - #[cfg(not(feature = "pre_bash_4_4"))] NoSpace = 1 << 5, - #[cfg(not(feature = "pre_bash_4_4"))] BashDefault = 1 << 6, - #[cfg(not(feature = "pre_bash_4_4"))] PlusDirs = 1 << 7, - #[cfg(not(feature = "pre_bash_4_4"))] NoSort = 1 << 8, - #[cfg(not(feature = "pre_bash_4_4"))] FullQuote = 1 << 9, - #[cfg(feature = "pre_bash_4_4")] - NoSpace = 1 << 4, - #[cfg(feature = "pre_bash_4_4")] - BashDefault = 1 << 5, - #[cfg(feature = "pre_bash_4_4")] - PlusDirs = 1 << 6, } #[derive(Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] @@ -61,19 +46,13 @@ impl CompletionFlags { quote_type, readline_default_fallback_desired: foundcs & (CompspecOption::Default as libc::c_int) != 0, - #[cfg(not(feature = "pre_bash_4_4"))] filename_quoting_desired: foundcs & (CompspecOption::NoQuote as libc::c_int) == 0, - #[cfg(feature = "pre_bash_4_4")] - filename_quoting_desired: true, filename_completion_desired: foundcs & (CompspecOption::Filenames as libc::c_int) != 0, no_suffix_desired: foundcs & (CompspecOption::NoSpace as libc::c_int) != 0, suffix_character: char::from_u32(append_char as u32).unwrap_or(' '), bash_default_fallback_desired: foundcs & (CompspecOption::BashDefault as libc::c_int) != 0, - #[cfg(not(feature = "pre_bash_4_4"))] nosort_desired: foundcs & (CompspecOption::NoSort as libc::c_int) != 0, - #[cfg(feature = "pre_bash_4_4")] - nosort_desired: false, some_dont_end_in_equal_sign, } } diff --git a/src/shell/bash/funcs.rs b/src/shell/bash/funcs.rs index 42f9ddf..b6bc1a7 100644 --- a/src/shell/bash/funcs.rs +++ b/src/shell/bash/funcs.rs @@ -512,20 +512,14 @@ pub fn evaluate_shell_string(script: &str) -> Result<()> { let allocated_ptr = bash_symbols::locked_xmalloc_cstr(&script_cstr); let from_file_cstr = std::ffi::CString::new("flyline")?; - #[cfg(not(feature = "pre_bash_4_4"))] let flags = bash_symbols::SEVAL_NOHIST | bash_symbols::SEVAL_NOOPTIMIZE | bash_symbols::SEVAL_NOTIFY; - #[cfg(feature = "pre_bash_4_4")] - let flags = bash_symbols::SEVAL_NOHIST | bash_symbols::SEVAL_NOTIFY; // Save parser state (Bash's save_parser_state(NULL) uses xmalloc to allocate exact sizeof(sh_parser_state_t)) let ps_ptr = bash_symbols::save_parser_state(std::ptr::null_mut()); - #[cfg(not(feature = "pre_bash_4_4"))] bash_symbols::evalstring(allocated_ptr, from_file_cstr.as_ptr(), flags); - #[cfg(feature = "pre_bash_4_4")] - bash_symbols::parse_and_execute(allocated_ptr, from_file_cstr.as_ptr(), flags); // Restore parser state so expand_aliases and parser_state are preserved if !ps_ptr.is_null() { @@ -607,15 +601,9 @@ pub fn run_programmable_completions( // similar to set_completion_defaults bash_symbols::rl_filename_completion_desired = 0; bash_symbols::rl_filename_quoting_desired = 1; - #[cfg(not(feature = "pre_bash_4_4"))] - { - bash_symbols::rl_completion_suppress_append = 0; - } + bash_symbols::rl_completion_suppress_append = 0; bash_symbols::rl_completion_append_character = ' ' as c_int; - #[cfg(not(feature = "pre_bash_4_4"))] - { - bash_symbols::rl_sort_completion_matches = 1; - } + bash_symbols::rl_sort_completion_matches = 1; let foundcs: std::ffi::c_int = 0; @@ -635,7 +623,6 @@ pub fn run_programmable_completions( // Copying logic from bashline.c:attempt_shell_completion // This is to pickup the filename desire from calls like `complete -o filenames` // This probably isn't necessary since I am reading the values from foundcs directly but it doesn't hurt to be safe - #[cfg(not(feature = "pre_bash_4_4"))] bash_symbols::pcomp_set_readline_variables(foundcs, 1); } @@ -665,14 +652,11 @@ pub fn print_copt_flags(flag: c_int) { CompspecOption::Default, CompspecOption::Filenames, CompspecOption::Dirnames, - #[cfg(not(feature = "pre_bash_4_4"))] CompspecOption::NoQuote, CompspecOption::NoSpace, CompspecOption::BashDefault, CompspecOption::PlusDirs, - #[cfg(not(feature = "pre_bash_4_4"))] CompspecOption::NoSort, - #[cfg(not(feature = "pre_bash_4_4"))] CompspecOption::FullQuote, ]; for option in options { @@ -1106,28 +1090,10 @@ pub fn unset_env_var(name: &str) -> Result<()> { } pub fn is_autocd_enabled() -> bool { - #[cfg(feature = "pre_bash_4_4")] - { - false - } - #[cfg(not(feature = "pre_bash_4_4"))] - { - let _guard = super::symbols::BASH_LOCK.lock(); - unsafe { bash_symbols::autocd != 0 } - } -} - -#[cfg(feature = "pre_bash_4_4")] -pub fn has_pending_traps() -> bool { let _guard = super::symbols::BASH_LOCK.lock(); - unsafe { - let ptr = std::ptr::addr_of!(bash_symbols::pending_traps) as *const libc::c_int; - let slice = std::slice::from_raw_parts(ptr, 64); - slice.iter().any(|&count| count > 0) - } + unsafe { bash_symbols::autocd != 0 } } -#[cfg(not(feature = "pre_bash_4_4"))] pub fn has_pending_traps() -> bool { let _guard = super::symbols::BASH_LOCK.lock(); unsafe { bash_symbols::first_pending_trap() > 0 } diff --git a/src/shell/bash/mod.rs b/src/shell/bash/mod.rs index 9f57e63..4dfaa57 100644 --- a/src/shell/bash/mod.rs +++ b/src/shell/bash/mod.rs @@ -59,11 +59,8 @@ impl ShellBackend for BashBackend { let _guard = symbols::BASH_LOCK.lock(); let decoded = unsafe { - #[cfg(not(feature = "pre_bash_4_4"))] let decoded_prompt_cstr = symbols::decode_prompt_string(c_prompt.as_ptr(), _is_prompt as i32); - #[cfg(feature = "pre_bash_4_4")] - let decoded_prompt_cstr = symbols::decode_prompt_string(c_prompt.as_ptr()); if decoded_prompt_cstr.is_null() { log::warn!("decode_prompt_string returned null"); return None; diff --git a/src/shell/bash/symbols.rs b/src/shell/bash/symbols.rs index 079eb95..c635e4c 100644 --- a/src/shell/bash/symbols.rs +++ b/src/shell/bash/symbols.rs @@ -173,7 +173,6 @@ unsafe extern "C" { // from shell.h pub static interactive: c_int; pub static interactive_shell: c_int; - #[cfg(not(feature = "pre_bash_4_4"))] pub static autocd: c_int; pub fn save_parser_state(ps: *mut libc::c_void) -> *mut libc::c_void; pub fn restore_parser_state(ps: *mut libc::c_void); @@ -292,7 +291,6 @@ unsafe extern "C" { possible closing quote. This is set to 0 by rl_complete_internal and may be changed by an application-specific completion function. */ // int rl_completion_suppress_append = 0; - #[cfg(not(feature = "pre_bash_4_4"))] #[link_name = "rl_completion_suppress_append"] pub static mut rl_completion_suppress_append: c_int; @@ -304,7 +302,6 @@ unsafe extern "C" { /* If non-zero, sort the completion matches. On by default. */ // int rl_sort_completion_matches = 1; - #[cfg(not(feature = "pre_bash_4_4"))] #[link_name = "rl_sort_completion_matches"] pub static mut rl_sort_completion_matches: c_int; @@ -319,7 +316,6 @@ unsafe extern "C" { Option *mut c_char>; // void pcomp_set_readline_variables (int flags, int nval) - #[cfg(not(feature = "pre_bash_4_4"))] pub fn pcomp_set_readline_variables(flags: c_int, nval: c_int); // alias.h @@ -385,21 +381,11 @@ unsafe extern "C" { // common.h // int evalstring (char *string, const char *from_file, int flags) - #[cfg(not(feature = "pre_bash_4_4"))] pub fn evalstring(string: *mut c_char, from_file: *const c_char, flags: c_int) -> c_int; - // common.h (pre-4.4 fallback: evalstring did not exist as a separate symbol) - // int parse_and_execute (char *string, const char *from_file, int flags) - #[cfg(feature = "pre_bash_4_4")] - pub fn parse_and_execute(string: *mut c_char, from_file: *const c_char, flags: c_int) -> c_int; - // y.tab.c - // In bash >= 4.4: char * decode_prompt_string (char *string, int is_prompt) - // In bash < 4.4: char * decode_prompt_string (char *string) - #[cfg(not(feature = "pre_bash_4_4"))] + // char * decode_prompt_string (char *string, int is_prompt) pub fn decode_prompt_string(string: *const c_char, is_prompt: c_int) -> *mut c_char; - #[cfg(feature = "pre_bash_4_4")] - pub fn decode_prompt_string(string: *const c_char) -> *mut c_char; // char *expand_string_to_string (string, quoted) pub fn expand_string_to_string(string: *const c_char, quoted: c_int) -> *mut c_char; @@ -419,17 +405,12 @@ unsafe extern "C" { pub fn termsig_handler(sig: c_int); // int first_pending_trap (void) - #[cfg(not(feature = "pre_bash_4_4"))] pub fn first_pending_trap() -> c_int; - #[cfg(feature = "pre_bash_4_4")] - pub static mut pending_traps: [c_int; 64]; - // void run_pending_traps (void) pub fn run_pending_traps(); // rl_hook_func_t *rl_signal_event_hook = (rl_hook_func_t *)NULL; - #[cfg(not(feature = "pre_bash_4_4"))] pub static mut rl_signal_event_hook: Option; /* If this is non-zero, do job control. */ @@ -574,7 +555,6 @@ pub struct CompSpec { pub suffix: *mut c_char, pub funcname: *mut c_char, pub command: *mut c_char, - #[cfg(not(feature = "pre_bash_4_4"))] pub lcommand: *mut c_char, pub filterpat: *mut c_char, } diff --git a/tests/docker_integration_tests.rs b/tests/docker_integration_tests.rs index 26fd336..5082d39 100644 --- a/tests/docker_integration_tests.rs +++ b/tests/docker_integration_tests.rs @@ -26,12 +26,6 @@ macro_rules! bash_integration_test { }; } -// This one fails because of the lack of builtin_help in Bash 4.3 -// #[test] -// bash_integration_test!(test_bash_4_3_30, "4.3.30"); - -bash_integration_test!(test_bash_3_2_57, "3.2.57"); -bash_integration_test!(test_bash_4_4_rc1, "4.4-rc1"); -bash_integration_test!(test_bash_4_4_18, "4.4.18"); -bash_integration_test!(test_bash_5_0, "5.0"); +bash_integration_test!(test_bash_5_1, "5.1"); +bash_integration_test!(test_bash_5_2, "5.2"); bash_integration_test!(test_bash_5_3, "5.3"); From 5e298289bdc414eb63e0e09e3e09c29f8cb18912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:37:21 +0700 Subject: [PATCH 15/28] build!: raise the Linux glibc floor to 2.34 and build natively per arch Linux gnu libraries were built on Ubuntu 16.04 (glibc 2.23) for CI and on cross-rs CentOS images (glibc 2.17, GCC 4.8 with stdatomic and compiler-wrapper hacks) for releases. Both now come from one recipe, docker/builder.Dockerfile on AlmaLinux 9 (glibc 2.34, the oldest among RHEL 9, Amazon Linux 2023, Ubuntu 22.04 and Debian 13), run natively on ubuntu-latest and ubuntu-24.04-arm. The builder fails if any symbol needs a newer glibc. The CentOS cross Dockerfiles are gone; musl and Android still use cross. README gains a supported-platforms table; dependabot leaves AlmaLinux majors alone. Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 9 ++-- .github/workflows/ci.yml | 6 +-- .github/workflows/release.yml | 38 ++++++++++----- Cargo.toml | 4 -- README.md | 13 +++++ docker/builder.Dockerfile | 32 ++++++------- .../aarch64-unknown-linux-gnu.Dockerfile | 48 ------------------- .../cross/x86_64-unknown-linux-gnu.Dockerfile | 47 ------------------ docker/install_test_ubuntu.Dockerfile | 2 +- 9 files changed, 64 insertions(+), 135 deletions(-) delete mode 100644 docker/cross/aarch64-unknown-linux-gnu.Dockerfile delete mode 100644 docker/cross/x86_64-unknown-linux-gnu.Dockerfile diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fe9b160..10e8ab8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -51,7 +51,10 @@ updates: - "dependencies" ignore: # Every Ubuntu tag is chosen on purpose and explained in its Dockerfile: - # 16.04 is the glibc 2.23 floor the release library targets, 22.04 is - # the older-LTS install test, and the bash-version images need a GCC - # that still compiles bash 3.2/4.4. Bump them by hand. + # 22.04 is the oldest-LTS install test and the bash-version image needs + # a GCC that still compiles bash 5.1. Bump them by hand. - dependency-name: "ubuntu" + # docker/builder.Dockerfile's AlmaLinux 9 is the glibc 2.34 floor of + # every Linux release build; a major bump raises it. + - dependency-name: "almalinux" + update-types: ["version-update:semver-major"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ba8531..4327198 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ permissions: packages: write jobs: - build-ubuntu-1604: - name: Build and test on Ubuntu 16.04 + build: + name: Build and test (glibc 2.34 floor) runs-on: ubuntu-latest steps: - name: Set up Docker Buildx @@ -49,7 +49,7 @@ jobs: name: Bash integration tests using built library runs-on: ubuntu-latest needs: - - build-ubuntu-1604 + - build strategy: fail-fast: false matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cea32d5..bc6a61d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,22 +36,23 @@ jobs: version: ${{ env.VERSION }} build-release: - name: Build ${{ matrix.target }}${{ matrix.suffix }} + name: Build ${{ matrix.target }} needs: create-release runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - # Linux (via cross) - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } - - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } + # Linux glibc: docker/builder.Dockerfile (AlmaLinux 9, glibc 2.34 floor), built natively per arch + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, build_tool: bake, lib: libflyline.so } + - { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm, build_tool: bake, lib: libflyline.so } + # Linux musl (via cross) + - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so } + - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, build_tool: cross, lib: libflyline.so } # Android (via cross) - - { target: aarch64-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so, feature_flags: "", suffix: "" } + - { target: aarch64-linux-android, os: ubuntu-latest, build_tool: cross, lib: libflyline.so } # macOS (native cargo) - - { target: aarch64-apple-darwin, os: macos-latest, build_tool: cargo, lib: libflyline.dylib, feature_flags: "", suffix: "" } + - { target: aarch64-apple-darwin, os: macos-latest, build_tool: cargo, lib: libflyline.dylib } steps: - name: Checkout @@ -61,6 +62,7 @@ jobs: # different toolchain from the one rustup then selects in the repo, and # the target would be added to the wrong one. - name: Install Rust toolchain + if: matrix.build_tool != 'bake' uses: dtolnay/rust-toolchain@master with: toolchain: "1.100.0" @@ -72,12 +74,26 @@ jobs: with: tool: cross@0.2.5 - - name: Build ${{ matrix.target }}${{ matrix.suffix }} - run: ${{ matrix.build_tool }} build --release --target ${{ matrix.target }} ${{ matrix.feature_flags }} + - name: Set up Docker Buildx + if: matrix.build_tool == 'bake' + uses: docker/setup-buildx-action@v4 + + - name: Build ${{ matrix.target }} + if: matrix.build_tool == 'bake' + uses: docker/bake-action@v7 + with: + files: docker-bake.hcl + targets: extract-release-artifact + set: | + extract-release-artifact.output=type=local,dest=target/${{ matrix.target }}/release + + - name: Build ${{ matrix.target }} + if: matrix.build_tool != 'bake' + run: ${{ matrix.build_tool }} build --release --lib --target ${{ matrix.target }} - name: Prepare release artifact run: | - ARCHIVE="libflyline-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.suffix }}" + ARCHIVE="libflyline-${{ github.ref_name }}-${{ matrix.target }}" echo "ARCHIVE=$ARCHIVE" >> $GITHUB_ENV - name: Build archive diff --git a/Cargo.toml b/Cargo.toml index b76755a..2e5a417 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,10 +110,6 @@ chrono = "0.4" # cross-rs configurations [package.metadata.cross.target.aarch64-linux-android] dockerfile = "docker/cross/aarch64-linux-android.Dockerfile" -[package.metadata.cross.target.aarch64-unknown-linux-gnu] -dockerfile = "docker/cross/aarch64-unknown-linux-gnu.Dockerfile" -[package.metadata.cross.target.x86_64-unknown-linux-gnu] -dockerfile = "docker/cross/x86_64-unknown-linux-gnu.Dockerfile" [patch.crates-io] ratatui-core = { git = "https://github.com/HalFrgrd/ratatui.git", branch = "inline_viewport_improvments" } diff --git a/README.md b/README.md index de152ef..26524de 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,19 @@ Flyline is similar to [ble.sh](https://github.com/akinomyoga/ble.sh) but is writ > [!IMPORTANT] > After installing, run `flyline run-tutorial` and if you don't like the mouse capturing: `flyline mouse --mode disabled` +### Supported platforms + +Flyline needs Bash 4.4 or newer and is tested on Bash 5.1, 5.2 and 5.3. Prebuilt libraries are published for: + +| Platform | Minimum | +|---|---| +| Linux x86_64 / aarch64, glibc | glibc 2.34 (RHEL 9, Amazon Linux 2023, Ubuntu 22.04, Debian 13 and newer) | +| Linux x86_64 / aarch64, musl | Alpine and other musl distros | +| macOS, Apple silicon | macOS 11, with Homebrew Bash | +| Android aarch64 | Termux | + +Other platforms (Intel Macs, 32-bit, FreeBSD, …) can still [build from source](#build-from-source). + ### Quick install: `install.sh` > [!TIP] diff --git a/docker/builder.Dockerfile b/docker/builder.Dockerfile index c13cbb3..2c81697 100644 --- a/docker/builder.Dockerfile +++ b/docker/builder.Dockerfile @@ -4,20 +4,14 @@ # the whole idea is to build dependencies in a separate stage and let docker cache them # so that we don't have to recompile all dependencies on every code change. -# Stage 1: Builder - Use Ubuntu 16.04 for glibc 2.23 compatibility -# targetting this older glibc version ensures compatibility with a wide range of host systems -FROM ubuntu:16.04 AS chef +# Stage 1: Builder. The base image's glibc is the oldest the library can be +# loaded with, so it is the support floor: AlmaLinux 9 has glibc 2.34, the +# oldest of the supported distros (RHEL 9, Amazon Linux 2023; Ubuntu 22.04 +# has 2.35, Debian 13 2.41). Built natively for amd64 and arm64. +FROM almalinux:9 AS chef -# Prevent interactive prompts during package installation -ENV DEBIAN_FRONTEND=noninteractive - -# Install build dependencies -RUN apt-get update && apt-get install -y \ - curl \ - build-essential \ - pkg-config \ - binutils \ - && rm -rf /var/lib/apt/lists/* +RUN dnf install -y --setopt=install_weak_deps=False gcc git \ + && dnf clean all # Install rustup only; the toolchain itself is the one pinned in # rust-toolchain.toml, so the release library is built with the same compiler @@ -41,19 +35,21 @@ RUN cargo chef prepare --recipe-path recipe.json # Stage 3: Run final Build FROM chef AS flyline-builder -ARG CARGO_FEATURES COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release ${CARGO_FEATURES:+--features $CARGO_FEATURES} --recipe-path recipe.json +RUN cargo chef cook --release --recipe-path recipe.json COPY Cargo.toml Cargo.lock build.rs ./ COPY crates ./crates COPY src ./src COPY examples ./examples COPY tests ./tests -RUN cargo build --release ${CARGO_FEATURES:+--features $CARGO_FEATURES} +RUN cargo build --release +# Guard the floor: no symbol may need a glibc newer than the base image's. +RUN newest="$(objdump -T target/release/libflyline.so | grep -o 'GLIBC_2\.[0-9.]*' | sort -uV | tail -1)" \ + && echo "newest glibc symbol version: $newest" \ + && [ "$(printf '%s\nGLIBC_2.34\n' "$newest" | sort -V | tail -1)" = "GLIBC_2.34" ] FROM flyline-builder AS flyline-lib-tests -ARG CARGO_FEATURES -RUN cargo test --release ${CARGO_FEATURES:+--features $CARGO_FEATURES} --lib +RUN cargo test --release --lib # Build image with output. This won't have anything in the file system apart from the built library diff --git a/docker/cross/aarch64-unknown-linux-gnu.Dockerfile b/docker/cross/aarch64-unknown-linux-gnu.Dockerfile deleted file mode 100644 index 87c4b13..0000000 --- a/docker/cross/aarch64-unknown-linux-gnu.Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos - -# Create a compatibility stdatomic.h for GCC 4.8.5 -RUN echo '#ifndef _COMPAT_STDATOMIC_H' > /usr/local/include/stdatomic.h && \ - echo '#define _COMPAT_STDATOMIC_H' >> /usr/local/include/stdatomic.h && \ - echo '#include ' >> /usr/local/include/stdatomic.h && \ - echo '#include ' >> /usr/local/include/stdatomic.h && \ - echo 'typedef enum {' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_relaxed = __ATOMIC_RELAXED,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_consume = __ATOMIC_CONSUME,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_acquire = __ATOMIC_ACQUIRE,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_release = __ATOMIC_RELEASE,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_acq_rel = __ATOMIC_ACQ_REL,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_seq_cst = __ATOMIC_SEQ_CST' >> /usr/local/include/stdatomic.h && \ - echo '} memory_order;' >> /usr/local/include/stdatomic.h && \ - echo '#define _Atomic(T) T' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_load_explicit(object, order) __atomic_load_n(object, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_store_explicit(object, desired, order) __atomic_store_n(object, desired, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_exchange_explicit(object, desired, order) __atomic_exchange_n(object, desired, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) __atomic_compare_exchange_n(object, expected, desired, 0, success, failure)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) __atomic_compare_exchange_n(object, expected, desired, 1, success, failure)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_add_explicit(object, operand, order) __atomic_fetch_add(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_sub_explicit(object, operand, order) __atomic_fetch_sub(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_and_explicit(object, operand, order) __atomic_fetch_and(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_or_explicit(object, operand, order) __atomic_fetch_or(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#endif' >> /usr/local/include/stdatomic.h && \ - cp /usr/local/include/stdatomic.h /usr/aarch64-linux-gnu/include/stdatomic.h - -# Create a compiler wrapper to filter out the unsupported -Wno-error=date-time flag and inject C11 flags -RUN for bin in gcc g++ aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ x86_64-redhat-linux-gcc x86_64-redhat-linux-g++; do \ - if [ -f /usr/bin/$bin ]; then \ - mv /usr/bin/$bin /usr/bin/$bin.real && \ - echo '#!/bin/bash' > /usr/bin/$bin && \ - echo 'args=()' >> /usr/bin/$bin && \ - echo 'for arg in "$@"; do' >> /usr/bin/$bin && \ - echo ' if [[ "$arg" != "-Wno-error=date-time" && "$arg" != "-Werror=date-time" ]]; then' >> /usr/bin/$bin && \ - echo ' args+=("$arg")' >> /usr/bin/$bin && \ - echo ' fi' >> /usr/bin/$bin && \ - echo 'done' >> /usr/bin/$bin && \ - echo 'real_bin=$(readlink -f "$0")' >> /usr/bin/$bin && \ - echo 'binary_name=$(basename "$real_bin")' >> /usr/bin/$bin && \ - echo 'if [[ "$binary_name" != *g++* && "$binary_name" != *c++* ]]; then' >> /usr/bin/$bin && \ - echo ' args+=("-std=gnu11" "-D__has_include(x)=0")' >> /usr/bin/$bin && \ - echo 'fi' >> /usr/bin/$bin && \ - echo 'exec "$real_bin.real" "${args[@]}"' >> /usr/bin/$bin && \ - chmod +x /usr/bin/$bin; \ - fi; \ - done diff --git a/docker/cross/x86_64-unknown-linux-gnu.Dockerfile b/docker/cross/x86_64-unknown-linux-gnu.Dockerfile deleted file mode 100644 index 384ee0b..0000000 --- a/docker/cross/x86_64-unknown-linux-gnu.Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos - -# Create a compatibility stdatomic.h for GCC 4.8.5 -RUN echo '#ifndef _COMPAT_STDATOMIC_H' > /usr/local/include/stdatomic.h && \ - echo '#define _COMPAT_STDATOMIC_H' >> /usr/local/include/stdatomic.h && \ - echo '#include ' >> /usr/local/include/stdatomic.h && \ - echo '#include ' >> /usr/local/include/stdatomic.h && \ - echo 'typedef enum {' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_relaxed = __ATOMIC_RELAXED,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_consume = __ATOMIC_CONSUME,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_acquire = __ATOMIC_ACQUIRE,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_release = __ATOMIC_RELEASE,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_acq_rel = __ATOMIC_ACQ_REL,' >> /usr/local/include/stdatomic.h && \ - echo ' memory_order_seq_cst = __ATOMIC_SEQ_CST' >> /usr/local/include/stdatomic.h && \ - echo '} memory_order;' >> /usr/local/include/stdatomic.h && \ - echo '#define _Atomic(T) T' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_load_explicit(object, order) __atomic_load_n(object, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_store_explicit(object, desired, order) __atomic_store_n(object, desired, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_exchange_explicit(object, desired, order) __atomic_exchange_n(object, desired, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) __atomic_compare_exchange_n(object, expected, desired, 0, success, failure)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) __atomic_compare_exchange_n(object, expected, desired, 1, success, failure)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_add_explicit(object, operand, order) __atomic_fetch_add(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_sub_explicit(object, operand, order) __atomic_fetch_sub(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_and_explicit(object, operand, order) __atomic_fetch_and(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#define atomic_fetch_or_explicit(object, operand, order) __atomic_fetch_or(object, operand, order)' >> /usr/local/include/stdatomic.h && \ - echo '#endif' >> /usr/local/include/stdatomic.h - -# Create a compiler wrapper to filter out the unsupported -Wno-error=date-time flag and inject C11 flags -RUN for bin in gcc g++ x86_64-redhat-linux-gcc x86_64-redhat-linux-g++; do \ - if [ -f /usr/bin/$bin ]; then \ - mv /usr/bin/$bin /usr/bin/$bin.real && \ - echo '#!/bin/bash' > /usr/bin/$bin && \ - echo 'args=()' >> /usr/bin/$bin && \ - echo 'for arg in "$@"; do' >> /usr/bin/$bin && \ - echo ' if [[ "$arg" != "-Wno-error=date-time" && "$arg" != "-Werror=date-time" ]]; then' >> /usr/bin/$bin && \ - echo ' args+=("$arg")' >> /usr/bin/$bin && \ - echo ' fi' >> /usr/bin/$bin && \ - echo 'done' >> /usr/bin/$bin && \ - echo 'real_bin=$(readlink -f "$0")' >> /usr/bin/$bin && \ - echo 'binary_name=$(basename "$real_bin")' >> /usr/bin/$bin && \ - echo 'if [[ "$binary_name" != *g++* && "$binary_name" != *c++* ]]; then' >> /usr/bin/$bin && \ - echo ' args+=("-std=gnu11" "-D__has_include(x)=0")' >> /usr/bin/$bin && \ - echo 'fi' >> /usr/bin/$bin && \ - echo 'exec "$real_bin.real" "${args[@]}"' >> /usr/bin/$bin && \ - chmod +x /usr/bin/$bin; \ - fi; \ - done diff --git a/docker/install_test_ubuntu.Dockerfile b/docker/install_test_ubuntu.Dockerfile index b6f5623..945da7d 100644 --- a/docker/install_test_ubuntu.Dockerfile +++ b/docker/install_test_ubuntu.Dockerfile @@ -1,4 +1,4 @@ -# An older supported LTS on purpose; newer distros are covered by arch/alpine. +# The oldest supported Ubuntu LTS (glibc 2.35, bash 5.1), close to the glibc 2.34 floor. FROM ubuntu:22.04 ARG FLYLINE_INSTALL_VERSION From 6bd06aa9e7c7906728e7ccd0e0989dde018a1b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:53:23 +0700 Subject: [PATCH 16/28] chore(deps): use ansi-to-tui 8.0.1 from crates.io instead of the fork The HalFrgrd fork is upstream v8.0.1 plus one change: its ratatui-core dependency points at the inline_viewport_improvments branch. flyline's [patch.crates-io] already redirects ratatui-core there, so the crates.io release resolves to the same single ratatui-core and the fork, and its allow-git entry, can go. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 3 ++- Cargo.toml | 3 ++- deny.toml | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77533f1..c2fbd99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,8 @@ dependencies = [ [[package]] name = "ansi-to-tui" version = "8.0.1" -source = "git+https://github.com/HalFrgrd/ansi-to-tui.git?branch=main#b9617878f5eb668d8b32830cb38476041756faeb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42366bb9d958f042bf58f0a85e1b2d091997c1257ca49bddd7e4827aadc65fd" dependencies = [ "nom 8.0.0", "ratatui-core", diff --git a/Cargo.toml b/Cargo.toml index 2e5a417..89414ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,8 @@ tui-scrollbar = "0.2" unicode-segmentation = "1.13" unicode-width = { version = "0.2", default-features = false } -ansi-to-tui = { git = "https://github.com/HalFrgrd/ansi-to-tui.git", branch = "main" } +# crates.io release; [patch.crates-io] points its ratatui-core at the fork below. +ansi-to-tui = "8.0.1" ratatui = { git = "https://github.com/HalFrgrd/ratatui.git", branch = "inline_viewport_improvments", default-features = false, features = ["macros", "serde", "termina", "unstable-backend-writer", "unstable-rendered-line-info"] } skim = { git = "https://github.com/HalFrgrd/skim", rev = "7908ee85a5f6cd49575925fcc0bdef3999409d26", default-features = false, features = ["algos_only"] } termina = { git = "https://github.com/HalFrgrd/termina.git", rev = "dfa34e768a46d298e4b06fff6242c3d571f7061f" } diff --git a/deny.toml b/deny.toml index 5877630..5cf2259 100644 --- a/deny.toml +++ b/deny.toml @@ -39,10 +39,10 @@ allow-wildcard-paths = true [sources] unknown-registry = "deny" unknown-git = "deny" -# The patched ratatui/termina and the skim/ansi-to-tui/flycomp forks have no -# crates.io release carrying flyline's changes. Nothing else may come from git. +# ratatui (inline viewport), termina (terminal responses) and skim (matcher-only +# build) are forks with no crates.io release carrying flyline's changes; +# flycomp is HalFrgrd's own unpublished crate. Nothing else may come from git. allow-git = [ - "https://github.com/HalFrgrd/ansi-to-tui.git", "https://github.com/HalFrgrd/flycomp.git", "https://github.com/HalFrgrd/ratatui.git", "https://github.com/HalFrgrd/skim", From 5b0b8bb4efec4d147bc4bbbf01f260431910d79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4ng=20Tr=E1=BA=A7n?= Date: Mon, 23 Nov 2026 11:57:30 +0700 Subject: [PATCH 17/28] Squashed 'vendor/ratatui/' content from commit e665c36c git-subtree-dir: vendor/ratatui git-subtree-split: e665c36cb14752a61cd777fbd06dbef8474f2add --- .cargo/config.toml | 2 + .cliffignore | 115 + .cz.toml | 78 + .editorconfig | 17 + .github/CODEOWNERS | 11 + .github/FUNDING.yml | 2 + .github/ISSUE_TEMPLATE/bug_report.md | 73 + .github/ISSUE_TEMPLATE/config.yml | 14 + .github/ISSUE_TEMPLATE/feature_request.md | 47 + .github/copilot-instructions.md | 82 + .github/dependabot.yml | 42 + .github/pull_request_template.md | 1 + .github/workflows/check-pr.yml | 93 + .github/workflows/check-semver.yml | 22 + .github/workflows/ci.yml | 346 + .github/workflows/release-plz.yml | 71 + .github/workflows/zizmor.yml | 26 + .gitignore | 7 + .markdownlint.yaml | 15 + .vscode/extensions.json | 3 + .vscode/settings.json | 11 + ARCHITECTURE.md | 211 + BREAKING-CHANGES.md | 1164 ++ CHANGELOG.md | 10495 ++++++++++++++++ CODE_OF_CONDUCT.md | 128 + CONTRIBUTING.md | 368 + Cargo.lock | 5058 ++++++++ Cargo.toml | 127 + FUNDING.json | 7 + LICENSE | 22 + MAINTAINERS.md | 16 + README.md | 182 + RELEASE.md | 51 + SECURITY.md | 9 + assets/favicon.ico | Bin 0 -> 15406 bytes assets/logo-simple.svg | 1 + assets/logo.png | Bin 0 -> 1081 bytes assets/logo.svg | 1 + assets/release-header.png | Bin 0 -> 102239 bytes bacon.toml | 94 + cliff.toml | 172 + clippy.toml | 1 + codecov.yml | 14 + committed.toml | 30 + deny.toml | 39 + examples/README.md | 272 + examples/apps/advanced-widget-impl/Cargo.toml | 14 + examples/apps/advanced-widget-impl/README.md | 9 + .../apps/advanced-widget-impl/src/main.rs | 241 + examples/apps/async-github/Cargo.toml | 22 + examples/apps/async-github/README.md | 9 + examples/apps/async-github/src/main.rs | 232 + examples/apps/calendar-explorer/Cargo.toml | 15 + examples/apps/calendar-explorer/README.md | 9 + examples/apps/calendar-explorer/src/main.rs | 236 + examples/apps/canvas/Cargo.toml | 15 + examples/apps/canvas/README.md | 9 + examples/apps/canvas/src/main.rs | 264 + examples/apps/chart/Cargo.toml | 14 + examples/apps/chart/README.md | 9 + examples/apps/chart/src/main.rs | 352 + examples/apps/color-explorer/Cargo.toml | 15 + examples/apps/color-explorer/README.md | 9 + examples/apps/color-explorer/src/main.rs | 232 + examples/apps/colors-rgb/Cargo.toml | 15 + examples/apps/colors-rgb/README.md | 9 + examples/apps/colors-rgb/src/main.rs | 239 + examples/apps/constraint-explorer/Cargo.toml | 16 + examples/apps/constraint-explorer/README.md | 9 + examples/apps/constraint-explorer/src/main.rs | 605 + examples/apps/constraints/Cargo.toml | 15 + examples/apps/constraints/README.md | 9 + examples/apps/constraints/src/main.rs | 388 + examples/apps/custom-widget/Cargo.toml | 14 + examples/apps/custom-widget/README.md | 9 + examples/apps/custom-widget/src/main.rs | 258 + examples/apps/demo/Cargo.toml | 23 + examples/apps/demo/README.md | 31 + examples/apps/demo/src/app.rs | 344 + examples/apps/demo/src/crossterm.rs | 76 + examples/apps/demo/src/main.rs | 67 + examples/apps/demo/src/termina.rs | 113 + examples/apps/demo/src/termion.rs | 91 + examples/apps/demo/src/termwiz.rs | 75 + examples/apps/demo/src/ui.rs | 405 + examples/apps/demo2/Cargo.toml | 19 + examples/apps/demo2/README.md | 9 + examples/apps/demo2/src/app.rs | 215 + examples/apps/demo2/src/colors.rs | 38 + examples/apps/demo2/src/destroy.rs | 140 + examples/apps/demo2/src/main.rs | 51 + examples/apps/demo2/src/tabs.rs | 11 + examples/apps/demo2/src/tabs/about.rs | 73 + examples/apps/demo2/src/tabs/email.rs | 156 + examples/apps/demo2/src/tabs/recipe.rs | 183 + examples/apps/demo2/src/tabs/traceroute.rs | 204 + examples/apps/demo2/src/tabs/weather.rs | 161 + examples/apps/demo2/src/theme.rs | 132 + examples/apps/flex/Cargo.toml | 15 + examples/apps/flex/README.md | 9 + examples/apps/flex/src/main.rs | 617 + examples/apps/gauge/Cargo.toml | 14 + examples/apps/gauge/README.md | 9 + examples/apps/gauge/src/main.rs | 192 + examples/apps/hello-world/Cargo.toml | 14 + examples/apps/hello-world/README.md | 9 + examples/apps/hello-world/src/main.rs | 62 + examples/apps/hyperlink/Cargo.toml | 15 + examples/apps/hyperlink/README.md | 9 + examples/apps/hyperlink/src/main.rs | 72 + examples/apps/inline/Cargo.toml | 15 + examples/apps/inline/README.md | 9 + examples/apps/inline/src/main.rs | 286 + examples/apps/input-form/Cargo.toml | 16 + examples/apps/input-form/README.md | 27 + examples/apps/input-form/src/main.rs | 263 + examples/apps/minimal/Cargo.toml | 13 + examples/apps/minimal/README.md | 9 + examples/apps/minimal/src/main.rs | 23 + examples/apps/modifiers/Cargo.toml | 15 + examples/apps/modifiers/README.md | 9 + examples/apps/modifiers/src/main.rs | 82 + examples/apps/mouse-drawing/Cargo.toml | 17 + examples/apps/mouse-drawing/README.md | 9 + examples/apps/mouse-drawing/src/main.rs | 118 + examples/apps/panic/Cargo.toml | 14 + examples/apps/panic/README.md | 9 + examples/apps/panic/src/main.rs | 88 + examples/apps/popup/Cargo.toml | 14 + examples/apps/popup/README.md | 9 + examples/apps/popup/src/main.rs | 65 + examples/apps/release-header/Cargo.toml | 13 + examples/apps/release-header/README.md | 14 + examples/apps/release-header/src/main.rs | 172 + examples/apps/scrollbar/Cargo.toml | 14 + examples/apps/scrollbar/README.md | 9 + examples/apps/scrollbar/src/main.rs | 209 + examples/apps/table/Cargo.toml | 17 + examples/apps/table/README.md | 9 + examples/apps/table/src/main.rs | 374 + examples/apps/todo-list/Cargo.toml | 14 + examples/apps/todo-list/README.md | 9 + examples/apps/todo-list/src/main.rs | 292 + examples/apps/tracing/Cargo.toml | 17 + examples/apps/tracing/README.md | 10 + examples/apps/tracing/src/main.rs | 102 + examples/apps/user-input/Cargo.toml | 14 + examples/apps/user-input/README.md | 9 + examples/apps/user-input/src/main.rs | 226 + examples/apps/volatility-surface/Cargo.toml | 16 + examples/apps/volatility-surface/README.md | 33 + .../apps/volatility-surface/src/display.rs | 5 + .../volatility-surface/src/display/palette.rs | 88 + .../src/display/surface_3d.rs | 327 + examples/apps/volatility-surface/src/main.rs | 190 + .../apps/volatility-surface/src/volatility.rs | 115 + examples/apps/weather/Cargo.toml | 15 + examples/apps/weather/README.md | 9 + examples/apps/weather/src/main.rs | 68 + examples/apps/widget-ref-container/Cargo.toml | 14 + examples/apps/widget-ref-container/README.md | 10 + .../apps/widget-ref-container/src/main.rs | 81 + examples/concepts/state/Cargo.toml | 11 + examples/concepts/state/README.md | 179 + .../concepts/state/src/bin/component-trait.rs | 83 + .../state/src/bin/immutable-consuming.rs | 86 + .../state/src/bin/immutable-function.rs | 82 + .../state/src/bin/immutable-shared-ref.rs | 92 + .../state/src/bin/mutable-function.rs | 67 + .../concepts/state/src/bin/mutable-widget.rs | 74 + .../state/src/bin/nested-mutable-widget.rs | 96 + .../state/src/bin/nested-stateful-widget.rs | 103 + examples/concepts/state/src/bin/refcell.rs | 86 + .../concepts/state/src/bin/stateful-widget.rs | 78 + .../state/src/bin/widget-with-mutable-ref.rs | 84 + examples/concepts/state/src/lib.rs | 8 + examples/vhs/advanced-widget-impl.tape | 12 + examples/vhs/async-github.tape | 16 + examples/vhs/calendar-explorer.tape | 19 + examples/vhs/canvas.tape | 13 + examples/vhs/chart.tape | 12 + examples/vhs/color-explorer.tape | 12 + examples/vhs/colors-rgb.tape | 21 + examples/vhs/constraint-explorer.tape | 30 + examples/vhs/constraints.tape | 14 + examples/vhs/custom-widget.tape | 21 + examples/vhs/demo.tape | 18 + examples/vhs/demo2-destroy.tape | 18 + examples/vhs/demo2-social.tape | 43 + examples/vhs/demo2.tape | 50 + examples/vhs/flex.tape | 17 + examples/vhs/gauge.tape | 14 + examples/vhs/generate.bash | 44 + examples/vhs/hello-world.tape | 12 + examples/vhs/hyperlink.tape | 15 + examples/vhs/inline.tape | 9 + examples/vhs/minimal.tape | 12 + examples/vhs/modifiers.tape | 12 + examples/vhs/panic.tape | 20 + examples/vhs/popup.tape | 16 + examples/vhs/release-header.tape | 19 + examples/vhs/scrollbar.tape | 12 + examples/vhs/table.tape | 26 + examples/vhs/todo-list.tape | 24 + examples/vhs/tracing.tape | 12 + examples/vhs/user-input.tape | 22 + examples/vhs/volatility-surface.tape | 36 + ratatui-core/Cargo.toml | 95 + ratatui-core/LICENSE | 1 + ratatui-core/README.md | 73 + ratatui-core/src/backend.rs | 433 + ratatui-core/src/backend/test.rs | 1089 ++ ratatui-core/src/buffer.rs | 13 + ratatui-core/src/buffer/assert.rs | 71 + ratatui-core/src/buffer/buffer.rs | 1582 +++ ratatui-core/src/buffer/cell.rs | 458 + ratatui-core/src/buffer/cell_width.rs | 160 + ratatui-core/src/buffer/diff.rs | 585 + ratatui-core/src/layout.rs | 333 + ratatui-core/src/layout/alignment.rs | 89 + ratatui-core/src/layout/constraint.rs | 526 + ratatui-core/src/layout/direction.rs | 63 + ratatui-core/src/layout/flex.rs | 212 + ratatui-core/src/layout/layout.rs | 2926 +++++ ratatui-core/src/layout/margin.rs | 97 + ratatui-core/src/layout/offset.rs | 66 + ratatui-core/src/layout/position.rs | 253 + ratatui-core/src/layout/rect.rs | 1114 ++ ratatui-core/src/layout/rect/iter.rs | 356 + ratatui-core/src/layout/rect/ops.rs | 136 + ratatui-core/src/layout/size.rs | 147 + ratatui-core/src/lib.rs | 88 + ratatui-core/src/style.rs | 1069 ++ ratatui-core/src/style/anstyle.rs | 361 + ratatui-core/src/style/color.rs | 788 ++ ratatui-core/src/style/palette.rs | 6 + ratatui-core/src/style/palette/material.rs | 608 + ratatui-core/src/style/palette/tailwind.rs | 653 + ratatui-core/src/style/palette_conversion.rs | 82 + ratatui-core/src/style/stylize.rs | 668 + ratatui-core/src/symbols.rs | 15 + ratatui-core/src/symbols/bar.rs | 51 + ratatui-core/src/symbols/block.rs | 51 + ratatui-core/src/symbols/border.rs | 709 ++ ratatui-core/src/symbols/braille.rs | 21 + ratatui-core/src/symbols/half_block.rs | 3 + ratatui-core/src/symbols/line.rs | 259 + ratatui-core/src/symbols/marker.rs | 85 + ratatui-core/src/symbols/merge.rs | 748 ++ ratatui-core/src/symbols/pixel.rs | 30 + ratatui-core/src/symbols/scrollbar.rs | 46 + ratatui-core/src/symbols/shade.rs | 5 + ratatui-core/src/terminal.rs | 487 + ratatui-core/src/terminal/backend.rs | 95 + ratatui-core/src/terminal/buffers.rs | 448 + ratatui-core/src/terminal/cursor.rs | 160 + ratatui-core/src/terminal/frame.rs | 238 + ratatui-core/src/terminal/init.rs | 245 + ratatui-core/src/terminal/inline.rs | 929 ++ ratatui-core/src/terminal/render.rs | 865 ++ ratatui-core/src/terminal/resize.rs | 340 + ratatui-core/src/terminal/viewport.rs | 146 + ratatui-core/src/text.rs | 64 + ratatui-core/src/text/grapheme.rs | 84 + ratatui-core/src/text/line.rs | 1729 +++ ratatui-core/src/text/masked.rs | 149 + ratatui-core/src/text/span.rs | 904 ++ ratatui-core/src/text/text.rs | 1495 +++ ratatui-core/src/widgets.rs | 9 + ratatui-core/src/widgets/stateful_widget.rs | 193 + ratatui-core/src/widgets/widget.rs | 174 + ratatui-core/tests/rect.rs | 148 + ratatui-crossterm/Cargo.toml | 73 + ratatui-crossterm/LICENSE | 1 + ratatui-crossterm/README.md | 69 + ratatui-crossterm/src/lib.rs | 1171 ++ ratatui-macros/.rustfmt.toml | 2 + ratatui-macros/CHANGELOG.md | 116 + ratatui-macros/Cargo.toml | 18 + ratatui-macros/LICENSE | 20 + ratatui-macros/README.md | 161 + ratatui-macros/src/layout.rs | 203 + ratatui-macros/src/lib.rs | 179 + ratatui-macros/src/line.rs | 100 + ratatui-macros/src/row.rs | 144 + ratatui-macros/src/span.rs | 245 + ratatui-macros/src/text.rs | 75 + ratatui-macros/tests/macros.rs | 104 + ratatui-macros/tests/ui/fails.rs | 20 + ratatui-macros/tests/ui/fails.stderr | 57 + ratatui-termina/Cargo.toml | 53 + ratatui-termina/README.md | 21 + ratatui-termina/examples/termina.rs | 82 + ratatui-termina/src/lib.rs | 822 ++ ratatui-termion/Cargo.toml | 40 + ratatui-termion/LICENSE | 1 + ratatui-termion/README.md | 35 + ratatui-termion/src/lib.rs | 745 ++ ratatui-termwiz/Cargo.toml | 47 + ratatui-termwiz/LICENSE | 1 + ratatui-termwiz/README.md | 36 + ratatui-termwiz/src/lib.rs | 891 ++ ratatui-widgets/Cargo.toml | 74 + ratatui-widgets/LICENSE | 1 + ratatui-widgets/README.md | 106 + ratatui-widgets/examples/README.md | 101 + ratatui-widgets/examples/barchart-grouped.rs | 95 + ratatui-widgets/examples/barchart.rs | 75 + ratatui-widgets/examples/block.rs | 76 + ratatui-widgets/examples/calendar.rs | 84 + ratatui-widgets/examples/canvas.rs | 86 + ratatui-widgets/examples/chart.rs | 107 + ratatui-widgets/examples/collapsed-borders.rs | 117 + ratatui-widgets/examples/gauge.rs | 77 + ratatui-widgets/examples/line-gauge.rs | 153 + ratatui-widgets/examples/list.rs | 94 + ratatui-widgets/examples/logo.rs | 58 + ratatui-widgets/examples/paragraph.rs | 94 + ratatui-widgets/examples/scrollbar.rs | 126 + ratatui-widgets/examples/shadow.rs | 127 + ratatui-widgets/examples/sparkline.rs | 92 + ratatui-widgets/examples/table.rs | 98 + ratatui-widgets/examples/tabs.rs | 82 + .../examples/vhs/barchart-grouped.tape | 12 + ratatui-widgets/examples/vhs/barchart.tape | 12 + ratatui-widgets/examples/vhs/block.tape | 12 + ratatui-widgets/examples/vhs/calendar.tape | 12 + ratatui-widgets/examples/vhs/canvas.tape | 13 + ratatui-widgets/examples/vhs/chart.tape | 12 + .../examples/vhs/collapsed-borders.tape | 17 + ratatui-widgets/examples/vhs/gauge.tape | 12 + ratatui-widgets/examples/vhs/line-gauge.tape | 12 + ratatui-widgets/examples/vhs/list.tape | 20 + ratatui-widgets/examples/vhs/logo.tape | 14 + ratatui-widgets/examples/vhs/paragraph.tape | 12 + ratatui-widgets/examples/vhs/scrollbar.tape | 17 + ratatui-widgets/examples/vhs/shadow.tape | 12 + ratatui-widgets/examples/vhs/sparkline.tape | 12 + ratatui-widgets/examples/vhs/table.tape | 17 + ratatui-widgets/examples/vhs/tabs.tape | 15 + ratatui-widgets/src/as_ref.rs | 111 + ratatui-widgets/src/barchart.rs | 1562 +++ ratatui-widgets/src/barchart/bar.rs | 336 + ratatui-widgets/src/barchart/bar_group.rs | 170 + ratatui-widgets/src/block.rs | 2371 ++++ ratatui-widgets/src/block/padding.rs | 217 + ratatui-widgets/src/block/shadow.rs | 453 + ratatui-widgets/src/borders.rs | 307 + ratatui-widgets/src/calendar.rs | 458 + ratatui-widgets/src/canvas.rs | 1221 ++ ratatui-widgets/src/canvas/circle.rs | 80 + ratatui-widgets/src/canvas/line.rs | 603 + ratatui-widgets/src/canvas/map.rs | 209 + ratatui-widgets/src/canvas/points.rs | 29 + ratatui-widgets/src/canvas/rectangle.rs | 239 + ratatui-widgets/src/canvas/world.rs | 6298 ++++++++++ ratatui-widgets/src/chart.rs | 1705 +++ ratatui-widgets/src/clear.rs | 94 + ratatui-widgets/src/fill.rs | 212 + ratatui-widgets/src/gauge.rs | 623 + ratatui-widgets/src/lib.rs | 138 + ratatui-widgets/src/list.rs | 657 + ratatui-widgets/src/list/item.rs | 353 + ratatui-widgets/src/list/rendering.rs | 1272 ++ ratatui-widgets/src/list/state.rs | 357 + ratatui-widgets/src/logo.rs | 260 + ratatui-widgets/src/mascot.rs | 260 + ratatui-widgets/src/paragraph.rs | 1338 ++ ratatui-widgets/src/polyfills.rs | 156 + ratatui-widgets/src/reflow.rs | 729 ++ ratatui-widgets/src/scrollbar.rs | 1219 ++ ratatui-widgets/src/sparkline.rs | 751 ++ ratatui-widgets/src/table.rs | 2717 ++++ ratatui-widgets/src/table/cell.rs | 246 + .../src/table/highlight_spacing.rs | 77 + ratatui-widgets/src/table/row.rs | 345 + ratatui-widgets/src/table/state.rs | 745 ++ ratatui-widgets/src/tabs.rs | 805 ++ ratatui-widgets/tests/auto_traits.rs | 36 + ratatui-widgets/tests/block/merge_exact.txt | 1000 ++ ratatui-widgets/tests/block/merge_fuzzy.txt | 1000 ++ ratatui-widgets/tests/block/merge_replace.txt | 1000 ++ ratatui/Cargo.toml | 167 + ratatui/LICENSE | 1 + ratatui/benches/main.rs | 30 + ratatui/benches/main/barchart.rs | 69 + ratatui/benches/main/block.rs | 53 + ratatui/benches/main/buffer.rs | 60 + ratatui/benches/main/constraints.rs | 60 + ratatui/benches/main/gauge.rs | 58 + ratatui/benches/main/line.rs | 36 + ratatui/benches/main/list.rs | 70 + ratatui/benches/main/paragraph.rs | 95 + ratatui/benches/main/rect.rs | 114 + ratatui/benches/main/sparkline.rs | 42 + ratatui/benches/main/table.rs | 67 + ratatui/benches/main/text.rs | 63 + ratatui/src/init.rs | 572 + ratatui/src/lib.rs | 521 + ratatui/src/prelude.rs | 49 + ratatui/src/widgets.rs | 771 ++ ratatui/src/widgets/stateful_widget_ref.rs | 168 + ratatui/src/widgets/widget_ref.rs | 270 + ratatui/tests/backend_termion.rs | 64 + ratatui/tests/state_serde.rs | 229 + ratatui/tests/stateful_widget_ref_dyn.rs | 92 + ratatui/tests/stylize.rs | 105 + ratatui/tests/terminal.rs | 482 + ratatui/tests/widgets_barchart.rs | 91 + ratatui/tests/widgets_block.rs | 485 + ratatui/tests/widgets_calendar.rs | 109 + ratatui/tests/widgets_canvas.rs | 40 + ratatui/tests/widgets_chart.rs | 410 + ratatui/tests/widgets_gauge.rs | 253 + ratatui/tests/widgets_list.rs | 371 + ratatui/tests/widgets_paragraph.rs | 353 + ratatui/tests/widgets_table.rs | 842 ++ ratatui/tests/widgets_tabs.rs | 50 + release-plz.toml | 9 + rust-toolchain.toml | 2 + rustfmt.toml | 23 + tombi.toml | 21 + typos.toml | 12 + xtask/Cargo.toml | 13 + xtask/README.md | 11 + xtask/src/commands.rs | 219 + xtask/src/commands/backend.rs | 77 + xtask/src/commands/check.rs | 49 + xtask/src/commands/clippy.rs | 68 + xtask/src/commands/coverage.rs | 42 + xtask/src/commands/docs.rs | 22 + xtask/src/commands/format.rs | 40 + xtask/src/commands/rdme.rs | 41 + xtask/src/commands/test_docs.rs | 29 + xtask/src/commands/typos.rs | 23 + xtask/src/main.rs | 108 + 436 files changed, 106535 insertions(+) create mode 100644 .cargo/config.toml create mode 100644 .cliffignore create mode 100644 .cz.toml create mode 100644 .editorconfig create mode 100644 .github/CODEOWNERS create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/copilot-instructions.md create mode 100644 .github/dependabot.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/check-pr.yml create mode 100644 .github/workflows/check-semver.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release-plz.yml create mode 100644 .github/workflows/zizmor.yml create mode 100644 .gitignore create mode 100644 .markdownlint.yaml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 ARCHITECTURE.md create mode 100644 BREAKING-CHANGES.md create mode 100644 CHANGELOG.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 FUNDING.json create mode 100644 LICENSE create mode 100644 MAINTAINERS.md create mode 100644 README.md create mode 100644 RELEASE.md create mode 100644 SECURITY.md create mode 100644 assets/favicon.ico create mode 100644 assets/logo-simple.svg create mode 100644 assets/logo.png create mode 100644 assets/logo.svg create mode 100644 assets/release-header.png create mode 100644 bacon.toml create mode 100644 cliff.toml create mode 100644 clippy.toml create mode 100644 codecov.yml create mode 100644 committed.toml create mode 100644 deny.toml create mode 100644 examples/README.md create mode 100644 examples/apps/advanced-widget-impl/Cargo.toml create mode 100644 examples/apps/advanced-widget-impl/README.md create mode 100644 examples/apps/advanced-widget-impl/src/main.rs create mode 100644 examples/apps/async-github/Cargo.toml create mode 100644 examples/apps/async-github/README.md create mode 100644 examples/apps/async-github/src/main.rs create mode 100644 examples/apps/calendar-explorer/Cargo.toml create mode 100644 examples/apps/calendar-explorer/README.md create mode 100644 examples/apps/calendar-explorer/src/main.rs create mode 100644 examples/apps/canvas/Cargo.toml create mode 100644 examples/apps/canvas/README.md create mode 100644 examples/apps/canvas/src/main.rs create mode 100644 examples/apps/chart/Cargo.toml create mode 100644 examples/apps/chart/README.md create mode 100644 examples/apps/chart/src/main.rs create mode 100644 examples/apps/color-explorer/Cargo.toml create mode 100644 examples/apps/color-explorer/README.md create mode 100644 examples/apps/color-explorer/src/main.rs create mode 100644 examples/apps/colors-rgb/Cargo.toml create mode 100644 examples/apps/colors-rgb/README.md create mode 100644 examples/apps/colors-rgb/src/main.rs create mode 100644 examples/apps/constraint-explorer/Cargo.toml create mode 100644 examples/apps/constraint-explorer/README.md create mode 100644 examples/apps/constraint-explorer/src/main.rs create mode 100644 examples/apps/constraints/Cargo.toml create mode 100644 examples/apps/constraints/README.md create mode 100644 examples/apps/constraints/src/main.rs create mode 100644 examples/apps/custom-widget/Cargo.toml create mode 100644 examples/apps/custom-widget/README.md create mode 100644 examples/apps/custom-widget/src/main.rs create mode 100644 examples/apps/demo/Cargo.toml create mode 100644 examples/apps/demo/README.md create mode 100644 examples/apps/demo/src/app.rs create mode 100644 examples/apps/demo/src/crossterm.rs create mode 100644 examples/apps/demo/src/main.rs create mode 100644 examples/apps/demo/src/termina.rs create mode 100644 examples/apps/demo/src/termion.rs create mode 100644 examples/apps/demo/src/termwiz.rs create mode 100644 examples/apps/demo/src/ui.rs create mode 100644 examples/apps/demo2/Cargo.toml create mode 100644 examples/apps/demo2/README.md create mode 100644 examples/apps/demo2/src/app.rs create mode 100644 examples/apps/demo2/src/colors.rs create mode 100644 examples/apps/demo2/src/destroy.rs create mode 100644 examples/apps/demo2/src/main.rs create mode 100644 examples/apps/demo2/src/tabs.rs create mode 100644 examples/apps/demo2/src/tabs/about.rs create mode 100644 examples/apps/demo2/src/tabs/email.rs create mode 100644 examples/apps/demo2/src/tabs/recipe.rs create mode 100644 examples/apps/demo2/src/tabs/traceroute.rs create mode 100644 examples/apps/demo2/src/tabs/weather.rs create mode 100644 examples/apps/demo2/src/theme.rs create mode 100644 examples/apps/flex/Cargo.toml create mode 100644 examples/apps/flex/README.md create mode 100644 examples/apps/flex/src/main.rs create mode 100644 examples/apps/gauge/Cargo.toml create mode 100644 examples/apps/gauge/README.md create mode 100644 examples/apps/gauge/src/main.rs create mode 100644 examples/apps/hello-world/Cargo.toml create mode 100644 examples/apps/hello-world/README.md create mode 100644 examples/apps/hello-world/src/main.rs create mode 100644 examples/apps/hyperlink/Cargo.toml create mode 100644 examples/apps/hyperlink/README.md create mode 100644 examples/apps/hyperlink/src/main.rs create mode 100644 examples/apps/inline/Cargo.toml create mode 100644 examples/apps/inline/README.md create mode 100644 examples/apps/inline/src/main.rs create mode 100644 examples/apps/input-form/Cargo.toml create mode 100644 examples/apps/input-form/README.md create mode 100644 examples/apps/input-form/src/main.rs create mode 100644 examples/apps/minimal/Cargo.toml create mode 100644 examples/apps/minimal/README.md create mode 100644 examples/apps/minimal/src/main.rs create mode 100644 examples/apps/modifiers/Cargo.toml create mode 100644 examples/apps/modifiers/README.md create mode 100644 examples/apps/modifiers/src/main.rs create mode 100644 examples/apps/mouse-drawing/Cargo.toml create mode 100644 examples/apps/mouse-drawing/README.md create mode 100644 examples/apps/mouse-drawing/src/main.rs create mode 100644 examples/apps/panic/Cargo.toml create mode 100644 examples/apps/panic/README.md create mode 100644 examples/apps/panic/src/main.rs create mode 100644 examples/apps/popup/Cargo.toml create mode 100644 examples/apps/popup/README.md create mode 100644 examples/apps/popup/src/main.rs create mode 100644 examples/apps/release-header/Cargo.toml create mode 100644 examples/apps/release-header/README.md create mode 100644 examples/apps/release-header/src/main.rs create mode 100644 examples/apps/scrollbar/Cargo.toml create mode 100644 examples/apps/scrollbar/README.md create mode 100644 examples/apps/scrollbar/src/main.rs create mode 100644 examples/apps/table/Cargo.toml create mode 100644 examples/apps/table/README.md create mode 100644 examples/apps/table/src/main.rs create mode 100644 examples/apps/todo-list/Cargo.toml create mode 100644 examples/apps/todo-list/README.md create mode 100644 examples/apps/todo-list/src/main.rs create mode 100644 examples/apps/tracing/Cargo.toml create mode 100644 examples/apps/tracing/README.md create mode 100644 examples/apps/tracing/src/main.rs create mode 100644 examples/apps/user-input/Cargo.toml create mode 100644 examples/apps/user-input/README.md create mode 100644 examples/apps/user-input/src/main.rs create mode 100644 examples/apps/volatility-surface/Cargo.toml create mode 100644 examples/apps/volatility-surface/README.md create mode 100644 examples/apps/volatility-surface/src/display.rs create mode 100644 examples/apps/volatility-surface/src/display/palette.rs create mode 100644 examples/apps/volatility-surface/src/display/surface_3d.rs create mode 100644 examples/apps/volatility-surface/src/main.rs create mode 100644 examples/apps/volatility-surface/src/volatility.rs create mode 100644 examples/apps/weather/Cargo.toml create mode 100644 examples/apps/weather/README.md create mode 100644 examples/apps/weather/src/main.rs create mode 100644 examples/apps/widget-ref-container/Cargo.toml create mode 100644 examples/apps/widget-ref-container/README.md create mode 100644 examples/apps/widget-ref-container/src/main.rs create mode 100644 examples/concepts/state/Cargo.toml create mode 100644 examples/concepts/state/README.md create mode 100644 examples/concepts/state/src/bin/component-trait.rs create mode 100644 examples/concepts/state/src/bin/immutable-consuming.rs create mode 100644 examples/concepts/state/src/bin/immutable-function.rs create mode 100644 examples/concepts/state/src/bin/immutable-shared-ref.rs create mode 100644 examples/concepts/state/src/bin/mutable-function.rs create mode 100644 examples/concepts/state/src/bin/mutable-widget.rs create mode 100644 examples/concepts/state/src/bin/nested-mutable-widget.rs create mode 100644 examples/concepts/state/src/bin/nested-stateful-widget.rs create mode 100644 examples/concepts/state/src/bin/refcell.rs create mode 100644 examples/concepts/state/src/bin/stateful-widget.rs create mode 100644 examples/concepts/state/src/bin/widget-with-mutable-ref.rs create mode 100644 examples/concepts/state/src/lib.rs create mode 100644 examples/vhs/advanced-widget-impl.tape create mode 100644 examples/vhs/async-github.tape create mode 100644 examples/vhs/calendar-explorer.tape create mode 100644 examples/vhs/canvas.tape create mode 100644 examples/vhs/chart.tape create mode 100644 examples/vhs/color-explorer.tape create mode 100644 examples/vhs/colors-rgb.tape create mode 100644 examples/vhs/constraint-explorer.tape create mode 100644 examples/vhs/constraints.tape create mode 100644 examples/vhs/custom-widget.tape create mode 100644 examples/vhs/demo.tape create mode 100644 examples/vhs/demo2-destroy.tape create mode 100644 examples/vhs/demo2-social.tape create mode 100644 examples/vhs/demo2.tape create mode 100644 examples/vhs/flex.tape create mode 100644 examples/vhs/gauge.tape create mode 100755 examples/vhs/generate.bash create mode 100644 examples/vhs/hello-world.tape create mode 100644 examples/vhs/hyperlink.tape create mode 100644 examples/vhs/inline.tape create mode 100644 examples/vhs/minimal.tape create mode 100644 examples/vhs/modifiers.tape create mode 100644 examples/vhs/panic.tape create mode 100644 examples/vhs/popup.tape create mode 100644 examples/vhs/release-header.tape create mode 100644 examples/vhs/scrollbar.tape create mode 100644 examples/vhs/table.tape create mode 100644 examples/vhs/todo-list.tape create mode 100644 examples/vhs/tracing.tape create mode 100644 examples/vhs/user-input.tape create mode 100644 examples/vhs/volatility-surface.tape create mode 100644 ratatui-core/Cargo.toml create mode 120000 ratatui-core/LICENSE create mode 100644 ratatui-core/README.md create mode 100644 ratatui-core/src/backend.rs create mode 100644 ratatui-core/src/backend/test.rs create mode 100644 ratatui-core/src/buffer.rs create mode 100644 ratatui-core/src/buffer/assert.rs create mode 100644 ratatui-core/src/buffer/buffer.rs create mode 100644 ratatui-core/src/buffer/cell.rs create mode 100644 ratatui-core/src/buffer/cell_width.rs create mode 100644 ratatui-core/src/buffer/diff.rs create mode 100644 ratatui-core/src/layout.rs create mode 100644 ratatui-core/src/layout/alignment.rs create mode 100644 ratatui-core/src/layout/constraint.rs create mode 100644 ratatui-core/src/layout/direction.rs create mode 100644 ratatui-core/src/layout/flex.rs create mode 100644 ratatui-core/src/layout/layout.rs create mode 100644 ratatui-core/src/layout/margin.rs create mode 100644 ratatui-core/src/layout/offset.rs create mode 100644 ratatui-core/src/layout/position.rs create mode 100644 ratatui-core/src/layout/rect.rs create mode 100644 ratatui-core/src/layout/rect/iter.rs create mode 100644 ratatui-core/src/layout/rect/ops.rs create mode 100644 ratatui-core/src/layout/size.rs create mode 100644 ratatui-core/src/lib.rs create mode 100644 ratatui-core/src/style.rs create mode 100644 ratatui-core/src/style/anstyle.rs create mode 100644 ratatui-core/src/style/color.rs create mode 100644 ratatui-core/src/style/palette.rs create mode 100644 ratatui-core/src/style/palette/material.rs create mode 100644 ratatui-core/src/style/palette/tailwind.rs create mode 100644 ratatui-core/src/style/palette_conversion.rs create mode 100644 ratatui-core/src/style/stylize.rs create mode 100644 ratatui-core/src/symbols.rs create mode 100644 ratatui-core/src/symbols/bar.rs create mode 100644 ratatui-core/src/symbols/block.rs create mode 100644 ratatui-core/src/symbols/border.rs create mode 100644 ratatui-core/src/symbols/braille.rs create mode 100644 ratatui-core/src/symbols/half_block.rs create mode 100644 ratatui-core/src/symbols/line.rs create mode 100644 ratatui-core/src/symbols/marker.rs create mode 100644 ratatui-core/src/symbols/merge.rs create mode 100644 ratatui-core/src/symbols/pixel.rs create mode 100644 ratatui-core/src/symbols/scrollbar.rs create mode 100644 ratatui-core/src/symbols/shade.rs create mode 100644 ratatui-core/src/terminal.rs create mode 100644 ratatui-core/src/terminal/backend.rs create mode 100644 ratatui-core/src/terminal/buffers.rs create mode 100644 ratatui-core/src/terminal/cursor.rs create mode 100644 ratatui-core/src/terminal/frame.rs create mode 100644 ratatui-core/src/terminal/init.rs create mode 100644 ratatui-core/src/terminal/inline.rs create mode 100644 ratatui-core/src/terminal/render.rs create mode 100644 ratatui-core/src/terminal/resize.rs create mode 100644 ratatui-core/src/terminal/viewport.rs create mode 100644 ratatui-core/src/text.rs create mode 100644 ratatui-core/src/text/grapheme.rs create mode 100644 ratatui-core/src/text/line.rs create mode 100644 ratatui-core/src/text/masked.rs create mode 100644 ratatui-core/src/text/span.rs create mode 100644 ratatui-core/src/text/text.rs create mode 100644 ratatui-core/src/widgets.rs create mode 100644 ratatui-core/src/widgets/stateful_widget.rs create mode 100644 ratatui-core/src/widgets/widget.rs create mode 100644 ratatui-core/tests/rect.rs create mode 100644 ratatui-crossterm/Cargo.toml create mode 120000 ratatui-crossterm/LICENSE create mode 100644 ratatui-crossterm/README.md create mode 100644 ratatui-crossterm/src/lib.rs create mode 100644 ratatui-macros/.rustfmt.toml create mode 100644 ratatui-macros/CHANGELOG.md create mode 100644 ratatui-macros/Cargo.toml create mode 100644 ratatui-macros/LICENSE create mode 100644 ratatui-macros/README.md create mode 100644 ratatui-macros/src/layout.rs create mode 100644 ratatui-macros/src/lib.rs create mode 100644 ratatui-macros/src/line.rs create mode 100644 ratatui-macros/src/row.rs create mode 100644 ratatui-macros/src/span.rs create mode 100644 ratatui-macros/src/text.rs create mode 100644 ratatui-macros/tests/macros.rs create mode 100644 ratatui-macros/tests/ui/fails.rs create mode 100644 ratatui-macros/tests/ui/fails.stderr create mode 100644 ratatui-termina/Cargo.toml create mode 100644 ratatui-termina/README.md create mode 100644 ratatui-termina/examples/termina.rs create mode 100644 ratatui-termina/src/lib.rs create mode 100644 ratatui-termion/Cargo.toml create mode 120000 ratatui-termion/LICENSE create mode 100644 ratatui-termion/README.md create mode 100644 ratatui-termion/src/lib.rs create mode 100644 ratatui-termwiz/Cargo.toml create mode 120000 ratatui-termwiz/LICENSE create mode 100644 ratatui-termwiz/README.md create mode 100644 ratatui-termwiz/src/lib.rs create mode 100644 ratatui-widgets/Cargo.toml create mode 120000 ratatui-widgets/LICENSE create mode 100644 ratatui-widgets/README.md create mode 100644 ratatui-widgets/examples/README.md create mode 100644 ratatui-widgets/examples/barchart-grouped.rs create mode 100644 ratatui-widgets/examples/barchart.rs create mode 100644 ratatui-widgets/examples/block.rs create mode 100644 ratatui-widgets/examples/calendar.rs create mode 100644 ratatui-widgets/examples/canvas.rs create mode 100644 ratatui-widgets/examples/chart.rs create mode 100644 ratatui-widgets/examples/collapsed-borders.rs create mode 100644 ratatui-widgets/examples/gauge.rs create mode 100644 ratatui-widgets/examples/line-gauge.rs create mode 100644 ratatui-widgets/examples/list.rs create mode 100644 ratatui-widgets/examples/logo.rs create mode 100644 ratatui-widgets/examples/paragraph.rs create mode 100644 ratatui-widgets/examples/scrollbar.rs create mode 100644 ratatui-widgets/examples/shadow.rs create mode 100644 ratatui-widgets/examples/sparkline.rs create mode 100644 ratatui-widgets/examples/table.rs create mode 100644 ratatui-widgets/examples/tabs.rs create mode 100644 ratatui-widgets/examples/vhs/barchart-grouped.tape create mode 100644 ratatui-widgets/examples/vhs/barchart.tape create mode 100644 ratatui-widgets/examples/vhs/block.tape create mode 100644 ratatui-widgets/examples/vhs/calendar.tape create mode 100644 ratatui-widgets/examples/vhs/canvas.tape create mode 100644 ratatui-widgets/examples/vhs/chart.tape create mode 100644 ratatui-widgets/examples/vhs/collapsed-borders.tape create mode 100644 ratatui-widgets/examples/vhs/gauge.tape create mode 100644 ratatui-widgets/examples/vhs/line-gauge.tape create mode 100644 ratatui-widgets/examples/vhs/list.tape create mode 100644 ratatui-widgets/examples/vhs/logo.tape create mode 100644 ratatui-widgets/examples/vhs/paragraph.tape create mode 100644 ratatui-widgets/examples/vhs/scrollbar.tape create mode 100644 ratatui-widgets/examples/vhs/shadow.tape create mode 100644 ratatui-widgets/examples/vhs/sparkline.tape create mode 100644 ratatui-widgets/examples/vhs/table.tape create mode 100644 ratatui-widgets/examples/vhs/tabs.tape create mode 100644 ratatui-widgets/src/as_ref.rs create mode 100644 ratatui-widgets/src/barchart.rs create mode 100644 ratatui-widgets/src/barchart/bar.rs create mode 100644 ratatui-widgets/src/barchart/bar_group.rs create mode 100644 ratatui-widgets/src/block.rs create mode 100644 ratatui-widgets/src/block/padding.rs create mode 100644 ratatui-widgets/src/block/shadow.rs create mode 100644 ratatui-widgets/src/borders.rs create mode 100644 ratatui-widgets/src/calendar.rs create mode 100644 ratatui-widgets/src/canvas.rs create mode 100644 ratatui-widgets/src/canvas/circle.rs create mode 100644 ratatui-widgets/src/canvas/line.rs create mode 100644 ratatui-widgets/src/canvas/map.rs create mode 100644 ratatui-widgets/src/canvas/points.rs create mode 100644 ratatui-widgets/src/canvas/rectangle.rs create mode 100644 ratatui-widgets/src/canvas/world.rs create mode 100644 ratatui-widgets/src/chart.rs create mode 100644 ratatui-widgets/src/clear.rs create mode 100644 ratatui-widgets/src/fill.rs create mode 100644 ratatui-widgets/src/gauge.rs create mode 100644 ratatui-widgets/src/lib.rs create mode 100644 ratatui-widgets/src/list.rs create mode 100644 ratatui-widgets/src/list/item.rs create mode 100644 ratatui-widgets/src/list/rendering.rs create mode 100644 ratatui-widgets/src/list/state.rs create mode 100644 ratatui-widgets/src/logo.rs create mode 100644 ratatui-widgets/src/mascot.rs create mode 100644 ratatui-widgets/src/paragraph.rs create mode 100644 ratatui-widgets/src/polyfills.rs create mode 100644 ratatui-widgets/src/reflow.rs create mode 100644 ratatui-widgets/src/scrollbar.rs create mode 100644 ratatui-widgets/src/sparkline.rs create mode 100644 ratatui-widgets/src/table.rs create mode 100644 ratatui-widgets/src/table/cell.rs create mode 100644 ratatui-widgets/src/table/highlight_spacing.rs create mode 100644 ratatui-widgets/src/table/row.rs create mode 100644 ratatui-widgets/src/table/state.rs create mode 100644 ratatui-widgets/src/tabs.rs create mode 100644 ratatui-widgets/tests/auto_traits.rs create mode 100644 ratatui-widgets/tests/block/merge_exact.txt create mode 100644 ratatui-widgets/tests/block/merge_fuzzy.txt create mode 100644 ratatui-widgets/tests/block/merge_replace.txt create mode 100644 ratatui/Cargo.toml create mode 120000 ratatui/LICENSE create mode 100644 ratatui/benches/main.rs create mode 100644 ratatui/benches/main/barchart.rs create mode 100644 ratatui/benches/main/block.rs create mode 100644 ratatui/benches/main/buffer.rs create mode 100644 ratatui/benches/main/constraints.rs create mode 100644 ratatui/benches/main/gauge.rs create mode 100644 ratatui/benches/main/line.rs create mode 100644 ratatui/benches/main/list.rs create mode 100644 ratatui/benches/main/paragraph.rs create mode 100644 ratatui/benches/main/rect.rs create mode 100644 ratatui/benches/main/sparkline.rs create mode 100644 ratatui/benches/main/table.rs create mode 100644 ratatui/benches/main/text.rs create mode 100644 ratatui/src/init.rs create mode 100644 ratatui/src/lib.rs create mode 100644 ratatui/src/prelude.rs create mode 100644 ratatui/src/widgets.rs create mode 100644 ratatui/src/widgets/stateful_widget_ref.rs create mode 100644 ratatui/src/widgets/widget_ref.rs create mode 100644 ratatui/tests/backend_termion.rs create mode 100644 ratatui/tests/state_serde.rs create mode 100644 ratatui/tests/stateful_widget_ref_dyn.rs create mode 100644 ratatui/tests/stylize.rs create mode 100644 ratatui/tests/terminal.rs create mode 100644 ratatui/tests/widgets_barchart.rs create mode 100644 ratatui/tests/widgets_block.rs create mode 100644 ratatui/tests/widgets_calendar.rs create mode 100644 ratatui/tests/widgets_canvas.rs create mode 100644 ratatui/tests/widgets_chart.rs create mode 100644 ratatui/tests/widgets_gauge.rs create mode 100644 ratatui/tests/widgets_list.rs create mode 100644 ratatui/tests/widgets_paragraph.rs create mode 100644 ratatui/tests/widgets_table.rs create mode 100644 ratatui/tests/widgets_tabs.rs create mode 100644 release-plz.toml create mode 100644 rust-toolchain.toml create mode 100644 rustfmt.toml create mode 100644 tombi.toml create mode 100644 typos.toml create mode 100644 xtask/Cargo.toml create mode 100644 xtask/README.md create mode 100644 xtask/src/commands.rs create mode 100644 xtask/src/commands/backend.rs create mode 100644 xtask/src/commands/check.rs create mode 100644 xtask/src/commands/clippy.rs create mode 100644 xtask/src/commands/coverage.rs create mode 100644 xtask/src/commands/docs.rs create mode 100644 xtask/src/commands/format.rs create mode 100644 xtask/src/commands/rdme.rs create mode 100644 xtask/src/commands/test_docs.rs create mode 100644 xtask/src/commands/typos.rs create mode 100644 xtask/src/main.rs diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..35049cb --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +xtask = "run --package xtask --" diff --git a/.cliffignore b/.cliffignore new file mode 100644 index 0000000..fce09ff --- /dev/null +++ b/.cliffignore @@ -0,0 +1,115 @@ +# skip entries from +50af9a5d80ed5446f3e6cc554911f606580edde9 +272e9709c6eed45cd7e0c183624b7898f4e0ae69 +adc8fdc35aa57d6dad2ae8dd30ec2e9256576c09 +31711dbf82a4c7bb3b78692da34d9f469725dd6e +b6356aa7a529a491d63dd6628b8985adae337f16 +885558b6f89df642317d39c5b44c94c742d1e0c8 +6440eb9d76379340953420629ab0a3d9039d6c48 +3870583ea868452191857f9bda97a3d5c35d0a4f +487edc8399683fb8a9a66359729c015780d248f2 +250c222cc4aaab09184a28efc68f75ca03133794 +590a392ab11c1a215767614931036781f4cf6a29 +6443f7408af4a8834bc68cd35d2ba9be47e45f38 +8339cce10a51c9c951b3c9750d527d80168626eb +ac342231c344e893f2f630ee38167aab28c736a6 +0fb103680028a6e26a1923f87b60bde51acaec4f +4335a90a00aeeedb69a92442c7f2711727944017 +71480242a926f98e9081ed6e2dc8c381757b3a42 +e1a31db55913bd690bcaef380e9dbc3b6a5dc175 +38490ff8da6f11e309ba1bcb3e88a562f7c953c5 +a4bb143e4767137d6a9e9927d3da66562611f86f +bc73f2dcbe5ea48fc4d1555a8e931f40d7b0e03f +77dea441e5637b1c428c2aa71ea67fb3aac20c12 +06af14107e70e49a4cba3babb8ab0a0c57b4bdf8 +9acdab32df69517b93dd2b861b85586d47c71540 +2e684c6500be61fbe69744d183c8086564ac0051 +b7f8ec0ff9659473d936eae53a57cd9de38cec1f +31a2c4548c304270a8c852f19baa7a4eaac5e75c +57b681b053c019b66e0ed92959638997fea731b1 +131b9ec41751163d43d94564363247b60f031486 +8b32f82b4dd526580d00fa13f053bf507e8ea933 +76d1e5b1733d47a7f05acf563db26cb1a66b540d +57a0a34f924e0d488c9e9f917900e677c3488dc4 +12aa58601ddd0704256c56019bd2c7139d41f7a2 +2dc81833c60951d16f9bd60f3da003edfc9a11f5 +20e41f1d1da6db8abbc2504814531d4d97bdf94b +68b55a12a29e70ebfcc063c2d5d5845de3b5a27e +693003314a25e792ffc5d53146b28bfb6a4582e3 +63441e259bc38b56e0369197bed14788b2cb3d54 +fa88152c808eeb6c9d9b3662361aab1e57e1b1bf +30d9daa59b1843786cde00e25c3e69cfe818b80b +92540b2f6ab25f3a5400aebb28af3c498ac793a4 +29edc3a7a38c512611a80cf5d8d42027558419b2 +819499d6ffc0e8453ed3220067645933a4882a74 +4756526829a4e849d9e256b6cf821eb66afe3ade +8f35437d5ad78d31cd45c4af888f20f0b5ab4196 +39bd72b1f702dadb1ebbaf4e77ad2fada166ac49 +c6d2cee3e967c9234176c5229858512b0c79d6a9 +bd90e3d928e0f9f0b915933ebbc32c2256fe8cfa +b820c0c7e4c576c1e39b5e482a8aac08076a039c +74194759756bb111b4da3e9a5cdb968275a2fab0 +38b2f27efe0e1829bc503df7fd64b94b7bb80d97 +21aa3232d762d6e3f81f15fc5b66ba462385ac05 +903bb0ae32d22393783edfda96db900739864f0a +5cee13ab6d9c49751cf9283d9099e37f0cc3632c +0a0997702dd4cf2217160f5652f5c39cbd4a1010 +778f2f5ec511bef431b54157242b91d083ea9840 +7d23bd2ceaf96e81972b5f746fdcba0d17f6391f +2c02a56bce31519386303571e0b66b7d4beb378e +f33d51e7d9ccf9fe52ec3289d04d97c722d9ee17 +91cd81aaa032887bb2327bc3fe3cad6b3c9fbacf +5d5a1ccb0b4e2f293f215ce026fba33f1c069689 +6b9417db5f2adbdc60e9dd8dc5acbbe2a1f77ba9 +dce1e4b138eb1333c9e773bacd579a8cdddd73fb +b4aacb045e2200896b0d0136a2b8688b47828d73 +dcba0bcd5d5d6e33ddc1fa94ebb94819fdda600e +6f52350ecfb62e3a5bac16f0824e74b757cc6cd2 +2c6f324b9aa5034771e00758b143fd8df94d859d +bf0210602948f8d26ae323996fe7b22fb218a446 +07aff91b015b5e7e0504680c12edbce70d7dba1e +f6d49dde14af73ed467d75d8f6ec0f502db2908f +9a7467b30576d5cb7491ea6e09efcae97eadf9bb +a0c35f1d7bcce10e092582b95f5b0a3f20ad7bf3 +d24747d46982192b575a40b8cc18d1c948fac3d7 +8060f7bc578b29dde6ca0c4c64569f9c73218f46 +0dc5b2d2e0aa6438ffc1b3965b1ab31c721adbcc +8ecdd892f53d7db95bbb53a61700d36e3fcefdd4 +570c35868147a2400a13331e85d562d1ef96a011 +3855c3a84a77037aeee40dbe9e52454fb1f9afee +93372f35c1669da0138ca776890f3ff3d38a6539 +6cf08d4a2f0398856fd593f50bf077fd59b08230 +f78d3bfec32d07c1124eee8d0249477ce3fb0884 +204307fa50aaaa373946342084f7fd3af39f3cd3 +c50b01d098e5ab405a50c3e14e858da27d606e8f +f71d1ac73e8290f37d55a67d6a6507a3653ec174 +ae2868c0e0b1ac8b5126fd43269383fa533d87b5 +be8def963956c605bca28bcd8df673bd7ec3740b +4ac4d9d3ab97176d71e287bcdd6d41e66f2f7ccb +fafabb8dab84e9460a076199ea646262e51c855b +2f97d35bd8618e8c0cc006cb1d4a9b151c1b9b4a +39d5a745acbbd3510de707d4e7c471c17e02ae59 +a1acdcdc4c002390a76f01699cfa006a36cf3f56 +ad54cf29ad1a4335ba208fb94a8fc5dfbba260e3 +c7649575e7b199794be4252f79da80aaecdcee28 +8913e2ce1f40d451ddb4527f08ec75f198d5063c +1b9e310300f22bfc72364f027a9caeddadf61a99 +89d7dd46031511f0556b2d29ab34035f42e3a24c +ca4fa0b9bf5ba707aa0447ba7c38fbacdadb7eec +8cecfdf2f6dd5b0de507f79b469517cc0fb42add +7eeb6afb3dbc56e52f9387a74f826b186cd19137 +d0f75eb371a96f8d5f174e23de074efd840e9e44 +f8a70ea9da8e6df2bf7a5f74cce45615fc292afe +f28b9730061bffadb9d87ad63edf7d10b245d2c1 +afc5cf2140f22fea6bd6933dd0f9c302229a1980 +b75df78cdca58d5dca0c51fb8e106067aa6cb752 +28f5a6dbd4091aa3efa86eed6767eeb44a655f0f +345e6a1ebd853858463a33953585ce407a60378c +c45a4de47c601554f6b981d211181468b4798e41 +bbaa9a5432ff6ad5518344123c3b56f349347e99 +f804c90f96221f334371ccd01b0e6df7b1cfc1e8 +16ba867c5877d8c97968987ecb5f8bff966d0a82 +38a1474ca12aa6a796afc1e277882d997a999e14 +92c4078413fc79fcc83f5d3d8708abb58696ff1a +d4415204e1eb3aed2a74a722aeaaa274975dd2d7 +e48bcf5f21f14acb27996fdc02231c140f5b817c diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 0000000..6fa19cd --- /dev/null +++ b/.cz.toml @@ -0,0 +1,78 @@ +# configuration for https://github.com/commitizen/cz-cli + +[tool.commitizen] +name = "cz_customize" +tag_format = "$version" +version_type = "semver" +version_provider = "cargo" +update_changelog_on_bump = true +major_version_zero = true +use_shortcuts = true + +[tool.commitizen.customize] +message_template = """{{change_type}}({{scope}}): {{subject}} + +{% if body %}\ +{{body}}\ +{% endif %} + +{%if is_breaking_change %}\ +BREAKING_CHANGE: \ +{% endif %}\ +{{footer}}\ +""" +example = "feature: this feature enable customize through config file" +schema = "(): \n\n\n\n