ocamlopt

The OCaml native code compiler. Produces native executables, e.g. ELF on Linux. More information: <https://ocaml.org>.

Install

All systems
curl cmd.cat/ocamlopt.sh
Debian Debian
apt-get install ocaml-nox
Ubuntu
apt-get install ocaml-nox
Alpine
apk add ocaml
Arch Arch Linux
pacman -S ocaml
image/svg+xml Kali Linux
apt-get install ocaml-nox
CentOS
yum install ocaml
Fedora
dnf install ocaml
Windows (WSL2)
sudo apt-get update sudo apt-get install ocaml-nox
OS X
brew install ocaml
Raspbian
apt-get install ocaml-nox
Docker
docker run cmd.cat/ocamlopt ocamlopt powered by Commando

The OCaml native code compiler. Produces native executables, e.g. ELF on Linux. More information: <https://ocaml.org>.

  • Compile a source file:
    ocamlopt -o path/to/binary path/to/source_file.ml
  • Compile with debugging enabled:
    ocamlopt -g -o path/to/binary path/to/source_file.ml

© tl;dr; authors and contributors