rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Umbrella: Library Mode

Open cometkim opened this issue 2 years ago • 2 comments

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

  • [ ] https://github.com/rescript-lang/rescript-compiler/issues/6196
  • [ ] https://github.com/rescript-lang/rescript-compiler/issues/6209
  • [ ] https://github.com/rescript-lang/rescript-compiler/issues/6530
  • [ ] https://github.com/rescript-lang/rescript-compiler/issues/6946

Related changes

  • [x] https://github.com/rescript-lang/rescript-compiler/pull/6709
  • [x] https://github.com/rescript-lang/rescript-compiler/pull/6777

Open discussions

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

cometkim avatar Apr 26 '23 09:04 cometkim

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.

DZakh avatar May 01 '23 08:05 DZakh

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

hellos3b avatar Nov 17 '23 05:11 hellos3b