1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #1000 from antiagainst/fuchsia

Add a new feature to list all utilities that can compile for Fuchsia right now
This commit is contained in:
Michael Gehring 2016-11-26 10:01:55 +01:00 committed by GitHub
commit 268fe45f24
4 changed files with 88 additions and 3 deletions

View file

@ -36,6 +36,89 @@ unix = [
"users",
"who",
]
# Feature "fuchsia" contains the exclusive list of utilities
# that can be compiled and run on Fuchsia. Should be built
# with --no-default-features when selecting this feature.
# TODO: merge with "generic"/"unix" to avoid duplication
# once we support all utilities in that feature.
fuchsia = [
# From unix
"arch",
"chgrp",
"chmod",
"chown",
"du",
"groups",
"hostid",
"install",
"logname",
"mkfifo",
"mknod",
"nice",
"pathchk",
"stdbuf",
"touch",
"tty",
"uname",
"unlink",
# From generic
"base32",
"base64",
"basename",
"cat",
"cksum",
"comm",
"cp",
"cut",
"dircolors",
"dirname",
"echo",
"env",
"expand",
"expr",
"factor",
"false",
"fmt",
"fold",
"hashsum",
"head",
"link",
"ln",
"mkdir",
"mv",
"nl",
"od",
"paste",
"printenv",
"printf",
"pwd",
"readlink",
"realpath",
"relpath",
"rm",
"rmdir",
"seq",
"shred",
"shuf",
"sleep",
"sort",
"split",
"sum",
"sync",
"tac",
"tail",
"tee",
"test",
"tr",
"true",
"truncate",
"tsort",
"unexpand",
"wc",
"whoami",
"yes",
]
generic = [
"base32",
"base64",

View file

@ -12,7 +12,7 @@ pub fn main() {
if val == "1" && key.starts_with(feature_prefix) {
let krate = key[feature_prefix.len()..].to_lowercase();
match krate.as_ref() {
"default" | "unix" | "generic" | "nightly" | "test_unimplemented" => continue,
"default" | "unix" | "fuchsia" | "generic" | "nightly" | "test_unimplemented" => continue,
_ => {},
}
crates.push(krate.to_string());

View file

@ -28,6 +28,8 @@ static HOST_OS: &'static str = "FreeBSD";
static HOST_OS: &'static str = "OpenBSD";
#[cfg(target_os = "macos")]
static HOST_OS: &'static str = "Darwin";
#[cfg(target_os = "fuchsia")]
static HOST_OS: &'static str = "Fuchsia";
pub fn uumain(args: Vec<String>) -> i32 {
let mut opts = new_coreopts!(SYNTAX, SUMMARY, "");

View file

@ -16,7 +16,7 @@ pub mod encoding;
#[cfg(feature = "parse_time")]
pub mod parse_time;
#[cfg(all(unix, feature = "utmpx"))]
#[cfg(all(unix, not(target_os = "fuchsia"), feature = "utmpx"))]
pub mod utmpx;
#[cfg(all(unix, feature = "utsname"))]
pub mod utsname;
@ -24,7 +24,7 @@ pub mod utsname;
pub mod entries;
#[cfg(all(unix, feature = "process"))]
pub mod process;
#[cfg(all(unix, feature = "signals"))]
#[cfg(all(unix, not(target_os = "fuchsia"), feature = "signals"))]
pub mod signals;
#[cfg(all(windows, feature = "wide"))]