ocaml-grpc
ocaml-grpc copied to clipboard
Reimplementation of the library
This PR contains a reimplementation of the library. Only the eio variant works for now. The goal of the reimplementation is to make it more:
- modular
- performant
- ergonomic
Building an opinionated workflow is not a part of this library, I will implement it in a separate library.
TODO
- [ ] Refactor the lwt variant
- [ ] Refactor the async variant
- [ ] Depart from exposing ('a -> string) and (string -> 'a) (de)serializers and expose
Bigstringafdirectly to avoid copying. string variants can be put on top for those who need them simply in the userspace. The string variants impede the performance due to excessive copying. - [ ] Slight API modifications to reduce redundancy (headers probably don't need to contain the
extrapart for example) - [ ] Introduce
'ctxto server request handlers. Not sure if it's needed - maybe can be done in the user space, maybe has to be a part of the library - will experiment with it.
@wokalski if you use ~~the OCaml 5.3 beta~~ OCaml 5.3 trunk (opam switch create 5.3.0+trunk) with https://github.com/janestreet/memtrace/pull/22 then you can do memory profiling with Eio.
Edit, got confused with my compiler versions.
statmemprof ftw!!!
@tmcgilchrist will statmemprof be available in 5.2 or only in 5.3?
Only in 5.3. Based on this libraries dependencies it should be possible to build against that version. The problematic pieces are usually PPX and merlin/lsp.
just a little update - we are using this on production and we will probably push the final commits to this soon.