Skip to content

Add Pyodide support for Rust extensions - #72

Merged
timkpaine merged 2 commits into
mainfrom
agent/add-pyodide-support
Aug 16, 2026
Merged

Add Pyodide support for Rust extensions#72
timkpaine merged 2 commits into
mainfrom
agent/add-pyodide-support

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Teach hatch-rs to recognize the Emscripten Cargo target supplied by Pyodide, collect .wasm cdylibs, rename them with the CPython Emscripten extension suffix, and emit pyemscripten wheel tags from the active Pyodide ABI. This removes the need for project-specific build-hook workarounds while preserving existing native behavior.

Add focused unit coverage, documentation, and a Python 3.14/PyO3 fixture that CI builds and imports in a real Pyodide virtual environment.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (not applicable)

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

73 tests  +6   73 ✅ +6   30s ⏱️ +4s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 438cdec. ± Comparison against base commit 892ca99.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.82609% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.08%. Comparing base (892ca99) to head (438cdec).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
hatch_rs/structs.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   84.29%   86.08%   +1.79%     
==========================================
  Files          11       11              
  Lines        1496     1538      +42     
==========================================
+ Hits         1261     1324      +63     
+ Misses        235      214      -21     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine marked this pull request as ready for review August 16, 2026 19:43
@timkpaine
timkpaine merged commit 3398c19 into main Aug 16, 2026
7 checks passed
@timkpaine
timkpaine deleted the agent/add-pyodide-support branch August 16, 2026 19:43
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