From ce533eda80a1add71fcd4d6bd887e22cab064305 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Tue, 3 Oct 2023 02:51:32 +0200 Subject: [PATCH] chore: Add more READMEs --- crates/fluke-buffet/README.md | 19 +++++++++++++++++++ crates/fluke-maybe-uring/Cargo.toml | 1 + crates/fluke-maybe-uring/README.md | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 crates/fluke-buffet/README.md create mode 100644 crates/fluke-maybe-uring/README.md diff --git a/crates/fluke-buffet/README.md b/crates/fluke-buffet/README.md new file mode 100644 index 00000000..de95512d --- /dev/null +++ b/crates/fluke-buffet/README.md @@ -0,0 +1,19 @@ +# fluke-buffet + +This crate is mostly a terrible idea, but it's doing buffer management +for `fluke`. + +It's designed to memmap a big chunk of memory and then, well, hand out +reference-counted (non-thread-safe) pieces of it. It was faster than stack +allocation in some benchmark I did a while ago. + +Also, it's compatible with io_uring in that you can give ownership of one of the +pieces to a read/write operation and nobody else is able to use it until that +operation is done, which is really neat. + +There's a bunch of splitting operations that try to maintain reference count +and the general "one mutable reference XOR multiple read-only references" vibe +of the whole endeavor. + +I'm not honestly convinced buffet is the optimal way to go about this, but it +works for now, it's io_uring and fallback-codepath friendly... ah well. diff --git a/crates/fluke-maybe-uring/Cargo.toml b/crates/fluke-maybe-uring/Cargo.toml index 64be8f9d..b73e644e 100644 --- a/crates/fluke-maybe-uring/Cargo.toml +++ b/crates/fluke-maybe-uring/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/hapsoc/fluke" documentation = "https://docs.rs/fluke-maybe-uring" +readme = "README.md" description = """ Replicates some tokio-uring types to allow building code without it """ diff --git a/crates/fluke-maybe-uring/README.md b/crates/fluke-maybe-uring/README.md new file mode 100644 index 00000000..1aa2199e --- /dev/null +++ b/crates/fluke-maybe-uring/README.md @@ -0,0 +1,5 @@ +# fluke-maybe-uring + +fluke uses [tokio-uring](https://crates.io/crates/tokio-uring), but it also +tries to function on platforms where io_uring is not available: this crate +abstracts over "classic tokio" I/O types and tokio-uring types.