百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rkv

> 编程语言
开源

一个简单、人性化的、基于键值存储的解决方案。

338 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个简单、人性化的、基于键值存储的解决方案。

rkv

The rkv Rust crate is a simple, humane, typed key-value storage solution.

⚠️ Warning ⚠️

To use rkv in production/release environments at Mozilla, you may do so with the "SafeMode" backend, for example:

rust
use rkv::{Manager, Rkv};
use rkv::backend::{SafeMode, SafeModeEnvironment};

let mut manager = Manager::::singleton().write().unwrap();
let shared_rkv = manager.get_or_create(path, Rkv::new::).unwrap();

...

The "SafeMode" backend performs well, with two caveats: the entire database is stored in memory, and write transactions are synchronously written to disk (only on commit).

Use

Comprehensive information about using rkv is available in its online documentation, which can also be generated for local consumption:

bash
cargo doc --open

Build

Build this project as you would build other Rust crates:

bash
cargo build

Features

There are several features that you can opt-in and out of when using rkv:

By default, db-dup-sort and db-int-key features offer high level database APIs which allow multiple values per key, and optimizations around integer-based keys respectively. Opt out of these default features when specifying the rkv dependency in your Cargo.toml file to disable them; doing so avoids a certain amount of overhead required to support them.

Test

Test this project as you would test other Rust crates:

bash
cargo test

The project includes unit and doc tests embedded in the src/ files, integration tests in the tests/ subdirectory, and usage examples in the examples/ subdirectory. To ensure your changes don't break examples, also run them via the run-all-examples.sh shell script:

bash
./run-all-examples.sh

Note: the test fixtures in the tests/envs/ subdirectory aren't included in the package published to crates.io, so you must clone this repository in order to run the tests that depend on those fixtures or use the rand and dump executables to recreate them.

Contribute

Of the various open source archetypes described in A Framework for Purposeful Open Source, the rkv project most closely resembles the Specialty Library, and we welcome contributions. Please report problems or ask questions using this repo's GitHub issue tracker and submit pull requests for code and documentation changes.

rkv relies on the latest rustfmt for code formatting, so please make sure your pull request passes the rustfmt before submitting it for review. See rustfmt's quick start for installation details.

We follow Mozilla's Community Participation Guidelines while contributing to this project.

License

The rkv source code is licensed under the Apache License, Version 2.0, as described in the LICENSE file.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustlmdb

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言