Skip to content

Commit

Permalink
Initial Eio port
Browse files Browse the repository at this point in the history
This switches capnp-rpc from Lwt to Eio. One particularly nice side
effect of this is that `Service.return_lwt` has gone, as there is no
distinction now between concurrent and non-concurrent service methods.
  • Loading branch information
talex5 committed Nov 16, 2024
1 parent e8f6ca5 commit 2b4caf2
Show file tree
Hide file tree
Showing 89 changed files with 1,581 additions and 1,692 deletions.
15 changes: 11 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@
- Add `Capnp_rpc.Std` with some common module aliases, to reduce the need
to `open Capnp_rpc` (which is rather large).

- Convert API from Lwt to Eio.

To update to the new API:

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.
1. Use [lwt_eio][] during the migration to allow using Eio and Lwt together in your application.
2. Replace `open Capnp_rpc_lwt` with `open Capnp_rpc.Std`.
3. Replace all other uses of `Capnp_rpc_lwt` with just `Capnp_rpc`.
4. In `dune` and `opam` files, replace `capnp-rpc-lwt` with `capnp-rpc`.
5. 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`).
6. Replace `Service.return_lwt` with `Lwt_eio.run_lwt`.
7. Once all Lwt code is gone, `lwt_eio` can be removed.

[lwt_eio]: https://github.com/ocaml-multicore/lwt_eio

### v1.2.3

Expand Down
Loading

0 comments on commit 2b4caf2

Please sign in to comment.