# Install mlton with Homebrew, dnf, MacPorts, Nix, pacman, apt

Whole-program, optimizing compiler for Standard ML. Version 20241230 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:mlton
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mlton
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mlton
```

  Evidence: MacPorts ports tree: lang/mlton/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install mlton
```

  Evidence: Fedora Rawhide package metadata: mlton from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mlton
```

  Evidence: nixpkgs package indexes: mlton from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S mlton
```

  Evidence: Arch Linux sync databases: mlton from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Ubuntu apt (92%):

```sh
sudo apt install mlton
```

  Evidence: Ubuntu 24.04 LTS package indexes: mlton from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

## Package facts

- **Package key:** brew:mlton
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/mlton>
- **Version:** 20241230
- **Source summary:** Whole-program, optimizing compiler for Standard ML
- **Homepage:** <http://mlton.org>
- **Repository:** <https://github.com/MLton/mlton>
- **Upstream docs:** <https://www.mlton.org/Documentation>
- **License:** HPND
- **Source archive:** <https://downloads.sourceforge.net/project/mlton/mlton/20241230/mlton-20241230.src.tgz>
- **Last updated:** 2026-06-22T14:05:30-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mllex (cli)
- mlnlffigen (cli)
- mlprof (cli)
- mlton (cli)
- mlyacc (cli)
- mllex (alias)
- mlnlffigen (alias)
- mlprof (alias)
- mlton (alias)
- mlyacc (alias)

## Dependencies

- gmp

## Build dependencies

- autoconf
- automake

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 20241230
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: http://mlton.org
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

MLton grew out of Standard ML compiler research in the late 1990s. The project history traces its start to April 1997, when Stephen Weeks wrote a defunctorizer for Standard ML and integrated it with SML/NJ. That origin explains the shape of the compiler: MLton is not an interactive SML environment, but a whole-program compiler that takes the complete program as input and uses that global view for optimization.

### Project history

The project became known in the Standard ML community for aggressive whole-program optimization and standalone native executables. Its own repository describes support for SML97, a complete Standard ML Basis Library, the ML Basis system, a C foreign-function interface, source-level profiling, mllex, mlyacc, and mlnlffigen. The implementation emphasizes small executables and runtime performance through unboxed representations, native arrays, GMP-backed arbitrary precision arithmetic, multiple code generators, and multiple garbage-collection strategies.

### How it is used

In package-manager terms, MLton occupies the serious native-code SML compiler niche alongside SML/NJ, Poly/ML, and MLKit rather than the lightweight scripting or teaching niche. It is used when SML code needs to be compiled into fast standalone programs, when whole-program analysis is useful, or when tools from the MLton distribution such as mllex, mlyacc, and mlprof are part of the workflow.

### Sources

- <http://mlton.org/History>
- <https://formulae.brew.sh/formula/mlton>
- <https://github.com/MLton/mlton>
- <https://icfpconference.org/archived/icfp2001/cristal.inria.fr/ICFP2001/Abstracts/48.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mlton
- **Version Scheme:** 1
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - mlton: normalized package name match | nixpkgs package indexes: mlton from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - mlton - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML | http://mlton.org/
- Ubuntu apt - mlton-basis - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-basis from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - basis library | http://mlton.org/
- Ubuntu apt - mlton-compiler - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-compiler from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - compiler | http://mlton.org/
- Ubuntu apt - mlton-doc - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - documentation | http://mlton.org/
- Ubuntu apt - mlton-runtime-native - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-runtime-native from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - native runtime libraries | http://mlton.org/
- Ubuntu apt - mlton-runtime-x86-64-linux-gnu - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-runtime-x86-64-linux-gnu from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - amd64 runtime libraries | http://mlton.org/
- Ubuntu apt - mlton-tools - 20210117+dfsg-3: normalized package name match | Ubuntu 24.04 LTS package indexes: mlton-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Optimizing compiler for Standard ML - tools | http://mlton.org/
- dnf - mlton - 20210117-12.fc44: normalized package name match | Fedora Rawhide package metadata: mlton from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Optimizing compiler for Standard ML | http://mlton.org/
- pacman - mlton - 20241230-1: normalized package name match | Arch Linux sync databases: mlton from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Whole-program optimizing Standard ML compiler | http://mlton.org/
- MacPorts - mlton: normalized package name match | MacPorts ports tree: lang/mlton/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [smlfmt](https://www.automicvault.com/pkg/brew/smlfmt/) - Shares av.db curated category or tags: cli, developer-tools, sml, standard-ml.
- [smlpkg](https://www.automicvault.com/pkg/brew/smlpkg/) - Shares av.db curated category or tags: cli, developer-tools, sml, standard-ml.
- [aarch64-elf-gcc](https://www.automicvault.com/pkg/brew/aarch64-elf-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [adaptivecpp](https://www.automicvault.com/pkg/brew/adaptivecpp/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [arm-none-eabi-gcc](https://www.automicvault.com/pkg/brew/arm-none-eabi-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [bunster](https://www.automicvault.com/pkg/brew/bunster/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [dtc](https://www.automicvault.com/pkg/brew/dtc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [foma](https://www.automicvault.com/pkg/brew/foma/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [cloog](https://www.automicvault.com/pkg/brew/cloog/) - Local package facts share a topical domain. Shared terms: cli, code, compiler, compilers, developer.

## Combined YAML source

View the package source record on GitHub. [combined/mlton.yml](https://github.com/automic-vault/db/blob/main/combined/mlton.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
