v2.1

Build and opam metadata:

v2.0

capnp-rpc 2.0 switches from using Lwt to Eio. The capnp-rpc-lwt package is now just Lwt wrappers around the Eio functions in capnp-rpc. This allows libraries using the old Lwt API to be used with applications and libraries using the new Eio one, in the same binary. Because Lwt libraries (using capnp-rpc-lwt) can be used with Eio applications (using capnp-rpc-unix), you should first upgrade your application and then upgrade the libraries afterwards.

It is recommended to upgrade in stages, checking your application still works after each step:

  1. Upgrade to the latest Lwt version (opam install capnp-rpc-unix.1.2.4). This uses the new version of mirage-crypto, tls, etc, which may be incompatible with other libraries you are using. Get that sorted out before switching to capnp-rpc 2.0.
  2. Use lwt_eio to allow using Eio and Lwt together in your application. This means replacing your call to Lwt_main.run with code to run Eio and Lwt together, as explained at the start of the lwt_eio README.
  3. Upgrade your main application to capnp-rpc-unix 2.0. Calls to functions in the Capnp_rpc_unix and Capnp_rpc_net modules will need minor updates. They were previously called from Lwt context, so you'll need to wrap them with Lwt_eio.run_eio (or remove a Lwt_eio.run_lwt if you already updated the surrounding code).
  4. Upgrade code and libraries using Capnp_rpc_lwt:

    1. Replace open Capnp_rpc_lwt with open Capnp_rpc.Std.
    2. Replace all other uses of Capnp_rpc_lwt with just Capnp_rpc.
    3. In dune and opam files, replace capnp-rpc-lwt with capnp-rpc.
    4. Some modules are in Capnp_rpc but not the Capnp_rpc.Std subset. Those should now be fully qualified (e.g. replace Persistence with Capnp_rpc.Persistence).
    5. Replace Service.return_lwt with Lwt_eio.run_lwt. Replace Lwt.return (Ok x) with Service.return x.

Once all Lwt code is gone, you can remove the dependencies on lwt and lwt_eio.

New features:

API changes:

Performance and bug fixes:

Build:

v1.2.4

v1.2.3

v1.2.2

v1.2.1

v1.2

v1.1

v1.0

v0.9.0

Windows support:

Build changes:

v0.8.0

Bug fixes and diagnostics:

New functions:

Build changes:

Documentation:

v0.7.0

Logging:

v0.6.0

v0.5.0

Breaking changes:

Other changes:

v0.4.0

Breaking changes:

New features:

Bug fixes:

Build changes:

v0.3.3

v0.3.2

0.3.1

Build updates:

0.3 Unikernels

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.

There are a few minor API changes:

Bug fixes:

Documentation and examples:

Fuzzing:

Code cleanups:

0.2 Persistence, encryption and access control

This release brings support for RPC Level 2.

The API for implementing services and clients is mostly unchanged, but the APIs for setting up networking are very different. If you read the tutorial with the 0.1 release, you will probably want to read the new version again from the "Networking" point onwards.

The main change is that when connecting to a service you now give a URI of the form:

capnp://hash:digest@address/service

The client will connect to address, check the server's public key matches hash:digest, and then pass the (secret) service ID to get access to a particular service. The server will typically display the URI to use on start-up, or write it to a file.

The communications are encrypted using TLS. If you want to disable TLS, use the form capnp://insecure@address. This should only be needed for interoperability with non-TLS services, as the system will generate keys and certificates automatically, making secure use just as easy as the non-secure case.

The other major new feature is support for persistent services. In version 0.1 you could specify an offer argument when creating a vat, telling it a service to provide in response to bootstrap requests. Now, you pass a restore argument, which can restore different services depending on the service ID provided by the client.

The new Restorer.Table module provides a table-based lookup restorer, to which services can be added dynamically. If you have a lot of services and don't want to add them all at startup, you can use Restorer.Table.of_loader and provide your own function for loading services.

Other changes

Documentation changes:

Main API changes:

In the core capnp-rpc package (which applications do not normally use directly):

0.1