I'm quite new to OCaml and to the js_of_ocaml compiler in particular.
Did someone manage to compile the application which uses Jane Street Core with js_of_ocaml? I get lots of "missing primitives" warnings during the compilation, and then when I try to run it with node
they turn into an actual exceptions.
I understand that those are primitives which can't be ported from OCaml to JS
and that their implementation should depend on the application, but for core there is literally thousands of them, whereas my program only uses output to stdout
.
On a side note, I had trouble even compiling a simple "hello world" project, as IO functions weren't implemented in JS. Is there a "standard" JS file somewhere which could be used for this purpose? e.g. replacing caml_ml_output_char
with console.log
and other things, so that modules can be compiled to something useful without writing any custom javascript?