rio
pre-alpha misuse-resistant bindings for io_uring, focusing on users who want to do high-performance storage.
- only relies on libc, no need for c/bindgen to complicate things, nobody wants that
- the completions implement Future, if ur asyncy
- as it gets built out, will leverage as much of the Rust type system as possible to prevent misuse
This is a very early-stage project, but it will be the core of sled's IO stack over time. It is built with a specific high-level application in mind: a high performance storage engine and replication system.
sled expects to use the following features:
- SQE linking for dependency specification
- SQPOLL mode for 0-syscall operation
- registered files & IO buffers for lower overhead
- write, read, connect, fsync, fdatasync, O_DIRECT
examples that will be broken in the next day or two
readn
let mut ring = new.expect;
let file = open.expect;
let mut dater = ;
let mut in_io_slice = new;
let completion = ring.read?;
// if using threaddies
completion.wait?;
// if using asyncus
completion.await?
writen
let mut ring = new.expect;
let file = create.expect;
let dater = ;
let out_io_slice = new;
let completion = ring.read_at?;
// if using threadulous
completion.wait?;
// if using asyncoos
completion.await?
speedy O_DIRECT shi0t (try this at home / run the o_direct example)
use ;
const CHUNK_SIZE: u64 = 4096 * 256;
// `O_DIRECT` requires all reads and writes
// to be aligned to the block device's block
// size. 4096 might not be the best, or even
// a valid one, for yours!
;
btw if ur here from the internet u can fuck right the F off