This idea has been on my radar for quite a while, I would like to share with you and gauge some interest. ReScript has very good interop with JS, so that it fits the JS ecosystem very well, for example, npm/yarn.
These days I found more and more dissatisfaction with node_modules black wholes. So I am wondering if we should spend some time on our own package manager and grow more pure rescript libraries.
I expect this would be a community effort, and we can adapt the compiler and build system to collaborate with the “package manager”.
I would rather see more volume of pure libraries and potentially a react alternative framework than a custom package system, if I were to vote on general community improvements.
The idea is to encoruage people to build pure rescript stack.
It is great that we can piggyback the existing libraries to get job done. In the long term, in my opinion, it will be more healthy to the community to build the tech on top of rescript itself, i.e, write libraries in rescript itself instead of creating bindings to js libraries.
Note this will never be mandated, but I think will benefit us in the long term
I think having a rescript dedicated package manager so that people who only rely on rescript libraries will have much better user experience without node_modules black holes, this will encourage people to write more and more pure rescript libraries, that’s my idea.
Given that probably 90% of the projects need npm anyway (if they use react for example), that would mean there are two package managers necessary to use ReScript. Even if the ReScript package manager is very user friendly, wouldn’t it in any case be less user friendly to have two package managers?
Also rewriting something like React in ReScript (team within facebook working full-time on it, millions of users), or something like Next.js (tens of millions of VC funding), or a GraphQL client such as Relay (full-time team at facebook), or Apollo (tens of millions of VC funding), or React-Native (full-time team at facebook) and that’s just scratching the surface.
For me it feels like that for this to become feasible we need a TypeScript level of market share (with major libraries already using ReScript) which is still many orders of magnitude away unfortunately.
Lots of great threads and discussion on features etc right now. Keep up the great work @Hongbo ! Very exciting to discuss these things even if consensus isn’t always reached immediately. Thanks for involving us!
TBH I would love if the rescript binary would just work as a wrapper. Because then it can at least automatically add the packages to bs-dependencies. I am however not sure if it is feasible if it would only install pure ReScript libraries, at least it should also be able to install all of the bindings libraries.
I know this is closed, but I think I am so important that I have to write my oppinion here (disclaimer, this is sarcasm and I am just joking about my importance…)
One of the reasons why I’m starting to pick rescript for some projects is that is, literally, as easy as installing any other node library, with my existing project tooling and even bundler. Super nice onboarding experience that I think will bring more people to rescript ecosystem than a nicer purely rescript experience.
Just my 2 cents.
If it were like a wrapper as someone suggested for me it will make more sense. Something that just uses yarn or npm under the hood but also just adds the libraries to your bsbconfig.json will be nice.