Registry / async / tokio-stdin-stdout

tokio-stdin-stdout

JSON →
library0.1.5rscratesunverified

Thread- and future::sync::mpsc-based AsyncRead/AsyncWrite stdin/stdout with little buffering.

# Cargo.toml [dependencies] tokio-stdin-stdout = "0.1.5"
INSTALL
IMPORT
SIG · TOKIO-STDIN-STDOUT
T
tokio-stdin-stdout
asyncrustv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stdin
use tokio_stdin_stdout::stdin;

Read from stdin asynchronously using tokio.

use tokio_stdin_stdout::stdin; use tokio::io::AsyncReadExt; #[tokio::main] async fn main() { let mut stdin = stdin(); let mut buf = vec![0; 1024]; let n = stdin.read(&mut buf).await.unwrap(); println!("Read {} bytes", n); }
Debug
Known issues
gotchaRequires a Tokio runtime to be active.
fix
Ensure you are using #[tokio::main] or manually create a runtime.
affects: >=0.1.0
Upgrade
Version history
0.1.5latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
tokio-stdin-stdout — cargo add tokio-stdin-stdout · libregistry