This dockerfile builds a docker container similar to https://hub.docker.com/r/emscripten/emsdk, for AMR64. It was tested on a Macbook M2, but I see no reason why it wouldn't work for other arm 64 platforms.
It used the pre-build arm64 emscripten binary mentioned in emscripten-core/emsdk#547 (comment).
Building time is short (mostly downloading stuff); less than 2 minutes on my M2 / 1Gbps internet.
Performance difference is enourmous; Running amd64 images (through Lima/Vz,, with --platform=amd64
), building libav.js
took almost an hour.
With native arm64, it takes around 8 minutes, so about 7 times as fast.