Seeking Collaboration: New Perl Protobuf XS Implementation using UPB

[email protected] ("C.J. Collier" via perl5-porters)
Newsgroups perl.perl5.porters
Message-ID <CAAjgtHYqUYOe6bpzKkhgmy-Y83nM4AX-N8CAsex9NkNGOidFHQ@mail.gmail.com>
Hi p5p,

I’m working on a new Perl extension for Protocol Buffers, aiming to provide
a modern, performant, and well-tested interface. The core idea is to
leverage the upb library from Google’s C++ Protobuf project, which is
designed for speed and small code size, making it ideal for bindings in
other languages. This work is in line with efforts to enhance Perl support
within the Google Cloud Platform ecosystem (see
https://issuetracker.google.com/issues/470573079).

The current progress is being made in the google-auth-library-perl
repository, under the protobuf/perl/ subdirectory:
https://github.com/GoogleCloudPlatform/google-auth-library-perl/tree/main/protobuf/perl

The protobuf/ directory contains a copy of the Protocol Buffers C++
implementation at tag v33.2, with the Perl-specific XS code and build
system located within protobuf/perl/.

*Important Note:* This repository is currently private. Until the open
source program office can adjust the visibility, interested collaborators
will need to contact me <[email protected]> directly to be added to the
repository collaborators list to gain access.

*Current Status:*

   - Basic build system using ExtUtils::MakeMaker is in place within
   protobuf/perl/.
   - Interfacing with the upb library located in protobuf/upb.
   - C-level test suite (protobuf/perl/t/c/) using an embedded Perl
   interpreter for core functions.
   - Initial XS implementations for:
      - Arena management
      - Object caching (Perl wrappers for UPB objects)
      - Descriptor Pool and Descriptor loading
      - Scalar type conversions between Perl SVs and UPB values (sv_to_upb
      and upb_to_sv)
   - Perl-level tests for error conditions.

*Goals:*

   - A complete and robust Protobuf implementation for Perl.
   - Good performance by leveraging upb.
   - A clean and modern Perl API.
   - Eventually, releasing this as a standalone distribution on CPAN.

*Seeking Collaboration:*

This is a significant undertaking, and I would be thrilled to have
collaborators. Areas where help would be particularly welcome include:

   - *XS Development:* Implementing the remaining Protobuf features
   (Messages, Enums, Services, Extensions, Well-Known Types).
   - *API Design:* Ensuring the Perl API is idiomatic and user-friendly.
   - *Testing:* Expanding both C-level and Perl-level test coverage.
   - *Memory Management:* Refining object lifecycles and addressing
   potential leaks, especially with ASan.
   - *Documentation:* Writing clear and comprehensive docs.
   - *Packaging:* Preparing for a CPAN release.

If you have experience with XS, the Perl internals, Protocol Buffers, or
just enthusiasm for the project, I’d love to hear from you. Please feel
free to check out the repository (after requesting access), open issues, or
reach out to discuss.

Thanks,

C.J.

-- 
C.J. Collier | Technical Solutions Engineer | [email protected] | +1 (206)
226-5809 <+12062265809>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.