{"id":13439025,"url":"https://github.com/rust-rocksdb/rust-rocksdb","last_synced_at":"2025-12-12T10:58:14.839Z","repository":{"id":37484188,"uuid":"26731785","full_name":"rust-rocksdb/rust-rocksdb","owner":"rust-rocksdb","description":"rust wrapper for rocksdb","archived":false,"fork":false,"pushed_at":"2025-04-27T03:09:49.000Z","size":2101,"stargazers_count":1971,"open_issues_count":165,"forks_count":778,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-05-06T19:52:10.075Z","etag":null,"topics":["database","rocksdb","rust","rust-bindings"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-rocksdb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-11-16T23:19:18.000Z","updated_at":"2025-05-03T12:22:37.000Z","dependencies_parsed_at":"2024-04-24T08:54:25.039Z","dependency_job_id":"855e1f51-a62d-4700-bcd9-64ee31b54b0f","html_url":"https://github.com/rust-rocksdb/rust-rocksdb","commit_stats":{"total_commits":733,"total_committers":156,"mean_commits":4.698717948717949,"dds":0.7503410641200545,"last_synced_commit":"d44de09925c16757480e0676832c7123a86c7216"},"previous_names":["spacejam/rust-rocksdb"],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-rocksdb%2Frust-rocksdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-rocksdb%2Frust-rocksdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-rocksdb%2Frust-rocksdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-rocksdb%2Frust-rocksdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-rocksdb","download_url":"https://codeload.github.com/rust-rocksdb/rust-rocksdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020478,"owners_count":22000750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","rocksdb","rust","rust-bindings"],"created_at":"2024-07-31T03:01:10.532Z","updated_at":"2025-12-12T10:58:14.819Z","avatar_url":"https://github.com/rust-rocksdb.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","库","database"],"sub_categories":["Database","数据库 Database","数据库"],"readme":"# rust-rocksdb\n\n[![RocksDB build](https://github.com/rust-rocksdb/rust-rocksdb/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/rust-rocksdb/rust-rocksdb/actions/workflows/rust.yml)\n[![crates.io](https://img.shields.io/crates/v/rocksdb.svg)](https://crates.io/crates/rocksdb)\n[![documentation](https://img.shields.io/docsrs/rocksdb/latest)](https://docs.rs/rocksdb)\n[![license](https://img.shields.io/crates/l/rocksdb.svg)](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/LICENSE)\n[![Gitter chat](https://badges.gitter.im/rust-rocksdb/gitter.svg)](https://gitter.im/rust-rocksdb/lobby)\n![rust 1.85.0 required](https://img.shields.io/badge/rust-1.85.0-blue.svg?label=MSRV)\n\n![GitHub commits (since latest release)](https://img.shields.io/github/commits-since/rust-rocksdb/rust-rocksdb/latest.svg)\n\n## Requirements\n\n- Clang and LLVM\n\n## Contributing\n\nFeedback and pull requests are welcome! If a particular feature of RocksDB is\nimportant to you, please let me know by opening an issue, and I'll\nprioritize it.\n\n## Usage\n\nThis binding is statically linked with a specific version of RocksDB. If you\nwant to build it yourself, make sure you've also cloned the RocksDB and\ncompression submodules:\n\n```shell\ngit submodule update --init --recursive\n```\n\n## Compression Support\n\nBy default, support for [Snappy](https://github.com/google/snappy),\n[LZ4](https://github.com/lz4/lz4), [Zstd](https://github.com/facebook/zstd),\n[Zlib](https://zlib.net), and [Bzip2](http://www.bzip.org) compression\nis enabled through crate features. If support for all of these compression\nalgorithms is not needed, default features can be disabled and specific\ncompression algorithms can be enabled. For example, to enable only LZ4\ncompression support, make these changes to your Cargo.toml:\n\n```toml\n[dependencies.rocksdb]\ndefault-features = false\nfeatures = [\"lz4\"]\n```\n\n## Multithreaded ColumnFamily alternation\n\nRocksDB allows column families to be created and dropped\nfrom multiple threads concurrently, but this crate doesn't allow it by default\nfor compatibility. If you need to modify column families concurrently, enable\nthe crate feature `multi-threaded-cf`, which makes this binding's\ndata structures use `RwLock` by default. Alternatively, you can directly create\n`DBWithThreadMode\u003cMultiThreaded\u003e` without enabling the crate feature.\n\n## Switch between /MT or /MD run time library (Only for Windows)\n\nThe feature `mt_static` will request the library to be built with [/MT](https://learn.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-170)\nflag, which results in library using the static version of the run-time library.\n*This can be useful in case there's a conflict in the dependency tree between different\nrun-time versions.*\n\n## Switch between static and dynamic linking for bindgen (features `bindgen-static` and `bindgen-runtime`)\n\nThe feature `bindgen-runtime` will enable the `runtime` feature of bindgen, which dynamically\nlinks to libclang. This is suitable for most platforms, and is enabled by default.\n\nThe feature `bindgen-static` will enable the `static` feature of bindgen, which statically\nlinks to libclang. This is suitable for musllinux platforms, such as Alpine linux.\nTo build on Alpine linux for example, make these changes to your Cargo.toml:\n\n```toml\n[dependencies.rocksdb]\ndefault-features = false\nfeatures = [\"bindgen-static\", \"snappy\", \"lz4\", \"zstd\", \"zlib\", \"bzip2\"]\n```\n\nNotice that `runtime` and `static` features are mutually exclusive, and won't compile if both are enabled.\n\n## LTO\nEnable the `lto` feature to enable link-time optimization. It will compile rocksdb with `-flto` flag. This feature is disabled by default.\n\n\u003e [!IMPORTANT]\n\u003e You must use clang as `CC`. Eg. `CC=/usr/bin/clang CXX=/usr/bin/clang++`. Clang llvm version must be the same as the one used by rust compiler.\n\u003e On the rust side you should use `RUSTFLAGS=\"-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld\"`.\n\nCheck the [Rust documentation](https://doc.rust-lang.org/rustc/linker-plugin-lto.html) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-rocksdb%2Frust-rocksdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-rocksdb%2Frust-rocksdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-rocksdb%2Frust-rocksdb/lists"}