unitconv 0.1.1

Rust Simple Unit Converter
Documentation
  • Coverage
  • 50%
    6 out of 12 items documented0 out of 8 items with examples
  • Size
  • Source code size: 5.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • balsantiger/rs-unitconv
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • balsantiger

📦 rs-unitconv — A Simple Unit Conversion Library for Rust

✨ Lightweight, zero-dependency utility crate for common unit conversions: length, weight, temperature and more.


🚀 Features

  • 📏 Length: cm ↔ inch, m ↔ ft
  • ⚖️ Weight: kg ↔ lb
  • 🌡️ Temperature: °C ↔ °F, °C ↔ K
  • 💡 Intuitive function names and clean API
  • 🧪 Tested and ready for embedded or CLI use
  • 🔀 No external dependencies

📥 Installation

# Cargo.toml
[dependencies]
rs-unitconv = "0.1.0"

🧑‍💻Usage

use rs_unitconv::length::{cm_to_inch, inch_to_cm};
use rs_unitconv::weight::{kg_to_lb, lb_to_kg};
use rs_unitconv::temperature::{c_to_f, f_to_c};

fn main() {
    println!("100 cm = {:.2} in", cm_to_inch(100.0));
    println!("220 lb = {:.2} kg", lb_to_kg(220.0));
    println!("37 °C = {:.2} °F", c_to_f(37.0));
}