Live data from Hacker News

Rewriting essential Linux packages in Rust

lwn.net

31–40 of 175 posts

Re: Rewriting essential Linux packages in Rust

#31
> "I'm going to state the obvious, that Rust is very good for security, for parallelism, for performance".

That's not obvious.

> He is "almost certain" that code he writes in Rust is going to work well on everything from Android to Windows.

I'd think the problem with security in code is cocky developers who believe that some part of the environment is magical and can save them from themselves.

> Ledru cited laziness as another reason for using Rust. "So if there is a crate or library doing that work, I'm going to use it. I'm not going to implement it [myself]."

Precisely. Where does this "certainty" come from then?

> He is thinking about "what we are going to leave to the next generation".

At this rate, a complete and total mess, of two slightly incompatible libraries neither of which have any significant features which differentiate it from the other, save for in the imagination of the developers themselves.

Re: Rewriting essential Linux packages in Rust

#32

> " There are between 200 and 300 dependencies in the uutils project. He said that he understood there is always a supply-chain-attack risk, "but that's a risk we are willing to take". There is more and more tooling around to help mitigate the risk, he said. left-pad II, coming soon to a Linux distro near you

Just using dependencies isn't bad IMO. Your code might be of much higher quality when you use libraries that are used by many other packages instead of coding your own stuff that is only used by your package and thus less reviewed / less improved upon.

Re: Rewriting essential Linux packages in Rust

#33

> " There are between 200 and 300 dependencies in the uutils project. He said that he understood there is always a supply-chain-attack risk, "but that's a risk we are willing to take". There is more and more tooling around to help mitigate the risk, he said. left-pad II, coming soon to a Linux distro near you

crates.io does not allow a dependency of another crate to be arbitrarily deleted as per their usage policy section 'package ownership' paragraph 4.

Re: Rewriting essential Linux packages in Rust

#34

> " There are between 200 and 300 dependencies in the uutils project. He said that he understood there is always a supply-chain-attack risk, "but that's a risk we are willing to take". There is more and more tooling around to help mitigate the risk, he said. left-pad II, coming soon to a Linux distro near you

Just using dependencies isn't bad IMO. Your code might be of much higher quality when you use libraries that are used by many other packages instead of coding your own stuff that is only used by your package and thus less reviewed / less improved upon.

How many people do you think are reviewing stuff? Does more reviews make code better?

Re: Rewriting essential Linux packages in Rust

#35
post #29

Rewriting GPL software under the MIT license is a terrible thing to do. The GPL is meant to protect and preserve what should be basic human rights. So-called "permissive" licenses are meant to provide big tech with free labour.

Yup, and one doesn't need to look further than FreeBSD to see what the end result is.

I wonder, to what extent is the Linux Rust effort "generously subsidized" by corporations?

> He is thinking about ""what we are going to leave to the next generation"". Developers starting out don't want to use COBOL, Fortran, or C, he said. They want to work with fancy stuff like Rust, Swift, Go, or Kotlin.

Oh, think about the children! The wolf in sheep's clothing.

Re: Rewriting essential Linux packages in Rust

#36
post #29

Rewriting GPL software under the MIT license is a terrible thing to do. The GPL is meant to protect and preserve what should be basic human rights. So-called "permissive" licenses are meant to provide big tech with free labour.

Perhaps, but MIT licensed code is Free like Air and Sunshine.

Re: Rewriting essential Linux packages in Rust

#37
post #13

I've been using the rewritten coreutils as a reference in implementing human-utils[0]. The amount of complexity, even with pretty high-level Rust std, is still super high. So rewriting them in Rust is no small feat. For the file-system management ones: I appreciate the value of everyone knowing these tools, but they do have some terrible defaults, and I wish there was an alternative between using a GUI/TUI file manag…

I like some of the directions you're heading with that. One thing I've thought is it might be useful to have tools that create filesystem objects (like "new" or "mov foo bar/") be able to take permissions. "mov --umask 027 --owner alice:bob foo bar/" and "new --mode a=rx foo/" for example.

Re: Rewriting essential Linux packages in Rust

#38
post #12

Is Rust (llvm?) supported on all platforms Linux targets?

> Is Rust (llvm?) supported on all platforms Linux targets? AFAIK, no. Linux chooses to support platforms from which we haven't seen new releases in decades, like DEC Alpha. Although in recent years, Linux has dumped support for many older platforms including IA-64. But my guess is GNU coreutils also doesn't support all Linux targets. I mean this in two ways -- 1) AFAIK coreutils does not expressly support each and e…

I recall packages on Debian considered available for some obscure platforms that would segfault immediately when executed. Platform support goes beyond "does a compiler happen to produce a binary".

Re: Rewriting essential Linux packages in Rust

#40
Seems this project is MIT-licensed. That is fine, but I cannot help this is a way to get Corporations from following the GPL.

I wonder if Linux is re-written i rust will it too remove GPL as a factor ?

Again due to the license choice I tend to believe this can be seen as a way to move Linux to a Microsoft Type Windows System.

Post reply on HN