{"id":19080727,"url":"https://github.com/tomcur/koit","last_synced_at":"2026-04-03T10:42:45.799Z","repository":{"id":51211415,"uuid":"317341744","full_name":"tomcur/koit","owner":"tomcur","description":"A simple, asynchronous, pure-Rust, structured, embedded database","archived":false,"fork":false,"pushed_at":"2023-02-10T09:40:13.000Z","size":13,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T19:50:08.952Z","etag":null,"topics":["async","database","rust","storage"],"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/tomcur.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-11-30T20:46:12.000Z","updated_at":"2024-01-10T16:11:00.000Z","dependencies_parsed_at":"2024-11-09T02:25:31.805Z","dependency_job_id":"f6d04e94-8351-4ab5-bddd-d43813a6f8a4","html_url":"https://github.com/tomcur/koit","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"07461e925e5a175881b5996fcebb6c06c33fe8bc"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomcur%2Fkoit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomcur%2Fkoit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomcur%2Fkoit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomcur%2Fkoit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomcur","download_url":"https://codeload.github.com/tomcur/koit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651886,"owners_count":21621838,"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":["async","database","rust","storage"],"created_at":"2024-11-09T02:25:20.074Z","updated_at":"2026-04-03T10:42:45.752Z","avatar_url":"https://github.com/tomcur.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koit\n[![Crates.io][crates-badge]][crates-url]\n[![MIT licensed][mit-badge]][mit-url]\n\n[crates-badge]: https://img.shields.io/crates/v/koit.svg\n[crates-url]: https://crates.io/crates/koit\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[mit-url]: https://github.com/tomcur/koit/blob/master/LICENSE\n\nKoit is a simple, asynchronous, pure-Rust, structured, embedded database.\n\n```toml\n[dependencies]\nkoit = \"0.2\"\n```\n\n## Example\n\n```rust\nuse std::default::Default;\n\nuse koit::{FileDatabase, format::Json};\nuse serde::{Deserialize, Serialize};\n\n#[derive(Default, Deserialize, Serialize)]\nstruct Data {\n    cats: u64,\n    yaks: u64,\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let db = FileDatabase::\u003cData, Json\u003e::load_from_path_or_default(\"./db.json\").await?;\n  \n    db.write(|data| {\n        data.cats = 10;\n        data.yaks = 32;\n    }).await;\n    \n    assert_eq!(db.read(|data| data.cats + data.yaks).await, 42);\n\n    db.save().await?;\n\n    Ok(())\n}\n```\n\n## Features\n- built-in, future-aware, reader-writer synchronization\n- works with arbitrary data formatters\n- works with arbitrary storage backends\n- comes with default formatters and backends that fit most purposes\n\nBy default, Koit comes with its file-backend, JSON formatter and Bincode\nformatter enabled. You can cherry-pick features instead.\n\n```toml\n[dependencies.koit]\nversion = \"0.2\"\ndefault-features = false\nfeatures = [\"bincode-format\"]\n```\n\n## Purpose\n\nKoit enables quickly implementing persistence and concurrent access to\nstructured data. It is meant to be used with relatively small amounts\n(megabytes) of data.\n\nIt is not a performant database. Upon loading, the entire data structure is\nkept in memory. Upon saving, the entire data structure is formatted and written\nto the storage backend.\n\n## Other crates\n\nKoit is inspired by [Rustbreak](https://github.com/TheNeikos/rustbreak), a\nsimilar (synchronous) database.\n\n## License\n\nThis project is licensed under the [MIT license].\n\n[MIT license]: https://github.com/tomcur/koit/blob/master/LICENSE\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in Koit by you, shall be licensed as MIT, without any additional\nterms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomcur%2Fkoit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomcur%2Fkoit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomcur%2Fkoit/lists"}