feat(deps): gate blake3/p64/fractal behind hpc-extras feature (sprint A1)#116
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5207d7881
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// Gated behind the `hpc-extras` feature (enabled by default) because the | ||
| /// module pulls in `blake3`, `p64`, and `fractal`. Disable default features to | ||
| /// drop those dependencies (e.g. burn-ndarray's polyfill-only build). | ||
| #[cfg(feature = "hpc-extras")] |
There was a problem hiding this comment.
Keep
hpc available for std-only builds
Gating pub mod hpc; behind feature = "hpc-extras" breaks the advertised --no-default-features --features std configuration because simd is still compiled under std and unconditionally re-exports symbols from crate::hpc (see src/simd.rs around the pub use crate::hpc::... block). In that feature set, hpc is absent and these imports become unresolved, so downstream std-only consumers cannot compile.
Useful? React with 👍 / 👎.
Make blake3, p64, and fractal optional dependencies pulled in only when
the hpc-extras feature is enabled. hpc-extras is enabled by default so
existing consumers see no change. Downstream crates (notably burn-ndarray)
that only need the core array layer can opt out via:
[dependencies]
ndarray = { version = "0.17", default-features = false, features = ["std"] }
This keeps cargo build (default) and cargo build --no-default-features
both clean while removing ~200 transitive deps from minimal builds.
Sprint A1 of burn-ndarray parity sprint.
https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
e5207d7 to
4f62643
Compare
Summary
Sprint A1 of burn-ndarray parity sprint v1. Closes item (15) of the parity list shared by the burn-side review session.
Makes
blake3,p64,fractaloptional dependencies pulled in only when thehpc-extrasfeature is enabled.hpc-extrasis in the default features so existing consumers see no change. Downstream crates (notably burn-ndarray) that only need the core array layer can opt out:What changed
Cargo.tomlsrc/lib.rs:cfg(feature = "std")→cfg(feature = "hpc-extras")on thepub mod hpc;declaration so the hpc tree only compiles when its deps are present.Verification
cargo build(default = std + hpc-extras) — clean, only pre-existing warningscargo build --no-default-features— clean; ndarray crate compiles without blake3/p64/fractalcargo tree -p ndarray --no-default-features | grep -E "blake3|p64|fractal"— empty (gating proven)cargo tree -p ndarray(default) — shows blake3, p64, fractal as expectedcargo test --lib --no-run— compiles cleanlycargo test --lib— 1667 tests pass, then SIGILL insimd_avx512tests on this CI host (pre-existing —.cargo/config.tomlforcestarget-cpu=x86-64-v4/ AVX-512; sandbox lacks it). 0 FAILED. This crash exists on master too.Plan reference
.claude/plans/burn-ndarray-parity-sprint-v1.md(in lance-graph repo) — Item (15)Companion sprint
This is the first of 9 PRs targeting the burn parity list. Items 1-14 + 16 still in flight or queued. See plan doc for full breakdown.
https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj