Repolode
rescript-lang

rescript-lang/rescript

A robustly typed language from the ML family that compiles to fast, readable JavaScript, with TypeScript type generation and easy JS interop.

Open-source alternative to:TypeScript

Stars
7,480
Forks
485
Open issues
161
Last commit
34 minutes ago

What is it?

ReScript is a statically typed language that compiles to human-readable JavaScript. It is aimed at developers who want the safety of a strong type system without the complexity of heavily generic type designs. Every value has reliable type information, and the language avoids `any` and implicit `undefined` values.

The compiler toolchain is built for quick feedback on codebases of any size. Projects can use any JavaScript library, ReScript libraries can be exported to JavaScript, and TypeScript types can be generated automatically. It also includes a built-in pretty printer and editor plugins for VS Code and Vim.

ReScript supports gradual adoption: a project can be moved back to plain JavaScript by removing the source files and keeping the generated output. It is commonly used for web, Node, and React applications, including React Native through a separate project.

Key features

  • 01Compiles to readable JavaScript output.
  • 02Strong type system with no `any` and no implicit `undefined`.
  • 03Automatic TypeScript type generation for ReScript code.
  • 04Direct use of existing JavaScript libraries.
  • 05Built-in pretty printer and VS Code and Vim editor plugins.
  • 06Can be adopted gradually and removed by keeping the generated JavaScript.

Use cases

  • Building type-safe web frontends, especially React applications.
  • Writing Node.js back-end code with strong static typing.
  • Migrating a JavaScript codebase to a typed language incrementally.
  • Shipping libraries that expose clean TypeScript declarations to JavaScript consumers.

In collections

Topics

FAQ

What is rescript?
A robustly typed language from the ML family that compiles to fast, readable JavaScript, with TypeScript type generation and easy JS interop. ReScript is a statically typed language that compiles to human-readable JavaScript. It is aimed at developers who want the safety of a strong type system without the complexity of heavily generic type designs. Every value has reliable type information, and the language avoids `any` and implicit `undefined` values.
Is rescript free to use? What license does it have?
rescript is open source under the Other license. Check the license terms before using it in commercial products.
Is rescript still maintained?
Actively maintained. The last commit to rescript was on Nov 7, 2026.
What can I use rescript for?
Building type-safe web frontends, especially React applications. Writing Node.js back-end code with strong static typing. Migrating a JavaScript codebase to a typed language incrementally. Shipping libraries that expose clean TypeScript declarations to JavaScript consumers.
Where can I get rescript?
The source code and installation instructions are on GitHub: https://github.com/rescript-lang/rescript

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects