Live data from Hacker News

Git implemented in Rust

github.com

41–50 of 122 posts

Re: Git implemented in Rust

#41

Let's port already portable software to non-portable languages! Yay!

Rust is pretty darn portable as it is though. It runs on the major platforms. Are you thinking its Assembly or something? Everywhere FireFox is compiled to Rust has to run on, which is a lot of platforms. Maybe it wont run on your toaster but if you are making git commits through your toaster you got other issues.

I agree with the sentiment behind your comment. Rust is very portable, but isn't portable to all platforms. Obviously it works on the big ones like Windows, macOS, most variants of Linux, BSD etc. but it doesn't on Alpine Linux. IIRC there was an issue compiling it without glibc (which Alpine lacks).

Edit - apparently rustc can now be linked to musl instead of glibc in nightly. Cool!

Re: Git implemented in Rust

#42

Also a git implementation in pure OCaml, used for irmin git-based kv storage: https://github.com/mirage/ocaml-git https://github.com/mirage/irmin

Man I was thinking last week that something like this based on git or pijul would be a better backend for kubernetes than Etcd is.

Re: Git implemented in Rust

#44
post #41

Earlier quoted context omitted.

Rust is pretty darn portable as it is though. It runs on the major platforms. Are you thinking its Assembly or something? Everywhere FireFox is compiled to Rust has to run on, which is a lot of platforms. Maybe it wont run on your toaster but if you are making git commits through your toaster you got other issues.

I agree with the sentiment behind your comment. Rust is very portable, but isn't portable to all platforms. Obviously it works on the big ones like Windows, macOS, most variants of Linux, BSD etc. but it doesn't on Alpine Linux. IIRC there was an issue compiling it without glibc (which Alpine lacks). Edit - apparently rustc can now be linked to musl instead of glibc in nightly. Cool!

Rust can be compiled without glibc, by statically linking to musl, but it looks like it's still experimental as the only distribution of it is on the nightly channel: https://static.rust-lang.org/dist/rust-nightly-x86_64-unknow...

Re: Git implemented in Rust

#45
post #41

Earlier quoted context omitted.

Rust is pretty darn portable as it is though. It runs on the major platforms. Are you thinking its Assembly or something? Everywhere FireFox is compiled to Rust has to run on, which is a lot of platforms. Maybe it wont run on your toaster but if you are making git commits through your toaster you got other issues.

I agree with the sentiment behind your comment. Rust is very portable, but isn't portable to all platforms. Obviously it works on the big ones like Windows, macOS, most variants of Linux, BSD etc. but it doesn't on Alpine Linux. IIRC there was an issue compiling it without glibc (which Alpine lacks). Edit - apparently rustc can now be linked to musl instead of glibc in nightly. Cool!

https://pkgs.alpinelinux.org/package/edge/community/x86_64/r...

Is this not a successful build? At that point it seems like the OS is just not providing the necessary tooling, but Rust will run on the architecture.

Re: Git implemented in Rust

#46
post #43

If you're interested in this, you may enjoy "Building Git" by James Coglan - a comprehensive book that takes you through reimplementing git in Ruby. https://shop.jcoglan.com/building-git/

If you have read this book, would you care to comment about its content and quality?

It is something I am interested in buying but I have not been able to find reviews of it.

Re: Git implemented in Rust

#48
post #19

Earlier quoted context omitted.

> Implementing git in rust for fun and education! Also, not having a license file isn't a messy situation, that means “this project is protected under Berne Convention copyright“: the author is the only one holding every rights on the code and every use that is not explicitly allowed is a copyright infringement (unless it's fair use).

That sounds nice and all but it's wrong in two major ways. First: GitHub has a Terms of Service which was somewhat-recently amended to make this license grant explicit: https://help.github.com/en/articles/github-terms-of-service#... "Any User-Generated Content you post publicly, including issues, comments, and contributions to other Users' repositories, may be viewed by others. By setting your repositories to be view…

Thanks for the clarification on the “implicit license” point, I glossed over a little bit quickly. I should definitely have said “every use that is not explicitly or implicitly allowed is a copyright infringement”.

Your first point doesn't really bring much though, since it falls in the “explicitly allowed” part of my comment.

Overall, my whole point stands still: if anyone went on GitHub, downloaded the project and did anything with it that went beyond fair use, that would be a copyright infringement because neither the author nor GitHub granted you any permission to do so.

Re: Git implemented in Rust

#49
post #38

Earlier quoted context omitted.

Pretty much all the TOS says is there's an implicit reproduction license (other users can see & fork the work) and possibly broadcast (the fork itself has the visibility of the original). Not adaptation, not use, not exploitation, … And that license grant is solely through github as a service, it's unclear that a local clone is even permitted.

That's... somewhat true. My main objection is to "the author is the only one holding every rights on the code and every use that is not explicitly allowed is a copyright infringement (unless it's fair use)". The ToS doesn't say there's an implicit reproduction license, though; it says there's an explicit reproduction license. The other licenses can still be argued to be implicit. For instance, you have a decent argum…

> The ToS doesn't say there's an implicit reproduction license, though; it says there's an explicit reproduction license.

Then it's totally excluded from my claim which aims «every use that is not explicitly allowed». :)

Re: Git implemented in Rust

#50
post #41

Earlier quoted context omitted.

I agree with the sentiment behind your comment. Rust is very portable, but isn't portable to all platforms. Obviously it works on the big ones like Windows, macOS, most variants of Linux, BSD etc. but it doesn't on Alpine Linux. IIRC there was an issue compiling it without glibc (which Alpine lacks). Edit - apparently rustc can now be linked to musl instead of glibc in nightly. Cool!

Rust can be compiled without glibc, by statically linking to musl, but it looks like it's still experimental as the only distribution of it is on the nightly channel: https://static.rust-lang.org/dist/rust-nightly-x86_64-unknow...

Compiling most Rust programs with MUSL is fine, and available on stable. But the rust compiler itself with MUSL had some issues, and this were worked out very recently, and so it hasn’t totally ridden the trains to stable yet. https://github.com/rust-lang/rust/issues/59302
Post reply on HN