News for hackers. Stuff that matters.
Re:An update on rust/coreutils by gravypod on Saturday January 29, 2022 @09:06AM (#30126373)
If you needed to do low level systems programming in Rust would you be able to use this as an OS abstraction layer by importing these sorts of things: https://github.com/uutils/coreutils/blob/main/src/uu/chmod/s...

Is this one of the intentions of this team? It sounds like it could make "scripting" in rust very nice if all of the CLI functions you're used to exist as language libraries.

Re:An update on rust/coreutils by terts on Saturday January 29, 2022 @09:19AM (#30126478)
That is a very interesting idea! It is not something we've discussed before as far as I know. For some utils (like chmod) it might be possible, but any util that is focused on outputting information currently does so by printing directly to stdout. So, ls doesn't give you a Vec or Iterator of listed files for instance, but instead prints them to stdout. Nevertheless, it would be a cool experiment to see if we can create something like a "ulib" crate that would provide the functions some functions for which it is possible.
Re:An update on rust/coreutils by Arcterus on Sunday January 30, 2022 @02:45AM (#30134927)
I believe I actually had a proof of concept of this functionality in a PR at some point. This would basically have to work like mesabox, where each utility takes some generic input and output and then runs based on them rather than using stdout and friends directly (e.g. to avoid blowing through all your memory by stuffing many gigabytes of output into a Vec on certain commands).
Re:An update on rust/coreutils by loeg on Saturday January 29, 2022 @09:37AM (#30126583)
That would be much more elegant than something like libxo.