- 小程序如何支持在 Worker 内使用 WXWebAssembly?
如题, 最好有代码示例,谢谢
2021-08-16 - FileSystemManager 读取大文件超时?
小程序真机调试时,下载大约5MB的文件后,读取超时。试过两种方法: 方法一:FileSystemManager.readFile(Object object) var wasmfilepath = evt.tempFilePath; console.log(wasmfilepath) console.log(wasmdir + wasmfilename) var ret = FSM.saveFileSync(wasmfilepath, wasmdir + wasmfilename); console.log(ret) var stat = FSM.statSync(ret, false) console.log(stat) FSM.readFile({filePath: ret, success(res) { console.log("read file suceed!!!") new WebAssembly.compile(wasmdata).then(function (wam) { new WebAssembly.instantiate(wam, info).then(receiveInstantiatedSource); }); }, fail: console.error }); 方法二:FileSystemManager.readFile(Object object) var wasmfilepath = evt.tempFilePath; console.log(wasmfilepath) console.log(wasmdir + wasmfilename) var ret = FSM.saveFileSync(wasmfilepath, wasmdir + wasmfilename); console.log(ret) var stat = FSM.statSync(ret, false) console.log(stat) var res = FSM.readFileSync(ret) new WebAssembly.compile(res).then(function (wam) { new WebAssembly.instantiate(wam, info).then(receiveInstantiatedSource); });[图片] 模拟器调试同样的代码,没有问题。
2020-12-29