I’m pleased to announce the release of capnp-rpc 0.3, an OCaml implementation of the Cap’n Proto RPC specification.
If you haven’t used the library before, please see the documentation and tutorial. Cap’n Proto RPC aims to provide secure, efficient, typed communications between multiple parties.
Changes since v0.2
This release adds a new
capnp-rpc-mirage package, which provides support for using the library within a MirageOS unikernel. See https://github.com/mirage/capnp-rpc#how-can-i-use-this-with-mirage for details.
This makes use of the new capnp 3.1.0 release, which removes all uses of
Unix from the runtime library.
Documentation and examples
The documentation now includes some diagrams to clarify the various example scenarios.
Fixed a ref-counting bug in the calculator example. Also, changed the service ID to match what the C++ client expects. With these changes, the C++ client’s tests pass when used with the OCaml service.
There are a few minor API changes:
Capnp_rpc_unix.Vat_config.derived_id ?name configis now
Capnp_rpc_unix.Vat_config.derived_id config name. If you weren’t passing a
~nameargument before, use
"main"to get the same ID.
Socket_addressmodule is now called
There is an explicit network parameter in
Network.connect, etc. This is needed to support Mirage, where the network isn’t a global.
Fix race when reconnecting. We notified the user that the capability had broken while the old connection was still shutting down. If they immediately tried to reconnect, we tried to reuse the old connection. Now, we wait for it to be removed.
Fix handling of leaks in switchable. If we detected the ref-count was invalid, we tried to resolve to an error, but resolving now checks that the ref-count is valid first so this failed.
- Also test answering questions with errors or with a promise from another question.
Use a better way to get the client certificate from a TLS connection (suggested by @hannes).
capnp://URI handling to
Capnp_rpc_lwt.Capnp_address. This allows it to be shared with the Mirage code.
Capnp_rpc_lwt.VAT_NETWORKwith simpler signature than
The address sub-module of
S.NETWORKis now available separately as