Introduction into OcamlNet
 Component "netstring"
 Component "cgi"
General hints
General hints

Compiling programs that use OcamlNet

Thanks to the findlib package manager it is quite simple to compile programs that use OcamlNet components. For example, to byte-compile that uses the netstring component, one has to execute the following command:

ocamlfind ocamlc -package netstring -c

For the final link step, the command looks like this one:

ocamlfind ocamlc -package netstring -linkpkg -o sample sample.cmo

You can get more information about findlib here, and in the quickstart guide.

How to reduce the size of executables

This was a problem for ocamlnet up to version 0.95. In 0.96, the big conversion tables are usually loaded at runtime when needed, so the old tricks are no longer applicable.