Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/wasmbuild/loader.ts>LoaderOptions

Build tool to use Rust code in Deno and the browser.
Go to Latest
interface LoaderOptions
import { type LoaderOptions } from "https://deno.land/x/wasmbuild@0.15.0/loader.ts";

Properties

imports: WebAssembly.Imports | undefined

The Wasm module's imports.

optional
cache: (url: URL, decompress: DecompressCallback | undefined) => Promise<URL | Uint8Array>

A function that caches the Wasm module to a local path so that so that a network request isn't required on every load.

Returns an ArrayBuffer with the bytes on download success, but cache save failure.