[package]
name = "aprender-core"
version.workspace = true
edition = "2021"
rust-version = "1.89"
authors = ["Noah Gift <noah@paiml.com>"]
license = "MIT"
description = "Next-generation machine learning library in pure Rust"
repository = "https://github.com/paiml/aprender"
documentation = "https://docs.rs/aprender"
readme = "README.md"
keywords = ["machine-learning", "classification", "clustering", "statistics", "graph-algorithms"]
categories = ["science", "algorithms"]
exclude = [
"target/",
"*.profraw",
"*.profdata",
".vscode/",
".idea/",
"proptest-regressions/",
".pmat/",
".pmat-metrics/",
".pmat-metrics.toml",
"*.bak",
".github/",
".githooks/",
".bashrsignore",
"Makefile",
"scripts/",
"docs/",
"book/",
"golden_traces/",
"tokenizer.json",
"defect-report-*.json",
"trace_*.json",
"fuzz/",
"/models/",
"contracts/chat-template-semantics-v1.yaml",
"contracts/classification-finetune-v1.yaml",
"contracts/kernel-fusion-v1.yaml",
"contracts/layer-parity-v1.yaml",
"contracts/model-metadata-bounds-v1.yaml",
"contracts/quantized-dot-product-v1.yaml",
"contracts/special-tokens-registry-v1.yaml",
"contracts/tensor-layout-v1.yaml",
"contracts/tokenizer-vocab-v1.yaml",
"contracts/publish-safety-v1.yaml",
]
[lib]
name = "aprender"
[lints]
workspace = true
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"
rmp-serde = "1.3"
tempfile = "3.14"
rand = { version = "0.9", features = ["small_rng"] }
rand_chacha = "0.9"
rustfft = { version = "6.2", optional = true }
thiserror = { version = "2.0", optional = true }
alsa = { version = "0.9", optional = true }
rayon = { version = "1.10", optional = true }
batuta-common = "0.1"
trueno = "0.17"
trueno-quant = "0.1"
trueno-rag = { version = "0.2", optional = true }
lz4_flex = { version = "0.11", optional = true }
zstd = { version = "0.13", optional = true }
half = { version = "2.4", optional = true, default-features = false, features = ["std"] }
ed25519-dalek = { version = "2.1", optional = true, default-features = false, features = ["std", "zeroize", "rand_core"] }
aes-gcm = { version = "0.10", optional = true }
argon2 = { version = "0.5", optional = true, default-features = false, features = ["std"] }
x25519-dalek = { version = "2.0", optional = true, default-features = false, features = ["static_secrets"] }
hkdf = { version = "0.12", optional = true }
sha2 = { version = "0.10", optional = true }
alimentar = { version = "0.2.8", optional = true }
trueno-zram-core = { version = "0.3.0", optional = true }
hf-hub = { version = "0.4", optional = true, default-features = false, features = ["ureq"] }
dirs = { version = "6.0", optional = true }
ureq = { version = "2.12", optional = true, features = ["json"] }
safetensors = { version = "0.4", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true }
minijinja = { version = "2.14.0", features = ["loader", "serde"] }
provable-contracts-macros = "0.3"
[build-dependencies]
serde = { version = "1", features = ["derive"] }
serde_yaml_ng = "0.10"
[dev-dependencies]
proptest = "1.6"
criterion = { workspace = true }
renacer = "0.10"
tempfile = "3.14"
jugar-probar = "0.5"
ctrlc = "3.4"
provable-contracts = "0.3"
entrenar = "0.7"
[features]
default = ["parallel"]
parallel = ["rayon"]
datasets = ["alimentar"]
format-compression = ["lz4_flex", "zstd"]
format-signing = ["ed25519-dalek"]
format-encryption = ["aes-gcm", "argon2", "x25519-dalek", "hkdf", "sha2"]
format-quantize = ["half"]
format-homomorphic = []
hf-hub-integration = ["hf-hub", "dirs", "ureq", "sha2"]
audio = ["rustfft", "thiserror"]
audio-capture = ["audio"]
audio-alsa = ["audio-capture", "alsa"]
audio-coreaudio = ["audio-capture"]
audio-wasapi = ["audio-capture"]
audio-webaudio = ["audio-capture"]
audio-playback = ["audio"]
audio-codec = ["audio"]
audio-noise = ["audio"]
audio-noise-wasm = ["audio-noise", "wasm-bindgen", "js-sys"]
safetensors-compare = ["safetensors", "hf-hub-integration", "half"]
rag = ["trueno-rag"]
gpu = ["trueno/gpu"]
model-tests = []
cuda = ["trueno/cuda-monitor"]
cpu-only = []
showcase-profile = []
showcase-zram = ["trueno-zram-core"]
explainable-monitor-integration = []
chaos-basic = []
chaos-network = ["chaos-basic"]
chaos-byzantine = ["chaos-basic"]
chaos-full = ["chaos-network", "chaos-byzantine"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
memmap2 = "0.9"
[[test]]
name = "book"
path = "tests/book/mod.rs"
[[bench]]
name = "linear_regression"
harness = false
[[bench]]
name = "kmeans"
harness = false
[[bench]]
name = "dataframe"
harness = false
[[bench]]
name = "graph"
harness = false
[[bench]]
name = "recommend"
harness = false
[[bench]]
name = "citl"
harness = false
[[bench]]
name = "bpe"
harness = false
[[bench]]
name = "ollama_parity"
harness = false
required-features = ["format-quantize"]
[[example]]
name = "shell_encryption_demo"
required-features = ["format-encryption"]
[[example]]
name = "chat_template"
[[example]]
name = "text_preprocessing"
[[example]]
name = "time_series_forecasting"
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = "none"
debug = true
[profile.dev]
lto = false
panic = "abort"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]
targets = ["x86_64-unknown-linux-gnu"]
[package.metadata.release]
sign-commit = false
sign-tag = false
push = true
publish = true
shared-version = true
tag-name = "v{{version}}"
pre-release-commit-message = "release: aprender v{{version}}"
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "## \\[Unreleased\\]"
replace = "## [{{version}}] - {{date}}"