Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
JavaScript/C
interop.npm
npm
version > 3.0 is required - install here.
Installing the ReasonProject
starter kit using npm
is the easiest way to get started with Reason
. It will install the master
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 clone https://github.com/reasonml/ReasonProject.git
cd ReasonProject
npm install
npm 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.
The 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 RebelExampleProject
. rebel
currently takes a long time to compile the first time it's used, so for getting started quickly, use ReasonProject
instead.
rebel
features:
bucklescript
integration.js_of_ocaml
integration.package.json
package name..merlin
files.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 Reason
.
# On OSX, install opam via Homebrew:
brew update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html
opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
# eval $(opam config env)
opam update
opam switch 4.02.3
eval $(opam config env)
opam install reason
Test the installation by compiling the following program:
echo 'print_string "Hello world"' > Hello.re
rebuild 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 update
brew install opam
# On Linux, see here (you will need opam >= 1.2.2): http://opam.ocaml.org/doc/Install.html
opam init
# Add this to your ~/.bashrc (or ~/.zshrc):
# eval $(opam config env)
opam update
opam switch 4.03.0
eval $(opam config env)
git clone git@github.com:facebook/reason.git
cd reason
opam pin add -y reason .
Note: during the last opam pin
step, make sure your local repo is clean. In particular, remove artifacts and node_modules
. Otherwise the pinning might go stale or stall due to the big node_modules
.
See Reason license in LICENSE.txt.
Works that are forked from other projects are under their original licenses.
Editor plugins (which have also been forked) in the editorSupport/
directory
include their own licenses.
FAQs
Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
The npm package reason receives a total of 409 weekly downloads. As such, reason popularity was classified as not popular.
We found that reason demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.