Skip to content

Support process and signal on wasm#484

Draft
peter-jerry-ye wants to merge 2 commits into
mainfrom
codex/async-process
Draft

Support process and signal on wasm#484
peter-jerry-ye wants to merge 2 commits into
mainfrom
codex/async-process

Conversation

@peter-jerry-ye

@peter-jerry-ye peter-jerry-ye commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Why

The wasm backend needs the async process APIs and global signal handling to behave like the native event loop. Without these imports, process cancellation and the signal package cannot run under moonrun.

Correctness

This adds wasm bindings for process and signal operations, keeps Windows-only signal paths as link-time stubs where the native package cannot deliver those signals programmatically, and routes Unix signal handling through the existing thread-pool completion path.

Scope

The change is limited to wasm process/signal bindings and enables the existing signal tests for wasm.

@coveralls

coveralls commented Jul 7, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 781

Coverage decreased (-1.3%) to 75.9%

Details

  • Coverage decreased (-1.3%) from the base build.
  • Patch coverage: 82 uncovered changes across 3 files (0 of 82 lines covered, 0.0%).
  • 3 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
src/process/process.mbt 43 0 0.0%
src/internal/event_loop/signal.mbt 20 0 0.0%
src/internal/event_loop/process.mbt 19 0 0.0%

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
src/internal/event_loop/network.mbt 2 75.0%
src/internal/event_loop/signal.mbt 1 41.18%

Coverage Stats

Coverage Status
Relevant Lines: 4776
Covered Lines: 3625
Line Coverage: 75.9%
Coverage Strength: 11652.91 hits per line

💛 - Coveralls

@peter-jerry-ye peter-jerry-ye changed the title feat(process): add wasm process support Support process and signal on wasm Jul 7, 2026
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.

2 participants