Skip to content

Commit 9400acc

Browse files
committed
top: move codes to uu_core
1 parent bd36404 commit 9400acc

File tree

6 files changed

+111
-184
lines changed

6 files changed

+111
-184
lines changed

Cargo.lock

+59-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ thiserror = "2.0.4"
6262
uucore = "0.0.30"
6363
walkdir = "2.5.0"
6464
windows = { version = "0.60.0" }
65+
windows-sys = { version = "0.59.0", default-features = false }
6566
xattr = "1.3.1"
66-
systemstat = "0.2.4"
6767

6868
[dependencies]
6969
clap = { workspace = true }

src/uu/top/Cargo.toml

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@ keywords = ["acl", "uutils", "cross-platform", "cli", "utility"]
1212
categories = ["command-line-utilities"]
1313

1414
[dependencies]
15-
uucore = { workspace = true, features = ["utmpx"] }
15+
uucore = { workspace = true, features = ["utmpx", "uptime"] }
1616
clap = { workspace = true }
1717
libc = { workspace = true }
1818
nix = { workspace = true }
1919
prettytable-rs = { workspace = true }
2020
sysinfo = { workspace = true }
2121
chrono = { workspace = true }
22-
systemstat = { workspace = true }
2322
bytesize = { workspace = true }
24-
25-
[target.'cfg(target_os="linux")'.dependencies]
26-
libsystemd-sys = "0.9.3"
27-
2823
[target.'cfg(target_os="windows")'.dependencies]
29-
windows = { version = "0.59.0", features = ["Win32_System_RemoteDesktop", "Wdk_System_SystemInformation"] }
24+
windows-sys = { workspace = true, features = [
25+
"Win32_System_RemoteDesktop",
26+
"Win32_System_SystemInformation",
27+
] }
28+
29+
[target.'cfg(target_os="linux")'.build-dependencies]
30+
pkg-config = "0.3.31"
3031

3132
[lib]
3233
path = "src/top.rs"

src/uu/top/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
#[cfg(target_os = "linux")]
3+
pkg_config::find_library("libsystemd").unwrap();
4+
}

0 commit comments

Comments
 (0)