Skip to content

david-alexander/protobuf-haxe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protobuf-Haxe

Protobuf-Haxe is an implementation of Google's Protocol Buffers library for the Haxe platform. It requires Haxe 3.0 or above.

The project is still in the very early stages of development, and further information will be posted here soon.

Contact: David Alexander (david@cerebralfix.com)

What is Implemented?

  • ProtoC generator plugin (see protogen directory)
  • Reading and writing from byte arrays
  • All primitive types (not all tested yet - expect some issues with signed vs unsigned integers, endianness, etc.)
  • Type-safe enum fields
  • Repeated fields (packed and non-packed)
  • Messages within messages
  • Length-prefixed messages (à la protobuf-net)
  • Utility code for dealing with sockets (synchronous and asynchronous)
  • Utility code for managing union messages, including passing them to appropriate callbacks

To-Do List

  • Required fields (currently all are considered optional, even if specified as required in the proto file)
  • Unit tests for the library and the ProtoC generator, covering all data types
  • Memory pooling of messages
  • Source code documentation
  • Sample code (e.g. basic chat client/server)
  • Support for Protobuf RPC Services
  • An option to interpret union messages as parameterized enums
  • Proper handling of unknown fields
  • Support for the now-deprecated "group" field type

Known Issues

  • The RepeatedField class seems to be triggering a bug in HXCPP which causes the C++ build to fail. It is currently being worked around using a batch script that deletes the offending C++ code before the C++ compiler is run.
  • The MessageBuilder macros can generate cryptic compiler errors (such as "this pattern is unused") when given incorrect message specifications (e.g. missing field numbers). The file/line information for these errors is also incorrect.

About

Haxe Implementation of Google Protobuf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published