[ANN] Reforging the ReScript Build System

We wrote a blog post about the new build system in v12: Reforging the ReScript Build System | ReScript Blog

Feel free to ask any questions you have about it.

Happy building!

13 Likes

Thanks for sharing some insights about rewatch. Very interesting.
Compared to typescript, monorepos work like a breeze now.

6 Likes

That’s an interesting observation. What makes it harder in TS? Or is it just the house of cards of types that you build that make TS slow?

It’s more about the configuration than the compilation speed.
Probably caused by many totally different projects, I have no idea about the best way to set these up.

  • tsc vs tsc --build?
  • Using the incremental flag or not?
  • Using path aliases?
  • In some projects I have to import files with the extension import { ... } from "./something.js", in some other projects I don’t.
  • Should I use nx, turborepo, lerna, …?

I don’t like to say “skill issue”, but yeah… it’s a skill issue.


In rescript, I just have to add the dependencies to my rescript.json. Done.

3 Likes

I use rewatch with a ReScript 11 monorepo for some time already and in the context of a monorepo it’s a game changer! A couple of seconds + less than 512MB RAM (haven’t tried to push lower) to watch/build all the ReScript code and then multitude more time + 2GB of RAM to compile the remaining 10% of codebase with tsc.

What I was missing a little is the bulk code code-formatting across the whole code base, but now it’s coming with ReScript 12 :heart:

Many thanks to people involved for the hard work. Really-really appreciate this :bowing_man:

4 Likes