capnp: Cap'n Proto for Haskell

[ capnproto, data, library, mit, network, program, rpc, serialization ] [ Propose Tags ]

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.


[Skip to Readme]

Modules

[Last Documentation]

  • Capnp
    • Capnp.Address
    • Capnp.Basics
      • Capnp.Basics.Pure
    • Capnp.Bits
    • Capnp.Canonicalize
    • Capnp.Classes
    • Capnp.Convert
    • Capnp.Errors
    • Capnp.Gen
      • ById
        • Capnp.Gen.ById.X86c366a91393f3f8
          • Capnp.Gen.ById.X86c366a91393f3f8.Pure
        • Capnp.Gen.ById.X8ef99297a43a5e34
          • Capnp.Gen.ById.X8ef99297a43a5e34.Pure
        • Capnp.Gen.ById.Xa184c7885cdaf2a1
          • Capnp.Gen.ById.Xa184c7885cdaf2a1.Pure
        • Capnp.Gen.ById.Xa93fc509624c72d9
          • Capnp.Gen.ById.Xa93fc509624c72d9.Pure
        • Capnp.Gen.ById.Xb312981b2552a250
          • Capnp.Gen.ById.Xb312981b2552a250.Pure
        • Capnp.Gen.ById.Xb8630836983feed7
          • Capnp.Gen.ById.Xb8630836983feed7.Pure
        • Capnp.Gen.ById.Xbdf87d7bb8304e81
          • Capnp.Gen.ById.Xbdf87d7bb8304e81.Pure
      • Capnp.Gen.Capnp
        • Compat
          • Capnp.Gen.Capnp.Compat.Json
            • Capnp.Gen.Capnp.Compat.Json.Pure
        • Capnp.Gen.Capnp.Cxx
          • Capnp.Gen.Capnp.Cxx.Pure
        • Capnp.Gen.Capnp.Persistent
          • Capnp.Gen.Capnp.Persistent.Pure
        • Capnp.Gen.Capnp.Rpc
          • Capnp.Gen.Capnp.Rpc.Pure
        • Capnp.Gen.Capnp.RpcTwoparty
          • Capnp.Gen.Capnp.RpcTwoparty.Pure
        • Capnp.Gen.Capnp.Schema
          • Capnp.Gen.Capnp.Schema.Pure
        • Capnp.Gen.Capnp.Stream
          • Capnp.Gen.Capnp.Stream.Pure
    • Capnp.GenHelpers
      • Capnp.GenHelpers.Pure
      • Capnp.GenHelpers.ReExports
        • Control
          • Concurrent
            • Capnp.GenHelpers.ReExports.Control.Concurrent.STM
          • Monad
            • STM
              • Capnp.GenHelpers.ReExports.Control.Monad.STM.Class
        • Data
          • Capnp.GenHelpers.ReExports.Data.ByteString
          • Capnp.GenHelpers.ReExports.Data.Default
          • Capnp.GenHelpers.ReExports.Data.Text
          • Capnp.GenHelpers.ReExports.Data.Vector
        • Capnp.GenHelpers.ReExports.Supervisors
      • Capnp.GenHelpers.Rpc
    • Capnp.IO
    • Capnp.Message
    • Capnp.Pointer
    • Capnp.Rpc
      • Capnp.Rpc.Errors
      • Capnp.Rpc.Invoke
      • Capnp.Rpc.Promise
      • Capnp.Rpc.Server
      • Capnp.Rpc.Transport
      • Capnp.Rpc.Untyped
    • Capnp.TraversalLimit
    • Capnp.Tutorial
    • Capnp.Untyped
      • Capnp.Untyped.Pure
  • Data
    • Data.Mutable

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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.6.0.1, 0.6.0.2, 0.6.0.3, 0.7.0.0, 0.8.0.0, 0.9.0.0, 0.10.0.0, 0.10.0.1, 0.11.0.0, 0.12.0.0, 0.12.1.0, 0.13.0.0, 0.14.0.0, 0.15.0.0, 0.16.0.0, 0.17.0.0, 0.18.0.0
Change log CHANGELOG.md
Dependencies async (>=2.2.1 && <2.3), base (>=4.11 && <5), bifunctors (>=5.5.8 && <5.6), bytes (>=0.15.4 && <0.18), bytestring (>=0.10 && <0.12), capnp, containers (>=0.5.9 && <0.7), cpu (>=0.1.2 && <0.2), data-default (>=0.7.1 && <0.8), data-default-instances-vector (>=0.0.1 && <0.1), directory (>=1.3.0 && <1.4), exceptions (>=0.10.0 && <0.11), filepath (>=1.4.2 && <1.5), focus (>=1.0.1 && <1.1), hashable (>=1.2.7 && <1.4), list-t (>=1.0.2 && <1.1), monad-stm (>=0.1 && <0.2), mtl (>=2.2.2 && <2.3), network (>=3.1 && <3.2), network-simple (>=0.4 && <0.5), pretty-show (>=1.9.5 && <1.11), primitive (>=0.6.3 && <0.8), safe-exceptions (>=0.1.7 && <0.2), stm (>=2.5.0 && <2.6), stm-containers (>=1.1.0 && <1.3), supervisors (>=0.2.0 && <0.3), template-haskell (>=2.16.0 && <2.17), text (>=1.2 && <2.0), transformers (>=0.5.2 && <0.6), vector (>=0.12.0 && <0.13), wl-pprint-text (>=1.2 && <1.3) [details]
License MIT
Copyright 2016-2020 haskell-capnp contributors (see CONTRIBUTORS file).
Author Ian Denhardt
Maintainer ian@zenhack.net
Category Data, Serialization, Network, Rpc
Home page https://github.com/zenhack/haskell-capnp
Bug tracker https://github.com/zenhack/haskell-capnp/issues
Source repo head: git clone https://github.com/zenhack/haskell-capnp.git -b master
Uploaded by isd at 2020-12-17T22:50:53Z
Distributions
Executables capnpc-haskell
Downloads 5603 total (50 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2020-12-17 [all 1 reports]

Readme for capnp-0.9.0.0

[back to package description]

build status hackage

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

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