Skip to content

Commit 6c87ca7

Browse files
committed
♻️ use node:fs/promises for wasm file loading
1 parent abab634 commit 6c87ca7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

native.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export interface Native {
77
length(ct: number): number;
88
}
99

10-
const wasm = await Deno.readFile(new URL("./clayterm.wasm", import.meta.url));
10+
import { readFile } from "node:fs/promises";
11+
12+
const wasm = new Uint8Array(
13+
await readFile(new URL("./clayterm.wasm", import.meta.url)),
14+
);
1115
const compiled = await WebAssembly.compile(wasm);
1216

1317
export async function load(w: number, h: number): Promise<Native> {

0 commit comments

Comments
 (0)