Cargo.toml: Define feat_wasm (#11074)

This commit is contained in:
oech3
2026-03-05 07:52:28 +09:00
committed by GitHub
parent d906b7d85a
commit d327ee61ef
4 changed files with 62 additions and 3 deletions
+1 -1
View File
@@ -657,7 +657,7 @@ jobs:
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true , check-only: true }
- { os: ubuntu-latest , target: wasm32-wasip1, default-features: false, features: "basenc,cksum", skip-tests: true }
- { os: ubuntu-latest , target: wasm32-wasip1, default-features: false, features: feat_wasm, skip-tests: true }
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
# PR #7964: chcon should not break build without the feature. cargo check is enough to detect it.
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, check-only: true } # M1 CPU
+2
View File
@@ -365,6 +365,8 @@ getcwd
# * other
weblate
algs
wasm
wasip
# * stty terminal flags
brkint
+55
View File
@@ -168,6 +168,61 @@ feat_Tier1 = [
"whoami",
]
## (primary platforms) feature sets
# "feat_wasm" == set of utilities which can be built for wasm target
# We don't need to support all of wasm targets. So the ambiguous name is used at here
# It is bit complex to deduplicate with other lists
feat_wasm = [
"basename",
"base32",
"base64",
"basenc",
"cut",
"date",
"dircolors",
"dirname",
"echo",
"expand",
"factor",
"false",
"fmt",
"fold",
"join",
"link",
"nl",
"numfmt",
"od",
"paste",
"pr",
"printenv",
"printf",
"ptx",
"pwd",
"seq",
"shred",
"shuf",
"sleep",
"sum",
"tee",
"true",
"truncate",
"unexpand",
"uniq",
"unlink",
"wc",
"yes",
# cksum family
"cksum",
"b2sum",
"md5sum",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512sum",
# useless?
"arch",
"uname",
]
# "feat_os_macos" == set of utilities which can be built/run on the MacOS platform
feat_os_macos = [
"feat_os_unix", ## == a modern/usual *nix platform
+4 -2
View File
@@ -25,13 +25,15 @@ The platforms in tier 1 and the platforms that we test in CI are listed below.
| **macOS** | `x86_64-apple-darwin` |
| **Windows** | `i686-pc-windows-msvc` <br> `x86_64-pc-windows-gnu` <br> `x86_64-pc-windows-msvc` |
| **FreeBSD** | `x86_64-unknown-freebsd` |
| **Android** | `i686-linux-android` |
| **OpenBSD** | `x86_64-unknown-openbsd` |
| **Android** | `x86_64-linux-android` |
| **wasm32** | `wasm32-wasip1` |
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.
- and BSDs such as NetBSD & DragonFlyBSD.
## Utility compatibility per platform