Replies: 2 comments
-
No current plans to write first-party ocaml bindings, but I like ocaml quite a lot and I'd be thrilled to advise somebody working on third-party ones. There are sort of two components to the whole thing:
For our current first-party bindings, python and go only implement #1, but we have a pretty good query builder for typescript that does great type stuff. Part 1 is the critical part, of course. Though I suppose it would be possible to use the python-ocaml bindings to call the python bindings to handle the protocol, but I doubt that anybody would find that satisfactory! Part 2 is the optional but more fun part :P I'm not sure if it is possible to build a query builder like our typescript one in ocaml; GADTs can let you do simple typed embedded DSLs, but I suspect that edgeql is more complicated than what it could manage. We pull it off in typescript, but typescript has a lot of support for type level computation and structural object types. Something that would definitely work, and that we are planning to do for some of our other languages (like mypy-typed python), is to have a "query type generator" that takes queries and generates typed code for running them, ahead of time. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that update. I think part 2 will be required for the binding to work with Ocaml but that could boil down to a simple mapping of types between one side and the other (for which there already are projects). Could you provide more details about what step 1 might require so I can make an assessment? I can try looking at what was done for the rust binding but its always better to compare a sample implementation with an more official reference implementation. A list of places in the repo that will need to be cloned/looked should be good enough. I will open a feature request related to this (structured way to add new language bindings) Also looking forward to the query generator features that edgeDb may adopt. |
Beta Was this translation helpful? Give feedback.
-
Hi,
This is a question from a slightly different angle
Are there any plans to create an Ocaml language binding?
Seeing as:
It would seem like a good idea to create an Ocaml language binding for EdgeDb
Full disclosure: I am one of the developers in a crypto project based on Ocaml and we are exploring EdgeDb in one of our branches
Can anyone provide input about the feasibility of Ocaml bindings?
Beta Was this translation helpful? Give feedback.
All reactions