npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

protohx

v0.0.3

Published

Crossplatform implementation of 'Google's Protocol Buffers' for haxe.

Readme

Protohx is crossplatform implementation of "Google's Protocol Buffers" for haxe 3.

This is partial port of ActionScript3 protoc plugin "protoc-gen-as3" for haxe. Currently implemented only basic functionality: read/write messages from/to haxe.io.Bytes.

haxe 3 compatible. Core functionality doesn't depend on third-party libraries.

License

BSD

See also

* https://code.google.com/p/protobuf/ - Official Google Protocol Buffers page
* https://github.com/Atry/protoc-gen-haxe - another haxe implementation from original "protoc-gen-as3" author 
* https://code.google.com/p/protoc-gen-as3/ - ActionScript 3 protoc plugin
* https://github.com/david-alexander/protobuf-haxe - another haxe implementation (GPL)

Supported Features

This functionality ported from "protoc-gen-as3"

* All basic types  (int, int64, string, bytes, bool)
* Nested messages
* Enumerations (as integer)
* Packed and non-packed repeated fields
* Extensions (converted to optional fields)

Tested targets

* flash
* neko 2.0
* cpp (linux32, win32, android)
* js
* php
* java
* as3

System requirements

* haxe 3.1.3
* neko 2.0
* protoc 2.5.0
* java 1.7
* ant (for build plugin from sources)

How to install

1) install protohx
     $ haxelib install protohx
   or
     $ haxelib hg protohx https://bitbucket.org/nitrobin/protohx
   or
     $ haxelib git protohx https://github.com/nitrobin/protohx
2) install protoc into system PATH
   * Windows: 
       Download https://protobuf.googlecode.com/files/protoc-2.5.0-win32.zip
       Unpack and add protoc.exe location to system %PATH%
   * Ubuntu:
       $ sudo aptitude install protobuf-compiler
   * Other:
       Download source code from https://code.google.com/p/protobuf/downloads/list
       Unpack and make && make install.
   * NOTE:
       You also can set custom protoc executable with "setup-protoc"
           $ haxelib run protohx setup-protoc PROTOC_2_5_0_PATH 
       For example:
           $ haxelib run protohx setup-protoc /home/user/opt/protobuf-2.5.0/src/protoc

How to use

1) create empty json config file in project directory with "config"
    $ haxelib run protohx config protohx.json
    Change and save protohx.json 
    // File: samples/test-core/protohx.json
    {
        "protoPath": "proto",
        "protoFiles": [
            "proto/test.proto",
            "proto/google/protobuf/compiler/plugin.proto",
            "proto/google/protobuf/descriptor.proto"
        ],
        "cleanOut": true,
        "haxeOut": "out/src-gen",
        "javaOut": null
    }
    Parameters:
        protoPath - base path for import directive in proto files;
        protoFiles - list of files for code generation;
        haxeOut/javaOut - path for generated sources (add it in project classpath);
        cleanOut - if 'true' clean output directories before code generation.

2) write proto files
3) genearate haxe sources:
      $ haxelib run protohx generate protohx.json
4) add "out/src-gen" (see param: haxeOut) directory in project classpath

Notes

Protohx project urls: 
    * https://github.com/nitrobin/protohx
    * https://bitbucket.org/nitrobin/protohx

This project consists from follow parts:
    * tools/plugin - protoc plugin for generating haxe sources;
    * tools/run - haxelib runner. Generate haxe and a java sources by json config in project directory;
    * protohx - library sources. Pure-haxe port of main parts originally ActionScrip3 code from protoc-gen-as3;
    * samples/01-core - unit tests;
    * samples/02-ipc - java-to-neko and neko-to-java intercommunication test.
        NOTE: Install protoc 2.5.0 via "haxelib run protohx setup-protoc PROTOC_2_5_0_PATH" before building java part of this test.
    * samples/03-network - complete client-server example.
       build/run node.js server:
            haxe build-server-js.hxml
       or neko serer:
            haxe build-server-neko.hxml
       and build/run flash client:
            haxe build-client-flash.hxml
       or
            nme test (flash|linux|android)