Cargo Features

[dependencies]
coreutils = { version = "0.0.28", default-features = false, features = ["macos", "unix", "windows", "nightly", "expensive_tests", "uudoc", "feat_acl", "feat_selinux", "feat_common_core", "feat_Tier1", "feat_os_macos", "feat_os_unix", "feat_os_windows", "feat_os_unix_gnueabihf", "feat_os_unix_musl", "feat_os_unix_android", "feat_require_crate_cpp", "feat_require_unix", "feat_require_unix_utmpx", "feat_require_unix_hostid", "feat_require_selinux", "feat_os_unix_fuchsia", "feat_os_unix_redox", "feat_os_windows_legacy", "test"] }
default = feat_common_core

The feat_common_core feature is set by default whenever coreutils is added without default-features = false somewhere in the dependency tree.

macos = feat_os_macos

OS feature shortcodes

unix = feat_os_unix
windows = feat_os_windows
nightly

project-specific feature shortcodes

test_unimplemented expensive_tests
uudoc = zip
  • only build uudoc when --feature uudoc is activated

Enables uuhelp_parser

Required by the uudoc binary

feat_acl

features "feat_acl" == enable support for ACLs (access control lists; by using--features feat_acl) NOTE:

  • On linux, the posix-acl/acl-sys crate requires libacl headers and shared library to be accessible in the C toolchain at compile time.
  • On FreeBSD and macOS this is not required.

Enables feat_acl of uu_cp

feat_selinux = feat_require_selinux, selinux

"feat_selinux" == enable support for SELinux Security Context (by using --features feat_selinux) NOTE:

  • The selinux(-sys) crate requires libselinux headers and shared library to be accessible in the C toolchain at compile time.
  • Running a uutils compiled with feat_selinux requires an SELinux enabled Kernel at run time.

Enables selinux of uu_cp, uu_id, and uu_ls

feat_common_core default feat_Tier1? feat_os_unix_fuchsia? feat_os_unix_redox? feat_os_windows_legacy? = base32, base64, basename, basenc, cat, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env, expand, expr, factor, false, fmt, fold, hashsum, head, join, link, ln, ls, mkdir, mktemp, more, mv, nl, numfmt, od, paste, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, seq, shred, shuf, sleep, sort, split, sum, tac, tail, tee, test, touch, tr, true, truncate, tsort, unexpand, uniq, unlink, vdir, wc, yes

feature sets
(common/core and Tier1) feature sets
"feat_common_core" == baseline core set of utilities which can be built/run on most targets

feat_Tier1 feat_os_unix? feat_os_unix_android? feat_os_unix_gnueabihf? feat_os_unix_musl? feat_os_windows? = arch, feat_common_core, hostname, nproc, sync, touch, uname, whoami

"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_os_macos macos? = feat_os_unix, feat_require_unix_hostid

(primary platforms) feature sets
"feat_os_macos" == set of utilities which can be built/run on the MacOS platform

feat_os_unix feat_os_macos? unix? = feat_Tier1, feat_require_crate_cpp, feat_require_unix, feat_require_unix_hostid, feat_require_unix_utmpx

"feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms

feat_os_windows windows? = feat_Tier1

"feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms

feat_os_unix_gnueabihf = feat_Tier1, feat_require_unix, feat_require_unix_hostid, feat_require_unix_utmpx

(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_musl = feat_Tier1, feat_require_unix, feat_require_unix_hostid

"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_android = feat_Tier1, feat_require_unix
feat_require_crate_cpp feat_os_unix? feat_os_unix_fuchsia? = stdbuf

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_unix feat_os_unix? feat_os_unix_android? feat_os_unix_gnueabihf? feat_os_unix_musl? = chgrp, chmod, chown, chroot, groups, id, install, kill, logname, mkfifo, mknod, nice, nohup, pathchk, stat, stty, timeout, tty

"feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23)

feat_require_unix_utmpx feat_os_unix? feat_os_unix_gnueabihf? = pinky, uptime, users, who

"feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support

feat_require_unix_hostid feat_os_macos? feat_os_unix? feat_os_unix_gnueabihf? feat_os_unix_musl? = hostid

"feat_require_unix_hostid" == set of utilities requiring gethostid in libc (only some unixes provide)

feat_require_selinux feat_selinux? = chcon, runcon

"feat_require_selinux" == set of utilities depending on SELinux.

feat_os_unix_fuchsia = chgrp, chmod, chown, du, feat_common_core, feat_require_crate_cpp, groups, hostid, install, logname, mkfifo, mknod, nice, pathchk, tty, uname, unlink

(alternate/newer/smaller platforms) feature sets "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuchsia" OS (refs: https://fuchsia.dev; https://en.wikipedia.org/wiki/Google_Fuchsia)

feat_os_unix_redox = chmod, feat_common_core, stat, uname

"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_windows_legacy = arch, feat_common_core, nproc, sync, touch, whoami

"feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP")

test feat_common_core = uu_test

* bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing)

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

selinux feat_selinux?
zip uudoc?

Enables zip ^1.1.4

uu_test test?

Enables uu_test

* uutils

arch feat_Tier1? feat_os_windows_legacy?

Enables uu_arch

base32 feat_common_core

Enables uu_base32

base64 feat_common_core

Enables uu_base64

basename feat_common_core

Enables uu_basename

basenc feat_common_core

Enables uu_basenc

cat feat_common_core

Enables uu_cat

