![]() Introduction into OcamlNet
|
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 sample.ml that uses the netstring component, one has to execute the following command: ocamlfind ocamlc -package netstring -c sample.mlFor the final link step, the command looks like this one: ocamlfind ocamlc -package netstring -linkpkg -o sample sample.cmoYou can get more information about findlib here, and in the quickstart guide. How to reduce the size of executables By default, the Netstring component adds a large number of conversion tables to programs, no matter whether they are used or not. This increases the size of the programs by approximately 150 KB. Instead of adding all conversion tables, it is possible to select subsets as follows:
|