You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@protobuf-ts/protoc

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protobuf-ts/protoc

Installs the protocol buffer compiler "protoc" for you.

2.11.1
latest
Source
npmnpm
Version published
Weekly downloads
369K
15.73%
Maintainers
1
Weekly downloads
 
Created

What is @protobuf-ts/protoc?

@protobuf-ts/protoc is a TypeScript library that provides tools for working with Protocol Buffers (protobuf). It allows you to generate TypeScript code from .proto files, making it easier to work with protobuf in TypeScript projects.

What are @protobuf-ts/protoc's main functionalities?

Generate TypeScript Code from .proto Files

This feature allows you to generate TypeScript code from .proto files. The generated code can then be used in your TypeScript projects to work with protobuf messages.

const { protoc } = require('@protobuf-ts/protoc');

protoc({
  protoFiles: ['path/to/your/file.proto'],
  outDir: 'path/to/output/directory'
}).then(() => {
  console.log('TypeScript code generated successfully');
}).catch(err => {
  console.error('Error generating TypeScript code:', err);
});

Compile Protobuf Definitions

This feature allows you to compile protobuf definitions from .proto files. The compiled definitions can be used to serialize and deserialize protobuf messages.

const { compile } = require('@protobuf-ts/protoc');

compile({
  protoFiles: ['path/to/your/file.proto'],
  outDir: 'path/to/output/directory'
}).then(() => {
  console.log('Protobuf definitions compiled successfully');
}).catch(err => {
  console.error('Error compiling protobuf definitions:', err);
});

Other packages similar to @protobuf-ts/protoc

Keywords

Protocol Buffers

FAQs

Package last updated on 18 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts