Skip to content

penduan/emscripten-wechat-filesystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emscripten-wechat-filesystem

为Emscripten适配了微信小程序的文件管理系统

使用方式

emcc构建时使用 --pre-js ./dist/wechatfs.js引入或者在粘贴到emscripten构建后的模块代码前面

构建时选项-sENVIRONMENT=node -sNO_DYNAMIC_EXECTION -lnodefs.js

# 为emscripten添加适配
sed -i "s/require(.fs.)/getWeChatFS()/g" ./out.js
sed -i "s/require(.path.)/getPathAdapter()/g" ./out.js
sed -i 's/getBinaryPromise()\./getWasmFilePath()./g' ./out.js

# 将`WASM_FILE_PATH`字符串替换为小程序包中的wasm文件路径
sed -i 's/WASM_FILE_PATH/out.wasm/g' ./out.js

About

适用于微信小程序的Emscripten文件管理系统

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published