rescript-lang/rescript ? reverse-engineered prompt

Reverse engineered prompt

Build me a small but real version of ReScript, a typed language that compiles down to clean, readable JavaScript.

I want a command line tool that can take source files, check types, and output JavaScript fast. It should feel practical for normal app development, so include good error messages, a pretty printer, basic project config, and support for using existing JavaScript libraries without a bunch of setup. If it makes sense, add a simple watch mode for development and a few examples or tests that show it working on basic functions, records, variants, and React style code.

Keep the output human readable and make the whole thing easy to run from the terminal. Use current docs online if you need to. Please set it up so the project is organized cleanly and is easy to extend later, even if this first version only covers the core compiler and tooling pieces.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab