Skip to content

wasm: WasmCompiledWheelTest on checked-in cp315t wheels (C and C++) - #556

Open
b-re-w wants to merge 3 commits into
developfrom
feat/wasm-compiled-wheel-315t
Open

b-re-w wants to merge 3 commits into
developfrom
feat/wasm-compiled-wheel-315t

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 27, 2026

Copy link
Copy Markdown
Member

Follow-up to #175 (closed). Since the 3.15t runtime landed (#542), WasmCompiledWheelTest has been red on develop: the cp314 pydantic-core wheel cannot load. Batch run 45973628546 shows 599 tests, 1 failed.

Test added / changed

  • aCompiledPyemscriptenWheelLoadsAndRunsInTheInterpreter loads pypackpack's C wheel wasmdemo (pypackpack Fix: Stubs list every Kotlin supertype that has a stub class #82): answer() 42, unwind() 7 via setjmp/longjmp (__c_longjmp), and the GIL stays off.
  • aCompiledCppWheelThrowsAndCatchesInsideTheInterpreter (new) loads the C++ wheel wasmcpp. catch_it() throws and catches std::runtime_error("boom 3") inside the side module (__cpp_exception, __cxa_throw).
  • theCheckedInWheelsAreTheOnesTheReadmeDescribes (new) checks each fixture's sha256 against the pins and fails on an unpinned wheel.
  • Red/green observed locally on node, with -PrequireWasmRuntime=true against the local 3.15t runtime:
    • pydantic body with the C wheel staged: "No module named 'pydantic_core'".
    • Hash test on a tampered copy: red.
    • C++ test without its wheel: 3 tests, 1 failed, "No module named 'wasmcpp'".
    • Final: 3 tests, 0 failed.

Feature added: none. Defect fixed: the wasm.yml red above.

Deleted

  • The URL download path the fixtures replace: build-cpython.sh wheels (do_wheels, WHEELS, sha256_of), the Gradle task fetchWasmWheels, and wasm.yml's "Fetch the pinned wasm wheels" step.
  • wasmWheelsDir defaults to the fixture directory. -PwasmWheelsDir still overrides it.

Documentation corrected

  • python-multiplatform/src/wasmJsTest/resources/wheels/README.md gives both wheels' hashes and the pypackpack commit (2f3ddd0) and command that built them.
  • wasm-design.md and wasmJsMain/README.md are updated, along with the test KDoc.

The two wheels are binary fixtures in git (1892 and 2213 bytes), placed in the source set's resources directory per the leader, 2026-11-27.

…(pypackpack #82)

The 3.15t runtime cannot load the cp314 pydantic-core wheel. The test now imports wasmdemo.wmod
and expects answer() 42, unwind() 7 through setjmp/longjmp (the __c_longjmp tag), and the GIL
still off. Red with the wheel staged: ModuleNotFoundError for pydantic_core; green after.
…ader 2026-11-27)

The cp315t wasmdemo wheel lives in src/wasmJsTest/resources/wheels, the default wasmWheelsDir.
theCheckedInWheelsAreTheOnesTheReadmeDescribes fails on any unpinned or altered wheel (red on a
tampered copy, green on the fixture). The URL download path is deleted: build-cpython.sh wheels,
fetchWasmWheels and wasm.yml's fetch step.
…r (__cpp_exception)

wasmcpp-0.1.0-cp315-cp315t-pyemscripten_2026_0_wasm32.whl (toolchain, pypackpack 2f3ddd0,
sha256 6a41eb2a...) joins the checked-in fixtures. wasmcpp.wcpp.catch_it() throws
std::runtime_error("boom 3") in the side module and returns the caught message, so it imports
python.wasm's __cpp_exception tag, which the C fixture never touched.

Red (node, -PrequireWasmRuntime=true, fixture absent): 3 tests, 1 failed, "No module named
'wasmcpp'". Green with the wheel pinned: 3 tests, 0 failed.

Documentation corrected: resources/wheels/README.md records both wheels, their hashes and
the pypackpack commit and command that built them.

This branch has not been deployed

No deployments
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