Rust implementation of Heer and Stone's C3 library.
## Loading data
- **`C3::new` / `C3::try_new`** — Loads the **same** bundled `c3_color.npy`, `c3_a.npy`, and `c3_t.npy` via [`include_bytes!`](https://doc.rust-lang.org/std/macro.include_bytes.html) at compile time. Works on **native and `wasm32-unknown-unknown`** (browser): no runtime filesystem.
- **`C3::from_embedded_npy`** — Same bytes, explicit `Result` API.
- **`C3::from_npy_dir`** — Read `.npy` from disk (**not** available on `wasm32-unknown-unknown`; use WASI or embedded loaders instead).
The crates.io package ships those `.npy` files under `src/` for reproducibility; dependents normally just call **`C3::try_new()?.`** without copying JSON or duplicating arrays.
## Slice-oriented APIs
For JS interop or tight loops without `ndarray::Array2`:
- [`analyze_lab_rows`](https://docs.rs/rust_c3/latest/rust_c3/struct.C3.html#method.analyze_lab_rows)
- [`color_indices_lab_rows`](https://docs.rs/rust_c3/latest/rust_c3/struct.C3.html#method.color_indices_lab_rows)
- [`palette_terms_lab_rows`](https://docs.rs/rust_c3/latest/rust_c3/struct.C3.html#method.palette_terms_lab_rows)
- [`analyze_lab_rows_with_distance_matrix`](https://docs.rs/rust_c3/latest/rust_c3/struct.C3.html#method.analyze_lab_rows_with_distance_matrix)
## Tests
```text
cargo test
```
Optional regression run against **on-disk** `.npy` (must match the embedded bundle):
```text
cargo test --test c3 -- --ignored
```
## Benchmarks
```text
cargo bench
```
Criterion writes reports under `target/criterion/`.
## WASM CI
GitHub Actions runs `cargo check --lib --target wasm32-unknown-unknown` so browser builds stay compiling.