petersalomonsen / wasm-git

GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
Other
648 stars 37 forks source link

support for lower level libgit2 APIs? #4

Closed maks closed 4 years ago

maks commented 4 years ago

The examples show using the higher level "porcelain" commands, but I was wondering if I am missing something on how to access the lower level "plumping" APIs, eg. rev walking ?

petersalomonsen commented 4 years ago

I would look into this then:

https://libgit2.org/docs/guides/101-samples/#revwalk

You would of course have to extend methods exposed to javascript, but it could be as simple as annotating them with EMSCRIPTEN_KEEPALIVE

maks commented 4 years ago

@petersalomonsen sorry about that, I think I wasn't very lcear in what I was asking. I guess I really had 2 questions: 1 are the low level apis already exposed from wasm ? 2 if not, are there examples on how to expose them with emscripten and use them from wasm ?

so its a no for 1 and you've pointed me in the right direction for 2 - thanks!