2014-05-11 14:50:00 +00:00
|
|
|
# capnproto-java: Cap'n Proto for Java
|
|
|
|
|
2014-05-17 02:37:25 +00:00
|
|
|
This is an experimental pure Java implementation of [Cap'n Proto](http://capnproto.org).
|
2014-05-11 14:50:00 +00:00
|
|
|
|
2014-05-17 02:37:25 +00:00
|
|
|
It doesn't do much yet.
|
2014-05-11 18:15:15 +00:00
|
|
|
|
2014-05-17 02:37:25 +00:00
|
|
|
## getting started
|
2014-05-15 23:12:58 +00:00
|
|
|
|
2014-05-17 02:37:25 +00:00
|
|
|
You will need [SBT](http://scala-sbt.org). We recommend [this version](https://github.com/paulp/sbt-extras).
|
2014-05-16 02:53:49 +00:00
|
|
|
|
2014-05-16 02:50:36 +00:00
|
|
|
```
|
2014-05-17 02:37:25 +00:00
|
|
|
$ sbt compile
|
2014-05-17 02:40:48 +00:00
|
|
|
$ echo '(people = [(id = 123, name = "Alice", email = "alice@example.com", employment = (school = "MIT"))])' \
|
|
|
|
| capnp encode examples/src/main/schema/addressbook.capnp AddressBook \
|
2014-05-19 19:15:38 +00:00
|
|
|
| java -cp runtime/target/scala-2.11/classes:examples/target/scala-2.11/classes/ \
|
2014-05-17 02:40:48 +00:00
|
|
|
org.capnproto.examples.AddressbookMain read
|
2014-05-17 02:37:25 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
To generate IntelliJ project files, do `sbt update gen-idea`.
|
|
|
|
|