Skip to content
/ rskey Public

A simple key-value store in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

bitfield/rskey

Repository files navigation

Crate Docs CI Audit Maintenance

rskey

A simple persistent key-value store that wraps HashMap.

Getting started

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.

Installation

cargo install rskey

Usage

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.

Listing all data

rskey list
key1: value1
key2: value2

Getting a value by key

rskey get key1
key1: value1

Setting a key-value pair

rskey set key3 value3

Current version: 0.4.0

License: MIT OR Apache-2.0

About

A simple key-value store in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages