Registry / async / tokio-file-unix

tokio-file-unix

JSON →
library0.6.0rscratesunverified

Asynchronous support for epollable files via Tokio on Unix-like platforms.

# Cargo.toml [dependencies] tokio-file-unix = "0.6.0"
INSTALL
IMPORT
SIG · TOKIO-FILE-UNIX
T
tokio-file-unix
asyncrustv0.6.0
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.

File
use tokio_file_unix::File;

Reads from stdin asynchronously using tokio-file-unix.

use tokio_file_unix::File; use std::os::unix::io::FromRawFd; #[tokio::main] async fn main() -> std::io::Result<()> { let std_file = unsafe { std::fs::File::from_raw_fd(0) }; let mut file = File::new(std_file)?; let mut buf = [0u8; 1024]; let n = file.read(&mut buf).await?; println!("Read {} bytes", n); Ok(()) }
Debug
Known issues
gotchaRequires Tokio runtime and Unix-like platform.
fix
Ensure you are using Tokio as the async runtime and target a Unix-like OS.
affects: >=0.6.0
Upgrade
Version history
0.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
41 hits · last 30 days
node
36
OpenAI (training)
1
Resources
tokio-file-unix — cargo add tokio-file-unix · libregistry