Hi all,
I'm pleased to announce the birth of scala-protobuf project. You can
find the sources at http://code.google.com/p/protobuf-scala .
The goal of the project is allowing easy construction of Google
protobuf (http://code.google.com/p/protobuf/) messages from Scala.
Unlike conventional protobuf code, protobuf-scala allows for a more
code-as-data way to write your protocol messages. Here is a short

Given a protocol definition
message Artist {
  required string name = 1;
  message Album {
    required string title = 1;
    repeated string tracks = 2;
    optional uint32 year_produced = 3;

  repeated Album albums = 2;

one creates instances like this:

val BradMehldau = Artist (
  name("Brad Mehldau"),
  albums (
    Album (
      title("Day Is Done"),
        "50 ways to leave your lover",

As most of scalac plugins, protobuf-scala consists of a generator
plugin and a thin runtime layer in scala. The output of scala code
generator requries java classes produced with --java_output, so be
sure to produce it as well.
Hope those of you who use both scala and protobufs find it useful.


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to