esy.sh is a rapid workflow for developing ReasonML or OCaml projects, inspired by npm.
- It provides an unique CLI to manage many tools
- It supports native packages hosted on opam and npm.
- It uses Dune build system.
- It eases the project settings with a main manigest
package.json
. - It sandboxes dependencies per project;
- It simplifies Dune's configuration with pesy
We first need to install esy with npm
You need to use Cygwin in order to run OCaml. Since those distributions are deprecated, trainings are not tested on those OS.
I highly recommend to use the linux distribution that the university provides you.
You are accountable to make your environment work if you choose to use it despite this warning.
You need to :
- Install Windows Subsystem for Linux a.k.a WSL
- Install your Linux distribution. If you're not accurate with linux you would install Ubuntu 20.
- Install vscode for WSL
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
If you have space in your username, you're doomed ¯_(ツ)_/¯ ; use Linux or try WSL2 (require a Windows Insider Program account)
- Install terminator :
sudo apt-get install terminator
- Install Oh-My-Zsh :
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Install starship :
wget -O- https://starship.rs/install.sh | bash
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
mkdir -p ~/.config && touch ~/.config/starship.toml
echo 'add_newline = false\n\n[character]\nsymbol = "➜"\n[git_branch]\nsymbol = "🌱 "\n' >> ~/.config/starship.toml
If you encounter trouble about certificates when using
wget
you probably should installca-certificates
package :sudo apt-get install ca-certificates
- Install vscode : https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
You may lack some tooling :
sudo apt install build-essential
You will need a libc >= 2.7. Check the version with
ldd --version
. If you have a version below 2.7, it means your distribution is too old, upgrade it or rebuild libc (advanced).
- Install iTerm2 :
brew cask install iterm2
- Install Oh-My-Zsh :
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Install starship :
brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
mkdir -p ~/.config && touch ~/.config/starship.toml
echo 'add_newline = false\n\n[character]\nsymbol = "➜"\n[git_branch]\nsymbol = "🌱 "\n' >> ~/.config/starship.toml
- Install vscode :
brew cask install visual-studio-code
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
-
Install NVM :
-
wget -O- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
OR
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
-
-
Install node LTS :
nvm install --lts
-
Update npm :
npm i -g npm
npm i -g esy
Congratulation you're ready to start the Kata