cargo build # debug build
cargo test # all tests (default features)
cargo test --features serde # include serde round-trip tests
cargo test --features gpu # include GPU tests (adapter tests are #[ignore])
cargo test --features gpu -- --ignored # run GPU adapter tests (requires GPU)
cargo clippy -- -D warnings # lint — must pass with zero warnings
cargo clippy --features gpu -- -D warnings # lint with GPU feature
cargo fmt -- --check # check formatting
cargo fmt # auto-format
cargo audit # security audit| Flag | What it enables |
|---|---|
serde |
Serialize/Deserialize on public structs, store export/import |
gpu |
WGPU compute shaders for GPU-accelerated scoring |
Default features are empty — both are opt-in.
| Variable | Default | What it controls |
|---|---|---|
QJL_GPU_MIN_BATCH |
5000 | Total vectors for scores GPU dispatch |
cargo bench # all CPU benchmarks
cargo bench --bench gpu_score --features gpu # GPU vs CPU
./scripts/bench.sh --gpu --save # full run with report| Area | Location |
|---|---|
| Algorithms | docs/design/algorithms/ |
| Persistence | docs/design/persistence.md |
| Store API | docs/design/store.md |
| Serde | docs/design/serde.md |
| Benchmarks | docs/benchmarks.md |
| Testing | docs/design/testing.md |
| Roadmap | docs/roadmap.md |
| Release guide | docs/release.md |
- Read the relevant design doc in
docs/design/. - Implement in the correct module — see
src/lib.rsfor the module map. - Write tests in the appropriate
tests/subdirectory:tests/quality/— statistical validationtests/persistence/— store round-trip, compaction, crash recoverytests/serde.rs— serde round-trip (feature-gated)- Unit tests in
src/modules via#[cfg(test)]
- If adding a GPU feature, gate behind
#[cfg(feature = "gpu")]and mark adapter-requiring tests with#[ignore]. - Run the full check:
cargo fmt --check cargo clippy -- -D warnings cargo clippy --features gpu -- -D warnings cargo test cargo test --features serde cargo test --features gpu cargo doc --no-deps
cargo run --example basic_qjl
cargo run --example compressed_scoring
cargo run --example mse_quantization
cargo run --example serde_roundtrip --features serde
cargo run --example store_export_import --features serdeqjl-sketch compresses and scores vectors. It makes zero LLM calls and has no opinion about how vectors are produced. Do not add any LLM client, tokenizer, or model-loading crate as a dependency.
See docs/release.md.