A dice parsing library uses nom for dice syndax parsing
Cargo.toml
toml
[dependencies]
lib_dice = { git = "https://github.com/twh2898/lib_dice" }
src/main.rs ```rust extern crate lib_dice;
fn main() { let roll1 = libdice::roll(1, 8, 0); // 1d8 + 0 let roll2 = libdice::rollfromstr("2d6 + 7"); } ```
$ git clone https://github.com/twh2898/lib_dice.git
$ cd lib_dice
$ cargo run --example demo
The following prompt will start. Close the demo with CTRL + C
```
Welcome to Dice Line v0.1.0
1d8 3 3d6 + 8 16 ```
lib_dice uses the MIT Licence