Protocol Buffers for Node
A wrapper in Node for the compiled protoc from https://github.com/protocolbuffers/protobuf.
Version
It's currently using Protocol Buffers v3.20.3
.
Platforms
Google only provides binary files for Windows, Linux and OSX in x86_64 and x86_32.
Examples
There's currently no documentation. Hopefully this example will help.
var protoc = require("protoc");
protoc.library(["path/to/file.proto", "path/to/file2.proto"], function(err, files) {
if (err) {
console.error(err);
return;
}
});
It's also possible to directly call the protoc binary file:
npx protoc --help