Rust clean-slate POSIX CLI utilities 0.2.1 release: Awk, M4, ftw and more

45 pointsposted 7 hours ago
by jgarzik

7 Comments

teo_zero

an hour ago

I like standards and abhor bloat, but I must admit there are GNU extensions that are so useful and well known that it would be difficult to do without. Probably this happens when POSIX specs are too strict or feature-poor to be of use even for medium-complexity tasks.

One example is "make": I'm afraid that a POSIX-only implementation wouldn't run most Makefiles out there!

nialv7

5 hours ago

Should've called it Oreutils.

rybosome

3 hours ago

I’d love to see what performance benchmarks look like. The old ones were highly optimized, but perhaps for different challenges than today’s architectures present.

simonask

2 hours ago

Would definitely be interesting, but from a cursory look at the repository, it doesn't look like squeezing the last percentage points of performance has been a priority yet.

Things that stand out:

- The `awk` implementation uses the Pest parser generator (https://pest.rs/), which is known to not generate the fastest possible parsers, but is great for getting up and running.

- They are using the `clap` crate for argument parsing, which is also known to not be the fastest, but again is very user friendly (for example, it does Unicode linebreaks in the output of `--help`). It's marginal, but for a tiny utility being invoked many times from a shell script, this can add up.

It's very probably "fast enough", and it makes sense to prioritize like this at this point, but people shouldn't use this expecting a performance improvement right now.

littlestymaar

an hour ago

Yeah, and I don't think performance matters that much for these utilities (and AFAIK many of the original haven't been particularly optimized for performance anyway).

wmf

2 hours ago

I didn't realize The Open Group still exists and is updating POSIX.

jgarzik

2 hours ago

Updated in 2024, no less! (2024 version still has UUCP though, heh)