Skip to content

Yrrrrrf/dev_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dev Utils

GitHub Crates.io Docs.rs

Overview

Dev Utils is a modular Rust workspace providing a collection of utility crates designed to streamline common development tasks. It features a high-performance logging system, arbitrary-precision base conversion, and more.

Workspace Structure

  • dev_utils (src/core): The core library containing all utility modules.
  • dev_macros (src/macros): Procedural macros for boilerplate reduction.
  • dev-cli (src/cli): The dev binary, a command-line interface for the toolkit.

Installation

As a Library

Add to your Cargo.toml:

[dependencies]
dev_utils = "0.1.5"

As a CLI

Install the dev binary globally:

cargo install --path src/cli

Features

Enhanced Logging (dlog)

A tracing-powered logging system with local time, millisecond precision, and leveled colors.

use dev_utils::{dlog, info, warn};

fn main() {
    dlog::init(); // Initialize with local time
    info!("Starting application...");
    warn!("Low disk space detected");
}

CLI Logging

Use the dev command in your shell or scripts:

dev log info "Build successful"
dev log --no-time error "Deployment failed"

Quick Start

use dev_utils::app_dt;

fn main() {
    app_dt!(file!()); // Display project info from Cargo.toml
}

Benchmarks

Run the logging benchmark:

just bench 100000

See docs/bench.md for more details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A collection of utilities for development

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors