creationix / js-git

A JavaScript implementation of Git.
MIT License
3.83k stars 265 forks source link

Tried using Emscripten? #22

Closed relaxnow closed 11 years ago

relaxnow commented 11 years ago

You're going to be asked this multiple times I suppose, might as well have some place to point them, but have you tried using Emscripten with libgit?

creationix commented 11 years ago

So, two of the main goals of jsgit are to be lightweight and extremely portable (running on a variety of platforms and storage and network backends). The C libraries make a lot of assumptions about the platform they run on that make that extremely difficult. Also many of the C libraries that would be useful to me are GPL or LGPL licensed and I want to keep js-git more open using MIT.

The main technical problem with enscripten, even if the C libraries were exactly what I needed, is that it generates a lot of javacsript. I don't want 2mb of generated code. I want something hand-coded so that it can be a lot leaner. Remember this is just a library and not an entire application. It's just a part of someone else's project.

Also the emscripten toolchain is a pain to setup, especially on platforms like ChromeOS where I expect people to use js-git a lot. I would really like it if people could hack on js-git on the same platforms that use it. There is no emscripten (not one that runs at usable speeds at least) in browser-style environments.