From 52f193f50d3767617270432962649dff667b0d0b Mon Sep 17 00:00:00 2001 From: BarbossHack Date: Mon, 30 Sep 2024 21:05:45 +0200 Subject: [PATCH] v0.4.7 : update OS support --- Cargo.toml | 6 +++--- README.md | 14 ++++++++++++-- src/lib.rs | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9a93d69..058ce7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [package] authors = ["BarbossHack "] categories = ["database-implementations", "concurrency", "data-structures", "caching"] -description = "A key-value store based on unix shared-memory files (shm) for persisting state across program restarts." +description = "A key-value store based on linux shared-memory files (shm) for persisting state across program restarts." edition = "2021" homepage = "https://github.com/BarbossHack/shmap" -keywords = ["shm", "shared-memory", "inter-process", "store", "ramfs"] +keywords = ["shm", "shared-memory", "inter-process", "store", "ramfs", "linux"] license = "MIT OR Apache-2.0" name = "shmap" readme = "README.md" repository = "https://github.com/BarbossHack/shmap" -version = "0.4.6" +version = "0.4.7" [dependencies] aes-gcm = { version = "0.10", features = ["std"] } diff --git a/README.md b/README.md index 1fc92c9..f672da0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # **Shmap** -**A key-value store based on unix shared-memory files (shm) for persisting state across program restarts.** +**A key-value store based on linux shared-memory files (shm) for persisting state across program restarts.** ## Features -- Items are stored in the unix shared memory: it uses `shm_open` to create file in the ramdisk (/dev/shm), then they are mapped in memory with mmap. +- Items are stored in the linux shared memory: it uses `shm_open` to create file in the ramdisk (/dev/shm), then they are mapped in memory with mmap. - Concurrent access to items it provided thanks to `named-lock` mutexes. @@ -34,3 +34,13 @@ fn main() -> Result<(), ShmapError> { Ok(()) } ``` + +## Supported OS + +Any POSIX linux where `/dev/shm` is mounted. MacOS and any BSD descendants are therefore not supported. + +> [man shm_open(3)](https://man7.org/linux/man-pages/man3/shm_open.3.html) + +```text +The POSIX shared memory object implementation on Linux makes use of a dedicated tmpfs(5) filesystem that is normally mounted under /dev/shm. +``` diff --git a/src/lib.rs b/src/lib.rs index a976c67..149cd21 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,10 @@ //! # **Shmap** //! -//! **A key-value store based on unix shared-memory files (shm) for persisting state across program restarts.** +//! **A key-value store based on linux shared-memory files (shm) for persisting state across program restarts.** //! //! ## Features //! -//! - Items are stored in the unix shared memory: it uses `shm_open` to create file in the ramdisk (/dev/shm), then they are mapped in memory with mmap. +//! - Items are stored in the linux shared memory: it uses `shm_open` to create file in the ramdisk (/dev/shm), then they are mapped in memory with mmap. //! //! - Concurrent access to items it provided thanks to `named-lock` mutexes. //!