A Haskell library for the Cap'N Proto Cerialization and RPC protocol.
There is a module
Capnp.Tutorial which contains an introduction
to the library; users are strongly encouraged to read this first, as
the reference documentation can be bewildering without that context.
Serialization support works, with some limitations:
- We do not support defining custom default values for fields of pointer type; see (#28).
- We currently do not correctly handle decoding lists of structs from non-composite lists (#27). This means that, contrary to the protocol evolution rules, it is not safe to change a field from type List(T) (where T is any non-struct type) to a list of a struct type.
Level 1 RPC support is implemented and usable, though there are a couple gaps in the API. It should be considered alpha quality for now. Specific things to be aware of:
- The implementation is not robust against resource exhaustion attacks; for now users are strongly discouraged from using it to do RPC with untrusted peers.
- While most of the machinery for it is in place, the API does not currently expose a way to do field projection on remote promises. As a consequence, actually pipelining method calls is not currently possible, so the library is currently best suited to environments which are already low-latency.
The API is considered unstable. It will likely see changes, for the sake of polish, consistency, etc. as well as to improve performance and accommodate more features as we add them.