commit: e70c520358088dc14fce426e9d69606f47e4657d
parent 5d9d42efaa85c24ff01921218021b5bd91d4a9ae
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 23 Apr 2024 13:45:07 +0200
README: Reorganise, add differences to coreutils and BusyBox/ToyBox
Diffstat:
M | README.md | 49 | +++++++++++++++++++++++++++++++------------------ |
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/README.md b/README.md
@@ -2,25 +2,10 @@
Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
SPDX-License-Identifier: MPL-2.0
-This is a repository of my own implementations of commonly available Unix system tools, mostly using POSIX as a guide but tools also commonly available across different Unix-like systems shall be available here.
+This is my own collection of commonly available Unix utilities, most of them implemented by me.
+POSIX is used as a guide, but current Unix systems are the biggest inspiration and compatibility with portable scripts is intended.
-Tested on Linux(musl), FreeBSD, NetBSD, OpenBSD: <https://builds.sr.ht/~lanodan/utils-std>
-
-## Design differences
-- All programs prefix their messages with their name. This way you don't end up with context-less messages in scripts.
-- When the output is structured data, a terminal gets human-oriented output, others like piped programs get machine-oriented output (no padding, line separation, CSV, JSON, …). Prior art: most `ls(1)` implementations, i3/sway, FreeBSD utils via `libxo`, …
-- As the `utmp` and `wtmp` files are considered broken by design, utilities dependant on them like `who` and `lastlog` won't be implemented. Proper authentication logs shouldn't be writable into by multiple programs, some of them third-party (like SSH and Display Managers typically are).
-
-## Goals
-- (long-run) Effectively serve as one of the blocks to get base utilities, replacing GNU coreutils and part of BusyBox/ToyBox
-- Code readability and hackability
-- Portability, should run on modern libre POSIX systems as to not introduce vendor-locking
-- Efficiency, but not without sacrifying the other goals
-
-## Non-Goals
-- Reimplementing complex utilities that already have great code or ought to be maintained separately
-- Implementing utilities which aren't in your usual base system. This is covered by [utils-extra](https://hacktivis.me/git/utils-extra), and I'd also recommend checking out [moreutils](https://joeyh.name/code/moreutils/)
-- Reimplementing OS-specific utilities like [util-linux](https://www.kernel.org/pub/linux/utils/util-linux/)
+Developed on Linux+musl, automatically tested on FreeBSD and NetBSD thanks to [SourceHut](https://builds.sr.ht/~lanodan/utils-std).
## Dependencies
- C99 Compiler + POSIX C Library
@@ -37,3 +22,31 @@ Tested on Linux(musl), FreeBSD, NetBSD, OpenBSD: <https://builds.sr.ht/~lanodan/
- The `./configure` script isn't auto*hell based, you can pass it arguments via key-value arguments or environment variables
- You can define the `NO_BWRAP` environment variable to skip the bwrap-based tests which can cause issues in some environments like Gentoo `sandbox`
- If you want statically linked executables, pass `LDSTATIC=-static` to configure (environment or argument)
+
+## Design differences
+- All programs prefix their messages with their name. This way you don't end up with context-less messages in scripts.
+- When the output is structured data, a terminal gets human-oriented output, others like piped programs get machine-oriented output (no padding, line separation, CSV, JSON, …). Prior art: most `ls(1)` implementations, i3/sway, FreeBSD utils via `libxo`, …
+- As the `utmp` and `wtmp` files are considered broken by design, utilities dependant on them like `who` and `lastlog` won't be implemented. Proper authentication logs shouldn't be writable into by multiple programs, some of them third-party (like SSH and Display Managers typically are).
+- Minimal dependencies, allowing to bootstrap utils-std with barely having unix utilities.
+
+### Difference with coreutils
+
+Straightforward code, similarly to glibc, coreutils codebase often has it's actual code hidden under layers of macros and wrapper functions.
+
+### Difference with BusyBox/ToyBox
+Instead of minimalism as a constraint, here it is seen as a virtue of good design and as such as a process/long-term-goal.
+But being a near drop-in replacement is utils-std reason for existing.
+
+Also Toybox is stuck with reimplementing everything free of copyright issues due to it's choice of 0BSD.
+utils-std default license is the MPL-2.0 to be able to take code and design back without legal issues, but also is able to take code from other implementations.
+
+## Goals
+- (long-run) Effectively serve as one of the blocks to get base utilities, replacing GNU coreutils and part of BusyBox/ToyBox
+- Code readability and hackability
+- Portability, should run on modern libre POSIX systems as to not introduce vendor-locking
+- Efficiency, but not without sacrifying the other goals
+
+## Non-Goals
+- Reimplementing complex utilities that already have great code or ought to be maintained separately
+- Implementing utilities which aren't in your usual base system. This is covered by [utils-extra](https://hacktivis.me/git/utils-extra), and I'd also recommend checking out [moreutils](https://joeyh.name/code/moreutils/)
+- Reimplementing OS-specific utilities like [util-linux](https://www.kernel.org/pub/linux/utils/util-linux/)