{"id":13815579,"url":"https://github.com/meilisearch/heed","last_synced_at":"2025-05-15T09:32:37.142Z","repository":{"id":43141537,"uuid":"212857695","full_name":"meilisearch/heed","owner":"meilisearch","description":"A fully typed LMDB wrapper with minimum overhead 🐦","archived":false,"fork":false,"pushed_at":"2024-11-16T15:20:37.000Z","size":3404,"stargazers_count":621,"open_issues_count":36,"forks_count":55,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-11-16T16:27:01.415Z","etag":null,"topics":["key-value-store","lmdb","memory-mapping","typed","wrapper"],"latest_commit_sha":null,"homepage":"https://docs.rs/heed","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meilisearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2019-10-04T16:25:17.000Z","updated_at":"2024-11-13T14:01:42.000Z","dependencies_parsed_at":"2023-12-01T23:31:39.577Z","dependency_job_id":"5724a1c1-b325-4735-b7ca-08ceb0615949","html_url":"https://github.com/meilisearch/heed","commit_stats":{"total_commits":257,"total_committers":6,"mean_commits":"42.833333333333336","dds":0.311284046692607,"last_synced_commit":"5cdaedc727683077d7638f4e6826d06a03973d98"},"previous_names":["kerollmops/heed"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fheed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fheed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fheed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meilisearch%2Fheed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meilisearch","download_url":"https://codeload.github.com/meilisearch/heed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224943740,"owners_count":17396249,"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":["key-value-store","lmdb","memory-mapping","typed","wrapper"],"created_at":"2024-08-04T04:03:36.994Z","updated_at":"2025-05-15T09:32:37.129Z","avatar_url":"https://github.com/meilisearch.png","language":"Rust","funding_links":[],"categories":["Rust","Libraries"],"sub_categories":["Database"],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"280px\" src=\"https://raw.githubusercontent.com/meilisearch/heed/main/assets/heed-pigeon-logo.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch1 align=\"center\" \u003eheed \u0026 heed3\u003c/h1\u003e\n\n[![License](https://img.shields.io/badge/license-MIT-green)](#LICENSE)\n[![Crates.io](https://img.shields.io/crates/v/heed)](https://crates.io/crates/heed)\n[![Docs](https://docs.rs/heed/badge.svg)](https://docs.rs/heed)\n[![dependency status](https://deps.rs/repo/github/meilisearch/heed/status.svg)](https://deps.rs/repo/github/meilisearch/heed)\n[![Build](https://github.com/meilisearch/heed/actions/workflows/rust.yml/badge.svg)](https://github.com/meilisearch/heed/actions/workflows/rust.yml)\n[![Discord](https://img.shields.io/discord/1006923006964154428?style=flat\u0026logo=discord\u0026logoColor=ffffff\u0026label=\u0026labelColor=6A7EC2\u0026color=7389D8)](https://discord.com/channels/1006923006964154428/1347203493106024528)\n\nRust-centric [LMDB](https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database) abstractions with minimal overhead. These libraries enable the storage of various Rust types within LMDB, extending support to include Serde-compatible types. It supports not only the LMDB `mdb.master` branch but also the `mdb.master3` branch, which features encryption-at-rest.\n\n## Simple Example Usage\n\nHere is an example on how to store and read entries into LMDB in a safe and ACID way. For usage examples, see [examples/](examples/). To see more advanced usage techniques go check our [Cookbook](https://docs.rs/heed/latest/heed/cookbook/index.html).\n\n```rust\nuse std::fs;\nuse std::path::Path;\nuse heed::{EnvOpenOptions, Database};\nuse heed::types::*;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let env = unsafe { EnvOpenOptions::new().open(\"my-first-db\")? };\n\n    // We open the default unnamed database\n    let mut wtxn = env.write_txn()?;\n    let db: Database\u003cStr, U32\u003cbyteorder::NativeEndian\u003e\u003e = env.create_database(\u0026mut wtxn, None)?;\n\n    // We open a write transaction\n    db.put(\u0026mut wtxn, \"seven\", \u00267)?;\n    db.put(\u0026mut wtxn, \"zero\", \u00260)?;\n    db.put(\u0026mut wtxn, \"five\", \u00265)?;\n    db.put(\u0026mut wtxn, \"three\", \u00263)?;\n    wtxn.commit()?;\n\n    // We open a read transaction to check if those values are now available\n    let mut rtxn = env.read_txn()?;\n\n    let ret = db.get(\u0026rtxn, \"zero\")?;\n    assert_eq!(ret, Some(0));\n\n    let ret = db.get(\u0026rtxn, \"five\")?;\n    assert_eq!(ret, Some(5));\n\n    Ok(())\n}\n```\n\n## Working with two Crates: heed and heed3\n\nThe heed and heed3 crates manage a shared codebase. Within the heed3 folder, you can find the Cargo.toml specific to the heed3 crate.\nTo facilitate work on heed3, utilize the `convert-to-heed3.sh` script.\n\nThis script conveniently moves the `heed3/Cargo.toml` file to the `heed/` folder, updates the `heed::` references to `heed3::`, and generates a commit for easy rollback if needed.\n\n## Building from Source\n\nYou can use this command to clone the repository:\n\n```bash\ngit clone --recursive https://github.com/meilisearch/heed.git\ncd heed\ncargo build\n```\n\nHowever, if you already cloned it and forgot to initialize the submodules, execute the following command:\n\n```bash\ngit submodule update --init\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilisearch%2Fheed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeilisearch%2Fheed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilisearch%2Fheed/lists"}