mlx-sys-burn

Crates.iomlx-sys-burn
lib.rsmlx-sys-burn
version0.2.2
created_at2025-12-31 08:26:31.27736+00
updated_at2025-12-31 09:05:14.139223+00
descriptionLow-level interface and binding generation for the mlx library (fork with additional operations for burn-mlx)
homepage
repositoryhttps://github.com/TuringWorks/mlx-rs
max_upload_size
id2014239
size606,931
ravituringworks (ravituringworks)

documentation

README

mlx-sys-burn

Crates.io Documentation License

Low-level Rust FFI bindings to Apple's mlx-c API, generated using bindgen.

This is a fork of mlx-sys published to enable burn-mlx on crates.io.

Overview

This crate provides:

  • Raw FFI bindings to mlx-c (the C API for MLX)
  • Build script that compiles mlx-c from source
  • Automatic linking to Metal and Accelerate frameworks

Installation

[dependencies]
mlx-sys-burn = "0.2.1"

Feature Flags

Feature Default Description
metal Yes Enable Metal GPU support
accelerate Yes Enable Accelerate framework for optimized CPU operations

Usage

This crate provides raw FFI bindings. You typically don't use it directly.

For a safe, idiomatic Rust interface, use mlx-rs-burn:

[dependencies]
mlx-rs-burn = "0.25.4"

Build Requirements

  • macOS 13.3+ (Ventura or later)
  • Apple Silicon (M1/M2/M3/M4)
  • Xcode Command Line Tools
  • CMake
  • Rust 1.82+

The build script will automatically:

  1. Clone and build mlx-c
  2. Generate Rust bindings using bindgen
  3. Link against the compiled library

Related Crates

Crate Description
mlx-rs-burn Safe Rust bindings (use this!)
mlx-macros-burn Procedural macros
mlx-internal-macros-burn Internal macros
burn-mlx MLX backend for Burn

Upstream

Fork of mlx-sys from oxideai/mlx-rs.

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt