mirror of
https://github.com/extism/extism.git
synced 2026-04-23 03:00:11 -04:00
7 lines
265 B
JavaScript
7 lines
265 B
JavaScript
import { Plugin } from "./index.js";
|
|
import { readFileSync } from "fs";
|
|
|
|
let wasm = readFileSync("../wasm/code.wasm");
|
|
let p = new Plugin(wasm);
|
|
let buf = p.call("count_vowels", process.argv[2] || "this is a test");
|
|
console.log(JSON.parse(buf.toString())['count']); |