| Crates.io | exprs |
| lib.rs | exprs |
| version | 0.1.1 |
| created_at | 2022-11-22 13:54:26.571159+00 |
| updated_at | 2022-11-22 13:59:13.574459+00 |
| description | A 0 dependency math expression parser and evaluator in Rust. It aims to be simple to use and is more of an exercise than anything. |
| homepage | |
| repository | https://github.com/chloe0x0/exprs |
| max_upload_size | |
| id | 720827 |
| size | 18,457 |
A 0 dependency math expression parser and evaluator in Rust. It aims to be simple to use and is more of an exercise than anything.
Parsing an expression is simple
use exprs::*;
fn main() {
let expr = Expr::new("1 + 2");
let computation = expr.eval();
assert_eq!(computation, 3.0);
}
Simply add the current version to your Cargo.toml dependency list
[dependencies]
exprs = "0.1"
in your crate root add
extern crate exprs;