Skip to content

Conversation

@pavelsavara
Copy link
Member

  • new validateWasmFeatures() which makes sure that the JS Engine supports WASM EH and SIMD

@pavelsavara pavelsavara added this to the 11.0.0 milestone Dec 31, 2025
@pavelsavara pavelsavara self-assigned this Dec 31, 2025
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Dec 31, 2025
Copilot AI review requested due to automatic review settings December 31, 2025 13:50
@pavelsavara pavelsavara added area-Host os-browser Browser variant of arch-wasm labels Dec 31, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds browser feature detection to fail fast when the JavaScript engine doesn't support required WebAssembly features (exception handling and SIMD). This addresses a TODO item in the codebase about detecting missing WASM features early in the startup process.

  • Introduces a new validateWasmFeatures() function that checks for WASM exception handling and SIMD support
  • Integrates feature validation into the runtime initialization flow to fail early with clear error messages
  • Uses the wasm-feature-detect npm package to perform browser capability detection

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/native/corehost/browserhost/loader/run.ts Imports and calls the new validateWasmFeatures() function during runtime creation, after config is loaded but before any resources are processed
src/native/corehost/browserhost/loader/bootstrap.ts Implements the validateWasmFeatures() function that checks for WASM exception handling and SIMD support using the wasm-feature-detect library

@pavelsavara pavelsavara requested a review from maraf December 31, 2025 14:01
@pavelsavara pavelsavara merged commit d968dc4 into dotnet:main Jan 4, 2026
51 checks passed
@pavelsavara pavelsavara deleted the browser_detect_wasm_features branch January 4, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants