Libmir Archive
Community documentation archive for Mir — the D language numerical computing library ecosystem.
Unofficial archive
This site is a community-maintained archive, not the official Mir project. Content is derived from the open-source libmir GitHub organization under Apache-2.0. Maintainer 9il stated in issue #481 that the community is free to host docs elsewhere — this is that effort.
What is Mir?
Mir is a collection of D language libraries for numerical computing, scientific programming, and high-performance data manipulation. Originally developed by Ilia Ki (9il) and contributors, Mir provides:
- ndslice — N-dimensional array slices with NumPy-like semantics
- Algebraic types — Type-safe tagged unions and variants
- Optimization — Nonlinear least-squares and gradient-based solvers
- Serialization — Fast ION binary and JSON I/O
- Random — High-quality statistical distributions
- BetterC support — Core libraries work without the D runtime or GC
Library index
mir-algorithm
ndslice, functional iteration, multidimensional arrays. The core Mir library.
mir-core
Algebraic types, sumtype, universal reflection, basic math.
mir-random
Random number generation and statistical distributions.
mir-optim
Optimization algorithms: nonlinear least-squares, L-BFGS.
mir-ion
Fast ION binary / JSON serialization for D.
Tutorials
Guides: ndslice vs NumPy, BetterC programming, numerical computing in D.
Quick status
| Library | Last commit | DUB latest | Status |
|---|---|---|---|
| mir-algorithm | Feb 2026 | v3.22.4 | Active |
| mir-core | Feb 2026 | latest | Active |
| mir-random | Jun 2026 | latest | Active |
| mir-optim | May 2025 | latest | Active |
| mir-ion | Nov 2025 | latest | Active |
| lubeck | Jul 2023 | — | Dormant |
Getting started
Add any Mir library to a DUB project:
// dub.sdl
dependency "mir-algorithm" version="~>3.0"
dependency "mir-core" version="~>1.0"Or with dub.json:
{
"dependencies": {
"mir-algorithm": "~>3.0",
"mir-core": "~>1.0"
}
}