{"id":13672600,"url":"https://github.com/andresilva/cask","last_synced_at":"2025-04-09T16:09:55.315Z","repository":{"id":33785816,"uuid":"37460183","full_name":"andresilva/cask","owner":"andresilva","description":"A fast key-value store written in Rust","archived":false,"fork":false,"pushed_at":"2021-12-16T15:38:35.000Z","size":9186,"stargazers_count":109,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T16:09:48.915Z","etag":null,"topics":["database","key-value","rust"],"latest_commit_sha":null,"homepage":"","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/andresilva.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}},"created_at":"2015-06-15T11:06:54.000Z","updated_at":"2025-01-10T01:26:25.000Z","dependencies_parsed_at":"2022-08-07T23:01:05.204Z","dependency_job_id":null,"html_url":"https://github.com/andresilva/cask","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilva%2Fcask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilva%2Fcask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilva%2Fcask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilva%2Fcask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresilva","download_url":"https://codeload.github.com/andresilva/cask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041871,"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","key-value","rust"],"created_at":"2024-08-02T09:01:41.088Z","updated_at":"2025-04-09T16:09:55.298Z","avatar_url":"https://github.com/andresilva.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Cask\n\nA fast key-value store written in Rust. The underlying storage system is a log-structured hash table\nwhich is inspired by [bitcask](https://github.com/basho/bitcask/).\n\n[![Build Status](https://travis-ci.org/andresilva/cask.svg?branch=master)](https://travis-ci.org/andresilva/cask)\n[![Crates.io](https://img.shields.io/crates/v/cask.svg?maxage=2592000)](https://crates.io/crates/cask)\n[![License](https://img.shields.io/dub/l/vibe-d.svg)](https://raw.githubusercontent.com/andresilva/cask/master/LICENSE)\n\n[API Documentation](http://andresilva.github.io/cask)\n\n* * *\n\n**WARNING**: ⚠️ Please do not trust any valuable data to this yet. ⚠️\n\n## Installation\n\nUse the [crates.io](http://crates.io/) repository, add this to your Cargo.toml along with the rest\nof your dependencies:\n\n```toml\n[dependencies]\ncask = \"0.7.0\"\n```\n\nThen, use `Cask` in your crate:\n\n```rust\nextern crate cask;\nuse cask::{CaskOptions, SyncStrategy};\n```\n\n## Usage\n\nThe basic usage of the library is shown below:\n\n```rust\nextern crate cask;\n\nuse std::str;\nuse cask::{CaskOptions, SyncStrategy};\nuse cask::errors::Result;\n\nfn main() {\n    if let Err(e) = example() {\n        println!(\"{:?}\", e);\n    }\n}\n\nfn example() -\u003e Result\u003c()\u003e {\n    let cask = CaskOptions::default()\n        .compaction_check_frequency(1200)\n        .sync(SyncStrategy::Interval(5000))\n        .max_file_size(1024 * 1024 * 1024)\n        .open(\"cask.db\")?;\n\n    let key = \"hello\";\n    let value = \"world\";\n\n    cask.put(key, value)?;\n\n    let v = cask.get(key)?;\n    println!(\"key:{},value:{}\", key, str::from_utf8(\u0026v.unwrap()).unwrap());\n\n    cask.delete(key)?;\n    Ok(())\n}\n```\n\n## TODO\n\n- [X] Basic error handling\n- [X] Merge files during compaction\n- [X] Configurable compaction triggers and thresholds\n- [X] Documentation\n- [ ] Tests\n- [ ] Benchmark\n- [ ] Handle database corruption\n\n## License\n\ncask is licensed under the [MIT](http://opensource.org/licenses/MIT) license. See `LICENSE` for\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresilva%2Fcask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandresilva%2Fcask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresilva%2Fcask/lists"}