ReScript

What ReScript is
ReScript is a free, open-source language that compiles strongly typed source code into optimized, readable JavaScript. The maker describes it for JavaScript, Node, and React applications, including mission-critical products. Its type system is designed so applications are fully typed without any types, while the compiler and build system target fast feedback across codebases. ReScript can use JavaScript libraries, expose ReScript libraries to JavaScript, and generate TypeScript types. It can be introduced into an existing JavaScript project and later removed while retaining generated JavaScript. Project templates support Next.js or Vite with React and Tailwind CSS, and @rescript/react supplies React bindings. Installation requires Node.js 22 or later; npm, Yarn, pnpm, Bun, and Deno are listed. Editor tooling covers VS Code, Vim/Neovim, and Zed, with IntelliJ IDEA and Emacs community-supported rather than official.
Who it suits
ReScript suits developers building JavaScript, Node, or React applications who want static typing and JavaScript interoperability. It also fits teams adopting a typed language gradually inside existing projects.
What it does well
- Open-source and free
- Compiles to optimized readable JavaScript
- No any types in its type-system design
- Generates TypeScript types
- React starter templates included
What to know first
- Requires Node.js 22 or later
- Yarn versions above 1 need nodeLinker configuration
- IntelliJ IDEA and Emacs are community-supported
Limits
Yarn versions above 1 require `nodeLinker` set to `node-modules`. The editor’s exception analysis does not understand generic exceptions.
Getting started
- Install Node.js 22 or later
- Choose npm, Yarn, pnpm, Bun, or Deno
- Generate a starter with Next.js or Vite, React, and Tailwind CSS
- Install an editor plugin for VS Code, Vim/Neovim, or Zed
- Add ReScript to an existing JavaScript project if desired
Verdict
ReScript offers typed source development while retaining access to the JavaScript ecosystem. Its gradual adoption path and React tooling are useful, but installation and editor-support requirements should be checked first.
Questions
Is ReScript free?
Yes. ReScript is free and open source, with a free plan and no free trial.
Which platforms does ReScript support?
The listed platforms are Linux and web. ReScript-compiled JavaScript can also run in Node.js.
What editors have support?
Officially listed editors are VS Code, Vim/Neovim, and Zed. IntelliJ IDEA and Emacs are community supported rather than officially supported.
Can ReScript work with JavaScript?
Yes. It can use JavaScript libraries, export ReScript libraries to JavaScript, generate TypeScript types, and keep generated JavaScript after removal from a project.
Does ReScript support React?
Yes. The official generator offers React starters for Next.js or Vite with Tailwind CSS, and `@rescript/react` provides bindings for React and related modules.
Facts from ReScript's own pages
- Build speed
- ReScript describes its compiler and build system as designed for fast feedback loops across codebases of any size. · rescript-lang.org, 4 Oct 2026
- Community support
- Official questions can be posted in the forum or GitHub repositories, while Stack Overflow is described as not frequently monitored. · rescript-lang.org, 11 Oct 2026
- Community supported editors
- The editor guide lists IntelliJ IDEA and Emacs as community supported and says they are not officially supported. · rescript-lang.org, 4 Oct 2026
- Compatibility limit
- The installation guide notes that Yarn versions above 1 require nodeLinker set to node-modules. · rescript-lang.org, 11 Oct 2026
- Compiler
- The compiler generates optimized, readable JavaScript and the manual says a Hello World program generates 20 bytes of JavaScript. · rescript-lang.org, 11 Oct 2026
- Ecosystem
- Existing JavaScript package managers, bundlers, frameworks, and test runners work with ReScript. · rescript-lang.org, 11 Oct 2026
- Editor support
- The editor plugin provides syntax highlighting, autocomplete, type hints, formatting, code navigation, and code analysis; the guide lists VS Code, Vim/Neovim, and Zed. · rescript-lang.org, 4 Oct 2026
- Editor tooling
- The project documents a VS Code extension and says it provides memory-friendly VS Code and Vim plugins. · rescript-lang.org, 11 Oct 2026
- Founded
- 2015 · rescript-lang.org, 28 Sept 2026
- Gradual adoption
- The homepage says ReScript can be adopted gradually and a project can continue functioning with its generated JavaScript after removing ReScript source files. · rescript-lang.org, 11 Oct 2026
- Intended users
- The maker describes ReScript as suitable for JavaScript, Node, and ReactJS applications, including mission-critical products. · rescript-lang.org, 4 Oct 2026
- JavaScript interop
- ReScript can import JavaScript and TypeScript code, export code to JavaScript, and generate TypeScript types with genType. · rescript-lang.org, 11 Oct 2026
- Node.js
- ReScript-compiled JavaScript can run in Node.js, and installation requires Node.js version 22 or later. · rescript-lang.org, 11 Oct 2026
- Open source
- The ReScript Association describes ReScript as an open source platform supported by industrial users. · rescript-association.org, 11 Oct 2026
- Open source and organization
- The ReScript Association describes ReScript as an open source platform and says it supports development of the language and its OCaml technical foundation. · rescript-association.org, 4 Oct 2026
- Package managers
- The installation guide lists npm, Yarn, pnpm, Bun, and Deno as supported package manager options. · rescript-lang.org, 11 Oct 2026
- Project templates
- The official project generator provides starter projects for Next.js or Vite with React and Tailwind CSS. · rescript-lang.org, 4 Oct 2026
- Purpose
- ReScript is a strongly typed language that compiles to clean, efficient JavaScript. · rescript-lang.org, 11 Oct 2026
- React
- The official site offers first-class React bindings and starter templates using React and Tailwind CSS. · rescript-lang.org, 11 Oct 2026
- React integration
- The `@rescript/react` package provides bindings for React, ReactDOM, ReactDOMServer, React events, and other React modules. · rescript-lang.org, 4 Oct 2026
- Runtime and package managers
- The installation guide requires Node.js version 22 or later and lists npm, yarn, pnpm, bun, and deno as package manager options. · rescript-lang.org, 4 Oct 2026
- Security analysis
- The editor code analyzer can detect dead code and unhandled exceptions, and the guide notes that its exception analysis does not understand generic exceptions. · rescript-lang.org, 4 Oct 2026
- Type system
- The type system infers types and guarantees that values not marked nullable will not be undefined. · rescript-lang.org, 11 Oct 2026
- What it does
- ReScript is a strongly typed language that compiles to clean, efficient JavaScript. · rescript-lang.org, 4 Oct 2026
Where ReScript stands on Freedom251
- Code Transpilers#24 of 28
