Crates.io | mfio |
lib.rs | mfio |
version | 0.1.0 |
source | src |
created_at | 2023-01-30 10:54:41.838022 |
updated_at | 2023-12-07 16:33:26.278257 |
description | Flexible completion I/O primitives |
homepage | |
repository | https://github.com/memflow/mfio |
max_upload_size | |
id | 771658 |
size | 310,348 |
mfio is a one-stop shop for custom async I/O systems. It allows you to go wild, beyond typical OS APIs. Originally built for memflow, it aims to make the following aspects of an I/O as simple as possible:
mfio achieves all this by building everything around two key, but tiny traits: PacketIo
, and
IoBackend
. Backends implement these traits, which then allow asynchronous futures to be driven to
completion. Then, high level abstractions are used to pass data to the I/O system, in the form of
packets. These packets can have multiple views to non-overlapping segments of data, and different
views may be processed differently. The end result is an incredibly flexible I/O system with
unmatched potential for efficient concurrency.
The project is split into several crates:
Crate | Purpose | Status |
---|---|---|
mfio | Core building blocks | Beta |
mfio-rt | Runtime building blocks | Alpha |
mfio-netfs | Network filesystem PoC | Experimental |
What each status means:
mfio
and mfio-rt
do not require std
, albeit alloc
crate is still required. You can disable
standard library requirements as follows:
mfio = { version = "0.1", default-features = false }
mfio-rt = { version = "0.1", default-features = false, features = ["virt"] }
This will add both mfio
and mfio-rt
as dependencies in no_std mode. Many features will be
disabled, such as native polling handles, native runtime, and anything else that depends on running
operating system.
However, the remaining blocks should be sufficient to build any non-blocking I/O systems. Custom polling handles may be implemented on arbitrary types to enable cooperative operations on any operating system.