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)]
20
21/// Use mimalloc as the global allocator for all binaries.
22/// 2-3x faster than glibc malloc for small allocations,
23/// better thread-local caching, and reduced fragmentation.
24/// Critical for tools like sort/uniq that do many small allocs.
25#[global_allocator]
26static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
27
28pub mod base64;
29pub mod cat;
30pub mod comm;
31pub mod common;
32pub mod cut;
33pub mod expand;
34pub mod fold;
35pub mod hash;
36pub mod head;
37pub mod join;
38pub mod nl;
39pub mod paste;
40pub mod rev;
41pub mod sort;
42pub mod tac;
43pub mod tail;
44pub mod tr;
45pub mod uniq;
46pub mod wc;