ocaml-posix icon indicating copy to clipboard operation
ocaml-posix copied to clipboard

Provide module types? (Question)

Open jsoo1 opened this issue 4 years ago • 2 comments

This is more a question than anything else. Is it possible to create module types for these posix modules? I am working on a library and I am wondering how I can let the user bring their own c libraries. It would be nice to refer to some ocaml type or function in the library and defer to the library user to bring their own platform-specific ffi. Maybe this is an ill formed thought and I don’t know how to use your library. Thanks for your work! So far it works nicely!

jsoo1 avatar May 17 '21 13:05 jsoo1

Hi! I'm not sure if I follow your question. There is an online API documentation here: https://www.liquidsoap.info/ocaml-posix/

toots avatar May 18 '21 18:05 toots

Hm. I think what I was thinking of was something closer to abstract module types. Suppose I wrote a Rust or Ocaml version of the posix api that I want to use instead of the C version. It would be very cool to have an abstract interface to implement (or use).

jsoo1 avatar Jun 29 '21 13:06 jsoo1