uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.56k stars 1.26k forks source link

Can GNU-specific behavior be turned off at build time? #6646

Closed xplshn closed 1 month ago

xplshn commented 1 month ago

Hi, I was wondering if uutils/coreutils could become compliant (Not compile flags/functionality/behavior that isn't POSIX). Is that possible?

just-an-engineer commented 1 month ago

Maybe tool to tool, but not specifically. I know the project aims to be drop-in, so any GNU functionality should be almost exactly replicated, and where it's not, it's considered a bug. But that doesn't mean the tools can't go above and beyond. But it can also be a hindrance, ik our seq is more accurate due to the data type/structure we use to store everything, but GNU uses a long double, which gives it great precision, but not as accurate as the one here. You can see it in this in #6244 and #5759, and @BenWiederhake comments on the line some tools are starting to walk between accuracy/correctness, and compatibility. With that said, if you had a specific tool in mind you wanted to make more accurate, you can always code that up, add a command line flag for non-GNU compatible stuff, and make a PR. But tl;dr: I don't think there's much that isn't GNU compliant that can be turned off. But I don't know all the tools, either

xplshn commented 1 month ago

Ah, thanks for all the info. I'm actually very much against GNU, the license, and the bloat, I was looking for busybox alternatives, and uutils is MIT licensed, so it caught my attention.

just-an-engineer commented 1 month ago

Glad to hear. I agree with a lot of that. Feel free to contribute some code, we'd love to have the help!