1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

uucore: conditional enable different features

This commit is contained in:
Knight 2016-08-10 13:57:40 +08:00
parent c9dde462c7
commit 23979542af
2 changed files with 33 additions and 10 deletions

View file

@ -6,7 +6,20 @@ authors = []
[dependencies]
libc = { git = "https://github.com/rust-lang/libc.git" }
getopts = "*"
data-encoding = "^1.1"
time = { version = "*", optional = true }
data-encoding = { version = "^1.1", optional = true }
[features]
fs = []
utf8 = []
encoding = ["data-encoding"]
parse_time = []
utmpx = ["time"]
c_types = []
process = []
signals = []
wide = []
default = ["fs", "utf8", "encoding", "parse_time", "utmpx", "c_types", "process", "signals", "wide"]
[lib]
path = "lib.rs"

View file

@ -3,15 +3,25 @@ pub extern crate libc;
#[macro_use]
mod macros;
pub mod fs;
pub mod parse_time;
pub mod utf8;
pub mod encoding;
pub mod coreopts;
#[cfg(unix)] pub mod c_types;
#[cfg(unix)] pub mod process;
#[cfg(unix)] pub mod signals;
#[cfg(unix)] pub mod utmpx;
#[cfg(feature = "fs")]
pub mod fs;
#[cfg(feature = "utf8")]
pub mod utf8;
#[cfg(feature = "encoding")]
pub mod encoding;
#[cfg(feature = "parse_time")]
pub mod parse_time;
#[cfg(windows)] pub mod wide;
#[cfg(all(unix, feature = "utmpx"))]
pub mod utmpx;
#[cfg(all(unix, feature = "c_types"))]
pub mod c_types;
#[cfg(all(unix, feature = "process"))]
pub mod process;
#[cfg(all(unix, feature = "signals"))]
pub mod signals;
#[cfg(all(windows, feature = "wide"))]
pub mod wide;