You’re describing an interesting project, but it’s not _this_ project.
You’re describing an interesting project, but it’s not _this_ project.
I'm thinking about the wider FOSS ecosystem, for example if Firefox was built as a gui gluing together a modular collection of libraries people could do all sort of cool things with them.
Monolithic applications make sense for proprietary software, not so much for FOSS.
"Move fast and break things" makes sense for acquiring investors, not so much for core infrastructure that everyone everywhere depends on.
This could work, but you'd need at least a decade of widespread usage to work out all the problems before it would even be worth considering for core infrastructure tools.
Busybox with it's single binary, depend-on-arg[0]-hack implantation was at one point an "untested strategy", yet look at it now. Rust's Coreutils need to offer a real uvp if they want to see real adoption. Providing coreutil as a library and not forking processes would certainly qualify as that.
If stability is a concern, exposing a greater surface for user interaction would surely slow down development as these interfaces would have to be reworked with care.
If stability is not a concern, then any user tools built upon these interfaces would be subject to breakage at the rate of upstream development. That’s got to be frustrating.
One of the nice things about the POSIX command‐line interface is that the build systems that interact with them know what to expect, because the interface has been much the same for a very long time, while still providing hugely useful capability.
In the case of coreutils, the problem space is fairly simple and well-understood, so it should be quite easy to commit to a stable interface. Even for something exceptionally complex like a web browser, I'd expect most components to be easily kept backwards-compatible in terms of public api.
That's actually far less stable than is needed for core utils.
That's kind of the way it is. Most of the core utils are thin wrappers around C libraries.
- - - -
It sounds like you're thinking of things like the Oberon OS, where there were no separate applications, instead the system was extended by adding new commands to a unitary GUI. Or the Canon Cat.
i.e. This is the thing you want it's just not one library it's a collection of libraries and a collection clis which use those libraries.