template-ocaml icon indicating copy to clipboard operation
template-ocaml copied to clipboard

A template for OCaml, configured for Gitpod (www.gitpod.io) to give you pre-built, ephemeral development environments in the cloud.

A OCaml template on Gitpod

This is a OCaml template configured for ephemeral development environments on Gitpod. It provides the development tools recommneded in the offical OCaml documentation: Up and Running with OCaml: It uses Dune as the build system, ocaml-lsp to provide code-completion etc, and 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.

eval $(opam env)

To build and run the helloworld program, run the following:

dune build
dune exec helloworld

Next Steps

Click the button below to start a new development environment:

Open in Gitpod

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 documentation.