{"id":16688191,"url":"https://github.com/fcsonline/datalite","last_synced_at":"2026-04-29T06:32:41.962Z","repository":{"id":137594713,"uuid":"192975480","full_name":"fcsonline/datalite","owner":"fcsonline","description":"The open-source schemaless database for a realtime world","archived":false,"fork":false,"pushed_at":"2019-06-30T11:30:39.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-02T15:19:24.469Z","etag":null,"topics":["cqrs","database","datomic","event-sourcing","realtime","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/fcsonline.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-06-20T19:19:31.000Z","updated_at":"2022-11-18T17:00:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d7749d6-2635-46d3-8a00-7130ea9103c2","html_url":"https://github.com/fcsonline/datalite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fcsonline/datalite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcsonline%2Fdatalite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcsonline%2Fdatalite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcsonline%2Fdatalite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcsonline%2Fdatalite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcsonline","download_url":"https://codeload.github.com/fcsonline/datalite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcsonline%2Fdatalite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32414414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cqrs","database","datomic","event-sourcing","realtime","rust"],"created_at":"2024-10-12T15:27:11.083Z","updated_at":"2026-04-29T06:32:41.940Z","avatar_url":"https://github.com/fcsonline.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datalite\n\n## What is Datalite?\n\n:warning: This project is just a POC and is not production ready!\n\nAn immutable in-memory database and Datalog query engine written in Rust.\n\n- Flexible database based schemaless store\n- Immutable database with timetraveling features\n- Subscription base database for realtime web applications\n\nDatalite is inspired in many features from Datomic/Datalog, Crux and many\nothers. Datalite tries to simplify all the infrastructure requirement needed to\nachive this kind of databases.\n\n## Usage\n\nPut this in your Cargo.toml:\n\n```\n[dependencies]\ndatalite = \"0.1.0\"\n```\n\nEnable nightly features:\n\n```\nrustup override set nightly\n```\n\nAnd then start using it:\n\n```rust\nlet mut db = Datalite::new(\"example/database\");\n\ndb.fact(\"12\", \":person/name\", \"James Cameron\")?;\ndb.fact(\"13\", \":person/name\", \"Quentin Tarantino\")?;\ndb.unfact(\"12\", \":person/name\")?;\n\ndb.transaction(|block| {\n    block.fact(\"14\", \":person/name\", \"Alfred Hitchcock\")?;\n    block.fact(\"14\", \":person/name\", \"Alfred Hitchcock\")?;\n    block.fact(\"15\", \":person/name\", \"Martin Scorsese\")?;\n    block.unfact(\"13\", \":person/name\")?;\n})?;\n\nlet constraint = r#\"\n    {:find [name]\n     :where [[p1 :username name]\n             [count(p1) \u003c 1]]}\n\"#;\ndb.constraint(constraint)?;\n\ndb.subscribe(query, |changes| {\n    println!(\"{:?}\", changes);\n})?;\n\nlet query = r#\"\n    [\n      :find ?title\n      :where\n      [?p :person/name \"James Cameron\"]\n      [?m :movie/director ?p]\n      [?m :movie/title ?title]\n    ]\n\"#;\n\nlet results = db.query(query);\n\nprintln!(\"{:?}\", results);\n```\n\n## API\n\n`listen(address: String)`: Start Datalite server in a specific address and port\n\n`query(q: String)`: Retrieve information from the database\n\n`id() -\u003e String`: Generate a new random id for facts\n\n`fact(id: String, attr: String, value: String)`: Add new facts to the database for a specific id and attribute\n\n`unfact(id: String, attr: String)`: Remove facts from the database for a specific id and attribute\n\n`transaction`: Execute statements in block\n\n`constraint(q: String)`: Add constraints to the database to avoid data violations\n\n`subscribe(q: String, |changes| {} )`: Subscribe to interesting data changes to be pushed to exernal services\n\n## Use cases\n\n`TODO`\n\n## Roadmap\n\n- [X] Implement basic API\n- [X] Implement basic Datalog syntax parser\n- [X] Implement basic query executor\n- [ ] Implement midterm query executor\n- [ ] Implement effecient executor\n- [ ] Implement contraint functionality\n- [ ] Implement subscription functionality\n\n## Examples\n\n- Datalite integration with a Rocket.rs server: [link](https://github.com/fcsonline/datarocket)\n\n## Ideas\n\n- Use datalite in a browser with wasm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcsonline%2Fdatalite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcsonline%2Fdatalite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcsonline%2Fdatalite/lists"}