This is an experimental pure Java implementation of Cap'n Proto.
It doesn't do much yet.
You will need SBT. We recommend this version.
To compile:
$ sbt compile
To read a message:
$ echo '(people = [(id = 123, name = "Alice", email = "alice@example.com", employment = (school = "MIT"))])' \
| capnp encode examples/src/main/schema/addressbook.capnp AddressBook \
| java -cp runtime/target/scala-2.11/classes:examples/target/scala-2.11/classes/ \
org.capnproto.examples.AddressbookMain read
To write a message:
$ java -cp runtime/target/scala-2.11/classes:examples/target/scala-2.11/classes/ \
org.capnproto.examples.AddressbookMain write \
| capnp decode examples/src/main/schema/addressbook.capnp AddressBook
To generate IntelliJ project files, do sbt update gen-idea
.