Hello one and all,

Amid much editing, my Haskell version of protocol-buffer is now released 
at version 1.0.0.  This version supports the features of Google's 
version 2.0.2 including the new extensible options.  It can also dump a 
binary version of the FileDescriptorSet like protoc, but this version 
does not yet take such a binary file as input.  And a few bugs have been 
fixed.

What is this for?  What does it do?  Why?

  It generates Haskell data types that can be converted back and forth 
to lazy ByteStrings that interoperate with Google's generated code in 
C++/Java/python.

  The data types are defined in a ".proto" text file which is translated 
into the target language.

  My code is a pure Haskell re-implementation of the Google code at
http://code.Google.com/apis/protocolbuffers/docs/overview.html
  which is "...a language-neutral, platform-neutral, extensible way of 
serializing structured data for use in communications protocols, data 
storage, and more."
  Google's project produces C++, Java, and Python code.  This one 
produces Haskell code.

Where is the code?

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers-descriptor
   
 
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hprotoc

And it needs to be build and installed in the above order.  The first is 
the support library (Text.ProtocolBuffers).  The second is the 
self-describing descriptor library (Text.DescriptorProtos[.Options]).  
The third is the 'hprotoc' executable which translates the ".proto" 
files into Haskell code.  This works similarly to the "protoc" program 
from the original Google project.

The 'hprotoc' program works on descriptor.proto to produce the above, as 
well as having been tested with unittest.proto for which I have tested 
rountrip to and from the wire format, and unittest_custom_options.proto 
and for which I have retrieved and tested the stored options (see the 
new Text.DescriptorProtos.Options for an API to help access these).

Why is this not documented better?

  Because no one is using it.  Email me and this list if you use it and 
get stuck.  Note that hprotoc's options are very similar to protoc.  
Hopefully the Haskell code docs from haddock will be enough to get 
started with the libraries.

Cheers,
  Chris Kuklewicz

PS: Small example of testing the custom options from 
unittest_custom_options.proto :

import Text.ProtocolBuffers
import Text.DescriptorProtos.Options
import Protobuf_unittest

test4 :: EnumOptions
test4 = maybe (error "Nothing") options $
              toDP "TestMessageWithCustomOptions" fileDescriptorProto 
 >>= descend "AnEnum"

testVal = getVal test4 enum_opt1 == (-789)  -- Should be True


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to