Skip to main content

coreutils_rs/
lib.rs

1// Allow pre-existing clippy lints across the codebase
2#![allow(
3    clippy::collapsible_if,
4    clippy::unnecessary_map_or,
5    clippy::redundant_closure,
6    clippy::manual_strip,
7    clippy::needless_range_loop,
8    clippy::identity_op,
9    clippy::len_without_is_empty,
10    clippy::doc_lazy_continuation,
11    clippy::empty_line_after_doc_comments,
12    clippy::implicit_saturating_sub,
13    clippy::manual_div_ceil,
14    clippy::manual_range_contains,
15    clippy::needless_borrows_for_generic_args,
16    clippy::needless_lifetimes,
17    clippy::needless_return,
18    clippy::too_many_arguments,
19    clippy::unnecessary_cast,
20    clippy::write_literal,
21    clippy::io_other_error
22)]
23
24/// Use mimalloc as the global allocator for all binaries.
25/// 2-3x faster than glibc malloc for small allocations,
26/// better thread-local caching, and reduced fragmentation.
27/// Critical for tools like sort/uniq that do many small allocs.
28#[global_allocator]
29static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
30
31pub mod base64;
32pub mod cat;
33#[cfg(unix)]
34pub mod chgrp;
35#[cfg(unix)]
36pub mod chmod;
37#[cfg(unix)]
38pub mod chown;
39pub mod comm;
40pub mod common;
41#[cfg(unix)]
42pub mod cp;
43pub mod csplit;
44pub mod cut;
45#[cfg(unix)]
46pub mod date;
47pub mod dd;
48#[cfg(unix)]
49pub mod df;
50#[cfg(unix)]
51pub mod du;
52pub mod echo;
53pub mod expand;
54pub mod expr;
55pub mod factor;
56pub mod fmt;
57pub mod fold;
58pub mod hash;
59pub mod head;
60#[cfg(unix)]
61pub mod install;
62pub mod join;
63#[cfg(unix)]
64pub mod ls;
65#[cfg(unix)]
66pub mod mv;
67pub mod nl;
68pub mod numfmt;
69pub mod od;
70pub mod paste;
71#[cfg(unix)]
72pub mod pinky;
73#[cfg(unix)]
74pub mod pr;
75pub mod printf;
76pub mod ptx;
77pub mod rev;
78#[cfg(unix)]
79pub mod rm;
80pub mod shred;
81pub mod sort;
82pub mod split;
83#[cfg(unix)]
84pub mod stat;
85#[cfg(unix)]
86pub mod stdbuf;
87#[cfg(unix)]
88pub mod stty;
89pub mod tac;
90pub mod tail;
91#[cfg(unix)]
92pub mod test_cmd;
93pub mod tr;
94pub mod uniq;
95#[cfg(unix)]
96pub mod users;
97pub mod wc;
98#[cfg(unix)]
99pub mod who;