A robustly typed language that compiles to efficient, human-readable JavaScript
open sourceLGPL-3.0-or-later AND MITself-hostablefree
ReScript is a strongly typed language that compiles to clean, efficient, human-readable JavaScript that runs in browsers and Node.js. Its sound type system is deliberately a simple subset: a value not marked nullable is never undefined, types are inferred so annotations are optional, and the type system behaves the same in every project with no configuration. Its compiler and build system are among the fastest for JavaScript development, and the output is optimized for JIT engines and tiny (a hello world is 20 bytes), with standard library pieces included only when used. It interoperates both ways with JavaScript and TypeScript (including generating TypeScript types), works with existing package managers, bundlers, frameworks and test runners, has pattern matching and React JSX support, and is installed from npm. The compiler is LGPL-3.0-or-later and the runtime, standard libraries, syntax tools and build tool are MIT.
Libraries for JavaScript and TypeScript
View 40 more
- Composio
- Better Auth
- Puppeteer
- Tabler
- CodeMirror
- ProseMirror
- core-js
- Inngest
- webpack
- Open Policy Agent
- Appium
- React
- React Aria
- River
- ESLint
- Jest
- BullMQ
- PDF.js
- Prettier
- Redux
- DOMPurify
- SuperTokens
- React on Rails
- PDFKit
- @react-pdf/renderer
- shadcn/ui
- pdfmake
- SQLite
- Vite
- MuPDF
- EmDash
- Herb
- OpenLLMetry
- promptfoo
- Apache Guacamole
- jsPDF
- Clerk
- PropelAuth
- Mem0
- Selenium
Browse all of them: 369 libraries, 92 frameworks, 395 APIs.
Problems it solves
- a typed language for the web with a sound type system and no undefined errors
- compile to readable JavaScript that works with my existing npm packages and bundler
- a faster compiler than TypeScript for a large frontend codebase
- write React components in a strongly typed functional language
- gradually adopt a stricter typed language inside an existing JavaScript project
Features
- sound static type system with inference
- compiles to readable, optimized JavaScript
- fast compiler and build system
- JavaScript and TypeScript interop, TypeScript type generation
- pattern matching
- React JSX support
- tiny output with tree-shaken standard library
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what ReScript does.
- TypeScript JavaScript with static types, compiled to plain JavaScript
- Elm A delightful language for reliable webapps
- Roc A fast, friendly, functional language
- Crystal A language for humans and computers
- V Simple, fast, safe, compiled. For developing maintainable software
- OCaml An industrial-strength functional programming language with an emphasis on expressiveness and safety