{"id":18841905,"url":"https://github.com/diskuv/dkml-component-ocamlrun","last_synced_at":"2025-10-17T15:47:00.821Z","repository":{"id":41287737,"uuid":"484174415","full_name":"diskuv/dkml-component-ocamlrun","owner":"diskuv","description":"DKML component for OCaml runtime and Stdlib","archived":false,"fork":false,"pushed_at":"2025-08-02T20:18:37.000Z","size":424,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T22:18:46.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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-04-21T19:09:36.000Z","updated_at":"2025-08-02T20:18:40.000Z","dependencies_parsed_at":"2025-06-16T05:07:30.381Z","dependency_job_id":"da83b9d3-f6b8-4114-9e07-37423de454b0","html_url":"https://github.com/diskuv/dkml-component-ocamlrun","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/diskuv/dkml-component-ocamlrun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-component-ocamlrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-component-ocamlrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-component-ocamlrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-component-ocamlrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diskuv","download_url":"https://codeload.github.com/diskuv/dkml-component-ocamlrun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diskuv%2Fdkml-component-ocamlrun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279370494,"owners_count":26157125,"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-10-17T02:00:07.504Z","response_time":56,"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:00.730Z","updated_at":"2025-10-17T15:47:00.791Z","avatar_url":"https://github.com/diskuv.png","language":"Shell","readme":"# staging-ocamlrun 4.14.0\n\nThe ocamlrun component is a standalone distribution of OCaml containing\njust `ocamlrun` and the OCaml Stdlib.\n\nThese are components that can be used with [dkml-install-api](https://diskuv.github.io/dkml-install-api/index.html)\nto generate installers.\n\n## dkml-component-staging-ocamlrun\n\n### Usage\n\nFIRST, add a dependency to your .opam file:\n\n```ocaml\ndepends: [\n  \"dkml-component-staging-ocamlrun\"   {\u003e= \"4.14.0~\" \u0026 \u003c \"4.14.1~\"}\n  # ...\n]\n```\n\nSECOND, add the package to your currently selected Opam switch:\n\n```bash\nopam install dkml-component-staging-ocamlrun\n# Alternatively, if on Windows and you have Diskuv OCaml, then:\n#   with-dkml opam install dkml-component-staging-ocamlrun\n```\n\nBe prepared to **wait several minutes** while one or more OCaml runtimes are\ncompiled for your machine.\n\nTHIRD, in your `dune` config file for your registration library include\n`dkml-component-staging-ocamlrun.api` as a library as follows:\n\n```lisp\n(library\n (public_name dkml-component-something-great)\n (name something_great)\n (libraries\n  dkml-install.register\n  dkml-component-staging-ocamlrun.api\n  ; bos is for constructing command line arguments (ex. Cmd.v)\n  bos\n  ; ...\n  ))\n```\n\nFOURTH, in your registration component (ex. `something_great.ml`) use\n`spawn_ocamlrun` as follows:\n\n```ocaml\nopen Bos\nopen Dkml_install_api\n\nlet execute ctx =\n  (* ... *)\n  let bytecode =\n    ctx.Dkml_install_api.Context.path_eval \"%{_:share-generic}%/something_great.bc\"\n  in\n  Staging_ocamlrun_api.spawn_ocamlrun\n    ctx\n    Cmd.(v (Fpath.to_string bytecode) % \"arg1\" % \"arg2\" % \"etc.\")\n```\n\n## Contributing\n\nSee [the Contributors section of dkml-install-api](https://github.com/diskuv/dkml-install-api/blob/main/contributors/README.md).\n\nTo run the ocamlrun installer, do:\n\n```bash\n# 1. EITHER: download some version of the already-built ocamlrun component\nURL=https://github.com/diskuv/dkml-component-ocamlrun/releases/download/4.14.0-v1.1.0-prerel1/dkml-component-staging-ocamlrun.tar.gz\ninstall -d dist\nif command -v wget; then\n  wget -O dist/dkml-component-staging-ocamlrun.tar.gz \"$URL\"\nelse\n  curl -L -o dist/dkml-component-staging-ocamlrun.tar.gz \"$URL\"\nfi\n(cd dist \u0026\u0026 tar xfz dkml-component-staging-ocamlrun.tar.gz)\nSTAGING_FILES=$PWD/dist/staging-files\n\n# 1. OR: build the full ocamlrun component (all working files must be in a 'git commit')\nopam install .\nSTAGING_FILES=$(opam var dkml-component-staging-ocamlrun:share)/staging-files\n\n# 2. Build\ndune build\n\n# 3. Run\nABI=darwin_x86_64 # select the correct ABI; see the choices in $STAGING_FILES\nocamlrun _build/install/default/share/dkml-component-offline-ocamlrun/staging-files/generic/install.bc \\\n  --source-dir \"$STAGING_FILES/$ABI\" \\\n  --target-dir dist/installed\n\n# Look in dist/installed to see what was installed\ndist/installed/bin/ocamlc -config\n```\n\n## Status\n\n| Status                                                                                                                                                                                      |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [![Asset tests](https://github.com/diskuv/dkml-component-ocamlrun/actions/workflows/dkml.yml/badge.svg)](https://github.com/diskuv/dkml-component-ocamlrun/actions/workflows/dkml.yml)      |\n| [![Syntax check](https://github.com/diskuv/dkml-component-ocamlrun/actions/workflows/syntax.yml/badge.svg)](https://github.com/diskuv/dkml-component-ocamlrun/actions/workflows/syntax.yml) |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskuv%2Fdkml-component-ocamlrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiskuv%2Fdkml-component-ocamlrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiskuv%2Fdkml-component-ocamlrun/lists"}