ml-explore/mlx-c

C API for MLX

238

stars

156

commits

C++

primary language

Sep 3, 2026

updated

ml-explore.github.io/mlx-c
mlx

README

MLX C

MLX C is a C API for MLX.

MLX is an array framework for machine learning on Apple silicon. MLX C expands MLX to the C language, making research and experimentation easier on Apple silicon.

MLX C can be used standalone or as a bridge to bind other languages to MLX. For example, the MLX Swift package uses MLX C to provide a Swift API to MLX.

For more information see the docs.

Install

CMake is required to build MLX C. You can install it with Homebrew:

brew install cmake

To build, run the following commands:

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

From the build/ directory, you can run an example that uses MLX C with ./example.

Contributing

Check out the contribution guidelines for more information on contributing to MLX C. See the docs for more information on building from source, and running tests.

We are grateful for all of our contributors. If you contribute to MLX C and wish to be acknowledged, please add your name to the list in your pull request.

Contributors

andresy

116 commits

awni

14 commits

stemann

9 commits

davidkoski

8 commits

ml-explore/mlx-c

C API for MLX

238

stars

156

commits

C++

primary language

Sep 3, 2026

updated

ml-explore.github.io/mlx-c
mlx

README

MLX C

MLX C is a C API for MLX.

MLX is an array framework for machine learning on Apple silicon. MLX C expands MLX to the C language, making research and experimentation easier on Apple silicon.

MLX C can be used standalone or as a bridge to bind other languages to MLX. For example, the MLX Swift package uses MLX C to provide a Swift API to MLX.

For more information see the docs.

Install

CMake is required to build MLX C. You can install it with Homebrew:

brew install cmake

To build, run the following commands:

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

From the build/ directory, you can run an example that uses MLX C with ./example.

Contributing

Check out the contribution guidelines for more information on contributing to MLX C. See the docs for more information on building from source, and running tests.

We are grateful for all of our contributors. If you contribute to MLX C and wish to be acknowledged, please add your name to the list in your pull request.

Contributors

andresy

116 commits

awni

14 commits

stemann

9 commits

davidkoski

8 commits

Languages

C++

61.9%

C

21.0%

Python

16.3%