Moves directories and files to
/tmp
for faster execution thanrm -rf
To finally get a native reason program running in 2022.
# Provide a mixed list of directories and/or files
$ mvf node_modules dist tmp-file.txt
- Ensure you have
esy
installed and available globally
$ pnpm i --global esy
- Bootstrap with
esy
$ esy
To emit the executable we use esy
to run dune
to get the right resolutions to the reason libraries we link in the dune
file.
$ esy dune build
This will compile source into an executable to ./_esy/default/build/default/src/Main.exe
— mirroring the src
directory structure.
For full OS permissions, run the built executable directly instead of using esy
$ ./_esy/default/build/default/src/Main.exe node_modules dist
The following command will execute the program with esy
, but this is a sandboxed environment and will not allow the program to have filesystem access.
$ esy b dune exec ./src/Main.exe