luhcore
luhcore is a small utility crate providing core functionality commonly needed in my applications, including:
- Terminal styling via [
Colorise], [Style], [StyledText], and [Color]. - Platform directories handling via [
dirs::AppDirs]. - Build and environment checks like
is_ci(),is_debug_build(), andis_release_build().
Modules
- [
color]: Extension trait for coloring strings and styled text. - [
style]: Core style types (Style,StyledText,Color) and styling logic. - [
dirs]: Application directories handling (AppDirs) for config, cache, temp files, etc.
Features
-
Terminal text styling
Apply foreground/background colors, bold, underline, and dim effects using a convenient trait interface. -
Environment detection
Check if running in a CI environment, or whether the build is a debug or release build. -
Cross-platform directories
Create and manage app-specific config, cache, and temporary directories, including development temp files.
Examples
Terminal styling
use Colorise;
println!;
println!;
println!;
Environment detection
use ;
if is_ci
if is_debug_build
Directories handling
use AppDirs;
Note
made with love s.c 2025 :)