[workspace]
members = [".", "crates/aprender-shell", "crates/aprender-tsp", "crates/aprender-monte-carlo"]
[workspace.lints.rust]
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "warn"
unreachable_pub = "warn"
missing_debug_implementations = "warn"
missing_docs = "allow"
rust_2018_idioms = { level = "warn", priority = -1 }
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
checked_conversions = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
inefficient_to_string = "warn"
explicit_iter_loop = "warn"
manual_ok_or = "warn"
explicit_deref_methods = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
redundant_closure_for_method_calls = "warn"
unnested_or_patterns = "warn"
used_underscore_binding = "warn"
many_single_char_names = "allow"
cast_precision_loss = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
similar_names = "allow"
doc_markdown = "allow"
missing_const_for_fn = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
return_self_not_must_use = "allow"
float_cmp = "allow"
unreadable_literal = "allow"
items_after_statements = "allow"
large_stack_arrays = "allow"
[package]
name = "aprender"
version = "0.16.0"
edition = "2021"
rust-version = "1.70"
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"]
[lints]
workspace = true
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"
rmp-serde = "1.3"
rand = "0.8"
rand_chacha = "0.3"
rayon = { version = "1.10", optional = true }
trueno = { version = "0.8.1", default-features = 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.2", optional = true }
hf-hub = { version = "0.4", optional = true, default-features = false, features = ["ureq"] }
dirs = { version = "6.0", optional = true }
[dev-dependencies]
proptest = "1.6"
criterion = "0.5"
renacer = "0.7"
tempfile = "3.14"
[features]
default = ["parallel"]
parallel = ["rayon"]
datasets = ["alimentar"]
format-compression = ["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"]
gpu = ["trueno/gpu"]
cpu-only = []
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
[[example]]
name = "shell_encryption_demo"
required-features = ["format-encryption"]
[profile.release]
lto = true
codegen-units = 1
debug = true