Skip to content

gh-145219: Cache Emscripten libffi and mpdec builds, add install-emscripten cmd#145664

Open
hoodmane wants to merge 1 commit intopython:mainfrom
hoodmane:cache-emsdk-libs
Open

gh-145219: Cache Emscripten libffi and mpdec builds, add install-emscripten cmd#145664
hoodmane wants to merge 1 commit intopython:mainfrom
hoodmane:cache-emsdk-libs

Conversation

@hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Mar 9, 2026

This moves the emsdk install from {emsdk_cache}/{emscripten_version} to {emsdk_cache}/{emscripten_version}/emsdk so that we can put the prefix at `emsdk_cache_dir/{emscripten_version}/prefix.

I moved the data about mpdec & libffi version, url, and shasum into config.toml along with the emscripten version. Then as a cache key I write the library config section to disk in the prefix dir like {libname}.json. I write it as a json file since tomllib can't write toml. On subsequent builds, if prefix/{libname}.json contains the same data then we can skip a rebuild.

I also added an install-emscripten command to make it easy to get this directory structure correct.

…l-emscripten cmd

This moves the emsdk install from `{emsdk_cache}/{emscripten_version}` to
`{emsdk_cache}/{emscripten_version}/emsdk` so that we can put the prefix at
`emsdk_cache_dir/{emscripten_version}/prefix.

I moved the data about mpdec & libffi version, url, and shasum into config.toml along
with the emscripten version. Then as a cache key I write the library config section to
disk in the prefix dir like `{libname}.json`. I write it as a json file since tomllib
can't write toml. On subsequent builds, if prefix/{libname}.json contains the same data
then we can skip a rebuild.

I also added an install-emscripten command to make it easy to get this directory
structure correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant