Completely vibe coded script to build liblzma as a standalone WebAssembly module for WASI.
- Upstream source is tracked as the git submodule at
upstream/xz. - The submodule is pinned to the upstream release in
upstream.env.
git submodule update --init --checkout
./scripts/build-wasi.shOutputs land in dist/:
dist/liblzma.adist/liblzma.wasmdist/build-info.txtdist/SHA256SUMS
The Docker image installs Debian packages from a fixed snapshot timestamp. That keeps the toolchain stable across rebuilds.
git submodule update --init --checkout
./scripts/build-docker.shUseful overrides:
DEBIAN_SNAPSHOT=20260306T000000Z ./scripts/build-docker.sh
DEBIAN_RELEASE=bookworm ./scripts/build-docker.sh
OUT_DIR=$PWD/out ./scripts/build-wasi.sh
WASI_SYSROOT=/usr ./scripts/build-wasi.sh