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§

Modules§

  • Utilities for working with buffers.
  • dispatcherdispatcher
    Multithreading dispatcher for compio.
  • 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.
  • runtimeruntime
    The runtime of compio.
  • signalsignal
    Asynchronous signal handling.
  • tlstls
    Async TLS streams.

Attribute Macros§