From: Jon Seymour Date: Wed, 11 May 2005 02:09:49 GMT Subject: Re: Core and Not-So Core Message-ID: <2cfc4032050510190950bba995@mail.gmail.com> In-Reply-To: On 5/11/05, Rik van Riel wrote: > On Wed, 11 May 2005, Jon Seymour wrote: > > > I did consider wrapping it - I really did. But after thinking about it > > for a couple of weeks I eventually came to the conclusion it would be a > > sub-optimal solution. > > > So, if I want a stable foundation to build my stuff on, basing it on > > the output of the C tools would be a huge mistake. > > Can Java use a library that's implemented in C, like Python > and Perl can? If that is the case, the C implementation of > git simply needs the ability to be called as a library and > you can implement Java bindings for it. > It can in principle, yes. This is the so-called Java-Native-Interface (JNI). I think in the longer term it would make sense to write a JNI layer but the GIT source code is probably a little too unstable for that now. What needs to happen first, I think, is that a solid and stable C API (e.g. a libgit) be proposed and developed. One outcome of the work I am doing (a long time away, probably will never happen) might eventually be to propose an C API for GIT based, in part, on the prototyping work I do in Java. However, I suspect its Java-tainted heritage would mean instant death to it for purely dogmatic reasons so I think it I'll leave it to others to propose a C-API and then write a JNI wrapper for that when/if it ever happens. > That should also make it easier to create front-ends in > other languages... > Agreed. jon.