All Projects → kwonoj → protobuf-wasm

kwonoj / protobuf-wasm

Licence: other
No description, website, or topics provided.

protobuf-wasm

This repo contains small set of patches to protobuf (3.9.0) to build protobuf via emscripten. Simply apply all patches to protobuf source code, then run emcc. If you'd like to check example build, there is [docker image] (https://github.com/kwonoj/docker-arch-emscripten/blob/master/Dockerfile)

protoc compiler will not be built but any code generate by the standard protoc is compatible with emscripten.

sh autogen.sh
emconfigure ./configure
emmake Make

will generate a dynamic library in src/.libs/ called libprotobuf.$(VERSION).[so|dylib]. Though the suffix suggests that this is a regular dylib, it contains emscripten bytecode. Change the suffix to .bc and you'll be able to link it into your emscripten project.

These patches are based on prior work of https://github.com/invokr/protobuf-emscripten and follows same license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].