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_lifetimes,
16    clippy::needless_return,
17    clippy::too_many_arguments
18)]
19
20/// Use mimalloc as the global allocator for all binaries.
21/// 2-3x faster than glibc malloc for small allocations,
22/// better thread-local caching, and reduced fragmentation.
23/// Critical for tools like sort/uniq that do many small allocs.
24#[global_allocator]
25static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
26
27pub mod base64;
28pub mod common;
29pub mod cut;
30pub mod hash;
31pub mod sort;
32pub mod tac;
33pub mod tr;
34pub mod uniq;
35pub mod wc;