mirror of
https://github.com/denoland/deno.git
synced 2025-02-18 19:33:00 -05:00

Support for Wasm modules. Note this implements the standard where the default export is the instance (not the module). The module will come later with source phase imports. ```ts import { add } from "./math.wasm"; console.log(add(1, 2)); ```
7 lines
144 B
JavaScript
7 lines
144 B
JavaScript
import {
|
|
add,
|
|
subtract,
|
|
} from "http://localhost:4545/wasm/math_with_import.wasm";
|
|
|
|
console.log(add(1, 2));
|
|
console.log(subtract(100, 50));
|