rescript-lang / rescript

ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
https://rescript-lang.org
Other
6.75k stars 449 forks source link

Umbrella: Library Mode #6210

Open cometkim opened 1 year ago

cometkim commented 1 year ago

This is an umbrella issue to track and discusses the remaining issues to be resolved to achieve "Library Mode"

The "Library Mode" means that the ReScript compiler can be adopted as a first-class tool for building libraries in today's JavaScript ecosystem.

Opened RFCs

Related changes

Open discussions

Tell us your story if you've ever provided a JavaScript library based on ReScript (not binding)

DZakh commented 1 year ago

I've written the script to support library mode for rescript-struct. https://github.com/DZakh/rescript-struct/blob/main/packages/prepack/src/Prepack.res I'll share the problems it solves a little bit later when I have time.

hellos3b commented 1 year ago

Following! The above two issues would prevent the need for a secondary build step (rollup) and make making libraries much simpler.