Crates.io | rskey |
lib.rs | rskey |
version | 0.4.0 |
source | src |
created_at | 2024-05-26 16:31:09.273973 |
updated_at | 2024-11-05 19:18:09.855024 |
description | A simple persistent key-value store that wraps HashMap, with a basic CLI tool to list, get, and set key-value pairs. |
homepage | https://github.com/bitfield/rskey |
repository | https://github.com/bitfield/rskey |
max_upload_size | |
id | 1252679 |
size | 45,835 |
A simple persistent key-value store that wraps HashMap
.
use rskey::Store;
let mut s = Store::open(path)?;
s.insert("key1".to_string(), "value1".to_string());
assert_eq!(s.get("key1").unwrap(), "value1");
s.sync()?;
A basic CLI tool is also included to list, get, and set key-value pairs.
cargo install rskey
The rskey
tool expects to find a data file named store.kv
in the current
directory. If there is no such file, one will be created as soon as you set a
key.
rskey list
key1: value1
key2: value2
rskey get key1
key1: value1
rskey set key3 value3
Current version: 0.4.0
License: MIT OR Apache-2.0