bufordrat / spinup

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 name_of_your_project

Enjoy

$ cd name_of_your_project
$ opam exec -- dune exec name_of_your_project
$ opam exec -- dune build
$ opam exec -- dune utop
$ opam exec -- dune install

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

About

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


Languages

Language:OCaml 94.3%Language:Makefile 3.8%Language:Perl 1.0%Language:Shell 0.7%Language:Emacs Lisp 0.1%