{"id":51038892,"url":"https://github.com/logseq/datascript-ocaml","last_synced_at":"2026-06-22T09:01:13.670Z","repository":{"id":365622308,"uuid":"1272978812","full_name":"logseq/datascript-ocaml","owner":"logseq","description":"DataScript implementation in OCaml","archived":false,"fork":false,"pushed_at":"2026-06-18T06:29:45.000Z","size":657,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T07:24:40.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/logseq.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T05:26:20.000Z","updated_at":"2026-06-18T06:29:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/logseq/datascript-ocaml","commit_stats":null,"previous_names":["logseq/datascript-ocaml"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/logseq/datascript-ocaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdatascript-ocaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdatascript-ocaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdatascript-ocaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdatascript-ocaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logseq","download_url":"https://codeload.github.com/logseq/datascript-ocaml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logseq%2Fdatascript-ocaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34641636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":[],"created_at":"2026-06-22T09:01:12.831Z","updated_at":"2026-06-22T09:01:13.661Z","avatar_url":"https://github.com/logseq.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataScript OCaml\n\nAn OCaml 5 rewrite of DataScript, focused on matching the behavior of the ClojureScript implementation while providing a native OCaml API and js_of_ocaml build support.\n\nThis project is still under active development. Compatibility with upstream DataScript is verified through OCaml tests and cross-runtime parity checks against the ClojureScript implementation.\n\nSee [docs/compatibility.md](docs/compatibility.md) for explicit compatibility\nboundaries that are intentionally OCaml-specific.\n\n## Goals\n\n- Preserve DataScript semantics for transactions, datoms, indexes, entities, pull, and query.\n- Keep public APIs close enough to upstream behavior that Logseq can share the same data model assumptions.\n- Support native OCaml and js_of_ocaml runtimes.\n- Prefer clear OCaml implementations over shortcuts that change observable behavior.\n\n## Development\n\nRequirements:\n\n- OCaml 5.2.1 or newer\n- Dune 3.17 or newer\n- Node.js for js_of_ocaml smoke tests and cross-runtime checks\n\nCommon commands:\n\n```sh\ndune build\ndune runtest\n```\n\nCross-runtime parity checks compare this implementation with the upstream ClojureScript DataScript behavior:\n\n```sh\ngit clone https://github.com/logseq/datascript.git _deps/datascript\ncd _deps/datascript \u0026\u0026 lein with-profile test cljsbuild once release \u0026\u0026 cd -\ndune build test/cross_runtime_ocaml.exe\nbash test/cross_runtime_parity_test.sh _build/default/test/cross_runtime_ocaml.exe script/cross_runtime_upstream.js\n```\n\nBy default, the parity script expects an upstream DataScript checkout at\n`_deps/datascript`. Set `UPSTREAM_DATASCRIPT_REPO` or `UPSTREAM_DATASCRIPT_JS`\nto use a different checkout or compiled JS bundle.\n\n## Repository Layout\n\n- `type/`: shared public type definitions\n- `impl/`: implementation modules\n- `test/`: unit, integration, js_of_ocaml, and cross-runtime tests\n- `examples/`: small executable examples\n- `bench/`: benchmark entry points\n- `script/`: parity and benchmark helper scripts\n\n## Credits\n\nThis project is a port of DataScript's ideas and behavior to OCaml.\n\nPrimary credit goes to the upstream DataScript ClojureScript project:\n\n- https://github.com/tonsky/datascript\n\nThe OCaml implementation is written independently, but upstream DataScript remains the semantic reference for compatibility work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogseq%2Fdatascript-ocaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogseq%2Fdatascript-ocaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogseq%2Fdatascript-ocaml/lists"}