[ANN] rescript new CLI is available for alpha-testing (MacOS)!

Hi all,
Finally we are hosting the Rescript toolchain in a more reasonable name: rescript.

With the new repo, we are also adding a new CLI: rescript ( the old bsb still exists for backwards compatibility).

You can try it like this:

npm i rescript@dev
npx rescript init
npx rescript build

Make sure you’ve installed version >=9.1.0-dev.1. Version 0.0.0 was a completely unrelated npm package.

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

npx rescript -h
npx rescript subcommand -h

Note the new CLI is still experimental, your feedback is welcome!


Very nice, thank you Bob!

Will bsconfig be renamed/aliased as well?
To resconfig.json or something? Seems like the only user-facing place with the old acronym still left.

We would like to do this. But it seems github used bsconfig.json to detect dependent projects which is really nice data https://github.com/rescript-lang/rescript-compiler/network/dependents?package_id=UGFja2FnZS01MDkxNjE5MDQ%3D

What do other people think

1 Like

Not sure how that works but it’ll be able to detect a rescript.json as well


Wait, isn’t github’s package dependency based on the actual npm dependency name? I don’t think this relies on bsconfig.json.

1 Like

Nice! :partying_face:
Will try it out.

Looks like package.json is used for the github depndency graph: https://docs.github.com/en/code-security/supply-chain-security/about-the-dependency-graph#supported-package-ecosystems


Nice! Definitely going to try this out.

Note in that case, both bsb and rescript need support bsconfig.json and resconfig.json to ensure the smooth transition since the dependencies may not get updated


Yeah, I’d expect to first look for e.g rescript.json, and if that doesn’t exist, bsconfig.json… we’d need to implement that in our IDE plugin as well, which is easy to do.


Note it is a bit tricker than I thought, since the build system also needs remember if it is bsconfig.json or rescript.json to trigger a rebuild if the config changed.
This is not the last one which has bs, remember we still have .bs.js, so I am planning to revisit this later