# ReScript

> Programming language that compiles to JavaScript

**Wikidata**: [Q116885321](https://www.wikidata.org/wiki/Q116885321)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/ReScript)  
**Source**: https://4ort.xyz/entity/rescript

## Summary
ReScript is a functional programming language and source-to-source compiler that compiles directly to JavaScript. Developed by Bloomberg L.P., it serves as a statically typed dialect of Reason designed for cross-platform development.

## Key Facts
- **Inception:** 2015
- **Developer:** Bloomberg L.P.
- **Aliases:** BuckleScript
- **Classification:** Dialect, source-to-source compiler, and reference implementation
- **Typing Discipline:** Static typing
- **Programming Paradigm:** Functional programming
- **File Extensions:** .res, .resi
- **License:** GNU Lesser General Public License (LGPL) 3.0 or later; MIT License (specifically for the parser)
- **Implementation Languages:** OCaml, Q2005, and ReScript

## FAQs
### Q: What is the relationship between ReScript and BuckleScript?
A: ReScript is the current name and evolution of the project formerly known as BuckleScript. It is a rebranding of the toolchain that compiles OCaml-influenced syntax into JavaScript.

### Q: Which programming languages influenced ReScript?
A: ReScript is a dialect of Reason and was significantly influenced by OCaml and Q2005. It functions as a syntax extension and toolchain for these environments.

### Q: How is ReScript distributed and installed?
A: ReScript is available as an open-source package through the npm registry under the package name "rescript." It is designed to integrate with the standard JavaScript ecosystem.

### Q: What are the primary file types used in ReScript?
A: ReScript source files typically use the .res extension, while interface files use the .resi extension.

## Why It Matters
ReScript provides a robust bridge between the functional programming world and the JavaScript ecosystem. By offering a source-to-source compiler that targets JavaScript, it allows developers to utilize the safety of static typing and the power of functional paradigms while maintaining compatibility with web platforms. Its development by Bloomberg L.P. underscores its utility in large-scale, professional software environments where code reliability is paramount. As a dialect of Reason, it leverages the established OCaml toolchain while providing a more accessible path for developers working within the npm and cross-platform application space.

## Notable For
- **Source-to-Source Compilation:** Directly transforms functional code into JavaScript for execution across various platforms.
- **Dual Licensing Structure:** The compiler is protected under LGPL 3.0+, while the parser component is available under the MIT License.
- **Static Typing:** Enforces a rigorous typing discipline to catch errors during development rather than at runtime.
- **Ecosystem Integration:** Operates as a first-class citizen in the JavaScript world via npm, despite its OCaml-based roots.

## Body

### History and Development
ReScript was introduced in 2015 by Bloomberg L.P. under the original name BuckleScript. It was created as a toolchain to compile OCaml to JavaScript. The project is classified as a dialect, defined as a relatively small variation of a computer language that does not alter its intrinsic nature.

### Technical Architecture
ReScript is implemented using OCaml, Q2005, and ReScript itself. It is a cross-platform toolchain that functions as a reference implementation for its own language specifications. 
- **Paradigm:** It strictly follows functional programming principles.
- **Typing:** It utilizes a static typing discipline.
- **Output:** The compiler produces JavaScript, making it a source-to-source compiler (transpiler).

### Versioning History
The project has maintained a consistent release cycle since its inception:
- **Version 1.0:** Released August 31, 2016.
- **Version 1.4.1 - 1.4.3:** Released between January and February 2017.
- **Version 1.9.0:** Released August 25, 2017.
- **Version 3.0.0:** Released April 15, 2018.
- **Version 5.2.1:** Released October 17, 2019.

### Language Relationships
ReScript is deeply interconnected with the OCaml ecosystem. It is officially recognized as a dialect of Reason, which is itself a syntax extension and toolchain for OCaml (introduced in 2016). Additionally, ReScript has served as the basis for derivative works, most notably Melange. The project maintains an active presence on GitHub under the "rescript-lang" organization and uses Twitter (handle: rescriptlang) for community engagement.

## References

1. [Source](https://rescript-lang.org/blog/new-rescript-logo)
2. [Source](https://github.com/rescript-association/rescript-lang.org/blob/master/public/static/brand/rescript-logo.svg)
3. [Source](https://github.com/rescript-lang/rescript-compiler/blob/master/LICENSE)
4. [Source](https://github.com/rescript-lang/rescript-compiler/blob/master/res_syntax/LICENSE)
5. [Release 1.0. 2016](https://github.com/rescript-lang/rescript-compiler/releases/tag/1.0)
6. [Release 1.4.1. 2017](https://github.com/rescript-lang/rescript-compiler/releases/tag/1.4.1)
7. [Release 1.4.2. 2017](https://github.com/rescript-lang/rescript-compiler/releases/tag/1.4.2)
8. [Release 1.4.3. 2017](https://github.com/rescript-lang/rescript-compiler/releases/tag/1.4.3)
9. [Release 1.9.0. 2017](https://github.com/rescript-lang/rescript-compiler/releases/tag/1.9.0)
10. [Release 2.2.3. 2018](https://github.com/rescript-lang/rescript-compiler/releases/tag/2.2.3)
11. [Release 3.0.0. 2018](https://github.com/rescript-lang/rescript-compiler/releases/tag/3.0.0)
12. [Release 3.1.0. 2018](https://github.com/rescript-lang/rescript-compiler/releases/tag/3.1.0)
13. [Release 5.2.0. 2019](https://github.com/rescript-lang/rescript-compiler/releases/tag/5.2.0)
14. [Release 5.2.1. 2019](https://github.com/rescript-lang/rescript-compiler/releases/tag/5.2.1)
15. [Release 6.2.0. 2019](https://github.com/rescript-lang/rescript-compiler/releases/tag/6.2.0)
16. [Release 6.2.1. 2019](https://github.com/rescript-lang/rescript-compiler/releases/tag/6.2.1)
17. [Release 7.0.1. 2019](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.0.1)
18. [Release 7.1.0. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.1.0)
19. [Release 7.2.0. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.2.0)
20. [Release 7.2.2. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.2.2)
21. [Release 7.3.1. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.3.1)
22. [Release 7.3.2. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/7.3.2)
23. [Release 8.0.1. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/8.0.1)
24. [Release 8.0.3. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/8.0.3)
25. [Release 8.2.0. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/8.2.0)
26. [Release 8.3.1. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/8.3.1)
27. [Release 8.4.2. 2020](https://github.com/rescript-lang/rescript-compiler/releases/tag/8.4.2)
28. [Release 9.0.1. 2021](https://github.com/rescript-lang/rescript-compiler/releases/tag/9.0.1)
29. [Release 9.0.2. 2021](https://github.com/rescript-lang/rescript-compiler/releases/tag/9.0.2)
30. [Release 9.1.2. 2021](https://github.com/rescript-lang/rescript-compiler/releases/tag/9.1.2)
31. [npmjs](https://registry.npmjs.com/rescript)
32. [Release 9.1.3. 2021](https://github.com/rescript-lang/rescript-compiler/releases/tag/9.1.3)
33. [Release 9.1.4. 2021](https://github.com/rescript-lang/rescript-compiler/releases/tag/9.1.4)
34. [Release 10.0.0. 2022](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.0.0)
35. [Release 10.0.1. 2022](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.0.1)
36. [Release 10.1.0. 2022](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.1.0)
37. [Release 10.1.1. 2023](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.1.1)
38. [Release 10.1.2. 2023](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.1.2)
39. [Release 10.1.3. 2023](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.1.3)
40. [Release 10.1.4. 2023](https://github.com/rescript-lang/rescript-compiler/releases/tag/10.1.4)
41. [Release 11.0.0. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.0.0)
42. [Release 11.0.1. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.0.1)
43. [Release 11.1.0. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.1.0)
44. [Release 11.1.1. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.1.1)
45. [Release 11.1.2. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.1.2)
46. [Release 11.1.3. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.1.3)
47. [Release 11.1.4. 2024](https://github.com/rescript-lang/rescript-compiler/releases/tag/v11.1.4)
48. [Release 12.0.0. 2025](https://github.com/rescript-lang/rescript/releases/tag/v12.0.0)
49. [Release 12.0.1. 2025](https://github.com/rescript-lang/rescript/releases/tag/v12.0.1)
50. [Release 12.0.2. 2025](https://github.com/rescript-lang/rescript/releases/tag/v12.0.2)