https://github.com/yahoojapan/k2hash_rust
Official k2hash Rust Driver
https://github.com/yahoojapan/k2hash_rust
antpickax fullock in-memory k2hash kvs ly nosql queue transaction yahoojapan
Last synced: 8 months ago
JSON representation
Official k2hash Rust Driver
- Host: GitHub
- URL: https://github.com/yahoojapan/k2hash_rust
- Owner: yahoojapan
- License: mit
- Created: 2025-09-08T00:29:22.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-09T09:48:34.000Z (9 months ago)
- Last Synced: 2025-09-09T10:01:44.129Z (9 months ago)
- Topics: antpickax, fullock, in-memory, k2hash, kvs, ly, nosql, queue, transaction, yahoojapan
- Language: Rust
- Homepage:
- Size: 256 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# k2hash_rust
## Overview
[](https://crates.io/crates/k2hash_rust)
[](https://docs.rs/k2hash_rust)
[](https://github.com/yahoojapan/k2hash_rust/actions/workflows/rust.yml)
**k2hash_rust** implements a [k2hash](https://k2hash.antpick.ax/) client in Rust.

## Install
Firstly you must install the [k2hash](https://k2hash.antpick.ax/) shared library.
```sh
curl -o- https://raw.github.com/yahoojapan/k2hash_rust/main/utils/libk2hash.sh | bash
```
You can install **k2hash** library step by step from [source code](https://github.com/yahoojapan/k2hash). See [Build](https://k2hash.antpick.ax/build.html) for details.
Download the **k2hash_rust** package.
```sh
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.
```rust
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);
}
```
Let's run eamples!
```
cargo run --example basic_usage
```
## Development
Here is the step to start developing **k2hash_rust** on Fedora42.
```sh
sudo dnf update -y
```
```sh
sudo 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
- [About K2HASH](https://k2hash.antpick.ax/)
- [About AntPickax](https://antpick.ax/)
### License
MIT License. See the LICENSE file.
## AntPickax
[AntPickax](https://antpick.ax/) is
- an open source team in [LY Corporation](https://www.lycorp.co.jp/en/company/overview/).
- a product family of open source software developed by [AntPickax](https://antpick.ax/).