https://github.com/gitpod-samples/template-ocaml
A template for OCaml, configured for Gitpod (www.gitpod.io) to give you pre-built, ephemeral development environments in the cloud.
https://github.com/gitpod-samples/template-ocaml
gitpod ocaml opam template
Last synced: 2 months ago
JSON representation
A template for OCaml, configured for Gitpod (www.gitpod.io) to give you pre-built, ephemeral development environments in the cloud.
- Host: GitHub
- URL: https://github.com/gitpod-samples/template-ocaml
- Owner: gitpod-samples
- License: mit
- Created: 2021-08-13T11:25:46.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T14:47:15.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T12:56:21.335Z (3 months ago)
- Topics: gitpod, ocaml, opam, template
- Language: OCaml
- Homepage: https://www.gitpod.io/
- Size: 8.79 KB
- Stars: 18
- Watchers: 7
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A OCaml template on Gitpod
This is a [OCaml](https://en.wikipedia.org/wiki/OCaml) template configured for ephemeral development environments on [Gitpod](https://www.gitpod.io/). It provides the development tools recommneded in the offical OCaml documentation: [Up and Running with OCaml](https://ocaml.org/learn/tutorials/up_and_running.html): It uses [Dune](https://dune.readthedocs.io/en/stable/) as the build system, [ocaml-lsp](https://github.com/ocaml/ocaml-lsp) to provide code-completion etc, and [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) to automatically format your code whenever you save files.
Before you can build and run the `helloworld` program you need to be in the right directory and have the opam environment configured; in Gitpod this is already done for you.
```sh
eval $(opam env)
```To build and run the `helloworld` program, run the following:
```sh
dune build
dune exec helloworld
```## Next Steps
Click the button below to start a new development environment:
[](https://gitpod.io/#https://github.com/gitpod-io/template-ocaml)
## Get Started With Your Own Project
### A new project
Click the above "Open in Gitpod" button to start a new workspace. Once you're ready to push your first code changes, Gitpod will guide you to fork this project so you own it.
### An existing project
To get started with OCaml on Gitpod, copy the contents of this foler to your own project. To learn more, please see the [Getting Started](https://www.gitpod.io/docs/getting-started) documentation.