| Crates.io | unitconv |
| lib.rs | unitconv |
| version | 0.1.1 |
| created_at | 2025-08-01 10:23:18.261959+00 |
| updated_at | 2025-08-05 04:17:49.260364+00 |
| description | Rust Simple Unit Converter |
| homepage | |
| repository | https://github.com/balsantiger/rs-unitconv |
| max_upload_size | |
| id | 1776422 |
| size | 5,813 |
rs-unitconv — A Simple Unit Conversion Library for Rust✨ Lightweight, zero-dependency utility crate for common unit conversions: length, weight, temperature and more.
cm ↔ inch, m ↔ ftkg ↔ lb°C ↔ °F, °C ↔ K# Cargo.toml
[dependencies]
rs-unitconv = "0.1.0"
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));
}