Socket
Socket
Sign inDemoInstall

protobuf

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    protobuf

Protocol Buffers for NodeJS


Version published
Weekly downloads
234
increased by25.81%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

This is a fork of http://code.google.com/p/protobuf-for-node/

It now works with the NodeJS 0.8.x series.

To install, just type:

npm install protobuf

Thanks to work by seishun, it now uses node-gyp and has google's protocol bufferes library integrated, so no separate installtion required.

All the best,

Chris.

P.S. Mac/OSX note: A bug has been reported. Mac users can still use v0.8.0 of protobuf, by following the instructions for NodeJS 0.6.x, but typing:

npm install protobuf@0.8.0

to install the older version.

Older instructions for use with the NodeJS 0.6.x series.

Prerequisites:

NodeJS v0.6.X npm

To install on Ubuntu and OSX:

The first steps are to build and install Google's protobuf library. Make sure you have the right version by running "protoc --version" after the install.

wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
tar -xzvf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1/
./configure && make && sudo make install
cd

This installs the npm package.

npm install protobuf

For Ubuntu, update library paths.

sudo ldconfig

For OSX, you might need to add the path:

export DYLD_LIBRARY_PATH=/home/chris/node_modules/protobuf/build/Release:/usr/local/lib:$DYLD_LIBRARY_PATH

And test that it works... Run node, try

require('protobuf');

you should see:

{ Schema: [Function: Schema] }

As seen from the instructions above, this is my first attempt at packaging a slightly complex C++ module for NPM.

If you can help me simplify these instructions, please submit a patch.

Good luck,

Chris.

FAQs

Last updated on 25 Oct 2012

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc