Skip to content

Compile-time type checking for arbitrary unit systems.

License

Notifications You must be signed in to change notification settings

supergravity-org/dimensioned

 
 

Repository files navigation

crates.io Build Status

Dimensioned

Dimensioned is a Rust library for compile-time type checking of arbitrary unit systems. It has its own website which includes some in-depth tutorials.

The library documentation is located here.

Here is a short example of its use:

extern crate dimensioned;
use dimensioned::si::{one, m, s};

fn main() {
    let x = 6.0 * m;
    let t = 3.0 * s;
    let v = 2.0 * m/s;
    assert_eq!(v, x/t);
}

Note: This library is unstable, and you should expect breaking changes for now. It also depends on unstable Rust features.

About

Compile-time type checking for arbitrary unit systems.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 79.0%
  • Python 20.0%
  • Shell 1.0%