Skip to content

DRAFT: Store library build artifacts to per-recipe directory#301

Draft
ryanking13 wants to merge 2 commits intopyodide:mainfrom
ryanking13:lib-build-order
Draft

DRAFT: Store library build artifacts to per-recipe directory#301
ryanking13 wants to merge 2 commits intopyodide:mainfrom
ryanking13:lib-build-order

Conversation

@ryanking13
Copy link
Copy Markdown
Member

This PR refactors the installation process for library-type recipes (static and shared libraries). The change is designed to be fully backward compatible, though it will require some integration testing to confirm.

Before:

Previously, users installed libraries directly to the WASM_LIBRARY_DIR (by setting --prefix, CMAKE_INSTALL_PREFIX, or DESTDIR). As a result, once the build was complete, all artifacts from all libraries were merged together in a single global directory.

After
Each library now installs to a local DESTDIR—specifically, the dist/ directory inside its own build directory (similar to how Python packages are handled). Once built, pyodide-build automatically copies the artifacts from dist/ into the global WASM_LIBRARY_DIR so they remain accessible to other packages.

Motivation

This introduces two major benefits:

  • Artifact Isolation: It allows us to clearly distinguish and isolate the build artifacts of each individual library.

  • Pre-built Distribution: Because artifacts are initially stored in separate, library-specific directories, we can now bundle and release them independently. This will allow downstream packages to download and use pre-built libraries directly, bypassing the need to rebuild them from scratch.

  • Add changelog entry

  • Run integration tests at pyodide-recipes

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.

1 participant