chcon feat_require_selinux?

Enables uu_chcon

chgrp feat_os_unix_fuchsia? feat_require_unix?

Enables uu_chgrp

chmod feat_os_unix_fuchsia? feat_os_unix_redox? feat_require_unix?

Enables uu_chmod

chown feat_os_unix_fuchsia? feat_require_unix?

Enables uu_chown

chroot feat_require_unix?

Enables uu_chroot

cksum feat_common_core

Enables uu_cksum

comm feat_common_core

Enables uu_comm

cp feat_acl? feat_common_core feat_selinux?

Enables uu_cp

csplit feat_common_core

Enables uu_csplit

cut feat_common_core

Enables uu_cut

date feat_common_core

Enables uu_date

dd feat_common_core

Enables uu_dd

df feat_common_core

Enables uu_df

dir feat_common_core

Enables uu_dir

dircolors feat_common_core

Enables uu_dircolors

dirname feat_common_core

Enables uu_dirname

du feat_common_core feat_os_unix_fuchsia?

Enables uu_du

echo feat_common_core

Enables uu_echo

env feat_common_core

Enables uu_env

expand feat_common_core

Enables uu_expand

expr feat_common_core

Enables uu_expr

factor feat_common_core

Enables uu_factor

false feat_common_core

Enables uu_false

fmt feat_common_core

Enables uu_fmt

fold feat_common_core

Enables uu_fold

groups feat_os_unix_fuchsia? feat_require_unix?

Enables uu_groups

hashsum feat_common_core

Enables uu_hashsum

head feat_common_core

Enables uu_head

hostid feat_os_unix_fuchsia? feat_require_unix_hostid?

Enables uu_hostid

hostname feat_Tier1?

Enables uu_hostname

id feat_require_unix? feat_selinux?

Enables uu_id

install feat_os_unix_fuchsia? feat_require_unix?

Enables uu_install

join feat_common_core

Enables uu_join

kill feat_require_unix?

Enables uu_kill

Enables uu_link

ln feat_common_core

Enables uu_ln

ls feat_common_core feat_selinux?

Enables uu_ls

logname feat_os_unix_fuchsia? feat_require_unix?

Enables uu_logname

mkdir feat_common_core

Enables uu_mkdir

mkfifo feat_os_unix_fuchsia? feat_require_unix?

Enables uu_mkfifo

mknod feat_os_unix_fuchsia? feat_require_unix?

Enables uu_mknod

mktemp feat_common_core

Enables uu_mktemp

more feat_common_core

Enables uu_more

mv feat_common_core

Enables uu_mv

nice feat_os_unix_fuchsia? feat_require_unix?

Enables uu_nice

nl feat_common_core

Enables uu_nl

nohup feat_require_unix?

Enables uu_nohup

nproc feat_Tier1? feat_os_windows_legacy?

Enables uu_nproc

numfmt feat_common_core

Enables uu_numfmt

od feat_common_core

Enables uu_od

paste feat_common_core

Enables uu_paste

pathchk feat_os_unix_fuchsia? feat_require_unix?

Enables uu_pathchk

pinky feat_require_unix_utmpx?

Enables uu_pinky

pr feat_common_core

Enables uu_pr

printenv feat_common_core

Enables uu_printenv

printf feat_common_core

Enables uu_printf

ptx feat_common_core

Enables uu_ptx

pwd feat_common_core

Enables uu_pwd

Enables uu_readlink

realpath feat_common_core

Enables uu_realpath

rm feat_common_core

Enables uu_rm

rmdir feat_common_core

Enables uu_rmdir

runcon feat_require_selinux?

Enables uu_runcon

seq feat_common_core

Enables uu_seq

shred feat_common_core

Enables uu_shred

shuf feat_common_core

Enables uu_shuf

sleep feat_common_core

Enables uu_sleep

sort feat_common_core

Enables uu_sort

split feat_common_core

Enables uu_split

stat feat_os_unix_redox? feat_require_unix?

Enables uu_stat

stdbuf feat_require_crate_cpp?

Enables uu_stdbuf

stty feat_require_unix?

Enables uu_stty

sum feat_common_core

Enables uu_sum

sync feat_Tier1? feat_os_windows_legacy?

Enables uu_sync

tac feat_common_core

Enables uu_tac

tail feat_common_core

Enables uu_tail

tee feat_common_core

Enables uu_tee

timeout feat_require_unix?

Enables uu_timeout

touch feat_Tier1? feat_common_core feat_os_windows_legacy?

Enables uu_touch

tr feat_common_core

Enables uu_tr

true feat_common_core

Enables uu_true

truncate feat_common_core

Enables uu_truncate

tsort feat_common_core

Enables uu_tsort

tty feat_os_unix_fuchsia? feat_require_unix?

Enables uu_tty

uname feat_Tier1? feat_os_unix_fuchsia? feat_os_unix_redox?

Enables uu_uname

unexpand feat_common_core

Enables uu_unexpand

uniq feat_common_core

Enables uu_uniq

Enables uu_unlink

uptime feat_require_unix_utmpx?

Enables uu_uptime

users feat_require_unix_utmpx?

Enables uu_users

vdir feat_common_core

Enables uu_vdir

wc feat_common_core

Enables uu_wc

who feat_require_unix_utmpx?

Enables uu_who

whoami feat_Tier1? feat_os_windows_legacy?

Enables uu_whoami

yes feat_common_core

Enables uu_yes