spinup is a command-line tool that generates starter boilerplate for
an OCaml project. It is:
- intended to work with the least possible amount of configuration
- opinionated about what goes in an OCaml project
- configurable mainly via changes to its templates
- simple syntax
- config file in GNU Refer format
- all default configuration packed directly into the binary using
ocaml-crunch - customizable templates which use TINT as a template engine
First, install opam through your OS’s package manager.
Arch Linux:
$ sudo pacman -S opam
macOS:
$ brew install opam
Once opam is installed, install spinup:
$ opam repository add dldc https://dldc.lib.uchicago.edu/opam $ opam install spinup
$ spinup your_project
$ eval $(opam env) $ cd /path/to/your_project $ dune exec your_project $ dune build $ dune utop $ dune exec lib/repl.exe $ dune runtest $ dune install
$ cd /path/to/your_project $ docker image build -t your/project . $ docker container run your/project $ docker container run your/project opam exec dune exec your_project $ docker container run your/project opam exec dune build $ docker container run -it your/project opam exec dune utop $ docker container run -it your/project opam exec dune exec lib/repl.exe $ docker container run your/project opam exec dune runtest
spinup’s defaults reflect the needs of the author’s typical code
projects:
- library-executable design
duneas a build toolopamas a package manager- Prelude (with Etude) as a standard library
alcotestas a unit-testing framework- cram tests powered by
dune - TINT as a template engine
Dockerfilefor reproducible builds- code formatting using
ocamlformat, run automatically in a git pre-commit hook