Repository navigation
Conversation
c-blosc 1.x only provides SSE2/AVX2 shuffle kernels. On aarch64 its dispatcher always selects blosc_internal_(un)shuffle_generic, a scalar byte-by-byte loop that dominates Blosc runtime on ARM. On aarch64, compile a drop-in replacement for c-blosc's shuffle-generic.c that implements those two symbols with NEON kernels (copied from c-blosc2) for type sizes 2, 4, 8 and 16, falling back to the scalar loop otherwise. The c-blosc submodule is left untouched and the output is byte-identical. Controlled by a new `neon` meson option (default: auto). Assisted-by: ClaudeCode:claude-opus-5-5
Replace the c-blosc submodule and the hand-maintained source lists for its internal-complibs with meson subprojects: - zstd, lz4 and zlib come from WrapDB (subprojects/*.wrap), so their versions are no longer tied to c-blosc's bundled copies. - c-blosc 1.x is not in WrapDB, so subprojects/c-blosc.wrap pins the same commit as the old submodule, and subprojects/packagefiles/c-blosc/ provides its meson.build plus numcodecs patches (the NEON shuffle). - The system_* options keep their meaning; when a library is not taken from the system, the subproject is configured first so every lookup, including c-blosc's, resolves to the same static build. - meson-python skips installing subproject artifacts and includes the subproject sources in the sdist, so the sdist builds offline. - License texts for the bundled libraries now live in LICENSES/, adding the previously missing zstd license. Assisted-by: ClaudeCode:claude-opus-5-5
The upstream c-blosc archive bundles zstd, lz4, zlib and snappy sources plus tests and compat fixtures, none of which the meson build uses (the codec libraries come from their own subprojects). Add tools/make_c_blosc_tarball.py, which extracts blosc/, the license files and the README into a deterministic tarball, and point c-blosc.wrap at that tarball. c-blosc now takes 0.07 MB of the sdist, which shrinks from 10.7 MB to 8.3 MB. Assisted-by: ClaudeCode:claude-opus-5-5
Drop the submodules settings from the GitHub Actions checkouts and the Read the Docs config now that c-blosc is a meson subproject, and add a release note for the migration. Assisted-by: ClaudeCode:claude-opus-5-5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #865 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 905 905
=========================================
Hits 905 905 🚀 New features to boost your workflow:
|
|
How much conda-forge breakage is involved here? https://github.com/conda-forge/numcodecs-feedstock/blob/main/recipe%2Fmeta.yaml |
|
Not much I think |
|
I think we should just wrap cmake here with https://mesonbuild.com/CMake-module.html |
|
This might be relevant: Blosc/c-blosc2#690 We should move to blosc2 as soon as possible. |
blosc2 cannot write data that blosc1 reads. so we have to keep blosc1 around. |
|
c-blosc2 has a https://github.com/Blosc/c-blosc2/blob/main/RELEASE_NOTES.md#changes-from-220-to-230 |
|
it would be a breaking change to blosc1 readers
|
🤖 AI text below 🤖
Note
Stacked on #864 (NEON shuffle). The first commit here is #864's; review the last three commits. Draft until #864 lands and the c-blosc tarball is hosted in this repo (see Before merging).
Summary
This replaces the
c-bloscgit submodule, and the ~170 lines of hand-listedinternal-complibssources insrc/numcodecs/meson.build, with meson subprojects:subprojects/{zstd,lz4,zlib}.wrap). Previously their versions were whatever c-blosc bundled; now they can be bumped independently withmeson wrap update. This PR moves zstd 1.5.6 → 1.5.7 and zlib 1.3.1 → 1.3.2; lz4 stays at 1.10.0.subprojects/c-blosc.wrappins the same commit the submodule pointed to (04c06fb).subprojects/packagefiles/c-blosc/holds itsmeson.build(upstream only ships CMake) and numcodecs' patches, currently the NEON shuffle from perf(blosc): use NEON SIMD for byte-shuffle on aarch64 #864. Patching c-blosc no longer requires forking the submodule.tools/make_c_blosc_tarball.pyextracts onlyblosc/, the license files and the README into a reproducible 60 KB tarball, which the wrap points at.system_*options keep their meaning. When a library isn't taken from the system, its subproject is configured first, so everydependency()lookup, including c-blosc's, resolves to the same static build. The build log shows c-blosc reusing the zstd subproject (found: YES 1.5.7 (cached)).pyproject.toml, meson-python now skips installing subproject artifacts (--skip-subprojects) and includes their sources in the sdist (--include-subprojects), so the sdist builds offline.LICENSES/and are listed inlicense-files. This adds zstd's license, which the wheels were missing before.submodules:checkout settings and Read the Docs config are removed, and the contributing guide is updated.Trade-offs
build-baseinclude one. Alternatives: a numcodecs-maintained zstd overlay, or an upstream WrapDB change.lib/sources via c-blosc. These could be trimmed the same way as c-blosc, at the cost of losing plainmeson wrap updatebumps.meson subprojects downloadbeforehand or build from the sdist.Before merging
source_urlinsubprojects/c-blosc.wrapcurrently points at a release asset on the PR author's fork (vendor/c-blosc-04c06fb7339d). To verify it, runpython tools/make_c_blosc_tarball.py 04c06fb7339d3df3600b1862077b8699b30a0e1d; the tarball sha256 should beebadbf11…a7f7a81and the uncompressed tar sha2566b7381ba…42b28f4. Then re-upload it here and update the URL.Testing
Locally on macOS arm64 (Python 3.14):
--wrap-mode=nodownloadsucceeds.libSystem.Linux, Windows and cibuildwheel runs are not yet verified locally; this PR's CI covers them.
🤖 Generated with Claude Code