YuJianrong/node-unrar.js

How to use wasm file ?

Closed this issue · 4 comments

hi,

i want to extract file by wasm , can you give me some suggestions ?

我想单独使用 wasm ,以使用各种功能,比如解压。我该怎么做?期待你的回复

Can you describe your question in detail? What are you talking about? This package already supports Webasm; please follow the demo https://github.com/YuJianrong/node-unrar.js/tree/master/demo/web to see how it works in the browser.

请详细描述一下你的需求,wasm已经支持了(例子:https://github.com/YuJianrong/node-unrar.js/tree/master/demo/web)。

我想移植到微信小程序上,但是它的环境还是和 浏览器有差异的。比如对wasm文件的使用就不大相同,以及 rar文件的读取 都存在差异。

目前来看逻辑上存在耦合,有点无从下手。大致想法是 比如wasm文件我独立调用起来后,它提供了解压的方法 我读取rar文件的arraybuffer后传入

噢,这就到我的知识盲区了。
建议你sync项目后进 demo/web ,npm install 之后查看一下那个demo怎么加载的,应该在小程序上加载方式也类似。

明白,我在多研究研究。谢谢