# 使用 Homebrew, dnf, MacPorts, Nix, pacman, apt 安装 mlton

查看 mlton 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mlton
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mlton
```

  证据: 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
```

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

- Nix (92%):

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

  证据: 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
```

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:mlton
- **软件包管理器:** Homebrew
- **版本:** 20241230
- **来源摘要:** Whole-program, optimizing compiler for Standard ML
- **主页:** <http://mlton.org>
- **仓库:** <https://github.com/MLton/mlton>
- **最后更新:** 2026-06-22T14:05:30-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mllex (别名)
- mlnlffigen (别名)
- mlprof (别名)
- mlton (别名)
- mlyacc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 20241230
## 项目历史与用法

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.

### 项目历史

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.

### 使用方式

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.

### 来源

- <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>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- 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-13.fc45: normalized package name match | Fedora Rawhide package metadata: mlton from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## Combined YAML source

View the package source record on GitHub. [combined/mlton.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mlton.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
