| Crates.io | rust-pty |
| lib.rs | rust-pty |
| version | 0.1.0 |
| created_at | 2026-01-05 22:00:27.269635+00 |
| updated_at | 2026-01-05 22:00:27.269635+00 |
| description | Cross-platform async PTY (pseudo-terminal) library for Rust |
| homepage | |
| repository | https://github.com/praxiomlabs/rust-expect |
| max_upload_size | |
| id | 2024653 |
| size | 121,853 |
Low-level pseudo-terminal (PTY) abstraction for Rust.
use rust_pty::{PtyConfig, UnixPtyMaster, spawn_with_pty};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = PtyConfig::default()
.window_size(80, 24);
let (master, child) = spawn_with_pty("bash", &config)?;
// Use master for I/O
// master.write_all(b"echo hello\n").await?;
Ok(())
}
Licensed under MIT or Apache-2.0.