feat: Add emscripten_wasm32 (WebAssembly) target for tket-c-api#15
Open
aborgna-q wants to merge 4 commits into
Open
feat: Add emscripten_wasm32 (WebAssembly) target for tket-c-api#15aborgna-q wants to merge 4 commits into
aborgna-q wants to merge 4 commits into
Conversation
Build the tket C API and its C++ dependencies for the `wasm32-unknown-emscripten` target so downstream projects (tket2, hugr) can produce pyodide-compatible WebAssembly wheels. - deps/tket/emscripten_wasm32.sh: full source build via emsdk 5.0.3 (matching the pyodide `pyemscripten_2026_0` ABI). Boost is installed headers-only, symengine/eigen/json and the tk* libraries are compiled to wasm, and all static archives are merged into a single self-contained libtket-c-api.a. - build.yml: map the emscripten_wasm32 platform to an ubuntu-latest runner (auto-discovered from the deps script). - release.yml: accept the `wasm32` arch in the release asset regex. - install-hugrenv-action: add a `target` input so consumers can fetch the emscripten build on a Linux runner, and skip dynamic-library path setup for the static-only emscripten target. - README: document the emscripten_wasm32 target and the `target` input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Eigen 5.0.1 defaults `EIGEN_BUILD_BLAS`/`EIGEN_BUILD_LAPACK` to ON for a top-level build, which compiles the reference Fortran BLAS/LAPACK and requires a Fortran compiler. The Emscripten CI runner has none, so configure failed. tket only consumes Eigen header-only, so disable the BLAS/LAPACK (and testing/demos/doc) builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a
wasm32-unknown-emscriptenbuild target for the tket C API we can produce pyodide-compatible WebAssembly wheels downstream. See Quantinuum/tket2#1415.Targets Emscripten 5.0.3, matching the pyodide
pyemscripten_2026_0ABI (Python 3.14).I checked the artifacts generated here in a local build and test of tket-py, and everything seemed correct.
Warning
This PR was mostly LLM-generated. I am not fluent in cmake bash scripts, but did a layman check of the file.