You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize I should probably write a line or two explaining the changes other than the pytorch recipe (missed it cause was working on this pr through the weekend). Writing something soon !
All mostly come from PyTorch tests on both wasm32 and wasm64:
pytester:torch.compile imports torch.utils.cpp_extension, which needs setuptools at runtime. We already declare that dependency, but the filter removed setuptools and _distutils_hack from the browser archive, so Inductor failed with ModuleNotFoundError.
pthread detection: generic-testing was matching any occurrence of “pthread”, including the data symbol FLAGS_pthreadpool_size. It now matches pthread_* symbol names, so actual pthread symbols still fail the check.
Memoryless wrappers:libtorch.so, _C.so and libtorch_global_deps.so are tiny dependency/entry-point wrappers, the implementation lives in libtorch_cpu.so and libtorch_python.so. Those wrappers can contain only functions and declare no memory width, which makes LLVM default to reporting wasm32. The exception is restricted to function-only shared wrappers, modules with defined or imported memory still get the architecture check.
NumPy run exports: NumPy is needed in the shared staging build for the Python bindings. Its run export is ignored there so it doesn’t make the C++ libtorch output depend on NumPy/Python. The pytorch output declares host NumPy separately and still gets its ABI constraint—confirmed as numpy >=2.2,<3 in CI.
Let me think through other changes that need a mention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Template A: Checklist for adding a package
Pre-submission Checks
emscripten-wasm32platform (not a noarch package), in other words, the package requires compilation.Recipe Structure
Added
recipes/recipes_emscripten/[package-name]/recipe.yamlwith proper structure:contextsection withversion(and optionallyname)packagesection with name and version using Jinja2 templatessourcesection with:.tar.gz,.tar.bz2,.tar.xz,.tgz, or.zip)${{ version }}template for version updatescurl -sL <url> | sha256sum)[package-name]/patches/directorybuildsection with appropriate script/method${PYTHON} -m pip install . ${PIP_ARGS}$R CMD INSTALL $R_ARGS .emcmake/emmakeoremconfigure/emmakerust-nightlyandmaturinor appropriate Rust build toolrequirementssection (build, host, run as needed)testssectiontest_import_[package].pyfile created and referencedaboutsection with license, homepage, summaryTemplate B: Checklist for updating a package
PR Formatting
Add [package-name]orUpdate [package-name] to [version]Package Details
Build Notes