stedolan / malfunction

Malfunctional Programming
Other
338 stars 19 forks source link

Support for bytecode compilation #43

Closed stedolan closed 1 month ago

stedolan commented 3 months ago

Adds malfunction cmo foo.mlf to compile malfunction files to OCaml bytecode cmo files, for later linking with ocamlc.

Try with:

opam pin add malfunction https://github.com/stedolan/malfunction.git#bytecode-compilation
malfunction cmo program.mlf
ocamlc program.cmo -o program.byte
./program.byte

Like malfunction cmx, if the module being compiled has an OCaml signature (a mli file), you'll need to compile that with ocamlc -c module.mli first.