{"id":19163063,"url":"https://github.com/federicobruzzone/setup-ocaml-project-with-dune","last_synced_at":"2026-02-19T00:35:08.732Z","repository":{"id":189743054,"uuid":"681221032","full_name":"FedericoBruzzone/setup-ocaml-project-with-dune","owner":"FedericoBruzzone","description":"This repository provides a basic setup for an OCaml project with using Dune as the build system. It aims to provide a simple and straightforward structure for your OCaml project, allowing you to focus on writing code without the complexities of a build system.","archived":false,"fork":false,"pushed_at":"2024-08-12T16:04:01.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T06:08:26.218Z","etag":null,"topics":["functional-programming","ocaml","ocamlbuild","project-template","setuptools"],"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/FedericoBruzzone.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}},"created_at":"2023-08-21T14:32:23.000Z","updated_at":"2024-08-12T16:04:05.000Z","dependencies_parsed_at":"2025-01-03T21:41:53.242Z","dependency_job_id":"4cad58cf-3d47-4f33-bd78-6edbb7ec4c3d","html_url":"https://github.com/FedericoBruzzone/setup-ocaml-project-with-dune","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"5628d9d0aa4b6efce5ecf81628a739188de94e6e"},"previous_names":["federicobruzzone/setup-ocaml-project-with-dune"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FedericoBruzzone/setup-ocaml-project-with-dune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Fsetup-ocaml-project-with-dune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Fsetup-ocaml-project-with-dune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Fsetup-ocaml-project-with-dune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Fsetup-ocaml-project-with-dune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FedericoBruzzone","download_url":"https://codeload.github.com/FedericoBruzzone/setup-ocaml-project-with-dune/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Fsetup-ocaml-project-with-dune/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29599396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T22:25:43.180Z","status":"ssl_error","status_checked_at":"2026-02-18T22:25:42.766Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["functional-programming","ocaml","ocamlbuild","project-template","setuptools"],"created_at":"2024-11-09T09:14:08.264Z","updated_at":"2026-02-19T00:35:08.710Z","avatar_url":"https://github.com/FedericoBruzzone.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCaml Project Setup with Dune\n\nThis repository provides a basic setup for an OCaml project with using Dune as the build system. It aims to provide a simple and straightforward structure for your OCaml project, allowing you to focus on writing code without the complexities of a build system.\n\n## Project Structure\n\nThe project structure is organized as follows:\n\n```\n.\n├── bin\n│   ├── add.ml\n│   ├── dune\n│   ├── main.ml\n│   └── sub\n│       └── sub.ml\n├── dune-project\n├── lib\n│   └── dune\n├── setup_ocaml_project_no_dune.opam\n└── test\n    ├── dune\n    └── setup_ocaml_project_no_dune.ml```\n```\n\n- `./bin/main.ml`: This file might contain the entry point of your application, where it starts execution.\n\n- `./bin/`: This folder is intended for executable code, like your project's main application.\n\n- `./lib/`: This folder is likely intended for your project's library code.\n\n- `./test/`: This folder seems to be intended for test-related code.\n\n## Setup ocaml\n\n1. **Install opam:** It's easy to install opam with your system's package manager on Linux:\n   ```\n   # Ubuntu and Debian:\n   $ apt install opam\n\n   # Archlinux\n   $ pacman -S opam\n   ```\n\n2. **Initialize opam** and **Create an opam switch**:\n    ```\n    $ opam init          # Can take some time\n    $ eval $(opam env)\n    ```\n    ```\n    $ opam switch create 4.14.0\n    $ eval $(opam env)\n    ```\n\n3. **Install Base**: Base is a library that is used in this setup only for demonstration purposes, to see how it works even with external libraries:\n    ```\n    $ opam install base\n    ```\n\n4. **OCaml Platform Tools on Unix**: All these tools can be installed in your current switch:\n    ```\n    $ opam install dune merlin ocaml-lsp-server odoc ocamlformat utop dune-release\n    ```\n\n## Getting Started\n\n1. **Clone the Repository:** Clone this repository to your local machine using the following command:\n\n   ```\n   https://github.com/FedericoBruzzone/setup-ocaml-project-with-dune.git\n   ```\n\n2. **Compile and Run:**\n\n    - To compile your code and create an executable with `dune`, run:\n        ```\n        $ dune build\n        $ dune exec setup_ocaml_project_no_dune\n        ```\n        eventually,\n        ```\n        $ dune clean\n        ```\n\n## Useful command\n\n`ocamlfind list`\n\n`opam list`\n\n## Contributing\n\nContributions to this project are welcome! If you have any suggestions, improvements, or bug fixes, feel free to submit a pull request.\n\n## License\n\nThis repository is licensed under the [GNU General Public License (GPL)](https://www.gnu.org/licenses/gpl-3.0.html). Please review the license file provided in the repository for more information regarding the terms and conditions of the GPL license.\n\n## Contact\n\nIf you have any questions, suggestions, or feedback, do not hesitate to [contact me](https://federicobruzzone.github.io/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedericobruzzone%2Fsetup-ocaml-project-with-dune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedericobruzzone%2Fsetup-ocaml-project-with-dune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedericobruzzone%2Fsetup-ocaml-project-with-dune/lists"}