#dice #rpg #game

dice_expression

A library to help you parse and execute some dice expressions

7 releases

Uses new Rust 2024

0.1.6 Oct 16, 2025
0.1.5 Oct 15, 2025
0.1.3 May 16, 2025

#392 in Game dev

Download history 408/week @ 2025-10-14 16/week @ 2025-10-21 1/week @ 2025-10-28

425 downloads per month

LGPL-3.0-or-later

240KB
2K SLoC

Logo


Pull Requests welcome License

Table of Contents

About

A library to help you parse and execute some dice expressions like:

  • 1d6 + 1
  • 2d20
  • 3d20k2 - 5
  • 10d20>10

Getting Started

Prerequisites

You'll need:

Installation

To use this lib, please execute this in your repository:

cargo add dice_expression

Usage and documentation

See docs.rs.

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Authors & contributors

The original setup of this repository is by Olivier Ory.

For a full list of all authors and contributors, see the contributors page.

Security

dice_expression follows good practices of security, but 100% security cannot be assured. dice_expression is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

See LICENSE for more information.

Dependencies

~0.8–1.4MB
~26K SLoC