Skip to content

Commit

Permalink
v0.4.7 : update OS support
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbossHack committed Sep 30, 2024
1 parent 7c37a03 commit 52f193f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
authors = ["BarbossHack <[email protected]>"]
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"] }
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.
```
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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.
//!
Expand Down

0 comments on commit 52f193f

Please sign in to comment.