mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Merge pull request #1485 from rivy/rf.features
feature reorganization and polish
This commit is contained in:
commit
f734d48405
2 changed files with 129 additions and 109 deletions
6
.github/workflows/CICD.yml
vendored
6
.github/workflows/CICD.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
matrix:
|
||||
job:
|
||||
- { os: ubuntu-latest , features: unix }
|
||||
- { os: macos-latest , features: unix }
|
||||
- { os: macos-latest , features: macos }
|
||||
- { os: windows-latest , features: windows }
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
@ -130,7 +130,7 @@ jobs:
|
|||
- { os: ubuntu-18.04 , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
|
||||
- { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross }
|
||||
- { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
|
||||
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_unix }
|
||||
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos }
|
||||
- { os: windows-latest , target: i686-pc-windows-gnu , features: feat_os_windows }
|
||||
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
|
||||
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows , toolchain: nightly-x86_64-pc-windows-gnu } ## !maint: [rivy; due 2020-21-03] disable/remove when rust beta >= v1.43.0 is available (~mid-March)
|
||||
|
@ -326,7 +326,7 @@ jobs:
|
|||
# job: [ { os: ubuntu-latest }, { os: macos-latest }, { os: windows-latest } ]
|
||||
job:
|
||||
- { os: ubuntu-latest , features: unix }
|
||||
- { os: macos-latest , features: unix }
|
||||
- { os: macos-latest , features: macos }
|
||||
- { os: windows-latest , features: windows , toolchain: nightly-x86_64-pc-windows-gnu }
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
|
232
Cargo.toml
232
Cargo.toml
|
@ -14,118 +14,14 @@ autotests = false
|
|||
[features]
|
||||
default = [ "feat_common_core" ]
|
||||
## OS feature shortcodes
|
||||
macos = [ "feat_os_unix" ]
|
||||
macos = [ "feat_os_macos" ]
|
||||
unix = [ "feat_os_unix" ]
|
||||
windows = [ "feat_os_windows" ]
|
||||
## project-specific feature shortcodes
|
||||
nightly = []
|
||||
test_unimplemented = []
|
||||
## feature sets
|
||||
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms
|
||||
feat_os_unix = [
|
||||
"feat_common",
|
||||
"feat_os_unix_musl",
|
||||
"feat_os_unix_utmpx_required",
|
||||
#
|
||||
"stdbuf",
|
||||
]
|
||||
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuschia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>)
|
||||
feat_os_unix_fuchsia = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"chgrp",
|
||||
"chmod",
|
||||
"chown",
|
||||
"du",
|
||||
"groups",
|
||||
"hostid",
|
||||
"install",
|
||||
"logname",
|
||||
"mkfifo",
|
||||
"mknod",
|
||||
"nice",
|
||||
"pathchk",
|
||||
"stdbuf",
|
||||
"tty",
|
||||
"uname",
|
||||
"unlink",
|
||||
]
|
||||
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat])
|
||||
feat_os_unix_gnueabihf = [
|
||||
"feat_common",
|
||||
"feat_os_unix_musl",
|
||||
"feat_os_unix_utmpx_required",
|
||||
]
|
||||
# "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>)
|
||||
feat_os_unix_musl = [
|
||||
"feat_common",
|
||||
#
|
||||
"chgrp",
|
||||
"chmod",
|
||||
"chown",
|
||||
"chroot",
|
||||
"du",
|
||||
"groups",
|
||||
"hostid",
|
||||
"id",
|
||||
"install",
|
||||
"kill",
|
||||
"logname",
|
||||
"mkfifo",
|
||||
"mknod",
|
||||
"nice",
|
||||
"numfmt",
|
||||
"nohup",
|
||||
"pathchk",
|
||||
"stat",
|
||||
"timeout",
|
||||
"touch",
|
||||
"tty",
|
||||
"uname",
|
||||
"unlink",
|
||||
]
|
||||
# "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: <https://www.redox-os.org>; <https://en.wikipedia.org/wiki/Redox_(operating_system)>)
|
||||
feat_os_unix_redox = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"uname",
|
||||
"chmod",
|
||||
"install",
|
||||
]
|
||||
# "feat_os_unix_utmpx_required" == set of utilites requiring utmp/utmpx support
|
||||
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
|
||||
feat_os_unix_utmpx_required = [
|
||||
"pinky",
|
||||
"uptime",
|
||||
"users",
|
||||
"who",
|
||||
]
|
||||
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms
|
||||
feat_os_windows = [
|
||||
"feat_common", ## == "feat_os_windows_legacy" + "hostname"
|
||||
]
|
||||
# "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP")
|
||||
feat_os_windows_legacy = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"arch",
|
||||
"nproc",
|
||||
"sync",
|
||||
"touch",
|
||||
"whoami",
|
||||
]
|
||||
## (common/core) feature sets
|
||||
# "feat_common" == expanded set of utilities which can be built/run on the usual rust "tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>)
|
||||
feat_common = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"arch",
|
||||
"hostname",
|
||||
"nproc",
|
||||
"sync",
|
||||
"touch",
|
||||
"whoami",
|
||||
]
|
||||
## (common/core and Tier1) feature sets
|
||||
# "feat_common_core" == baseline core set of utilities which can be built/run on most targets
|
||||
feat_common_core = [
|
||||
"base32",
|
||||
|
@ -189,6 +85,130 @@ feat_common_core = [
|
|||
"wc",
|
||||
"yes",
|
||||
]
|
||||
# "feat_Tier1" == expanded set of utilities which can be built/run on the usual rust "Tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>)
|
||||
feat_Tier1 = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"arch",
|
||||
"hostname",
|
||||
"nproc",
|
||||
"sync",
|
||||
"touch",
|
||||
"whoami",
|
||||
]
|
||||
## (primary platforms) feature sets
|
||||
# "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
|
||||
]
|
||||
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms
|
||||
feat_os_unix = [
|
||||
"feat_Tier1",
|
||||
#
|
||||
"feat_require_crate_cpp",
|
||||
"feat_require_unix",
|
||||
"feat_require_unix_utmpx",
|
||||
]
|
||||
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms
|
||||
feat_os_windows = [
|
||||
"feat_Tier1", ## == "feat_os_windows_legacy" + "hostname"
|
||||
]
|
||||
## (secondary platforms) feature sets
|
||||
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat])
|
||||
feat_os_unix_gnueabihf = [
|
||||
"feat_Tier1",
|
||||
#
|
||||
"feat_require_unix",
|
||||
"feat_require_unix_utmpx",
|
||||
]
|
||||
# "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>)
|
||||
feat_os_unix_musl = [
|
||||
"feat_Tier1",
|
||||
#
|
||||
"feat_require_unix",
|
||||
]
|
||||
## feature sets with requirements (restricting cross-platform availability)
|
||||
#
|
||||
# ** NOTE: these `feat_require_...` sets should be minimized as much as possible to encourage cross-platform availability of utilities
|
||||
#
|
||||
# "feat_require_crate_cpp" == set of utilities requiring the `cpp` crate (which fail to compile on several platforms; as of 2020-04-23)
|
||||
feat_require_crate_cpp = [
|
||||
"stdbuf",
|
||||
]
|
||||
# "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23)
|
||||
feat_require_unix = [
|
||||
"chgrp",
|
||||
"chmod",
|
||||
"chown",
|
||||
"chroot",
|
||||
"du",
|
||||
"groups",
|
||||
"hostid",
|
||||
"id",
|
||||
"install",
|
||||
"kill",
|
||||
"logname",
|
||||
"mkfifo",
|
||||
"mknod",
|
||||
"nice",
|
||||
"numfmt",
|
||||
"nohup",
|
||||
"pathchk",
|
||||
"stat",
|
||||
"timeout",
|
||||
"tty",
|
||||
"uname",
|
||||
"unlink",
|
||||
]
|
||||
# "feat_require_unix_utmpx" == set of utilites requiring unix utmp/utmpx support
|
||||
# * ref: <https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?>
|
||||
feat_require_unix_utmpx = [
|
||||
"pinky",
|
||||
"uptime",
|
||||
"users",
|
||||
"who",
|
||||
]
|
||||
## (alternate/newer/smaller platforms) feature sets
|
||||
# "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuschia" OS (refs: <https://fuchsia.dev>; <https://en.wikipedia.org/wiki/Google_Fuchsia>)
|
||||
feat_os_unix_fuchsia = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"feat_require_crate_cpp",
|
||||
#
|
||||
"chgrp",
|
||||
"chmod",
|
||||
"chown",
|
||||
"du",
|
||||
"groups",
|
||||
"hostid",
|
||||
"install",
|
||||
"logname",
|
||||
"mkfifo",
|
||||
"mknod",
|
||||
"nice",
|
||||
"pathchk",
|
||||
"tty",
|
||||
"uname",
|
||||
"unlink",
|
||||
]
|
||||
# "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: <https://www.redox-os.org>; <https://en.wikipedia.org/wiki/Redox_(operating_system)>)
|
||||
feat_os_unix_redox = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"uname",
|
||||
"chmod",
|
||||
"install",
|
||||
]
|
||||
# "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP")
|
||||
feat_os_windows_legacy = [
|
||||
"feat_common_core",
|
||||
#
|
||||
"arch",
|
||||
"nproc",
|
||||
"sync",
|
||||
"touch",
|
||||
"whoami",
|
||||
]
|
||||
|
||||
[workspace]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue