Reason project for native compilation:
Develop With OPAM
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
- Make sure you have
merlinglobally installed (via opam, not
- See the ReasonML
docs about setting
up your editor. Just remember to not install
Preliminary Esy Support
You may alternatively use
esy to build and develop this
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.
npm install -g esy@latest esy install esy build
esy x ("esy execute") command to run the binary.
esy x reason-native-bin
- See the ReasonML docs about setting up your editor.
- Start your editor from the root of this project via
esy atometc. (Note VSCode has special
esysupport so that you don't need to start it this way from the command line).
- Add dependencies by adding entries to the
Developing Your Project
The entrypoint of this project is the
./bin/test.re file. Make a simple
change to it and then rerun the build.
ReasonNativeProject is meant to be the starting point of your own project. You'll
want to make use of existing libraries in your app, so browse the growing set
opam packages in the opam repository.
In general, if something goes wrong, try upgrading your install of the project
opam upgrade ReasonNativeProject, or if it failed to install and you
later fixed it,
opam install ReasonNativeProject.