# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.86"
name = "pmetal-models"
version = "0.4.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "LLM model architectures for PMetal"
readme = "README.md"
keywords = [
    "machine-learning",
    "llm",
    "fine-tuning",
    "apple-silicon",
    "mlx",
]
categories = [
    "science",
    "algorithms",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/epistates/pmetal"
resolver = "2"

[features]
ane = [
    "pmetal-metal/ane",
    "pmetal-core/ane",
]
default = ["ane"]

[lib]
name = "pmetal_models"
path = "src/lib.rs"

[dependencies.json5]
version = "1.3.0"

[dependencies.mlx-rs]
version = "0.25.8"
features = ["safetensors"]
package = "pmetal-mlx-rs"

[dependencies.mlx-sys]
version = "=0.2.4"
package = "pmetal-mlx-sys"

[dependencies.pmetal-core]
version = "0.4.0"
default-features = false

[dependencies.pmetal-gguf]
version = "0.4.0"

[dependencies.pmetal-metal]
version = "0.4.0"
default-features = false

[dependencies.pmetal-mlx]
version = "0.4.0"

[dependencies.safetensors]
version = "0.7"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2"

[dependencies.tracing]
version = "0.1"

[dev-dependencies.serial_test]
version = "3.2"

[dev-dependencies.tempfile]
version = "3"

[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"

[target.'cfg(target_os = "macos")'.dependencies.objc2-metal]
version = "0.3"
features = [
    "MTLDevice",
    "MTLCommandQueue",
    "MTLCommandBuffer",
    "MTLCommandEncoder",
    "MTLComputeCommandEncoder",
    "MTLComputePipeline",
    "MTLLibrary",
    "MTLBuffer",
    "MTLResource",
    "MTLEvent",
    "MTLFence",
]

[lints.clippy]
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust]
unsafe_code = "deny"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(kani)"]
