Giter VIP home page Giter VIP logo

p5-protobuf-perlxs's Introduction

This is protobuf-perlxs, a Perl/XS code generator for Google's Protocol
Buffers.  The generated Perl/XS code is meant to be compiled and linked
with the generated C++ code, and it provides the Perl developer with a
high performance interface to Protocol Buffer objects.

Each top-level message generates a Perl module, an XS source file, and
a typemap.  Each top-level enum generates a Perl module and an XS 
source file.  No typemap is needed for a top-level enum.

If the .proto file specifies a package name, the package name is
converted to a Perl package prefix like so:

file.proto
---------------------------
package foo.bar.baz;

message qux {
  ...
}

becomes (in Perl):

Qux.pm
---------------------------
package Foo::Bar::Baz::Qux;

Qux.xs
---------------------------
#include "file.pb.h"

MODULE = Foo::Bar::Baz::Qux  PACKAGE = Foo::Bar::Baz::Qux
PROTOTYPES: ENABLE

qux.typemap
---------------------------
::foo::bar::baz::qux * T_FOO_BAR_BAZ_QUX

The Perl/XS code generator assumes that the C++ code generator will
have been run on the same .proto files by the time the sources are to
be compiled.  It is possible to build a Makefile.PL that compiles the
generated C++ sources along with the generated XS sources, and it is
also possible (preferable, in fact) to compile the C++ sources into a
shared library separately, linking the compiled XS sources with this
shared library.  In both scenarios, the generated C++ headers need to
be present in the include path, as they are included by the XS source
files.

p5-protobuf-perlxs's People

Watchers

Satoshi Ohkubo avatar Kan Fushihara avatar Kazuhiro Shibuya avatar James Cloos avatar Vincent van Dam avatar

p5-protobuf-perlxs's Issues

recursive message/field

Are you aware how to fix memory bomb while you're dealing with recursive message definition?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.