Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

As a Rust Library

Add mdka to your Cargo.toml:

[dependencies]
mdka = "3"

That is the only step. mdka has no system dependencies.

Minimum Supported Rust Version: 1.88 (2024 Edition)

As a CLI Binary

Download a prebuilt binary — no Rust toolchain needed — from the latest release. Which platforms have one, and the exact archive name for each, is listed in the README’s Quick Start; that table is the single source, so it is linked here rather than repeated.

The Linux x64 glibc archive is built against glibc 2.17 — the same floor the npm bindings and Python wheels below promise — so it starts on any distribution with glibc 2.17 or newer, including Ubuntu 20.04, Debian 11 and RHEL 8. The two musl archives are statically linked and have no glibc requirement.

Or install directly with cargo, which builds for whatever platform you are on:

cargo install mdka-cli

Or build from source using the mdka-cli crate in the workspace:

git clone https://github.com/nabbisen/mdka-rs
cd mdka-rs
cargo build --release -p mdka-cli
# Binary: ./target/release/mdka

As a Node.js Package

npm install mdka
# or
yarn add mdka

Requires Node.js 16 or later.

Prebuilt native bindings are published for six platforms, resolved automatically through optionalDependencies:

PlatformPackage
Linux x64 (glibc)@mdka/lib-linux-x64-gnu
Linux x64 (musl, e.g. Alpine)@mdka/lib-linux-x64-musl
Linux arm64 (glibc)@mdka/lib-linux-arm64-gnu
Linux arm64 (musl)@mdka/lib-linux-arm64-musl
macOS Apple Silicon@mdka/lib-darwin-arm64
Windows x64 (MSVC)@mdka/lib-win32-x64-msvc

The two glibc bindings are built against glibc 2.17 — the same floor the Python wheels below advertise — so any distribution with glibc 2.17 or newer can load them. That covers everything from CentOS 7 onward, including Ubuntu 20.04, Debian 11 and RHEL 8. The musl bindings link musl statically and have no glibc requirement at all.

On any other platform — macOS Intel, Windows ARM, and architectures such as 32-bit ARM or RISC-V — there is no fallback inside the package. npm install succeeds there, because a native package that does not match the platform is skipped by design, and require('mdka') then fails with an error that names the platform, lists the six above and points back to this page. The published tarball contains five files (index.js, index.d.ts, loader.js, package.json, README.md) and no Rust source, so npm run build cannot work from an installed copy: there is nothing to build, and the napi toolchain is a development dependency that is not installed for consumers.

What does work on those platforms:

  • Build the binding from the repository — clone nabbisen/mdka-rs, then cd node && npm install && npm run build, which needs a Rust toolchain. This produces a local binding; it does not make npm install mdka work elsewhere.
  • Use the CLI instead: cargo install mdka-cli, which builds from source for whatever platform you are on.
  • Use the Rust crate directly, if the surrounding project allows it.

As a Python Package

pip install mdka

Requires CPython 3.10 or later.

Pre-built wheels are published for CPython on these platforms. Each wheel uses Python’s stable ABI, so one wheel serves every CPython from 3.10 upward, including versions released after it:

PlatformWheel tag
Linux x86_64, glibc 2.17 or latermanylinux_2_17_x86_64
Linux aarch64, glibc 2.17 or latermanylinux_2_17_aarch64
Linux x86_64, musl 1.2 or later (e.g. Alpine)musllinux_1_2_x86_64
Linux aarch64, musl 1.2 or latermusllinux_1_2_aarch64
Windows x64win_amd64
macOS on Apple silicon, 11.0 or latermacosx_11_0_arm64

Other interpreters — PyPy, free-threaded CPython — and other platforms have no wheel. pip install mdka there falls back to the source distribution, which needs a Rust toolchain to build. On free-threaded CPython that build works, but mdka requires the GIL: Python re-enables it when mdka is imported, and emits a RuntimeWarning saying so. To build from source on purpose: pip install mdka --no-binary mdka with Rust installed.

These apply from mdka 2.3.0. On CPython 3.8 or 3.9, pip does not offer 2.3.0 or later and installs the latest 2.2.x release instead.