Check if WASM streaming compilation is supported.
Streaming compilation (WebAssembly.instantiateStreaming) allows the browser/runtime to compile WASM while downloading, giving a faster startup for large modules.
WebAssembly.instantiateStreaming
true when streaming instantiation is available.
true
import { isStreamingSupported } from "@aspect/crypto-wasm";if (isStreamingSupported()) { const { instance } = await WebAssembly.instantiateStreaming(fetch("/mod.wasm"));} Copy
import { isStreamingSupported } from "@aspect/crypto-wasm";if (isStreamingSupported()) { const { instance } = await WebAssembly.instantiateStreaming(fetch("/mod.wasm"));}
Check if WASM streaming compilation is supported.
Streaming compilation (
WebAssembly.instantiateStreaming) allows the browser/runtime to compile WASM while downloading, giving a faster startup for large modules.