{"id":33930722,"url":"https://github.com/kalscium/stack-db","last_synced_at":"2025-12-12T12:06:48.254Z","repository":{"id":219855036,"uuid":"750099447","full_name":"kalscium/stack-db","owner":"kalscium","description":"A (basically) infinitely stacking \u0026 extendable CoW database that has both readonly safety and incredible write speeds at the same time.","archived":false,"fork":false,"pushed_at":"2024-09-23T11:47:02.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T03:43:06.511Z","etag":null,"topics":["database","framework","rust"],"latest_commit_sha":null,"homepage":"","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/kalscium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-01-30T01:26:25.000Z","updated_at":"2024-09-23T11:47:06.000Z","dependencies_parsed_at":"2024-01-30T02:43:59.750Z","dependency_job_id":"c31bee33-79ff-4700-82d1-0c4865c5933a","html_url":"https://github.com/kalscium/stack-db","commit_stats":null,"previous_names":["greenchild04/stack-db","kalscium/stack-db"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kalscium/stack-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalscium%2Fstack-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalscium%2Fstack-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalscium%2Fstack-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalscium%2Fstack-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalscium","download_url":"https://codeload.github.com/kalscium/stack-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalscium%2Fstack-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27682506,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","framework","rust"],"created_at":"2025-12-12T12:06:47.398Z","updated_at":"2025-12-12T12:06:48.244Z","avatar_url":"https://github.com/kalscium.png","language":"Rust","readme":"# stack-db\n\u003e A (basically) infinitely stacking \u0026 extendable CoW database that has both readonly safety and incredible write speeds at the same time.\n\n## Examples\n---\n### Example of a basic in-memory binary database\nHere is a basic in-memory database that only deals with binary indexes and data (that uses the allocators provided by the library)\n```rust\nuse stack_db::prelude::*;\n\nlet allocator = SkdbMemAlloc; // or `SkdbDiskAlloc::new()`\nlet mut database = StackDB::new(allocator).unwrap();\n\n// writing\ndatabase.write(256, b\"hello, \").unwrap();\ndatabase.write(256+7, b\"world\").unwrap();\n\n// reading\nassert_eq!(\u0026*database.read(256..268).unwrap(), b\"hello, world\");\n\n// flush to save all changes\ndatabase.flush().unwrap();\n\n// over-writting\ndatabase.write(256, b\"H\").unwrap();\ndatabase.write(256+7, b\"W\").unwrap();\ndatabase.write(268, b\"!\").unwrap();\n\n// flush again\ndatabase.flush().unwrap();\n\n// reading\nassert_eq!(\u0026*database.read(256..269).unwrap(), b\"Hello, World!\");\n\n// rebase to save space\ndatabase.rebase(256).unwrap(); // rebase with a 256 byte buffer\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalscium%2Fstack-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalscium%2Fstack-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalscium%2Fstack-db/lists"}