| Crates.io | fiox |
| lib.rs | fiox |
| version | 0.2.0 |
| created_at | 2025-12-15 05:48:29.854386+00 |
| updated_at | 2025-12-29 02:37:33.488985+00 |
| description | file I/O using io_uring/iocp |
| homepage | |
| repository | https://github.com/keithyin/fiox |
| max_upload_size | |
| id | 1985608 |
| size | 60,482 |
Zero-Copy, Asynchronous File I/O for Rust — powered by io_uring on Linux and IOCP on Windows, with built-in ring buffer support.
fiox delivers ultra-low-latency, high-throughput file I/O by leveraging modern kernel interfaces:
io_uring integration (bypassing traditional syscall overhead)I/O Completion Ports (IOCP) for scalable async I/OPaired with efficient ring buffers, RingIO enables seamless zero-copy data pipelines
✅ Cross-platform: Linux (io_uring) & Windows (IOCP)
✅ Zero-copy reads/writes using direct io
✅ Built-in SPSC ring buffers for high-speed data staging
✅ Batching & coalescing for reduced syscalls
let read_start_pos = 10;
let mut reader =
SequentialReader::new("test_data/test_data.txt", read_start_pos, 4096, 2).unwrap();
let buf_size = 112560;
let mut buf = vec![0_u8; buf_size];
let mut read_size = 0;
loop {
let n = reader.read2buf(&mut buf).unwrap();
if n == 0 {
break;
}
print!("{}", String::from_utf8((&buf[..n]).to_vec()).unwrap());
}
let mut writer =
SequentialWriter::new("test_data/test_data_writer.txt", 0, 4096, 2).unwrap();
for i in 0..1000 {
writer
.write(format!("line:{}, abcdefghijklmnopqrstuvwxyz\n", i).as_bytes())
.unwrap();
}