Most of the primitives from the standard library are already implemented and loaded by default.
js_of_ocaml jsfile.js a.byte
See the runtime files chapter for how to discover runtime files.
- //Provides is used to declare a primitive; an annotation
can be used to specify the possible side-effects of the primitive:
- const means no side-effect; mutable indicates that the primitive has no side-effect but that other primitives might affect the returned value of the primitive; when no annotation is provided, the linker assumes that the primitive may have side-effects.
- //Requires is used if other primitives need to be loaded first
- version_constraint looks like "< 4.12.0"