A native Haskell implementation of the Cap'N Proto cerialization format and RPC protocol. The library implements serialization and level 1 RPC. The Capnp.Tutorial module is the best place to start reading; the reference documentation can seem bewildering without that context.


Keywords
data, library, mit, network, program, rpc, serialization, Propose Tags, Capnp.Tutorial, Skip to Readme, Last Documentation, capnp-0.18.0.0.tar.gz, browse, Package description, Package maintainers, isd, edit package information , 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.5.0.0, 0.6.0.0, 0.7.0.0, 0.8.0.0, 0.9.0.0, 0.11.0.0, 0.12.0.0, 0.17.0.0, Cap'N Proto, on codeberg, #28, #27, protocol evolution rules, capn-proto, capnp, capnproto, haskell
License
MIT
Install
cabal install capnp-0.18.0.0

Documentation

hackage

A Haskell library for the Cap'N Proto Cerialization and RPC protocol.

Note, this project's official home is on codeberg; if you're viewing this elsewhere, this is a mirror. For trivial changes we'll still accept patches here, but please file issues and submit more substantial changes via codeberg.

Getting Started

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.

Status

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 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.

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.