Home 编译protobuf的WASM库
Post
Cancel

编译protobuf的WASM库

记录

虽然最新的插件在WASM暂时去掉protobuf作为通信协议,但是也准备记录一下,为WASM编译protobuf的操作。

临时记录 https://github.com/coding2233/docker-arch-emscripten-protobuf

v3.9.0

因为这里的版本还支持makefile编译 编译流程https://github.com/coding2233/docker-arch-emscripten-protobuf/blob/main/.github/workflows/docker-publish.yml

主要为WASM编译库文件的时候,需要优先应用几个patch, 这几个patch也是专门为当前版本实现的

latest

未尝试

最新的版本,已经改成了bazel作为编译构建工具,需要修改对应的patch然后再尝试编译成WASM的库。 也可以尝试xmake f --trybuild=bazel

xmake加载protobuf

1
2
--add_files("protocol/*.cc","protocol/lib/libprotobuf.so.o")
--add_includedirs("protocol","protocol/include")
This post is licensed under CC BY 4.0 by the author.

Excel转Protobuf/Json通用配置文件

unity性能优化