slightlytyler / reason-native-starter

Starting point for a new reason project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reason-native-starter

Reason project for native compilation:

More info on the workflow.

Develop With OPAM

Build:

Clone the repo and run these commands from within the project:

opam update # get the latest opam packages data. Skip this optionally
# opam will read into the `opam` file and add the other dependencies
opam install reason
opam install merlin
opam install re
make build    # build/rebuild your files

Run:

make run

Develop:

  • Make sure you have merlin globally installed (via opam, not reason-cli!)
  • See the ReasonML docs about setting up your editor. Just remember to not install reason-cli when using opam.

Preliminary Esy Support

You may alternatively use esy to build and develop this project. (esy is like "npm for native"). This is preferable for people who want to build native Reason projects using existing opam packages, but with a more familiar and sandboxed workflow. This is experimental and not stable yet. Please report any issues to the esy repo.

Build:

npm install -g esy@latest
esy install
esy build

Run:

Use esy x ("esy execute") command to run the binary.

esy x reason-native-bin

Develop:

  • See the ReasonML docs about setting up your editor.
  • Start your editor from the root of this project via esy vim or esy atom etc. (Note VSCode has special esy support so that you don't need to start it this way from the command line).
  • Add dependencies by adding entries to the package.json, running esy install then esy build.

About

Starting point for a new reason project


Languages

Language:OCaml 88.4%Language:Makefile 11.6%