Reason Meta Language Toolchain
npm version > 3.0 is required - install here.
ReasonProject starter kit using
npm is the easiest way to get started with
Reason. It will install the
Reason branch and all of the dependencies for you into a local directory based sandbox. It even includes the compiler, IDE support, and REPL. Simply delete the directory when you're done and it's gone from your computer.
git clonecd ReasonProjectnpm installnpm start
While it's installing, read about how to use ReasonProject to compile your simple project and use its built-in editor support and top level.
ReasonProject uses a very simple build system called
rebuild that comes with
Reason, and is enough to start a small project. For large-scale development, we are currently developing a build and namespacing workflow called
rebel, which is built on
jenga. It is an early work in progress, but you can also try it out via
rebel currently takes a long time to compile the first time it's used, so for getting started quickly, use
jenga, a fast, parallel, recoverable build system.
The OPAM installation doesn't use the isolated directory based sandbox model that
ExampleProject does, but if you are very familiar with
opam, you should be able to work out conflicts in the global switch, or create a new switch for the purpose of using
# On OSX, install opam via Homebrew:brew updatebrew install opam# On Linux, see here (you will need opam >= 1.2.2):opam init# Add this to your ~/.bashrc (or ~/.zshrc):# eval $(opam config env)opam updateopam switch 4.02.3eval $(opam config env)opam install reason
Test the installation by compiling the following program:
echo 'print_string "Hello world"' > Hello.rerebuild Hello.native # Automatically generates Hello.native from Hello.re./Hello.native
Check out the docs which guide you through the basic syntax and toolchain features.
Contribute back to that documentation in the docs folder.
Get in touch! We're on IRC freenode #reasonml, and Discord.
# On OSX, install opam via Homebrew:brew updatebrew install opam# On Linux, see here (you will need opam >= 1.2.2):opam init# Add this to your ~/.bashrc (or ~/.zshrc):# eval $(opam config env)opam updateopam switch 4.02.3eval $(opam config env)git clone firstname.lastname@example.org:facebook/reason.gitcd reasonopam pin add -y reason .
New content is licensed under the MIT license, works that are forked from other projects are under their original licenses. MIT license
Editor plugins (which have also been forked) in the
include their own licenses.