OCaml Bytecode Portability

I compile the OCaml program in bytecode on the x86 machine and pass the bytecode to the ppc64 machine. Assuming the ppc64 machine has ocamlrun (compiled for ppc64), can I run my program on ppc64 architecture? It's simple?

In other words, is the bytecode content resistant?

If not, what is the purpose of the bytecode?

+4
source share
1 answer

I assume that you do not need any external function; otherwise, of course, you need binary code.

Yes, the bytecode is resistant to content (and word size) for systems supported by Ocaml.

( - ocamlrun Pervasives, , - Ocaml 4.01 Ocaml 4.02 runtime , YMMV)

, Ocaml , ( boot/ ...) ocamlc - -.

Ocaml , Ocaml Ocaml .

J.Pitrat -, , , boot/ocamlc Ocaml. Ocaml make bootstrap ( , - boot/ocamlc).

+8

Source: https://habr.com/ru/post/1624457/


All Articles