Safe, ergonomic Rust API for MLX tensors and operations.
mlx-core provides the foundational types (Tensor, Device, DType, Shape)
and a backend-agnostic interface for lazy tensor computation.
Architecture
Operations on tensors build a lazy computation graph. Calling eval() (or
to_vec_f32()) triggers a topological walk that dispatches each node to the
active Backend. A default CPU reference backend is provided out of the box.
Backends
- Built-in CPU reference: simple, safe Rust — always available
ffifeature: delegates to the MLX C++ runtime viamlx-sysmlx-cpucrate: optimized pure-Rust CPU backend (future)mlx-metalcrate: native Apple Silicon acceleration (future)