A transpiler and runtime for using Google Protocol Buffers (.proto files) with ProtoDef in Node.js. Version 1.0.0 is the current stable release; the package is actively maintained with an irregular release cadence (last two releases: 0.0.2 and 1.0.0). Key differentiators include support for Proto2 and Proto3, nested messages, enums, maps, packed repeated fields, extensions, imports (including Google well-known types), and a protobuf_message container for length-prefixing. It offers both a compiler mode for high performance via ProtoDef's AOT compiler and an interpreter mode for dynamic schemas. Compared to alternatives like protobuf.js or protobuf-es, this library integrates tightly with the ProtoDef ecosystem, making it suitable for projects already using ProtoDef for protocol definitions.
npm install protodef-protobufNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a .proto schema, compile with ProtoDef, and encode/decode a protobuf message using the library.
Review CHANGELOG for breaking changes; update imports and transpile() calls.
Pass schema(s) as array: pp.transpile([schema])
Use the naming convention as shown in generatedSchema keys.
Prefer ProtoDefCompiler over ProtoDef for better performance.
Ensure require or dynamic import is used: const pp = require('protodef-protobuf');Add pp.addTypesToCompiler(compiler) before compiler.addTypesToCompile(protocol).
Check generatedSchema keys for correct type name; use e.g. 'chat_ChatMessage'.
Install protobufjs: npm install protobufjs