Create a new feature for Fuchsia-enabled utilities.

This commit is contained in:
Lei Zhang 2016-11-24 17:54:47 -05:00
parent 59c12433e0
commit 546f2855d5
2 changed files with 84 additions and 1 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());