fone 0.1.0

fone is a rust dev helper
Documentation

Fone Crate

Crates.io Documentation

The fone crate is a lightweight utility library for Rust that provides:

  • Arithmetic Operations: Simple functions for performing basic math.
  • Logging Utilities: Macros for in-memory and file-based logging with support for different severity levels.

Features

  • Arithmetic Utilities:

    • add: Adds two integers.
  • Logging Utilities:

    • In-memory logging: logi!, logd!, logw!, loge!
    • File-based logging: logfi!, logfd!, logfw!, logfe!

Installation

Add the following to your Cargo.toml:

[dependencies]
fone = "0.1.0"

Usage

use fone::add;

fn main() {
    let result = add(2, 2);
    println!("Result: {}", result);
}
use fone::{logi, logd, logw, loge};

fn main() {
    logi!("Application initialized");
    logd!("Configuration loaded");
    logw!("Deprecated API used");
    loge!("Critical system failure");
}
use fone::{logfi, logfd, logfw, logfe};

fn main() {
    logfi!("Application initialized");
    logfd!("Configuration loaded");
    logfw!("Deprecated API used");
    logfe!("Critical system failure");
}

Testing

To run the test suite:

cargo test -- --show-output
cargo test -v

The tests validate:

  • Arithmetic functionality.
  • In-memory logging behavior.
  • File-based logging behavior.

Documentation

Generate and view the documentation locally:

cargo doc --open

For online documentation, visit docs.rs/fone.

Contributing

Contributions are welcome! Please ensure that:

  • New features include appropriate tests.
  • Documentation is updated for all public APIs.
  • Code adheres to Rust best practices and formatting standards.

License

This project is licensed under the MIT License. See LICENSE for details.


---

### Summary of Changes

1. **Crate-Level Documentation**: Added to `lib.rs` or `main.rs` to describe the crate's purpose, features, and usage.
2. **Function-Level Documentation**: Added to each public function and macro to explain their behavior and provide examples.
3. **README.md**: Created to provide a high-level overview of the crate, installation instructions, usage examples, and contribution guidelines.

With these updates, the `fone` crate will have comprehensive documentation that supports `cargo doc` generation and provides a clear README for users.