{"id":13726207,"url":"https://github.com/ahrefs/hello-native-melange","last_synced_at":"2025-08-01T09:37:09.278Z","repository":{"id":68068961,"uuid":"214414003","full_name":"ahrefs/hello-native-melange","owner":"ahrefs","description":"Skeleton of a shared library for melange and native OCaml/Reason","archived":false,"fork":false,"pushed_at":"2023-10-05T08:21:39.000Z","size":39,"stargazers_count":29,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-10T16:15:40.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/ahrefs.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}},"created_at":"2019-10-11T11:01:41.000Z","updated_at":"2024-06-04T21:28:53.000Z","dependencies_parsed_at":"2023-07-02T18:00:13.867Z","dependency_job_id":null,"html_url":"https://github.com/ahrefs/hello-native-melange","commit_stats":null,"previous_names":["ahrefs/hello-native-melange","ahrefs/hello-native-bucklescript"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ahrefs/hello-native-melange","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fhello-native-melange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fhello-native-melange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fhello-native-melange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fhello-native-melange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahrefs","download_url":"https://codeload.github.com/ahrefs/hello-native-melange/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Fhello-native-melange/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265878987,"owners_count":23843048,"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","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-08-03T01:02:55.748Z","updated_at":"2025-07-19T03:03:56.610Z","avatar_url":"https://github.com/ahrefs.png","language":"OCaml","funding_links":[],"categories":["OCaml"],"sub_categories":[],"readme":"This repository contains an example of a library written in\nocaml/reason for both javascript (through bucklescript) and native\n(through the ocaml compiler).\n\nThe `shared` directory contains the core of the library, available in\nboth modes. `js` and `native` contain the part specific to one\nimplementation of the library.\n\nThe library is composed of 3 modules:\n\n- `Date`, which has an implementation per platform and can have a\n  different interface per platform.\n- `Tomorrow`, which has one implementation shared for both platforms.\n- `Yesterday`, which has a signature shared by both platforms, but an\n  implementation per platform.\n\nThere is companion [blog\npost](https://tech.ahrefs.com/how-to-write-a-library-for-bucklescript-and-native-22f45e5e946d)\ngiving more details on how to create this kind of library step by\nstep.\n\n## Installation\n\nFor bucklescript:\n\n```bash\nyarn\n```\n\nFor native:\n\n- install [esy](https://esy.sh/)\n- then run `esy install`\n\nIt can work with opam, but we use esy in this example as it is easier\nto understand for people from the javascript world.\n\n## Compilation\n\nFor bucklescript:\n\n```bash\nyarn bsb -make-world\n```\n\nFor native\n\n```bash\nesy dune build @all\n```\n\nThe commands are wrapped in a Makefile and can be called with `make\njs` and `make native`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Fhello-native-melange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahrefs%2Fhello-native-melange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Fhello-native-melange/lists"}