An experimental compiled programming language designed for AI-generated code that people review, with explicit syntax and no garbage collector, compiling to C.
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
BAML is a programming language for building AI agents, with typed functions, a Rust-based compiler, and callable from TypeScript, Python, Go and other languages.
A statically typed programming language and calculator for scientific computations with built-in physical dimensions and units.
A TypeScript-like language and compiler that turns a typed subset of TypeScript into WebAssembly modules.
The Go programming language, an open source language for building simple, reliable, and efficient software.
The main source repository for the Rust programming language, containing the compiler, standard library, and documentation.