What is ReScript?
masterReScript is a robustly typed programming language that compiles to efficient, human-readable, and performant JavaScript. It is designed for high-speed iteration with a lightning-fast compiler toolchain that scales to large codebases. Key features include:
- Sound Type System: Guarantees that if a type is not marked as nullable, it will never be
undefined, effectively eliminating null/undefined errors. - Type Inference: The language automatically infers types, so explicit type annotations are optional.
- Optimized Output: Generates tiny, highly optimized JavaScript that leverages JIT optimizations (like hidden classes and inline caching).
- Fast Iteration: Build times are significantly faster than many alternatives, with watcher mode often completing in milliseconds.
- High-Quality Dead Code Elimination: Uses purity analysis and a well-engineered type system to eliminate unused functions and modules, and produces code that is friendly to bundlers like Rollup or Closure Compiler.