There are bindings to git in Rust (https://github.com/rust-lang/git2-rs ) - I've used it in a couple of my projects (https://github.com/samsieber/subgit-sync for example).
That said, even when using those bindings, I've had to drop down to wrapping the porcelain sometimes. I'd love to have a native rust git implementation. It'd be easier to hack on, and to abuse for the type of git interactions I've written.
And it'd be one less external dependency to worry about when cross-compiling. I love how easy it is to install things from source in Rust - and it's pretty easy to add flag to make the program use your CPU's special instruction set to make it even faster.
That's a good point; you're right that it's helpful to be able to interface with such a ubiquitous program natively in a language of choice. I did see a mention on the page of deploying as a crate and using in another program; that seems very convenient.
> stop complaining
Not a complaint; more a question as to why there's a specific move around rust. I appreciate the reply; that's exactly the kind of response I was looking for.
Fair enough. There's definitely a lot of folks who do get upset over this stuff, maybe as pushback to the new language hype.
Re:Git implemented in Rust
by beatgammit on Monday April 01, 2019 @02:14PM
(#19546333)
Also, it would be pretty sweet to use git with Redox, and I don't think Redox works very well with things not written in Rust.
Re:Git implemented in Rust
by steveklabnik on Monday April 01, 2019 @02:29PM
(#19546508)
Redox can run a lot of non-Rust software, see https://www.redox-os.org/news/release-0.5.0/ a list of packages that work.
Actually there's a lot of great reasons to rewrite everything in every language. Git is an especially good piece of software to implement everywhere because it's relatively stable and it's pretty useful.
As for actual reasons, one good example is so you can keep your dependencies in the language, using the language package manager. For Go nobody even questions that this is worth it; it enables painless cross compiling and completely static, libc-free binaries. For Rust that may not be a thing, but you do at least get the benefits that you could integrate Git functionality without having to hack around in porcelain.
This one here is a learning experience by it's own description, but I would suggest people stop complaining about "rewriting everything" in $LANGUAGE. The opposite complaint is often cited as a reason why to not use the language (that, for example, basic programs haven't already been ported.) If we did build an alternate world with feature parity, unit testing, optimizations, in a memory safe language, I doubt many people would be complaining about the strange trend of rewriting things anymore.