[ANN] rescript 9.1 for beta testing (windows testing welcome!)

Hi all,

We’re finalizing the transfer of our npm package under the new name rescript. This is still a beta, so please report any problem.

The old package bs-platform will still exist, and we’ve carried the old binaries (bsc, bsb) over to the new rescript package for compatibility.

Along with these old binaries, we’re adding a new one: rescript.

npm i rescript
npx rescript init
npx rescript build

The new rescript CLI adopts the subcommand approach so that it is more extensible in the future, it is pretty easy to learn those options:

npx rescript -h
npx rescript format -h

Thanks to this approach and npx, commands like npx rescript format should work out of box, with zero installation, even on Windows!

The new CLI is not finalized yet, your feedback is welcome!

A list of changes are available here: https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#91

27 Likes

When I use npx rescript init, the bsconfig.json is:
{
“name”: “my-app”,
“version”: “0.1.0”,
“sources”: {
“dir” : “src”,
“subdirs” : true
}
}

There is no

 "suffix": ".bs.js",
 "bs-dependencies": []

The build step will not generate any javascript, maybe suffix is a must-have option.

Your config is out of source build, can you check lib/js directory

I forgot the “dot” in the command line, the correct command should be:
npx rescript init project-name

It is better to get an error message if the folder argument is not present.

It defaults to current directory.
rescript init is the same as rescript init .