#unit #math #conversion


Unit conversion library behind rink

4 releases

0.6.2 Oct 31, 2021
0.6.0 Apr 6, 2021
0.5.1 Aug 30, 2020
0.5.0 Jul 18, 2020

#1952 in Algorithms

Download history 101/week @ 2023-06-13 130/week @ 2023-06-20 114/week @ 2023-06-27 127/week @ 2023-07-04 101/week @ 2023-07-11 153/week @ 2023-07-18 155/week @ 2023-07-25 119/week @ 2023-08-01 126/week @ 2023-08-08 137/week @ 2023-08-15 102/week @ 2023-08-22 119/week @ 2023-08-29 152/week @ 2023-09-05 122/week @ 2023-09-12 118/week @ 2023-09-19 101/week @ 2023-09-26

508 downloads per month
Used in 5 crates (3 directly)

MPL-2.0 license


Rink Core

Rink Core is the library that implements most of the special language and calculations in Rink. It's mainly intended to be used in projects that are exposing an end user interface to Rink, e.g. a discord bot or a mobile app.


The primary interface of this library is meant to expose a very simple command-reply model for frontends, and to allow gradual addition of more advanced functionality. For now, only basic functionality exists.

Using Rink as a library for uses other than simple unit conversion tools is not currently well supported, and if you wish to do so, please make issues for any problems you have.

There are currently a number of hardcoded println!s and unwrap()s because most of this code was written in a day without much thought towards making it into a library.

To use the library, check how the CLI tool does it. To get additional features like currency and BTC you'll need to fetch those files yourself and add them into the Context.


use rink_core::*;

let mut ctx = simple_context().unwrap();
println!("{}", one_line(&mut ctx, "kWh / year -> W").unwrap());


~72K SLoC