Skip to content

build-wasm rewrite and more compression support - #70

Merged
lazarusA merged 2 commits into
mainfrom
af/update-build-wasm
Oct 30, 2026
Merged

lazarusA merged 2 commits into
mainfrom
af/update-build-wasm

Conversation

@Karinon

@Karinon Karinon commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Tackling the issues #68, #42, #41 and #40

This updates the build dependencies to current releases and adds support for more compressed NetCDF/HDF5 files.

What changed

  • Updated versions: Emscripten 6.0.13, HDF5 2.2.0 and NetCDF-C 4.10.1.
  • New compression filters: files compressed with Blosc, Zstandard or bzip2 can now be read. WebAssembly can't load HDF5 filter plugins at runtime, so these filters are built into the WASM module and registered when it starts.
  • Simpler build script: the newer NetCDF and HDF5 versions build cleanly with Emscripten, so we no longer patch CMakeLists.txt and config.h by hand.
  • Rebuilds on version changes: the build script now detects when installed dependencies are from a different version and rebuilds them, so stale caches aren't reused.

Notes

  • The CI cache key was bumped, so the first CI run will rebuild everything from scratch.

Tried it out with gridlook as well as the integrated viewer.

@TheJeran

Copy link
Copy Markdown
Collaborator

Do you have any zstandard NCs to test this? The one from EarthyScience/Browzarr#549 expired.

@lazarusA

lazarusA commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

I know that this is a bit out of scope here. But, we could we see if this also builds on CI for macOS, or if it's preferred in a follow-up PR. I usually test this locally on macOS, but today I cannot verify this build locally, so, seeing it on CI will make this more mergeable. Windows probably will be trickier or easier, not sure if with this new build there are not more issues. My last attempt was not very successful #34

@Karinon

Karinon commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Do you have any zstandard NCs to test this? The one from EarthyScience/Browzarr#549 expired.

I don't have any real-world-examples, but I created a synthetic one on a regular grid. Didn't work correctly in the previous release, but does now.

https://swift.dkrz.de/v1/dkrz_a073cd57eae14eba9afc9c692de6c127/Foo/global-zstd.nc?temp_url_sig=44d5911d1c82bf07d613bc4d5b6e35910ff4f111&temp_url_expires=2026-11-29T11:52:49Z

@Karinon

Karinon commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

I know that this is a bit out of scope here. But, we could we see if this also builds on CI for macOS, or if it's preferred in a follow-up PR. I usually test this locally on macOS, but today I cannot verify this build locally, so, seeing it on CI will make this more mergeable. Windows probably will be trickier or easier, not sure if with this new build there are not more issues. My last attempt was not very successful #34

At least MacOS was quite easy to integrate into the CI (checked it on my personal fork beforehand). Windows is another kind of beast and should definitely be a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants