# 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 = "2021"
rust-version = "1.89"
name = "aprender-compute"
version = "0.51.0"
authors = ["Noah Gift <noah@paiml.com>"]
build = "build.rs"
exclude = [
    "target/",
    ".profraw",
    ".profdata",
    ".vscode/",
    ".idea/",
    ".pmat",
    "proptest-regressions",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance SIMD compute library with GPU support, LLM inference engine, and GGUF model loading (was: trueno)"
readme = "README.md"
keywords = [
    "simd",
    "gpu",
    "wasm",
    "performance",
    "vectorization",
]
categories = [
    "algorithms",
    "mathematics",
    "science",
]
license = "MIT"
repository = "https://github.com/paiml/aprender"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]

[package.metadata.release]
shared-version = true

[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = '## \[Unreleased\]'
replace = "## [{{version}}] - {{date}}"

[features]
chaos-basic = []
chaos-byzantine = ["chaos-basic"]
chaos-full = [
    "chaos-network",
    "chaos-byzantine",
]
chaos-network = ["chaos-basic"]
cuda = ["trueno-gpu/cuda"]
cuda-monitor = ["trueno-gpu/cuda"]
default = []
dhat-heap = ["dep:dhat"]
gpu = [
    "wgpu",
    "pollster",
    "bytemuck",
    "futures-intrusive",
]
gpu-wasm = [
    "wgpu",
    "bytemuck",
    "futures-intrusive",
    "wasm-bindgen-futures",
    "wasm-bindgen",
    "web-sys",
]
hardware-detect = ["dep:dirs"]
ml-tuner = []
parallel = ["rayon"]
presentar-tui = ["presentar-terminal"]
tracing = ["dep:tracing"]
tui-monitor = [
    "presentar-core",
    "presentar-terminal",
    "crossterm",
    "trueno-gpu",
    "dep:tracing",
    "tracing-subscriber",
    "tracing-appender",
    "dep:dirs",
]

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

[[example]]
name = "activation_functions"
path = "examples/activation_functions.rs"

[[example]]
name = "b4_fault_simulation"
path = "examples/b4_fault_simulation.rs"

[[example]]
name = "backend_detection"
path = "examples/backend_detection.rs"

[[example]]
name = "bench_profiling_primitives"
path = "examples/bench_profiling_primitives.rs"

[[example]]
name = "benchmark_matrix_suite"
path = "examples/benchmark_matrix_suite.rs"

[[example]]
name = "benchmark_matvec"
path = "examples/benchmark_matvec.rs"

[[example]]
name = "benchmark_matvec_parallel"
path = "examples/benchmark_matvec_parallel.rs"

[[example]]
name = "benchmark_parallel"
path = "examples/benchmark_parallel.rs"

[[example]]
name = "blis_benchmark"
path = "examples/blis_benchmark.rs"

[[example]]
name = "brick_profiler_v2"
path = "examples/brick_profiler_v2.rs"

[[example]]
name = "coop_gemm_bench"
path = "examples/coop_gemm_bench.rs"
required-features = ["gpu"]

[[example]]
name = "design_by_contract"
path = "examples/design_by_contract.rs"

[[example]]
name = "execution_graph"
path = "examples/execution_graph.rs"

[[example]]
name = "gpu_batch_demo"
path = "examples/gpu_batch_demo.rs"
required-features = ["gpu"]

[[example]]
name = "gpu_monitor_demo"
path = "examples/gpu_monitor_demo.rs"
required-features = [
    "gpu",
    "tui-monitor",
]

[[example]]
name = "gpu_tiled_reduction"
path = "examples/gpu_tiled_reduction.rs"
required-features = ["gpu"]

[[example]]
name = "hash_demo"
path = "examples/hash_demo.rs"

[[example]]
name = "inference_demo"
path = "examples/inference_demo.rs"

[[example]]
name = "matrix_operations"
path = "examples/matrix_operations.rs"

[[example]]
name = "ml_similarity"
path = "examples/ml_similarity.rs"

[[example]]
name = "ml_tuner_demo"
path = "examples/ml_tuner_demo.rs"

[[example]]
name = "ml_tuner_evolution"
path = "examples/ml_tuner_evolution.rs"

[[example]]
name = "model_tracing"
path = "examples/model_tracing.rs"

[[example]]
name = "perf_tui"
path = "examples/perf_tui.rs"

[[example]]
name = "performance_demo"
path = "examples/performance_demo.rs"

[[example]]
name = "profile_vocab"
path = "examples/profile_vocab.rs"

[[example]]
name = "quickstart"
path = "examples/quickstart.rs"

[[example]]
name = "regression_test"
path = "examples/regression_test.rs"

[[example]]
name = "simd_comparison"
path = "examples/simd_comparison.rs"

[[example]]
name = "simd_softmax_quant"
path = "examples/simd_softmax_quant.rs"

[[example]]
name = "symmetric_eigen"
path = "examples/symmetric_eigen.rs"

[[example]]
name = "tile_profiler_demo"
path = "examples/tile_profiler_demo.rs"

[[example]]
name = "tiled_reduction_demo"
path = "examples/tiled_reduction_demo.rs"

[[example]]
name = "tiling_demo"
path = "examples/tiling_demo.rs"

[[example]]
name = "tuner_usage"
path = "examples/tuner_usage.rs"

[[example]]
name = "vocab_bench"
path = "examples/vocab_bench.rs"

[[example]]
name = "wgpu_backward_demo"
path = "examples/wgpu_backward_demo.rs"
required-features = ["gpu"]

[[test]]
name = "backend_story"
path = "tests/backend_story.rs"

[[test]]
name = "chaos_tests"
path = "tests/chaos_tests.rs"

[[test]]
name = "cuda_edge_cases"
path = "tests/cuda_edge_cases/main.rs"

[[test]]
name = "cuda_edge_cases_legacy"
path = "tests/cuda_edge_cases_legacy/main.rs"

[[test]]
name = "falsification_tests"
path = "tests/falsification_tests/main.rs"

[[test]]
name = "falsification_tui"
path = "tests/falsification_tui.rs"

[[test]]
name = "fma_correctness_f017"
path = "tests/fma_correctness_f017.rs"

[[test]]
name = "golden_trace_validation"
path = "tests/golden_trace_validation.rs"

[[test]]
name = "hardware_canary"
path = "tests/hardware_canary/main.rs"

[[test]]
name = "integration_test"
path = "tests/integration_test/main.rs"

[[test]]
name = "numerical_stability_f092"
path = "tests/numerical_stability_f092.rs"

[[test]]
name = "pixel_fkr"
path = "tests/pixel_fkr/main.rs"

[[test]]
name = "pixel_fkr_legacy"
path = "tests/pixel_fkr_legacy/main.rs"

[[test]]
name = "smoke_e2e"
path = "tests/smoke_e2e.rs"

[[test]]
name = "tuner_falsification"
path = "tests/tuner_falsification/main.rs"

[[test]]
name = "wasm_optimization_tests"
path = "tests/wasm_optimization_tests.rs"

[[bench]]
name = "async_gpu_ops"
path = "benches/async_gpu_ops.rs"
harness = false
required-features = ["gpu"]

[[bench]]
name = "eigen_ops"
path = "benches/eigen_ops.rs"
harness = false

[[bench]]
name = "gemm_comparison"
path = "benches/gemm_comparison.rs"
harness = false

[[bench]]
name = "gpu_ops"
path = "benches/gpu_ops/main.rs"
harness = false
required-features = ["gpu"]

[[bench]]
name = "gpu_reduction"
path = "benches/gpu_reduction.rs"
harness = false
required-features = ["gpu"]

[[bench]]
name = "matrix_ops"
path = "benches/matrix_ops.rs"
harness = false

[[bench]]
name = "tiling_ops"
path = "benches/tiling_ops.rs"
harness = false

[[bench]]
name = "vector_ops"
path = "benches/vector_ops/main.rs"
harness = false

[dependencies.anyhow]
version = "1.0.100"

[dependencies.bytemuck]
version = "1.24"
features = ["derive"]
optional = true

[dependencies.chrono]
version = "0.4"

[dependencies.crossterm]
version = "0.28"
optional = true

[dependencies.dhat]
version = "0.3"
optional = true

[dependencies.dirs]
version = "5.0"
optional = true

[dependencies.futures-intrusive]
version = "0.5"
optional = true

[dependencies.num_cpus]
version = "1.17.0"

[dependencies.pollster]
version = "0.4"
optional = true

[dependencies.presentar-core]
version = "0.51.0"
optional = true
package = "aprender-present-core"

[dependencies.presentar-terminal]
version = "0.51.0"
optional = true
package = "aprender-present-terminal"

[dependencies.provable-contracts-macros]
version = "0.3"

[dependencies.rayon]
version = "1.11"
optional = true

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

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2.0.17"

[dependencies.toml]
version = "0.8"

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.tracing-appender]
version = "0.2"
optional = true

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
]
optional = true

[dependencies.trueno-gemm-codegen]
version = "0.51.0"
package = "aprender-gemm-codegen"

[dependencies.trueno-gpu]
version = "0.51.0"
optional = true
package = "aprender-gpu"

[dependencies.trueno-quant]
version = "0.51.0"
package = "aprender-quant"

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4"
optional = true

[dependencies.wgpu]
version = "27.0"
optional = true

[dev-dependencies.criterion]
version = "0.7"
features = ["html_reports"]

[dev-dependencies.faer]
version = "0.24"

[dev-dependencies.matrixmultiply]
version = "0.3"

[dev-dependencies.nalgebra]
version = "0.34"

[dev-dependencies.ndarray]
version = "0.17.2"

[dev-dependencies.proptest]
version = "1.9"

[dev-dependencies.regex]
version = "1.11"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt",
]

[build-dependencies.serde]
version = "1"
features = ["derive"]

[build-dependencies.serde_yaml_ng]
version = "0.10"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.hostname]
version = "0.4"

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = ["console"]
optional = true

[lints.rust]
unsafe_code = "allow"

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

[profile.dev]
panic = "abort"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
debug = 2

[profile.test]
opt-level = 1
incremental = true
