{"id":18841924,"url":"https://github.com/diskuv/dkml-dune-dsl","last_synced_at":"2026-02-12T08:33:06.987Z","repository":{"id":61078492,"uuid":"544781862","full_name":"diskuv/dkml-dune-dsl","owner":"diskuv","description":"Embedded DSL for Dune files to do syntax checking, auto-completion and generate dune.inc include files","archived":false,"fork":false,"pushed_at":"2024-12-20T19:57:10.000Z","size":503,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T06:51:06.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://diskuv.github.io/dkml-dune-dsl/dkml-dune-dsl/index.html","language":"OCaml","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/diskuv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.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,"zenodo":null}},"created_at":"2022-10-03T08:04:48.000Z","updated_at":"2024-12-20T19:57:13.000Z","dependencies_parsed_at":"2024-02-29T07:30:33.455Z","dependency_job_id":"f6be09e7-30b3-4603-a0d0-3afda0bcb223","html_url":"https://github.com/diskuv/dkml-dune-dsl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/diskuv/dkml-dune-dsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-dune-dsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-dune-dsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-dune-dsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-dune-dsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diskuv","download_url":"https://codeload.github.com/diskuv/dkml-dune-dsl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-dune-dsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29361819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"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":"2024-11-08T02:53:02.977Z","updated_at":"2026-02-12T08:33:06.969Z","avatar_url":"https://github.com/diskuv.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dkml-dune-dsl\n\nA mini-language (DSL) for Dune files embedded in OCaml that produces readable, valid Dune include files. The\nmini-language closely matches the structure of a regular Dune file, and because it is embedded in OCaml\nyou get OCaml type-safety and the power of your favorite OCaml IDE as you write your Dune files.\n\nThe Dune DSL uses a tagless final design so your Dune DSL can be interpreted in a variety of ways that\nare independent of Dune itself. The standard **dkml-dune-dsl-show** interpreter allows all of the Dune string\nvalues (executable names, rule targets, etc.) to be parameterized from external JSON files. That lets you\nproduce many similar executables, libraries or assets using the same Dune logic without repeating yourself\n[DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).\n\nThe documentation is at https://diskuv.github.io/dkml-dune-dsl/dkml-dune-dsl/index.html\n\nOnce installed (see the documentation) you will be able to write DSL expressions like:\n\n```ocaml\nopen DkmlDuneDsl\n\nmodule Build (I : Dune.SYM) = struct\n  open I\n\n  let res =\n    [\n      rule\n        [\n          target \"{{{ name }}}.txt\";\n          action\n            (with_stdout_to \"%{target}\"\n              (echo [ \"{{{ age }}}\" ]));\n        ];\n    ]\nend\n```\n\nthat are run over the parameters in a JSON file:\n\n```json\n{\n  \"param-sets\": [\n    {\"name\": \"batman\", \"age\": 39},\n    {\"name\": \"robin\", \"age\": 24}\n  ]\n}\n```\n\nYou can do also do aggregation or, if you are really adventurous, define your own interpreter.\nEven if you don't use parameterization you get things you take for granted with OCaml: type-safety,\nauto-complete and `let` constants.\n\n## Examples and Testing\n\nThe examples are available in the [examples/](./examples/README.md) folder. Since Dune is the authority on whether Dune DSL is\nproducing correct output, each example includes a test that checks the output of Dune.\n\nFor now the process is when a new bug is found then an existing example is expanded or a new example created.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskuv%2Fdkml-dune-dsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiskuv%2Fdkml-dune-dsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskuv%2Fdkml-dune-dsl/lists"}