diff --git a/README.target.md b/README.target.md
deleted file mode 100644
index b8190ce3edb..00000000000
--- a/README.target.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Targets that compile
-
-**Note: this list isn't up to date.**
-
-This is an auto-generated table showing which binaries compile for each target-triple. Note that this **does not** indicate that they are fully implemented, or that the tests pass.
-
-|######OS######|###ARCH####|arch|base32|base64|basename|cat|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|df|dircolors|dirname|du|echo|env|expand|expr|factor|false|fmt|fold|groups|hashsum|head|hostid|hostname|id|install|join|kill|link|ln|logname|ls|mkdir|mkfifo|mknod|mktemp|more|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|printenv|printf|ptx|pwd|readlink|realpath|relpath|rm|rmdir|seq|shred|shuf|sleep|sort|split|stat|stdbuf|sum|sync|tac|tail|tee|test|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|uptime|users|wc|who|whoami|yes|chcon|pr|dir|vdir|dd|basenc|runcon|
-|--------------|-----------|----|------|------|--------|---|-----|-----|-----|------|-----|----|--|------|---|----|--|---------|-------|--|----|---|------|----|------|-----|---|----|------|-------|----|------|--------|--|-------|----|----|----|--|-------|--|-----|------|-----|------|----|--|----|--|-----|-----|------|--|-----|-------|-----|--------|------|---|---|--------|--------|-------|--|-----|---|-----|----|-----|----|-----|----|------|---|----|---|----|---|----|-------|-----|--|----|--------|-----|---|-----|--------|----|------|------|-----|--|---|------|---|-----|--|---|----|--|------|------|
-|linux-gnu|aarch64|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|linux-gnu|i686|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|linux-gnu|powerpc64|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|linux-gnu|riscv64gc| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-|linux-gnu|x86_64|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|windows-msvc|aarch64|y|y|y|y|y| | | | |y|y|y|y|y|y|y|y|y| |y|y|y| |y|y|y|y| |y|y|y|y| | |y| |y|y|y| |y| | |y|y|y| |y| |y|y|y|y| | |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| | |y|y|y|y|y|y| |y|y|y|y|y| |y|y|y| |y| |y| | |y|y|y|y|y|y|y|y|
-|windows-gnu|i686|y|y|y|y|y| | | | |y|y|y|y|y|y|y|y|y| |y|y|y| |y|y|y|y| |y|y|y|y| | |y| |y|y|y|y|y| | |y|y|y| |y| |y|y|y|y| | |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| | |y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y| |y| |y| |y|y|y|y|y|y|y|y|y|
-|windows-msvc|i686|y|y|y|y|y| | | | |y|y|y|y|y|y|y|y|y| |y|y|y| |y|y|y|y| |y|y|y|y| | |y| |y|y|y|y|y| | |y|y|y| |y| |y|y|y|y| | |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| | |y|y|y|y|y|y| |y|y|y|y|y| |y|y|y| |y| |y| |y|y|y|y|y|y|y|y|y|
-|windows-gnu|x86_64|y|y|y|y|y| | | | |y|y|y|y|y|y|y|y|y| |y|y|y| |y|y|y|y| |y|y|y|y| | |y| |y|y|y|y|y| | |y|y|y| |y| |y|y|y|y| | |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| | |y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y| |y| |y| |y|y|y|y|y|y|y|y|y|
-|windows-msvc|x86_64|y|y|y|y|y| | | | |y|y|y|y|y|y|y|y|y| |y|y|y| |y|y|y|y| |y|y|y|y| | |y| |y|y|y|y|y| | |y|y|y| |y| |y|y|y|y| | |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| | |y|y|y|y|y|y| |y|y|y|y|y| |y|y|y| |y| |y| |y|y|y|y|y|y|y|y|y|
-|apple MacOS|x86_64|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|freebsd|x86_64|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|
-|netbsd|x86_64|y|y|y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y| |y|y| |y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y| | |y| |y|y|y|y|y|y|y|y|y|
-|android|aarch64|y|y|y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y| |y|y| |y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y| |y|y|y|y| |y|y|y|y|y|y| |y|y|y| | |y| |y|y|y|y|y|y|y|y|y|
-|android|x86_64|y|y|y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y| |y|y|y|y|y|y|y|y|y| |y|y| |y|y|y|y|y|y|y|y|y|y|y|y| |y|y|y|y|y| |y|y|y|y|y|y|y|y|y|y|y|y|y|y|y| |y|y| |y|y|y|y| |y|y|y|y|y|y| |y|y|y| | |y| |y|y|y|y|y|y|y|y|y|
-|solaris|x86_64| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-|wasi|wasm32| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-|redox|x86_64| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-|fuchsia|aarch64| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-|fuchsia|x86_64| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
diff --git a/docs/.gitignore b/docs/.gitignore
index c669da8f672..be017dfbe7c 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,4 +1,5 @@
book
src/utils
src/SUMMARY.md
+src/platform_table.md
tldr.zip
\ No newline at end of file
diff --git a/docs/src/platforms.md b/docs/src/platforms.md
new file mode 100644
index 00000000000..56ec616fc91
--- /dev/null
+++ b/docs/src/platforms.md
@@ -0,0 +1,45 @@
+# Platform support
+
+
+
+uutils aims to be as "universal" as possible, meaning that we try to support
+many platforms. However, it is infeasible for us to guarantee that every
+platform works. Just like Rust itself, we therefore have multiple tiers of
+platform support, with different guarantees. We support two tiers of platforms:
+
+ - **Tier 1**: All applicable utils are compiled and tested in CI for these
+ platforms.
+ - **Tier 2**: These platforms are supported but not actively tested. We do accept
+ fixes for these platforms.
+
+> **Note**: The tiers are dictated by our CI. We would happily accept a job
+> in the CI for testing more platforms, bumping those platforms to tier 1.
+
+## Platforms per tier
+
+The platforms in tier 1 and the platforms that we test in CI are listed below.
+
+| Operating system | Tested targets |
+| ---------------- | -------------- |
+| **Linux** | `x86_64-unknown-linux-gnu`
`x86_64-unknown-linux-musl`
`arm-unknown-linux-gnueabihf`
`i686-unknown-linux-gnu`
`aarch64-unknown-linux-gnu` |
+| **macOS** | `x86_64-apple-darwin` |
+| **Windows** | `i686-pc-windows-msvc`
`x86_64-pc-windows-gnu`
`x86_64-pc-windows-msvc` |
+| **FreeBSD** | `x86_64-unknown-freebsd` |
+| **Android** | `i686-linux-android` |
+
+The platforms in tier 2 are more vague, but include:
+
+ - untested variations of the platforms above,
+ - Redox OS,
+ - and BSDs such as OpenBSD, NetBSD & DragonFlyBSD.
+
+## Utility compatibility per platform
+
+Not all utils work on every platform. For instance, `chgrp` is not supported on
+Windows, because Windows does have the concept of groups. Below is a full table
+detailing which utilities are supported for the tier 1 platforms.
+
+Note that for some utilities, not all functionality is supported on each
+platform. This is documented per utility.
+
+{{ #include platform_table.md }}
diff --git a/src/bin/uudoc.rs b/src/bin/uudoc.rs
index 5ac8582262d..77c7a2fcfdd 100644
--- a/src/bin/uudoc.rs
+++ b/src/bin/uudoc.rs
@@ -42,6 +42,7 @@ fn main() -> io::Result<()> {
[Introduction](index.md)\n\
* [Installation](installation.md)\n\
* [Build from source](build.md)\n\
+ * [Platform support](platforms.md)\n\
* [Contributing](contributing.md)\n\
* [GNU test coverage](test_coverage.md)\n\
* [Extensions](extensions.md)\n\
@@ -53,7 +54,7 @@ fn main() -> io::Result<()> {
println!("Gathering utils per platform");
let utils_per_platform = {
let mut map = HashMap::new();
- for platform in ["unix", "macos", "windows"] {
+ for platform in ["unix", "macos", "windows", "unix_android"] {
let platform_utils: Vec = String::from_utf8(
std::process::Command::new("./util/show-utils.sh")
.arg(format!("--features=feat_os_{}", platform))
@@ -61,6 +62,7 @@ fn main() -> io::Result<()> {
.stdout,
)
.unwrap()
+ .trim()
.split(' ')
.map(ToString::to_string)
.collect();
@@ -75,6 +77,7 @@ fn main() -> io::Result<()> {
.stdout,
)
.unwrap()
+ .trim()
.split(' ')
.map(ToString::to_string)
.collect();
@@ -83,9 +86,47 @@ fn main() -> io::Result<()> {
map
};
- println!("Writing to utils");
let mut utils = utils.entries().collect::>();
utils.sort();
+
+ println!("Writing util per platform table");
+ {
+ let mut platform_table_file = File::create("docs/src/platform_table.md").unwrap();
+
+ // sum, cksum, b2sum, etc. are all available on all platforms, but not in the data structure
+ // otherwise, we check the map for the util name.
+ let check_supported = |name: &str, platform: &str| {
+ if name.ends_with("sum") || utils_per_platform[platform].iter().any(|u| u == name) {
+ "✓"
+ } else {
+ " "
+ }
+ };
+ writeln!(
+ platform_table_file,
+ "| util | Linux | macOS | Windows | FreeBSD | Android |\n\
+ | ---------------- | ----- | ----- | ------- | ------- | ------- |"
+ )?;
+ for (&name, _) in &utils {
+ if name == "[" {
+ continue;
+ }
+ // The alignment is not necessary, but makes the output a bit more
+ // pretty when viewed as plain markdown.
+ writeln!(
+ platform_table_file,
+ "| {:<16} | {:<5} | {:<5} | {:<7} | {:<7} | {:<7} |",
+ format!("**{name}**"),
+ check_supported(name, "linux"),
+ check_supported(name, "macos"),
+ check_supported(name, "windows"),
+ check_supported(name, "unix"),
+ check_supported(name, "unix_android"),
+ )?;
+ }
+ }
+
+ println!("Writing to utils");
for (&name, (_, command)) in utils {
if name == "[" {
continue;