Skip to content

feat: add hasWasmSupport WebAssembly capability check#19

Open
antsukanova wants to merge 4 commits into
mainfrom
antsukan/wasm-support
Open

feat: add hasWasmSupport WebAssembly capability check#19
antsukanova wants to merge 4 commits into
mainfrom
antsukan/wasm-support

Conversation

@antsukanova

@antsukanova antsukanova commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds WebCapabilities.supportsWasm() - a capability check that reports whether the
WebAssembly runtime is available, without throwing when it isn't.

Some environments hard-disable WebAssembly (e.g. Chromium "jitless" mode via
DefaultJavaScriptJitSetting=2), where touching WebAssembly.* throws a
ReferenceError. This lets callers identify the issue early and fail fast.

Changes

  • web-capabilities.ts — new supportsWasm() (returns NOT_CAPABLE when the runtime
    is hard-disabled, CAPABLE otherwise).
  • isCapableOfBackgroundNoiseRemoval() — now fails fast to NOT_CAPABLE when
    WebAssembly is unavailable, since background noise removal runs as a WASM module.
  • isCapableOfVirtualBackground() — now fails fast to NOT_CAPABLE when
    WebAssembly is unavailable, since background video effect runs as a WASM module.
  • web-capabilities.spec.ts — tests for supportsWasm and the gated BNR case.
  • package.json — add a types entry to the exports map.

Consumer

@webex/web-media-effects will use supportsWasm() to gate noise-reduction loading and
fail fast with a clear error when WASM is unavailable.

@antsukanova antsukanova self-assigned this Jul 10, 2026
@antsukanova antsukanova requested a review from bbaldino July 10, 2026 15:55
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