exprs 0.1.1

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.
Documentation
  • Coverage
  • 57.45%
    27 out of 47 items documented4 out of 21 items with examples
  • Size
  • Source code size: 17.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • 0xchl0e/exprs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • chloe0x0

exprs

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.

Quick Start

Parsing an expression is simple

use exprs::*;

fn main() {
    let expr = Expr::new("1 + 2");
 
    let computation = expr.eval();

    assert_eq!(computation, 3.0);
}

Installation

Simply add the current version to your Cargo.toml dependency list

[dependencies]

exprs = "0.1"

in your crate root add

extern crate exprs;

TODO

  • More robust parse errors rather than assert macros