MCPcopy Create free account
hub / github.com/develop202/migu_video / initWasm

Function initWasm

utils/ddCalcuURL.js:72–78  ·  view source on GitHub ↗

* 初始化wasm * @param {string} masmURL - wasm地址 * @returns {object} - wasm导出的内容

(masmURL)

Source from the content-addressed store, hash-verified

70 * @returns {object} - wasm导出的内容
71 */
72async function initWasm(masmURL) {
73 // 获取wasm文件
74 let resp = await fetchUrl(masmURL);
75 // 初始化
76 let { instance } = await WebAssembly.instantiateStreaming(resp, importObj)
77 return instance.exports;
78}
79
80
81

Callers

nothing calls this directly

Calls 1

fetchUrlFunction · 0.90

Tested by

no test coverage detected