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)
- 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
- 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
- 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.