tokio-borrow-stdio

Crates.iotokio-borrow-stdio
lib.rstokio-borrow-stdio
version0.1.0
sourcesrc
created_at2018-05-27 22:14:00.282391
updated_at2018-05-27 22:14:00.282391
descriptionTemporarily expose standard input and output to a Tokio core.
homepagehttps://github.com/pkgw/stund/tree/master/tokio-borrow-stdio
repositoryhttps://github.com/pkgw/stund/
max_upload_size
id67354
size9,984
Peter Williams (pkgw)

documentation

https://docs.rs/crate/tokio-borrow-stdio

README

tokio-borrow-stdio

“Borrow” the standard input/output streams temporarily, exposing them to a Tokio core as nonblocking streams.

There are several crates implementing this general class of functionality:

Why yet another one? The key is in the name — this is the only crate that temporarily takes over stdin/stdout. This makes it possible for the stund CLI client to temporarily start up an asynchronous Tokio core when necessary, but otherwise use traditional blocking I/O for most of its user interactions.

This crate only works on Unix-like operating systems. (The program for which it was developed, stund, uses things like pseudo-TTYs and Unix domain sockets, so there is no expectation of ever porting it to other kinds of OS.)

Commit count: 626

cargo fmt