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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# cargo-deny configuration for numrs2 (COOLJAPAN Pure Rust Policy enforcement)
# Schema: cargo-deny 0.19.x
# Run: cargo deny check bans
#
# Scope: this file currently covers [bans] only (the COOLJAPAN banned-crate
# list plus the pure-Rust transitive-codec exceptions below). [licenses],
# [advisories] and [sources] are intentionally left at cargo-deny's defaults
# for now — vetting numrs2's full license/advisory graph is a separate task
# from the banned-crate audit this file was created for.
#
# ---------------------------------------------------------------------------
# USER DECISION (2026-08-19): pure-Rust transitive codecs inside parquet and
# matfile are KEPT for real-world file compatibility.
#
# numrs2's `parquet` feature and `matlab` feature pull in a handful of crates
# that are also COOLJAPAN-banned by name (flate2, miniz_oxide, brotli, snap,
# lz4_flex, libflate) because the OxiARC ecosystem has its own compression
# codecs (oxiarc-deflate, oxiarc-brotli, oxiarc-snappy, oxiarc-lz4). Those
# crates are reached ONLY as transitive dependencies of `parquet` (Apache
# Arrow's own format crate) and `matfile` (MATLAB .mat I/O) — foreign crates
# whose own Cargo.toml numrs2 does not control, so oxiarc cannot be injected
# into them. All of these codecs are 100% pure Rust themselves (no C/FFI); the
# COOLJAPAN preference for oxiarc here is an ecosystem-consistency preference,
# not a Pure-Rust-safety issue. Blocking them outright would mean giving up
# real-world Parquet/MATLAB file interoperability for no purity gain, so the
# user approved keeping them, scoped tightly via the `wrappers` mechanism
# below: each entry is denied for any OTHER direct dependent, so a stray
# future direct dependency on e.g. `flate2` from numrs2's own Cargo.toml (or a
# new transitive path through some other crate) still fails this check.
# ---------------------------------------------------------------------------
[]
# The parquet/matfile/usvg wrapper exceptions below only mean anything if
# cargo-deny actually resolves the graph with those optional features turned
# on (parquet, matlab, visualization, etc. are all off by default). Without
# this, `cargo deny check bans` silently checks the default-feature slice
# only, every `wrappers` entry below goes unmatched, and a banned crate
# introduced solely through a non-default feature would never be caught.
= true
[]
= "warn"
= [
# === C/C++/Fortran FFI and BLAS/LAPACK — hard Pure Rust Policy violations ===
{ = "openblas-src", = "oxiblas" },
{ = "blas-src", = "oxiblas" },
{ = "cblas-sys", = "oxiblas" },
{ = "lapack-src", = "oxiblas" },
{ = "lapacke-sys", = "oxiblas" },
{ = "rusqlite", = "oxisql-sqlite-compat" },
{ = "z3", = "oxiz" },
# === Pure Rust, but superseded by the COOLJAPAN ecosystem (ecosystem-preference bans) ===
{ = "bincode", = "oxicode" },
{ = "rustfft", = "oxifft" },
{ = "zip", = "oxiarc-archive" },
{ = "tar", = "oxiarc-archive" },
{ = "zstd", = "oxiarc-zstd" },
{ = "bzip2", = "oxiarc-bzip2" },
{ = "lz4", = "oxiarc-lz4" },
# === Pure-Rust parquet/matfile/usvg-transitive codec exceptions (USER-APPROVED 2026-08-19) ===
# Each `wrappers` list is the crate's actual, verified set of direct
# dependents in this workspace's graph, per
# `cargo tree -i <crate> --all-features -e normal` (re-derive it if the
# dependency graph shifts — a new direct dependent not listed here will
# correctly fail this check rather than silently passing).
{ = "flate2", = "oxiarc-deflate", = ["parquet", "png", "usvg"] },
{ = "miniz_oxide", = "oxiarc-deflate", = ["flate2", "png"] },
{ = "brotli", = "oxiarc-brotli", = ["parquet"] },
{ = "snap", = "oxiarc-snappy", = ["parquet"] },
{ = "lz4_flex", = "oxiarc-lz4", = ["parquet"] },
{ = "libflate", = "oxiarc-deflate", = ["matfile"] },
]