mlx-macros-burn 0.25.5

Procedural macros for mlx-rs-burn
Documentation

mlx-macros-burn

Crates.io Documentation License

Procedural macros for mlx-rs-burn.

Overview

This crate provides public procedural macros for mlx-rs-burn, including:

  • #[derive(ModuleParameters)] - Derive macro for neural network module parameters
  • Helper macros for defining MLX operations

Installation

This crate is automatically included as a dependency of mlx-rs-burn. You typically don't need to add it directly.

[dependencies]
# Just use mlx-rs-burn instead:
mlx-rs-burn = "0.25.4"

Available Macros

#[derive(ModuleParameters)]

Automatically implements parameter collection for neural network modules:

use mlx_macros::ModuleParameters;

#[derive(ModuleParameters)]
struct MyLayer {
    #[param]
    weights: Array,
    #[param]
    bias: Array,
}

Related Crates

Crate Description
mlx-rs-burn Safe Rust bindings for MLX
mlx-sys-burn Low-level FFI bindings
mlx-internal-macros-burn Internal macros
burn-mlx MLX backend for Burn

Upstream

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

License

MIT OR Apache-2.0