|
Project Information
Featured
Downloads
Links
|
What is it?protoc-gen-as3 is a Protocol Buffers plugin for ActionScript 3. This project aims to support Protocol Buffers in ActionScript 3 with minimum API and best performance. protoc-gen-as3's serialize/deserialize performance is near native AMF's writeObject/readObject, although protoc-gen-as3 runs in AVM2 while writeObject/readObject runs natively. How to contribute?Your contibution is welcome. I highly recommend that you clone, hack, and tell me what you've done. FeaturesI implemented most of protobuf features (more than any other protobuf's AS3 implementation) in protoc-gen-as3:
Unsupported featuresThese features are supported by Google's C++/Java/Python implementation, but not in protoc-gen-as3:
How to use it?Unlike other protobuf's as3 compilers, protoc-gen-as3 does not require you to modify original protobuf's source code. You can just use protoc binary (version 2.3+) with this plugin to generate AS3 code: protoc --plugin=protoc-gen-as3=path/to/protoc-gen-as3[.bat] --as3_out=output-path your.proto Then, you can use the generated files to serialize and deserialize in protobuf format by invoking mergeFrom() and writeTo() method. Before compiling, don't forget to let your AS3 compiler include protobuf.swc and the generated code. See AdvancedUsage and ASDoc for more information. |