摘要: c代码 #include <stdio.h> #include <emscripten/emscripten.h> typedef struct { int32_t number; double d; uint8_t* s; }obj; obj g = {1245,25.123456,(uint8_ 阅读全文
posted @ 2020-07-11 22:39 y-y-y-y 阅读(728) 评论(0) 推荐(0) 编辑
摘要: emcc main.c -s WASM=1 -o index.js 将c代码编译为wasm并且输出胶水代码index.js -O1 代码优化 -O2 优化级别提高 -O3 最高优化级别减小代码体积 emcc main.c -s MODULARIZE=1 -s EXPORT_NAME="createM 阅读全文
posted @ 2020-07-11 16:07 y-y-y-y 阅读(813) 评论(0) 推荐(0) 编辑