Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[browser][coreCLR] detect browser features and fail fast - #122799

#122799
Merged
pavelsavara merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
pavelsavara:browser_detect_wasm_featurespavelsavara/runtime:browser_detect_wasm_featuresCopy head branch name to clipboard
Jan 4, 2026
Merged

[browser][coreCLR] detect browser features and fail fast#122799
pavelsavara merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
pavelsavara:browser_detect_wasm_featurespavelsavara/runtime:browser_detect_wasm_featuresCopy head branch name to clipboard

Conversation

@pavelsavara

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
Comment thread src/native/corehost/browserhost/loader/bootstrap.ts
@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
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.