mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
uucore: conditional enable different features
This commit is contained in:
parent
c9dde462c7
commit
23979542af
2 changed files with 33 additions and 10 deletions
|
@ -6,7 +6,20 @@ authors = []
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = { git = "https://github.com/rust-lang/libc.git" }
|
libc = { git = "https://github.com/rust-lang/libc.git" }
|
||||||
getopts = "*"
|
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]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
|
@ -3,15 +3,25 @@ pub extern crate libc;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
||||||
pub mod fs;
|
|
||||||
pub mod parse_time;
|
|
||||||
pub mod utf8;
|
|
||||||
pub mod encoding;
|
|
||||||
pub mod coreopts;
|
pub mod coreopts;
|
||||||
|
|
||||||
#[cfg(unix)] pub mod c_types;
|
#[cfg(feature = "fs")]
|
||||||
#[cfg(unix)] pub mod process;
|
pub mod fs;
|
||||||
#[cfg(unix)] pub mod signals;
|
#[cfg(feature = "utf8")]
|
||||||
#[cfg(unix)] pub mod utmpx;
|
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue