[package]
edition = "2021"
rust-version = "1.81.0"
name = "mlx-native"
version = "0.1.2"
authors = ["mlx-native contributors"]
build = false
exclude = [
".claude/",
"_bmad/",
"_bmad-output/",
"docs/",
".github/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Pure-Rust Metal GPU compute library for MLX-compatible inference on Apple Silicon"
homepage = "https://github.com/robertelee78/mlx-native"
documentation = "https://docs.rs/mlx-native"
readme = "README.md"
keywords = [
"metal",
"gpu",
"mlx",
"inference",
"apple-silicon",
]
categories = [
"os::macos-apis",
"science",
]
license = "MIT"
repository = "https://github.com/robertelee78/mlx-native"
[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
]
all-features = true
[package.metadata.release]
pre-release-hook = [
"cargo",
"semver-checks",
]
tag-prefix = "v"
tag-name = "{{prefix}}{{version}}"
push-remote = "origin"
[lib]
name = "mlx_native"
path = "src/lib.rs"
[[test]]
name = "bench_sdpa_tq"
path = "tests/bench_sdpa_tq.rs"
[[test]]
name = "test_argmax"
path = "tests/test_argmax.rs"
[[test]]
name = "test_argsort"
path = "tests/test_argsort.rs"
[[test]]
name = "test_batch_kernels"
path = "tests/test_batch_kernels.rs"
[[test]]
name = "test_copy"
path = "tests/test_copy.rs"
[[test]]
name = "test_dense_gemm"
path = "tests/test_dense_gemm.rs"
[[test]]
name = "test_elementwise"
path = "tests/test_elementwise.rs"
[[test]]
name = "test_embedding"
path = "tests/test_embedding.rs"
[[test]]
name = "test_flash_attn_vec"
path = "tests/test_flash_attn_vec.rs"
[[test]]
name = "test_flash_attn_vec_tq"
path = "tests/test_flash_attn_vec_tq.rs"
[[test]]
name = "test_fused_ops"
path = "tests/test_fused_ops.rs"
[[test]]
name = "test_gather"
path = "tests/test_gather.rs"
[[test]]
name = "test_gather_bench"
path = "tests/test_gather_bench.rs"
[[test]]
name = "test_gelu"
path = "tests/test_gelu.rs"
[[test]]
name = "test_graph"
path = "tests/test_graph.rs"
[[test]]
name = "test_hadamard"
path = "tests/test_hadamard.rs"
[[test]]
name = "test_hadamard_quantize_kv"
path = "tests/test_hadamard_quantize_kv.rs"
[[test]]
name = "test_kv_cache"
path = "tests/test_kv_cache.rs"
[[test]]
name = "test_moe_dispatch"
path = "tests/test_moe_dispatch.rs"
[[test]]
name = "test_moe_gate"
path = "tests/test_moe_gate.rs"
[[test]]
name = "test_quantized_matmul"
path = "tests/test_quantized_matmul.rs"
[[test]]
name = "test_quantized_matmul_ggml"
path = "tests/test_quantized_matmul_ggml.rs"
[[test]]
name = "test_quantized_matmul_id"
path = "tests/test_quantized_matmul_id.rs"
[[test]]
name = "test_quantized_matmul_id_ggml"
path = "tests/test_quantized_matmul_id_ggml.rs"
[[test]]
name = "test_rms_norm"
path = "tests/test_rms_norm.rs"
[[test]]
name = "test_rms_norm_no_scale_f32"
path = "tests/test_rms_norm_no_scale_f32.rs"
[[test]]
name = "test_rope"
path = "tests/test_rope.rs"
[[test]]
name = "test_rope_neox_f32"
path = "tests/test_rope_neox_f32.rs"
[[test]]
name = "test_sampling"
path = "tests/test_sampling.rs"
[[test]]
name = "test_sdpa"
path = "tests/test_sdpa.rs"
[[test]]
name = "test_softcap"
path = "tests/test_softcap.rs"
[[test]]
name = "test_softmax"
path = "tests/test_softmax.rs"
[[test]]
name = "test_transpose_extended"
path = "tests/test_transpose_extended.rs"
[[test]]
name = "test_turboquant"
path = "tests/test_turboquant.rs"
[[bench]]
name = "bench_gather"
path = "benches/bench_gather.rs"
harness = false
[[bench]]
name = "bench_hadamard"
path = "benches/bench_hadamard.rs"
harness = false
[[bench]]
name = "bench_moe_dispatch"
path = "benches/bench_moe_dispatch.rs"
harness = false
[[bench]]
name = "bench_quantized_matmul"
path = "benches/bench_quantized_matmul.rs"
harness = false
[[bench]]
name = "bench_sdpa"
path = "benches/bench_sdpa.rs"
harness = false
[dependencies.bytemuck]
version = "1"
features = ["derive"]
[dependencies.half]
version = "2"
features = ["bytemuck"]
[dependencies.memmap2]
version = "0.9"
[dependencies.metal]
version = "0.33"
[dependencies.objc]
version = "0.2"
[dependencies.safetensors]
version = "0.7"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]
[dev-dependencies.static_assertions]
version = "1"