From 9004fd6e8e716c47f94405d5c64dede815c59e7f Mon Sep 17 00:00:00 2001 From: Alex Plotnick Date: Tue, 11 Aug 2026 20:55:43 +0000 Subject: [PATCH] Use rustyline's termios backend The default backend rebuilds termios from typed flags, dropping c_cflag bits nix doesn't model. On illumos that zeroes the baud rate, and B0 at raw-mode entry hangs up the terminal. --- Cargo.lock | 10 ++++++++++ Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 14b788f..1c4f3bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3945,6 +3945,7 @@ dependencies = [ "memchr", "nix", "radix_trie", + "termios", "unicode-segmentation", "unicode-width 0.2.2", "utf8parse", @@ -5042,6 +5043,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + [[package]] name = "textwrap" version = "0.15.2" diff --git a/Cargo.toml b/Cargo.toml index 6ba7afe..3cba426 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ rlimit = "0.10" rumors = { git = "https://github.com/oxidecomputer/rumors", rev = "66aea68b6578345275de3cf14151c4707345773f" } rustix = { version = "1", features = ["fs", "process", "pty", "termios"] } rustls = "0.23" -rustyline = "17" +rustyline = { version = "17", features = ["termios"] } schemars = { version = "0.8", features = ["chrono"] } serde = "1" serde_json = "1"