Crate compio

Source
Expand description

§Compio

A thread-per-core Rust runtime with IOCP/io_uring/polling. The name comes from “completion-based IO”. This crate is inspired by monoio.

§Quick start

use compio::{fs::File, io::AsyncReadAtExt};

let file = File::open("Cargo.toml").await.unwrap();
let (read, buffer) = file
    .read_to_end_at(Vec::with_capacity(1024), 0)
    .await
    .unwrap();
assert_eq!(read, buffer.len());
let buffer = String::from_utf8(buffer).unwrap();
println!("{}", buffer);

Re-exports§

pub use buf::BufResult;
pub use runtime::event;event
pub use runtime::time;time
pub use buf::arrayvec;arrayvec
pub use buf::bumpalo;bumpalo
pub use buf::bytes;bytes
pub use tls::native_tls;native-tls
pub use tls::rustls;rustls

Modules§

buf
Utilities for working with buffers.
dispatcherdispatcher
Multithreading dispatcher for compio.
driver
The platform-specified driver. Some types differ by compilation target.
fsruntime
Filesystem manipulation operations.
ioio
This crate provides traits and utilities for completion-based IO.
netruntime
Network related.
processprocess
Process library for compio. It is an extension to std::process.
quicquic
QUIC implementation for compio
runtimeruntime
The runtime of compio.
signalsignal
Asynchronous signal handling.
tlstls
Async TLS streams.

Attribute Macros§

mainmacros
testmacros