1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[]
= "tinyquant-core"
= "CPU-only vector quantization codec — core types, codec, corpus, and backend trait (no_std)."
= true
= true
= true
= true
= true
[]
= []
= []
= ["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.
= ["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).
= ["std"]
[]
# Phase 12: error enums (no_std-capable via thiserror v2 + default-features = false)
= { = true }
# Phase 13: codec / rotation / cache
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
# Phase 15: residual (fp16)
= { = true }
[]
= { = true }
# Phase 14: codebook / quantize fixture parity tests
= { = true }
# Phase 20: SIMD parity tests need std rand (dev-only, not in the no_std build).
= { = true, = ["std", "std_rng"] }
# Phase 21: batch determinism tests exercise local rayon pools.
= { = true }
[[]]
= "dump_rotation_fixture"
= "examples/dump_rotation_fixture.rs"
= ["std"]