13 个版本

0.2.9 2024年6月27日
0.2.8 2023年8月29日
0.2.5 2023年7月24日
0.2.1 2023年5月13日
0.1.1 2023年4月23日

数据库接口 中排名 #229

Download history · Rust 包仓库 77/week @ 2024-06-21 · Rust 包仓库 38/week @ 2024-06-28 · Rust 包仓库 2/week @ 2024-07-05 · Rust 包仓库 19/week @ 2024-07-19 · Rust 包仓库 42/week @ 2024-07-26 · Rust 包仓库

每月下载量 61

Apache-2.0

17MB
367K SLoC

C++ 326K SLoC // 0.1% comments · Rust 包仓库 C 16K SLoC // 0.1% comments · Rust 包仓库 Rust 9K SLoC // 0.1% comments · Rust 包仓库 Python 8K SLoC // 0.1% comments · Rust 包仓库 Shell 4K SLoC // 0.2% comments · Rust 包仓库 Visual Studio Project 3K SLoC · Rust 包仓库 GNU Style Assembly 542 SLoC // 0.1% comments · Rust 包仓库 INI 430 SLoC // 0.1% comments · Rust 包仓库 PowerShell 312 SLoC // 0.2% comments · Rust 包仓库 Bitbake 244 SLoC // 0.2% comments · Rust 包仓库 Visual Studio Solution 225 SLoC · Rust 包仓库

rust-rocksdb

RocksDB build crates.io documentation license Gitter chat rust 1.60.0 required

GitHub commits (since latest release)

要求

  • Clang 和 LLVM

贡献

欢迎反馈和拉取请求!如果您觉得 RocksDB 的某个特性很重要,请通过打开一个 issue 来告诉我,我会将其优先处理。

用法

此绑定与特定版本的 RocksDB 静态链接。如果您想自己构建,请确保您已经克隆了 RocksDB 和压缩子模块

git submodule update --init --recursive

压缩支持

默认情况下,通过 crate 功能启用了对 SnappyLZ4ZstdZlibBzip2 压缩的支持。如果不需要所有这些压缩算法的支持,可以禁用默认功能并启用特定的压缩算法。例如,要仅启用 LZ4 压缩支持,请在您的 Cargo.toml 中进行以下更改

[dependencies.rocksdb]
default-features = false
features = ["lz4"]

多线程 ColumnFamily 切换

底层的 RocksDB 允许在多个线程中同时创建和删除 column families。但是,此 crate 默认不允许,以保持兼容性。如果您需要同时修改 column families,请启用名为 multi-threaded-cf 的 crate 功能,这将使此绑定默认使用 RwLock。或者,您可以直接创建 DBWithThreadMode<MultiThreaded> 而不启用 crate 功能。

依赖

~0.7–5MB
~94K SLoC