Hacker News new | ask | show | jobs
by joshfarrant 2311 days ago
I’d love to see some work put in to making this work with React Native. I spent a day trying to get this to work a few weeks ago with no joy, and I couldn’t find any indication that anyone else had managed to make it work either.
3 comments

But why? Aren't your users gonna be far better off if you used native git?

Sorry, I know this comes off as a bit dickish, but I'm interested to know the circumstances that lead to this point of view :)

My particular use-case is that I'm not a Swift/Objective-C developer, I'm a JavaScript developer.

React Native opened the door to allow me to build apps and, realistically, I'm not going to spend the time battling through trying to get native git working through React Native. If there's a native developer out there that wants to tackle this problem and wrap it up in a nice JS module then I'd be in your debt!

More or less same arguments as for choosing React Native for any other project: share some or all code on web/android/ios platforms.

The other option could be compiling libgit2 to native code/wasm and use it in RN and web, but it will be harder then just import js-only npm.

Depends what users, if you're targeting some education format or institution that wants some locking down of their OS git native is kind of a non starter. No one can configure it for you, there's 65 million install options and you're loading a bash shell into windows.

Very different from "this app has packaged tutorials and tools just start at lesson 1"

I tried to run it in RN year ago with no luck, filled an issue [1]. Looks like they removed Buffer dependency in 1.0 which was one of the problems.

[1] https://github.com/isomorphic-git/isomorphic-git/issues/698

edit: fix link

I think you accidentally pasted a link to wasm-git instead of the Isogit issue link.
Thank you! fixed
This would seem like a workaround but it's possible to run node.js on Android and iOS and bundle it with your react native app so that might be a potential way forward: https://code.janeasystems.com/nodejs-mobile/