Opam

References:
Opam Switch Introduction

Here is is.

Setting up opam switch for Bonsai

1
2
3
4
5
6
opam switch create janestreet_switch ocaml.5.1.1

opam switch janestreet_switch

# to update the current shell environment
eval $(opam env)

Connect to Jane Street OPAM repository

GitHub Jane Street Repo

opam repo add janestreet-bleeding https://github.com/janestreet/opam-repository.git

opam repo add janestreet-bleeding-external https://github.com/janestreet/opam-repository.git#external-packages

opam install bonsai
1
2
3
4
5
6
7
dune init project hello_world

cd hello_world

dune build 

dune exec ./bin/main.exe