@amamo/mdx
On This Page

Native targets

The published package loads one napi-rs binary selected from the current operating system, architecture, and Linux libc. No JavaScript or WASI implementation is bundled.

Supported targets

Rust targetPlatform packageRuntime
aarch64-apple-darwin@amamo/mdx-darwin-arm64macOS arm64
x86_64-apple-darwin@amamo/mdx-darwin-x64macOS x64
aarch64-unknown-linux-gnu@amamo/mdx-linux-arm64-gnuLinux arm64 glibc
x86_64-unknown-linux-gnu@amamo/mdx-linux-x64-gnuLinux x64 glibc
aarch64-unknown-linux-musl@amamo/mdx-linux-arm64-muslLinux arm64 musl
x86_64-unknown-linux-musl@amamo/mdx-linux-x64-muslLinux x64 musl
x86_64-pc-windows-msvc@amamo/mdx-win32-x64-msvcWindows x64

When the binding loads

createCompiler() normalizes the config and may initialize Shiki without loading Rust. The matching native binary loads lazily on the first build() or transform(). Its platform package must have the exact same version as the root package.

Top-level errorMeaning
AMAMO_NATIVE_UNSUPPORTEDThe OS or CPU has no known target mapping.
AMAMO_NATIVE_UNAVAILABLEThe target is known, but neither local nor packaged binding loaded.

A package version mismatch appears as AMAMO_NATIVE_VERSION_MISMATCH inside the AMAMO_NATIVE_UNAVAILABLE aggregate cause, not as the top-level loader error.

If installation succeeded on another machine, reinstall dependencies on the current target. Package manager caches are safe; a copied node_modules directory is not.

Node.js requirement

The root and platform packages require Node.js 20.19 or newer.

Shiki does not replace the native binding

highlight.engine only changes how fenced code is highlighted. Choosing javascript does not provide a JavaScript fallback for MDX compilation; the application still needs one of the matching platform packages above. See Configuration for highlighting options.

Copyright © 2026 白熱.