mlx-sys

Crates.iomlx-sys
lib.rsmlx-sys
version0.0.8
sourcesrc
created_at2024-01-25 12:55:17.663342
updated_at2024-07-13 07:30:46.330626
descriptionLow-level interface and binding generation for the mlx library
homepage
repositoryhttps://github.com/oxideai/mlx-rs
max_upload_size
id1113820
size333,638
David Chavez (dcvz)

documentation

README

mlx-sys

DO NOT USE. This is an experimental crate for testing right now, and it is not intended to be used directly. A separate safe wrapper crate will be created in the future.


Naming

  • Numeric types that are not in the rust standard library will use whatever the MLX library uses, eg. float16_t
  • Trivial C++ types, if not following the rust naming convention, will be renamed to follow the rust naming conventions. This includes enums and structs, eg. DeviceType::Cpu.
  • Opaque C++ types will use whatever the MLX library uses, eg. array.

Exception and Result

The overall strategy for catching exceptions and turning them into Rust errors is

  1. Ignore memory allocation exceptions. This is consistent with the behavior of Vec in rust.
  2. load_library or get_kernel, this would include all ops and usually indicates a problem with the library, so we should probably just let it panic
Commit count: 0

cargo fmt