Dear OCaml community,
I would like to talk about a project I’ve been working on: Vcs
, a versatile OCaml library for Git interaction. The library provides a direct-style API for interacting with Git repositories and is designed as an “interface”, or “virtual” library with the actual implementation provided by other component dynamically dispatched at runtime (similar to Eio
vs Eio_main
). This design aims high flexibility and adaptability to different use cases.
The Vcs library is designed to be backend-agnostic and concurrency-runtime independent. It’s compatible with both Eio and OCaml Stdlib runtimes.
My focus on the backend implementation has been pragmatic as of yet. I’ve concentrated on implementing a provider called git-cli
that wraps the Git CLI, running it as an external process, interpreting its exit status and parsing its output. This approach has allowed me to focus on the core functionality and design of the Vcs library. I plan to explore the feasibility of supporting, in a similar fashion, luv and possibly miou as separate future work (still via the git-cli
provider).
The project is currently in the draft stage in a private repository, and I am gradually working through the process of open-sourcing the dependencies for this project. The API it supports is very incomplete, and I am extending incrementally as I need more.
While the code isn’t published yet, I’ve written a public README that outlines the project’s architecture, design principles, and motivation. You can read it here.
I’m reaching out to the community for feedback on the approach. I’m particularly interested in your thoughts on the use of a provider-based parametric library and the granularity of the provider interfaces via Traits, but I would be interested by other feedback you’d feel like sharing. Please feel free to open issues, or asking questions or contacting me if you are interested by the project.
Additionally, I’m in the process of selecting an appropriate license for the project. I think it is fair to respond to that “We as a community cannot give you legal advice on that matter, you should contact with a lawyer”. On the other hand, if either you or someone you know have spent a lot of times thinking about the subject of LICENSEs for the OCaml ecosystem, it would be of loss for me not to talk to you. I’ll be grateful if you do reach out.
Thank you in advance for your time and feedback. I look forward to engaging with the community on this project.
Best, Mathieu