Live data from Hacker News

Git: Introduce Rust and announce it will become mandatory in the build system

lore.kernel.org

131–140 of 433 posts

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#131
post #101

Earlier quoted context omitted.

C is unsafe.

I honestly can't tell if this is meant as serious reply to my question (in that case: let's say I agree that Rust is 100% better than C; my question still stands) or as a way to mock Rust people's eagerness to rewrite everything in Rust (in that case: are you sure this is the reason behind this? They are not rewriting Git from scratch...)

As a user, you may not be aware that C makes it relatively easy to create https://en.m.wikipedia.org/wiki/Buffer_overflow which are a major source of security vulnerabilities.

This is one of the best reasons to rewrite software in Rust or any other more safe by default language.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#132

Is this a bit of chickens coming home to roost as far as developer culture forgetting how to work with cross-compiling toolchains? When I started my career, it was common understanding that the developer may be manipulating sourcecode on a different system and/or platform than where it will be executed. Our source control, editing, compilation, and execution was understood to happen in different computational spaces,…

Actually, the Rust toolchain makes cross-compiling way easier than any other fully-compiled language I've ever used. There are like 100 different platforms you can target by just setting the `--target` flag, and they all pretty much just work on any host platform.

Sounds like the real issue is that some Git developers have ancient, rigid requirements for their own development machines.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#133
post #131

Earlier quoted context omitted.

I honestly can't tell if this is meant as serious reply to my question (in that case: let's say I agree that Rust is 100% better than C; my question still stands) or as a way to mock Rust people's eagerness to rewrite everything in Rust (in that case: are you sure this is the reason behind this? They are not rewriting Git from scratch...)

As a user, you may not be aware that C makes it relatively easy to create https://en.m.wikipedia.org/wiki/Buffer_overflow which are a major source of security vulnerabilities. This is one of the best reasons to rewrite software in Rust or any other more safe by default language.

Everyone on hackernews is well aware that C makes it relatively easy to create buffer overflows, and what buffer overflows are. You're still not responding to GP question.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#134
post #54

Maybe I'm just old and moany, and I need to step aside for bigger and better things such as Rust. But. Now rather than needing to understand just C to work on Git/kernel, you now need to also know Rust. The toolchain complexity is increasing, and the mix of these languages increases the barrier to entry. I'm highly invested into Git, having learned the tooling and having a significant number of projects constructed w…

> Now rather than needing to understand just C to work on Git/kernel, you now need to also know Rust. I'm yet to know a single software engineer who isn't well versed on multiple programming languages. This is not a problem.

Agreed. And if someone is interested in contributing to the Linux kernel, a new programming language is far from the hardest thing that they need to learn...

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#135
post #41

It seems unwise, to me, to tie the life of a project as fundamental, and conceptually simple, as git to a compiler and runtime as complicated as rust. The beauty of the unsafety of C is partially that it's pretty easy to spin up a compiler on a new platform. The same cannot be said of Rust.

Do you think any new, Git-relevant platform is going to gain C compiler support via anything other than Clang/LLVM?

Code doesn't need to "gain C compiler support", that's the point of having a language standard.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#136
post #101

Earlier quoted context omitted.

C is unsafe.

Changing well-tested code is unsafe.

If the code is brittle to change, it must not have been particularly safe in the first place, right?

And if it's well-tested, maybe that condition is achieved by the use of a test suite which could verify the changes are safe too?

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#137
post #132

Is this a bit of chickens coming home to roost as far as developer culture forgetting how to work with cross-compiling toolchains? When I started my career, it was common understanding that the developer may be manipulating sourcecode on a different system and/or platform than where it will be executed. Our source control, editing, compilation, and execution was understood to happen in different computational spaces,…

Actually, the Rust toolchain makes cross-compiling way easier than any other fully-compiled language I've ever used. There are like 100 different platforms you can target by just setting the `--target` flag, and they all pretty much just work on any host platform. Sounds like the real issue is that some Git developers have ancient, rigid requirements for their own development machines.

A good example of it is how easy it is to do WASM from rust. WASM is even one of the harder platforms to target with rust.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#138
post #16
post #6

Earlier quoted context omitted.

See this page [1], particularly the 'Tier 3' platforms. [1] https://doc.rust-lang.org/beta/rustc/platform-support.html

Thanks for the specifics, really fascinating list! I'm sure I'm being a bit flippant, but it's pretty funny that a list including the Playstation 1, N64, and Apple Watches is in the same conversation as systems that need to compile git from source. Anyone know of anything on that list with more than a thousand SWE-coded users? Presumably there's at least one or two for those in the know?

What I like about seeing a project support a long list of totally irrelevant old obscure platforms (like Free Pascal does, and probably GCC) is that it gives some hope that they will support some future obscure platform that I may care about. It shows a sign of good engineering culture. If a project supports only 64-bit arm+x86 on the three currently most popular operating systems that is a red flag for future compatibility risks.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#139
post #131

Earlier quoted context omitted.

I honestly can't tell if this is meant as serious reply to my question (in that case: let's say I agree that Rust is 100% better than C; my question still stands) or as a way to mock Rust people's eagerness to rewrite everything in Rust (in that case: are you sure this is the reason behind this? They are not rewriting Git from scratch...)

As a user, you may not be aware that C makes it relatively easy to create https://en.m.wikipedia.org/wiki/Buffer_overflow which are a major source of security vulnerabilities. This is one of the best reasons to rewrite software in Rust or any other more safe by default language.

Right, I never mentioned that I am a decently experienced C developer, so of course I got my fair share of buffer overflows and race conditions :)

I have also learned some Rust recently, I find a nice language and quite pleasant to work with. I understand its benefits.

But still, Git is already a mature tool (one may say "finished"). Lots of bugs have been found and fixed. And if more are found, sure it will be easier to fix them in the C code, rather than rewriting in Rust? Unless the end goal is to rewrite the whole thing in Rust piece by piece, solving hidden memory bugs along the way.

Re: Git: Introduce Rust and announce it will become mandatory in the build system

#140
This series was in response to another thread [1] which wanted to make rust mandatory in an upcoming release.

The authors proposal was to instead take the middle ground and use rust as an optional dependency until a later point of time where it becomes mandatory.

The later point of time was decided based on when rust support lands in gcc, which would make things smoother, since platforms which support gcc would also be included.

[1]: https://lore.kernel.org/git/pull.1980.git.git.1752784344.git...

Post reply on HN