Multik on different platforms
Overview
Multik is a Kotlin Multiplatform library. You can use the same NDArray API across JVM, JS, Native, and WASM, and choose an execution engine that fits your target and performance needs.
Supported targets
Multik supports the major Kotlin targets:
JVM
JS
Native (iOS, macOS, Linux, Windows)
WASM
Target presets
The following target presets are supported:
Target platform | Target presets |
|---|---|
Kotlin/JVM |
|
iOS |
|
macOS |
|
Linux |
|
Windows |
|
JS |
|
WASM |
|
Engine availability by platform
Multik separates the API from execution engines:
DEFAULT chooses the best available engine at runtime.
KOTLIN is a pure Kotlin implementation and is the safest choice for portability.
NATIVE uses OpenBLAS for higher performance where available.
Target | Engines | Notes |
|---|---|---|
JVM | DEFAULT, KOTLIN, NATIVE (OpenBLAS) | NATIVE requires the OpenBLAS artifact. |
JS | KOTLIN | Browser and Node.js targets. |
WASM | KOTLIN | Kotlin/WASM targets. |
Native (desktop) | KOTLIN; NATIVE (OpenBLAS) on selected targets | OpenBLAS for desktop native targets ( |
Native (iOS) | KOTLIN | OpenBLAS is not available. |
For details such as Android ABI limits, see the platform pages below.
Multiplatform setup pattern
A common approach is:
Add
multik-coretocommonMain.Add engine dependencies per target:
multik-kotlinfor JS/WASM/Native, andmultik-defaultormultik-openblasfor JVM.
For dependency examples, see Installation.
Platform-specific guides
If you spot a typo or missing detail, please open a docs issue.