GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fxfactorial/ocaml-libgit2: OCaml Bindings to libgit2 based on Ctypes

BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
libgit2 @ 41a71c1
libgit2 @ 41a71c1
 
 
opam
opam
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.merlin
.merlin
 
 
META
META
 
 
Makefile
Makefile
 
 
Notes
Notes
 
 
README.md
README.md
 
 
git.ml
git.ml
 
 
test.ml
test.ml
 
 

Repository files navigation

ocaml-libgit2

This package provides bindings to libgit2. The modules are organized all under the Git module where the submodules correspond to all the headers in the include of libgit2.

Helpers

The root Git module also contains helper functions for common tasks. These let you deal with OCaml values rather than dealing with the Ctypes library.

Installation

Since I work on OS X primarily, my first goal is to have this working transparently and cleanly on that platform first.

I haven't submitted to opam yet, but this works right now for OS X users.

git clone --recursive https://github.com/fxfactorial/ocaml-libgit2
cd ocaml-libgit2
make install

To do a sanity check of everything working, try the following.

in test.ml

open Git
    
let () =
  init ();
  "libgit's version is: " ^ git_library_version () |> print_endline

…and then compile that with

ocamlfind ocamlopt -package ocaml-libgit2 -linkpkg test.ml -o SanityCheck
./SanityCheck

or if bytecode is your thing

ocamlfind ocamlc -custom -package ocaml-libgit2 test.ml -linkpkg -o SanityCheck

If all went well, no DLL errors, then congrats. This most likely means everything is correct.

Documentation

I'm trying to expose as much of the API as I can and the naming is 1-1 between the OCaml side and C. If lost then look at libgit2's own docs.

About

🔨 OCaml Bindings to libgit2 based on Ctypes

hyegar.com

Resources

Readme
Activity

Stars

19 stars

Watchers

5 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.