/hello-reason-minimal

Minimal setup for running Reason code

Primary LanguageC++MIT LicenseMIT

hello-reason-minimal

Minimal setup for running Reason code.

Install esy

Globally install esy so that the esy command is available in the terminal.

npm install -g esy

This may be useful: Global npm without sudo

Clone this repo

git clone https://github.com/kyldvs/hello-reason-minimal
cd hello-reason-minimal

Install the dependencies and build

esy

This is a combination of esy install and esy build

Execute Hello.re

esy x hello

This will automatically rebuild if there are changes

Editor Support

VSCode

  • Install the OCaml Platform extension.
  • Create .vscode/settings.json in this repo:
{
  "ocaml.sandbox": {
    "kind": "esy",
    "root": "/path/to/hello-reason-minimal"
  }
}
  • Restart VSCode

VIM

  • For VIM support use: vim-reasonml
  • (Or see the next section for general terminal editor use)

Terminal Editors

  • Run your editor within the Reason environment using esy:
esy $EDITOR
esy vim

More Details

  • For more details and additional setup see: details.md
    • Adding dependencies
    • Recursive dub-directories
    • Ignoring warnings
    • Printing stack traces

Next Steps

When you understand how this repo works, a more complete setup, including CI/CD, can be found at esy-ocaml/hello-reason.