Expand description
k2hash_rust is a NoSQL Key Value Store(KVS) library developed by AntPickax, which is an open source team in LY Corporation and a product family of open source software developed by AntPickax.
§k2hash_rust
§Overview
k2hash_rust implements a k2hash client in Rust.
§Install
Firstly you must install the k2hash shared library.
curl -o- https://raw.github.com/yahoojapan/k2hash_rust/main/utils/libk2hash.sh | bashYou can install k2hash library step by step from source code. See Build for details.
Download the k2hash_rust package.
cd /path/to/your/rust/project
cargo add k2hash_rust§Usage
Here is a simple example of k2hash_rust that saves a key and get it.
use k2hash_rust::K2hash;
fn main() {
let db = K2hash::open_mem().expect("open_mem failed");
db.set("foo", "bar");
let v = db.get("foo");
println!("foo => {:?}", v);
}§Development
Here is the step to start developing k2hash_rust on Fedora42.
sudo dnf update -ysudo dnf makecache && sudo yum install curl git -y && curl -s https://packagecloud.io/install/repositories/antpickax/stable/script.rpm.sh | sudo bash
sudo dnf install libfullock-devel k2hash-devel -y
git clone https://github.com/yahoojapan/k2hash_rust.git
cd k2hash_rust
cargo build
cargo test§Documents
§License
MIT License. See the LICENSE file.
§AntPickax
AntPickax is
- an open source team in LY Corporation.
- a product family of open source software developed by AntPickax.
Structs§
- Base
Queue - Base struct of Queue and KeyQueue struct.
- K2hAttr
Pack - K2hAttrPack represents C-API’s K2HATTRPCK structure.
- K2hKey
Pack - K2hKeyPack represents C-API’s K2HKEYPCK structure.
- K2hash
- K2hash struct provides a high-level interface for interacting with the K2hash database.
- K2hash
Key - K2hashKey provides an iterator over the keys in the K2hash database.
- KeyQueue
- KeyQueue provides FIFO (first-in, first-out) functionality using k2hash database.
- KeyQueue
Builder - KeyQueueBuilder provides a builder pattern for creating KeyQueue instances.
- Queue
- Queue provides FIFO (first-in, first-out) functionality using k2hash database.
- Queue
Builder - QueueBuilder provides a builder pattern for creating Queue instances.
Enums§
- Debug
Level - DebugLevel represents the level of detail in the debug output.
- Dump
Level - DumpLevel represents the level of detail in the dump output.