Currently, as per the install script, the supported platforms for ReScript are: macOS, Linux, Windows, FreeBSD and OpenBSD.
With the recently completed CI work, we will be able to provide prebuilt and tested binaries for
- macOS Intel
- macOS ARM
- Linux x86-64
- Windows x86-64
On postinstall of the rescript
npm package, the install script mentioned above checks if a prebuilt binary is available. If not, it will try to build from scratch:
- Ninja (from vendored sources)
- OCaml (from vendored sources)
- The ReScript compiler binaries
IMHO building from source in postinstall for “exotic” platforms (for which no prebuilt binaries are available at the moment) has the following disadvantages:
- Installation of the
rescript
package takes a long time. - We can not be sure if it actually works. I do not know if anyone is regularly testing installations for e.g. FreeBSD or OpenBSD. In my experience, if something is not tested by CI, there is a high likelihood that it has already stopped working some time ago.
- Even if still working in principle and even though only (I think) a C compiler, make and python are required as prerequisites for the postinstall script, there is a good chance that the build/installation may fail on some machines because of a local setup issue.
- Due to the imposed limitations (minimal dependencies), the install scripts IMHO bring a lot of complexity/restrictions to the project setup. E.g., we cannot fully move to a dune-only setup for building the compiler binaries if the install scripts are not using dune, but a homegrown ninja setup instead.
So my idea was:
- Let’s find out which platforms the community actually wants/needs us to support in addition to the ones CI is already building binaries for. E.g., I think there was some interest in Linux ARM. But is anyone actually using FreeBSD/OpenBSD?
- Get CI builds for those platforms running so that we get prebuilt, tested binaries for them.
- Simplify the install scripts to always use those prebuilt binaries.
- Be able to simplify the project setup without being restricted by the postinstall process.
What do you think?
Which platforms are you actually using or planning to use?
- macOS x86-64
- macOS ARM
- Linux x86-64
- Linux ARM
- Windows x86-64
- Windows ARM
- FreeBSD
- OpenBSD
- NixOS
- Other (please specify)
0 voters