Skip to content

WebSerial support via Pyodide#70

Merged
puddly merged 28 commits intodevfrom
puddly/webserial
Apr 23, 2026
Merged

WebSerial support via Pyodide#70
puddly merged 28 commits intodevfrom
puddly/webserial

Conversation

@puddly
Copy link
Copy Markdown
Owner

@puddly puddly commented Apr 22, 2026

Fixes #58.

This PR implements a webserial transport via pyodide. You explicitly register serial ports with serialx.platforms.serial_pyodide.register_js_port from the JS side and then connect to the named port from the Python side. Surprisingly, the test suite (including coverage!) runs with minimal modifications from within pyodide. I've added this to CI via Bun.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 94.14634% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.77%. Comparing base (765e856) to head (965e1f6).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
serialx/platforms/serial_pyodide/__init__.py 93.02% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #70      +/-   ##
==========================================
+ Coverage   90.48%   90.77%   +0.28%     
==========================================
  Files          19       21       +2     
  Lines        3143     3348     +205     
==========================================
+ Hits         2844     3039     +195     
- Misses        299      309      +10     

☔ View full report in Codecov by Sentry.
📢 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.

@puddly
Copy link
Copy Markdown
Owner Author

puddly commented Apr 22, 2026

Tracing doesn't seem to work properly with pyodide unfortunately so the generated coverage isn't complete. I've excluded it until that's fixed upstream.

Never mind, I've got a workaround.

@puddly puddly merged commit e94a225 into dev Apr 23, 2026
40 checks passed
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.

Have framework for proxying serial connection capabilities established WebSerial support

1 participant