{"id":35091925,"url":"https://github.com/amitayh/rustomic","last_synced_at":"2025-12-27T14:49:11.159Z","repository":{"id":172203203,"uuid":"640646454","full_name":"amitayh/rustomic","owner":"amitayh","description":"A simplified Datomic clone built in Rust.","archived":false,"fork":false,"pushed_at":"2025-05-14T08:41:40.000Z","size":3279,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T09:45:41.168Z","etag":null,"topics":["datomic","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitayh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2023-05-14T19:12:15.000Z","updated_at":"2025-05-14T08:36:51.000Z","dependencies_parsed_at":"2024-08-05T17:28:30.915Z","dependency_job_id":"d68d8353-7143-4409-a1f6-e83c8e29aa0e","html_url":"https://github.com/amitayh/rustomic","commit_stats":null,"previous_names":["amitayh/rustomic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amitayh/rustomic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitayh%2Frustomic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitayh%2Frustomic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitayh%2Frustomic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitayh%2Frustomic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitayh","download_url":"https://codeload.github.com/amitayh/rustomic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitayh%2Frustomic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28080060,"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-27T02:00:05.897Z","response_time":58,"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":["datomic","rust"],"created_at":"2025-12-27T14:49:10.505Z","updated_at":"2025-12-27T14:49:11.126Z","avatar_url":"https://github.com/amitayh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rustomic ![build status](https://github.com/amitayh/rustomic/actions/workflows/rust.yml/badge.svg)\n\n[[Docs](https://amitayh.github.io/rustomic/rustomic/index.html)]\n\nA simplified [Datomic](https://www.datomic.com/) clone built in Rust.\n\n*This project is for educational purposes and should not be used.*\n\n## What is this?\n\nThis is a side project I've been working on, trying to mimic Datomic's functionality using Rust.\nI'm a complete novice with Rust, so I wanted to try learn it with something that feels real:\ndependencies, tests, etc.\n\n### Why Datomic?\n\n * Datomic has a well defined and documented API, which can guide me.\n * Datomic is closed source, so I don't know the implementatoin details of the real product.\n * Datomic is a database - meaning it has to deal with a lot of real-world complexity (I/O,\n   concurrency).\n * Datomic (and datalog) introduced very different and interesting conpects compared to traditional\n   databases.\n * This project can grow in complexity as much as I want to, depending on what I'll end up\n   implementing.\n * Challenging myself to translate an API initially designed for a dynamic language (Clojure) to a\n   staticly typed language.\n\n## Query Engine\n\nThe project implements a Datalog-style query engine that supports:\n\n### Core Features\n\n* Pattern matching against the database using entity-attribute-value-transaction patterns\n* Variable binding and resolution across multiple clauses\n* Custom predicate filtering\n* Aggregation support (count, min, max, sum, average, count-distinct)\n* Attribute name resolution\n* Streaming result processing\n* Early filtering through predicate evaluation\n\n### Example Query\n\n```rust\n// Find all people born after 1980\nlet query = Query::new()\n    .find(Find::variable(\"?person\"))\n    .where(Clause::new()\n        .with_entity(Pattern::variable(\"?person\"))\n        .with_attribute(Pattern::ident(\"person/born\"))\n        .with_value(Pattern::variable(\"?born\")))\n    .value_pred(\n        \"?born\",\n        |value| matches!(value, \u0026Value::I64(born) if born \u003e 1980),\n    );\n```\n\n## Transactor\n\nThe transactor is a core component that handles all data modifications in the database. It\nimplements Datomic's transactional model with ACID guarantees.\n\n### Features\n\n* **Entity Operations**\n  - Create new entities with auto-generated IDs\n  - Update existing entities by ID\n  - Support for temporary IDs within transactions\n  - Assert or retract attribute values\n\n* **Transaction Processing**\n  - Atomic execution of multiple operations\n  - Automatic timestamp recording for each transaction\n  - Value type validation against schema\n  - Uniqueness constraints enforcement\n  - Cardinality handling (one vs. many)\n\n### Example Transaction\n\n```rust\nlet tx = Transaction::new()\n    .with(EntityOperation::on_new()\n        .assert(\"person/name\", \"John Doe\")\n        .assert(\"person/age\", 30))\n    .with(EntityOperation::on_temp_id(\"employee-1\")\n        .assert(\"employee/role\", \"Developer\")\n        .assert(\"employee/start-date\", \"2024-01-01\"));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitayh%2Frustomic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitayh%2Frustomic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitayh%2Frustomic/lists"}