Skip to content

App for quickly spinning up a lib-executable `dune` project in OCaml with vaguely reasonable defaults.

Notifications You must be signed in to change notification settings

bufordrat/spinup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

407 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spinup

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

Features

  • 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

Quickstart

First, install opam through your OS’s package manager.

Install

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

Run

$ spinup your_project

Enjoy

$ 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

Enjoy on someone else’s machine

$ 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

Assumptions

spinup’s defaults reflect the needs of the author’s typical code projects:

  • library-executable design
  • dune as a build tool
  • opam as a package manager
  • Prelude (with Etude) as a standard library
  • alcotest as a unit-testing framework
  • cram tests powered by dune
  • TINT as a template engine
  • Dockerfile for reproducible builds
  • code formatting using ocamlformat, run automatically in a git pre-commit hook

About

App for quickly spinning up a lib-executable `dune` project in OCaml with vaguely reasonable defaults.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •