Enable websocket on wasm#476
Draft
peter-jerry-ye wants to merge 1 commit into
Draft
Conversation
104a892 to
54f8f20
Compare
Coverage Report for CI Build 736Coverage remained the same at 76.987%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
ca8bce3 to
4468997
Compare
4468997 to
5de792e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
WebSocket was still native-only even though the HTTP/TLS stack now has wasm support. That kept wasm users from using the existing WebSocket client/server implementation and left the websocket test matrix behind native.
Correctness
This enables the existing websocket implementation, docs, and non-process tests for wasm. The accept-key path no longer depends on TLS crypto helpers:
Sec-WebSocket-Acceptis computed with package-local SHA-1 plus the existing base64 encoder, covered by the RFC accept-key test.For WebSocket nonce and frame-mask bytes, native uses a websocket-local CSPRNG stub. Wasm does not add a new host import; it seeds a package-local ChaCha8 generator from the existing async clock import, so the wasm backend remains within the current moonrun host contract.
Scope
The change is limited to websocket target metadata, websocket-local crypto/random helpers, and shared websocket tests/docs.
external_client_test.mbtremains native-only because it shells out through process APIs, which are intentionally outside this PR.