User:Brooke Vibber (WMF)/Upstream emscripten patches 2023

TimedMediaHandler uses ogv.js as a WebM/Ogg player shim for versions of Safari unable to play native WebM files (which as of February 2023 includes all iOS devices). This relies on the emscripten compiler toolchain to build several C libraries into WebAssembly, to be called from JavaScript.

While we hope to eventually phase this shim out in favor of fully native playback, old devices may rely on it for a while, and other front-end tools might make use of it in the future (for instance other multimedia presentation tools, for 3d or panoramic graphics, image manipulation/color grading, recompression, etc) so it's worthwhile to continue to improve it.

Current work 2023


First-class Linux/aarch64 emsdk builds


The current Linux/aarch64 (arm64) builds are produced on a delayed basis which requires some manual work, because the main build bots don't have aarch64 hosts and it's not set up for a Linux-to-Linux cross-compile.


  • can build x86_64 on x86_64 successfully
  • need to tease out the mac-specific mac_cross build option and pass it through things more consistently
  • need to fiddle with sysroot build?


  • This remains a lower-priority task, but it'll make my and others' lives easier using build automation tools on Macos/arm64 or Win/arm64 -- anything that runs via Docker will be faster with a Linux/aarch64 build than running an x86_64 build in emulation, and having consistent versioning avoids having to build your own to be up to date.