Crates.io | home-prelude |
lib.rs | home-prelude |
version | 1.0.2 |
source | src |
created_at | 2024-08-24 21:29:42.716396 |
updated_at | 2024-08-24 21:39:00.894814 |
description | Prelude library to support home applications |
homepage | https://github.com/haribo256/home-prelude |
repository | https://github.com/haribo256/home-prelude |
max_upload_size | |
id | 1350566 |
size | 6,101 |
home-prelude
is a Rust library designed to simplify the setup of tracing and error handling for Rust applications.
It provides pre-configured tracing and error output configurations that can be quickly integrated into binary projects, especially those intended to run in a home or personal environment.
color-eyre
for better error reporting.StdResult
type alias for consistent error handling across your application.Add home-prelude
to your Cargo.toml
:
[dependencies]
home-prelude = "1"
To use home-prelude
in your Rust project, you need to set up tracing and error handling at the start of your application:
use home_prelude::{configure_tracing, configure_color_eyre, StdResult};
fn main() -> StdResult {
// Configure tracing and error handling
configure_tracing();
configure_error_output();
// Your application logic goes here
Ok(())
}
Tracing Configuration:
stderr
.%Y-%m-%d %H:%M:%S
) for log timestamps.NO_COLOR
environment variable.Error Handling Configuration:
color-eyre
for enhanced error reporting.NO_COLOR
environment variable.Contributions are welcome! Please check out the issues for tasks to work on. If you find a bug or have a feature request, feel free to open an issue.
tracing
, color-eyre
, and other dependencies.This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or support, please open an issue or contact the maintainer via the repository's homepage.