$ esy i
$ esy b
$ esy ./run.sh
$ open index.html
Open console and see the "4" printed.
Few notes:
- Had to copy & patch the
runtime.js
from the jsoo-compiler. Specifically in the end of file:// module.exports = global.jsoo_runtime; module.exports = global;
Test.js
is emitted withrequire("List_.js")
while I would expect it to berequire("List.js")
(no trailing underscore).Pervasives.js
requires some of OCaml's builtins as js files. Had to hack it with empty modules