tinyquant-core 1.1.0

CPU-only vector quantization codec — core types, codec, corpus, and backend trait (no_std).
Documentation
[package]
name         = "tinyquant-core"
description  = "CPU-only vector quantization codec — core types, codec, corpus, and backend trait (no_std)."
version.workspace      = true
edition.workspace      = true
rust-version.workspace = true
license.workspace      = true
repository.workspace   = true

[features]
default = []
std     = []
simd    = ["std"]
# Phase 22 placeholder: enables the AVX-512 kernel module (currently
# stub-delegates to scalar). Keeping the feature gate wired now lets
# downstream crates opt-in without churning Cargo metadata later.
avx512  = ["simd"]
# Optional GPU acceleration via wgpu/WGSL.
# Enabling this feature raises the effective MSRV from 1.81 to 1.87
# (wgpu's requirement) and switches the crate from no_std to std.
#
# NOTE: tinyquant-gpu-wgpu cannot be an optional dependency of tinyquant-core
# because tinyquant-gpu-wgpu itself depends on tinyquant-core, creating a
# Cargo cyclic dependency (Cargo rejects this unconditionally). Instead, this
# feature enables:
#   - The `GpuComputeBackend` trait and `GPU_BATCH_THRESHOLD` const defined
#     locally in tinyquant-core (no external dep needed — these only reference
#     types already in this crate).
#   - `Codec::compress_batch_gpu_with`, which accepts any `B: GpuComputeBackend`.
# Users who want WgpuBackend still add `tinyquant-gpu-wgpu` separately;
# that crate will implement `tinyquant_core::GpuComputeBackend` for `WgpuBackend`
# in a future patch (Phase 28.5b).
gpu-wgpu = ["std"]

[dependencies]
# Phase 12: error enums (no_std-capable via thiserror v2 + default-features = false)
thiserror = { workspace = true }
# Phase 13: codec / rotation / cache
faer        = { workspace = true }
rand_chacha = { workspace = true }
sha2        = { workspace = true }
hex         = { workspace = true }
spin        = { workspace = true }
libm        = { workspace = true }
# Phase 15: residual (fp16)
half        = { workspace = true }

[dev-dependencies]
serde_json = { workspace = true }
# Phase 14: codebook / quantize fixture parity tests
bytemuck   = { workspace = true }
# Phase 20: SIMD parity tests need std rand (dev-only, not in the no_std build).
rand       = { workspace = true, features = ["std", "std_rng"] }
# Phase 21: batch determinism tests exercise local rayon pools.
rayon      = { workspace = true }

[[example]]
name              = "dump_rotation_fixture"
path              = "examples/dump_rotation_fixture.rs"
required-features = ["std"]