Cargo Features

[dependencies]
apr-cli = { version = "0.29.3", default-features = false, features = ["hf-hub", "code", "dev", "safetensors-compare", "inference", "cuda", "cuda-batch", "wgpu", "full", "visualization", "zram", "training", "training-gpu", "whisper", "dhat-heap", "trueno-explain"] }
default = hf-hub, inference, safetensors-compare, training, visualization, zram

crates.io install: minimal features (inspect, validate, lint, etc.)
Full features enabled locally via workspace Cargo.toml default-members

hf-hub default

Enables hf-hub-integration of aprender-core

Core aprender library

code full?

Enables batuta ^0.7

Sovereign coding assistant (apr code → batuta agent engine) — PMAT-182
GH-344: path dep via .cargo/config.toml.dev-overrides; CI uses checkout+symlink

dev

Enable apr mono subcommands (publish, shims, audit, archive)

Affects commands::mono

safetensors-compare default

Enables safetensors-compare of aprender-core

inference default cuda? full? wgpu? = axum, futures-util, realizar, tokio, trueno

Affects serve::handlers, serve::safetensors, routes::create_router, apr-cli::federation

cuda cuda-batch? full? = inference

Affects parity_03::run

cuda-batch full? = cuda
wgpu = inference

PMAT-335: WGPU backend for AMD/Intel/Apple GPU inference via Vulkan/Metal/WebGPU

full = code, cuda, cuda-batch, inference, training, training-gpu, visualization, zram
visualization default full? = renacer, trueno-viz
zram default full? = trueno-zram-core
training default full? training-gpu?

Enables entrenar

ML training engine: classification fine-tuning pipeline (--task classify)
ALB-007: parquet feature enables Parquet→LMBatch loading via alimentar

and entrenar-lora

ML tuning: LoRA/QLoRA configuration and memory planning (GH-176, PMAT-184)

Affects extended_commands::RunsCommands, extended_commands::ExperimentCommands

training-gpu full? = training
whisper = whisper-apr
dhat-heap

Enables dhat

Heap profiling (opt-in via --features dhat-heap)

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

realizar inference

Enables realizar

Inference engine (crates.io version, with local path for dev)
Note: cuda/gpu features hardcoded here because apr-cli code has ungated CUDA imports.
TODO: Gate all CUDA code in apr-cli with #[cfg(feature = "cuda")] then remove from here.
GH-344: path dep via .cargo/config.toml.dev-overrides; CI uses checkout+symlink

whisper-apr whisper?

Enables whisper-apr

Whisper speech recognition (GH-516: apr run --input audio.wav)
Zero external deps — our own implementation in ../whisper.apr GH-344: path dep via .cargo/config.toml.dev-overrides when available

trueno inference

Enables trueno

SIMD compute library (for BrickProfiler in §12.11 unified profiling)
MUST use crates.io version to match aprender's trueno dependency 2026-04-05 PMAT-507: bumped 0.16.0→0.17 to match aprender root Cargo.toml (was diamond dep)

tokio inference

Enables tokio

Async runtime for server

axum inference

Enables axum ^0.7

HTTP server (for serve command with inference feature)

futures-util inference

Enables futures-util

Async streams for SSE

renacer visualization

Enables renacer

Visualization (syscall tracing and charts)

trueno-viz visualization
trueno-zram-core zram

Enables trueno-zram-core

ZRAM compression (SIMD-accelerated LZ4/ZSTD)

trueno-explain implicit feature

Enables trueno-explain

PTX analysis and bug detection (trueno-explain: PtxAnalyzer + PtxBugAnalyzer)