
Awesome ReScript
A collection of awesome things about the ReScript programming language and toolchain. Inspired by the awesome list thing. Contributions are always welcome.
NOTE: This repository is mainly for ReScript materials where the source code is ReScript (.res and .resi files). For materials written in ReasonML, please use the awesome-reasonml repository.
ReScript
Official Resources
Community
Blogposts
A lot of posts can be found via the #rescript tag on dev.to. So please check first, if a post is also there to keep this list small.
Roughly sorted from newest to oldest. But some posts have no date or get updated sometimes.
Blogpost series
Tutorials
Talks, Videos, Livestreams
ReScript Community Meetings
Libraries and Bindings
ReScript Package Index
To discover libraries and bindings for ReScript, please use the official package index tool. Libraries with the rescript keyword in their package.json will appear there, as well as manually added resources. If you happen to find no bindings for a library, please ask for it on the forum. Chances are that somebody already wrote them, but kept them private, because maintaining a full set of bindings is always harder than tweaking them to one's specific needs.
If no bindings exist yet, you can generate a starting point from the library's TypeScript types with rescript-bindgen โ a deterministic .d.ts โ ReScript binding generator (type-safe, no %identity), which you then tweak to your needs.
Templates and Boilerplates
Editor Support
(also refer to the official site)
General ReScript language support
Other extensions
Snippets in VSCode
The official snippets included with the ReScript-VSCode extension are available here. You don't need to do anything to activate them; the extension already installs them.
But you can also add your snippets if you want to. You can add them as user snippets or in a workspace through a rescript.code-snippets file in the .vscode folder in the root of your workspace / project. See an example of some user snippets here. Read more about snippets in VSCode here.
Keybindings in VSCode
If you're coming to ReScript React from other languages, you probably find yourself writing React.string("") quite a lot, but maybe sometimes forgetting to add the React.string call.
Luckily, VSCode has support for adding custom keybindings. If you open your keybindings.json and add the following, you can select any piece of code and press cmd+k followed by s to add the React.string call around the selection:
{
{
"key": "cmd+k s",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "{React.string(\"$TM_SELECTED_TEXT\")}"
}
}
...rest of your keybindings.json
}
Change the keybinding to your liking. Read more about keybindings in VSCode here.
Example Apps
- ReScript Game of Life - Conway's Game of Life written in ReScript using ReScript-React. (demo)
- ReScript RealWorld example app - Another Medium.com clone written using ReScript-React. (demo)
- ReTurbo - Pseudo 3D racing game built with Reprocessing (demo)
- Coronate - A Swiss-style chess tournament manager for the web and desktop, written with ReScript-React. (web demo)
- Pomodoro - Simple pomodoro application. Written in ReScript and ReactJS. (demo)
- rescript-intro - A calculator Using ReScript, React + Tailwind.
- Fire Emblem Chess - A pass & play chess game using ReScript, D3, and Howler (demo)
- Pick a color - A modern color picker based on the LCH color model. Utilizes React concurrent mode. (demo)
- Pixel Papercraft Generator Builder - Generator builder for Pixel Papercraft. (demo)
- Rock, Paper, Scissors - A "Rock, Paper, Scissors" CLI game consisting of a server (written in Golang) and a client (ReScript).
- Darklang Editor - A programming language, editor, and cloud environment. The editor is in ReScript.
- Movie and People browsing site - A site to browse movies and people from The Movie Database (TMDB). (demo)
Contribute
Just fork this repository and add your resources in a pull-request. Please check for duplicates and dead links before you submit.
NOTE: This repository is mainly for ReScript materials where the source code is ReScript (.res and .resi files). For materials written in ReasonML, please use the awesome-reasonml repository.
License
