Cargo Features

[dependencies]
aprender = { version = "0.27.4", default-features = false, features = ["parallel", "datasets", "format-compression", "format-signing", "format-encryption", "format-quantize", "format-homomorphic", "hf-hub-integration", "audio", "audio-capture", "audio-alsa", "audio-coreaudio", "audio-wasapi", "audio-webaudio", "audio-playback", "audio-codec", "audio-noise", "audio-noise-wasm", "safetensors-compare", "rag", "gpu", "model-tests", "cuda", "cpu-only", "showcase-profile", "showcase-zram", "chaos-basic", "chaos-byzantine", "chaos-full"] }
default = parallel

The parallel feature is set by default whenever aprender is added without default-features = false somewhere in the dependency tree.

parallel default = rayon

Enable parallel graph algorithms (disable for WASM)

datasets = alimentar

Enable data loading from alimentar

format-compression = lz4_flex, zstd

Enable LZ4/ZSTD compression for .apr format (spec §3.3, GH-146)

format-signing = ed25519-dalek

Enable Ed25519 signatures for .apr format (spec §4.2)

Affects format::signing, format::SIGNATURE_SIZE, format::PUBLIC_KEY_SIZE, gguf_pygmy_config::build_pygmy_apr_signed, gguf_pygmy_config::generate_test_signing_key

format-encryption = aes-gcm, argon2, hkdf, sha2, x25519-dalek

Enable encryption for .apr format (spec §4.1)

Affects core_io_mmap::load_from_bytes_encrypted, encryption::save_encrypted, encryption::load_encrypted, encryption::save_for_recipient, encryption::load_as_recipient, format::encryption, format::SALT_SIZE, format::NONCE_SIZE, format::KEY_SIZE, format::X25519_PUBLIC_KEY_SIZE, format::RECIPIENT_HASH_SIZE, format::HKDF_INFO, gguf_pygmy_config::build_pygmy_apr_encrypted, gguf_pygmy_config::build_pygmy_apr_encrypted_default

format-quantize = half

Enable quantization for .apr format (spec §6.2)

Affects format::quantize, gguf_pygmy_config::build_pygmy_quantize_data, gguf_pygmy_config::build_pygmy_q8_block, gguf_pygmy_config::build_pygmy_q4_block

format-homomorphic

Enable homomorphic encryption for .apr format (spec: homomorphic-encryption-spec.md)

Affects format::homomorphic

hf-hub-integration safetensors-compare? = dirs, hf-hub, sha2, ureq

Note: mmap is automatic on native platforms, no feature needed (spec: bundle-mmap-spec.md)
Enable Hugging Face Hub integration (GH-100, APR-PUB-001)

Affects sharded_index::parse_import_error, aprender::hf_hub

audio audio-capture? audio-codec? audio-noise? audio-playback? = rustfft, thiserror

Enable audio processing (mel spectrogram, resampling)

Affects aprender::audio

audio-capture audio-alsa? audio-coreaudio? audio-wasapi? audio-webaudio? = audio

Enable audio capture base functionality

audio-alsa = alsa, audio-capture

Enable ALSA audio capture (Linux only)

Affects capture::AlsaBackend

audio-coreaudio = audio-capture

Enable CoreAudio capture (macOS only)

Affects capture::CoreAudioBackend

audio-wasapi = audio-capture

Enable WASAPI capture (Windows only)

Affects capture::WasapiBackend

audio-webaudio = audio-capture

Enable WebAudio capture (WASM only)

Affects capture::WebAudioBackend

audio-playback = audio

Enable audio playback

Affects audio::playback

audio-codec = audio

Enable audio codec decoding (WAV, MP3, AAC, FLAC, Opus)

Affects audio::codec

audio-noise audio-noise-wasm? = audio

Enable ML-based noise generation (GH-144)

Affects audio::noise

audio-noise-wasm = audio-noise, js-sys, wasm-bindgen

Enable WASM bindings for noise generator

Affects wasm::NoiseGeneratorWasm, wasm::noise_version

safetensors-compare = half, hf-hub-integration, safetensors

Enable SafeTensors comparison (GH-121)

Affects inspect::safetensors, safetensors::HfSafetensors

rag = trueno-rag

Enable RAG pipeline for document-based ML (GH-125)

Affects text::rag

gpu

inference-monitoring feature removed — explainable types now unconditional (GH-305)
Enable GPU acceleration via trueno wgpu backend

Enables gpu of trueno

Core compute primitives - SIMD-accelerated tensor operations v0.14.5: wgpu adapter limits fix (buffer >256MB for 7B+ models)

model-tests

Enable heavy model/inference tests (requires models/ dir, ollama, GPU)

cuda

Enable CUDA monitoring via trueno-gpu (NVIDIA GPUs)

Enables cuda-monitor of trueno

cpu-only
showcase-profile

Renacer profiling (disabled: renacer→aprender circular dep)

Affects profiling::profiler

showcase-zram = trueno-zram-core

Enable trueno-zram KV cache compression for showcase benchmarks (PAR-040)

Affects compression::zram

chaos-basic chaos-byzantine? chaos-network?

Chaos engineering features (from renacer)

chaos-network chaos-byzantine chaos-full? = chaos-basic
chaos-full = chaos-byzantine, chaos-network

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.

rustfft audio?

Enables rustfft

Audio processing
FFT for mel spectrogram computation

thiserror audio?

Enables thiserror

Error handling for audio module

alsa audio-alsa?

Enables alsa ^0.9

Native audio capture (Linux ALSA)
ALSA bindings for Linux audio capture

rayon parallel

Enables rayon

Parallelization for graph algorithms (optional for WASM compatibility)

trueno-rag rag?

Enables trueno-rag

RAG pipeline for document-based ML (optional, GH-125)

lz4_flex format-compression?

Enables lz4_flex ^0.11

Compression for .apr format (optional, spec §3.3)

zstd format-compression?
half format-quantize? safetensors-compare?

Enables half

Half-precision floats for quantization (spec §6.2)

ed25519-dalek format-signing?

Enables ed25519-dalek

Digital signatures for .apr format (optional, spec §4.2)

aes-gcm format-encryption?

Enables aes-gcm

Encryption for .apr format (optional, spec §4.1)

argon2 format-encryption?
x25519-dalek format-encryption?
hkdf format-encryption?
sha2 format-encryption? hf-hub-integration?

Enables sha2

For HKDF-SHA256

alimentar datasets?

Enables alimentar

Data loading

trueno-zram-core showcase-zram?

Enables trueno-zram-core

SIMD-accelerated compression for KV cache (optional)

hf-hub hf-hub-integration?

Enables hf-hub ^0.4

Hugging Face Hub integration (optional, spec §11.8, hf-hub-upload-spec.md)

dirs hf-hub-integration?
ureq hf-hub-integration?

Enables ureq ^2.12

Direct HTTP for HF Hub upload (APR-PUB-001)

safetensors safetensors-compare?

Enables safetensors ^0.4

SafeTensors format parsing (optional, for HF model comparison)

wasm-bindgen audio-noise-wasm?

Enables wasm-bindgen

WASM bindings for noise generator (optional, spec: noise-generator-apr-wasm-spec.md)

js-sys audio-noise-wasm?