ReScript: an LGPL compiler, an MIT runtime, and a 13.0 that is still in alpha
ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
At a glance
- What is it?
- ReScript compiles a fully typed language to JavaScript you can read, with a toolchain distributed as a Node package whose compiler is LGPL and runtime is MIT. Two things decide whether it fits your project: version 13 is still shipping as alpha releases while the 12.x line remains stable, and the promise of no lock-in is a claim about the generated JavaScript rather than about your source code.
- Who is it for?
- Adopt it when your team wants types that survive a refactor and does not mind a compiler in the loop, especially on Node 22 or newer with a build step you control. Do not adopt it on version 13 alphas for production work, because 12.3.1 is the stable line and the Upgrading Guide is where the breaking changes live.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly OCaml, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- rescript-lang/rescript7,485 ★ · +26
| Repository | 2026-09-22 | 2026-11-15 |
|---|---|---|
| rescript-lang/rescript | 7.5k | 7.5k |
26 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The compiler is LGPL and the runtime is MIT, and you ship the runtime
The licence section is the most concrete thing on the page, because ReScript uses multiple licences in this monorepo and names them per directory. `compiler/` is LGPL-3.0-or-later. `compiler/syntax/` is MIT. `packages/@rescript/runtime/` is MIT. `rewatch/` is MIT. The full texts live in `COPYING.LESSER` and `LICENSE.MIT`, indexed by the repository LICENSE, and the npm manifest records the combination as a compound expression rather than picking one. That distinction has a practical consequence. The compiler is the tool you run at build time, and the runtime is the JavaScript your application actually loads in a browser or on a server. For most teams the runtime is the licence that matters, and it is MIT. Note also that the repository record itself leaves the licence field unstated, so the per-directory list is the authoritative source rather than the metadata you see on a repository page.
Node 22 is the floor, and three binaries come out of one package
The toolchain ships as a single npm package with four executables and a Node requirement, which is what you actually install:
"engines": {
"node": ">=22"
},
"bin": {
"bsc": "cli/bsc.js",
"rescript": "cli/rescript.js",
"rescript-tools": "cli/rescript-tools.js"
}`bsc` is the compiler and `rescript` the build driver; the bin map also lists `rescript-rust` (cli/rescript-rust.js) and `rescript-tools`. Two smaller details matter for a team integrating this. The package is published as an ES module and its publishConfig asks for public access with provenance enabled, which means npm records where the artefact came from. And the scripts are Node entry points rather than shell wrappers, so the toolchain's own tests run as `node scripts/test.js` with flags for the full run, a build run and an OCaml unit run, with biome handling checking and formatting. A Node floor of 22 is the practical adoption constraint, independent of anything about the language.
The Makefile refuses to guess a platform and errors out instead
If you build the toolchain from source, the platform resolution is explicit and fails loudly on anything unlisted. Windows becomes `win32-x64`. Darwin becomes `darwin-arm64` when `uname -m` reports arm64, and otherwise the build stops with "Intel Macs are not supported anymore, use ReScript 12". Linux becomes `linux-arm64` for aarch64 or arm64 and `linux-x64` for everything else. Anything else hits `$(error Unsupported platform $(UNAME_S)-$(UNAME_M))` at parse time, which means the build stops before compiling rather than producing a binary that fails later. The resolved value becomes a path, `packages/@rescript/$(RESCRIPT_PLATFORM)/bin`, and the copy macro chmods the result and strips it on every platform except Windows. The consequence for a contributor is that adding a target means editing this branching logic, and the consequence for a user is that an unusual platform fails loudly at build time, not quietly at runtime.
Build freshness is tracked by four stamps, one of them a dune log file
The claim that there are no stale caches is backed by specific machinery. The Makefile defines four stamps. `YARN_INSTALL_STAMP` is `.yarn/install-state.gz`, the file yarn creates whenever dependencies are installed, used so a manual `yarn install` is detected. `COMPILER_BUILD_STAMP` is `_build/log`, because dune updates that log on every build invocation even when run by hand, which keeps targets up to date after a manual `dune build`. `RUNTIME_BUILD_STAMP` is `packages/@rescript/runtime/.buildstamp` and `BELT_BUILD_STAMP` is `packages/@rescript/belt/.buildstamp`, each touched by the corresponding workspace build. So the mechanism is an agreement between three build systems about what counts as fresh, and the cost of that agreement is that a hand-run command can legitimately advance the stamps behind the Makefile's back.
13.0 is alpha while 12.3.1 shipped between two alphas
The release list tells you which line to be on. v13.0.0-alpha.6 was published 2026-09-16, v12.3.1 on 2026-08-24, and v13.0.0-alpha.5 on 2026-07-10. So the 12.x line shipped a stable release in the middle of two 13.0 alphas, which is a project working on the next major while still patching the current one. The workspace manifest is one step ahead again, declaring version 13.0.0-alpha.7. For an adopter the guidance is simple: follow the Upgrading Guide for instructions on upgrading to newer versions, stay on the stable line for production, and treat the alphas as what they are. The repository is not archived and the last push on master is dated 2026-11-02, so the alphas are moving quickly, which is a reason to pin rather than to track.
No lock-in is a claim about the output, not about your source files
The adoption argument is that ReScript was made with gradual adoption in mind, and that if you ever want to go back to plain JavaScript you remove all source files and keep its clean JavaScript output. That is the honest form of the claim. The exit path is real because the compiler emits readable JavaScript rather than a bundle of closures. It is not a claim that your ReScript source ports back, since the type system, its modules and its JSX are ReScript's own. The integration story is the mirror image: use any library from JavaScript, export ReScript libraries to JavaScript, and automatically generate TypeScript types, with the pitch being that you have not left the good parts of JavaScript at all. The type story is the other pillar. Every app is fully typed with reliable type information for any given value, simpler types are prioritised over complex ones for clarity and debugability, and the promises are blunt: no `any`, no magic types, no surprise `undefined`.
The documentation and the editor plugins are in other repositories
Read the repository layout and it becomes clear what this monorepo is for. The compiler lives under `compiler/` with its own `syntax/` subdirectory, the npm packages live under `packages/` with the runtime and the belt as their own workspaces, `rewatch/` is a separate MIT-licensed directory, `cli/` holds the three JavaScript entry points, and there are directories for analysis, tooling, scripts, tests, documentation and a development library. AGENTS.md, CLAUDE.md, an ocamlformat config and three opam files sit alongside. Everything a user reads is elsewhere. The documentation source and the website are hosted in a separate repository, React guidance lives in the rescript-react documentation and React Native has its own site, and the editor integrations are separate projects too: a memory friendly VSCode plugin and a Vim plugin. The origin note is that ReScript was created by Hongbo Zhang in 2015, the author field in the manifest, and twelve maintainers are named.
Editorial conclusion
Adopt it when your team wants types that survive a refactor and does not mind a compiler in the loop, especially on Node 22 or newer with a build step you control. Do not adopt it on version 13 alphas for production work, because 12.3.1 is the stable line and the Upgrading Guide is where the breaking changes live. Before you commit, read both licence files, since the compiler and the runtime you actually ship are under different terms, and confirm the editor plugin you rely on is maintained, because the VS Code and Vim plugins live in their own repositories.
Frequently asked questions
what is rescript
ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript, with a compiler toolchain that scales to any codebase size. Every app is fully typed with reliable type information, simpler types are preferred over complex ones, and the stated guarantees are no any, no magic types and no surprise undefined. It is distributed as an npm package named rescript requiring Node 22 or newer.
how to use rescript
Follow the Installation Guide to set up a new ReScript project or integrate it into an existing JavaScript project, then use the rescript binary to build. The package exposes four commands: bsc, rescript, rescript-rust and rescript-tools. React apps have separate documentation, and React Native has its own project page.
is rescript dead
The repository is not archived and the last push on master is dated 2026-11-02. The release list shows v12.3.1 published 2026-08-24 alongside v13.0.0-alpha.6 from 2026-09-16, so the 12.x line is still shipping while the 13.0 line works through alphas, and the manifest is already at 13.0.0-alpha.7.
rescript vs typescript
ReScript is a compiled language with a type system that rejects any, magic types and surprise undefined, and it emits readable JavaScript. It also generates TypeScript types automatically for consumers, so the two are not exclusive. The difference that matters for a team is the build step: ReScript compiles with an LGPL compiler and ships an MIT runtime, and needs Node 22 or newer.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rescript-lang-rescript)Star history chart for your README
[](https://hysenlabs.com/projects/rescript-lang-rescript)Was this useful?