Skip to content

Support process and signal on wasm#484

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

Support process and signal on wasm#484
peter-jerry-ye wants to merge 8 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 807

Coverage decreased (-1.7%) to 75.462%

Details

  • Coverage decreased (-1.7%) from the base build.
  • Patch coverage: 116 uncovered changes across 3 files (14 of 130 lines covered, 10.77%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
src/process/process.mbt 65 6 9.23%
src/internal/event_loop/process.mbt 43 0 0.0%
src/internal/event_loop/signal.mbt 18 4 22.22%
Total (6 files) 130 14 10.77%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

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

Coverage Stats

Coverage Status
Relevant Lines: 4813
Covered Lines: 3632
Line Coverage: 75.46%
Coverage Strength: 11589.96 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
@peter-jerry-ye peter-jerry-ye force-pushed the codex/async-process branch 3 times, most recently from 3bc9e90 to f33e11b Compare July 8, 2026 07:28
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