echo/Cargo.toml
Jean 1e8a5eab36
Add DiceServ: dice-roll and math-expression service
A stateless service for tabletop games over IRC. ROLL/CALC evaluate a dice
+ math expression (ROLL rounds to a whole number, CALC keeps decimals);
EXROLL/EXCALC also show each die. Supports NdM / dM / d% dice, + - * / ^ %,
parentheses, implicit multiplication, unary minus, pi/e, a set of functions
(sqrt, floor, sin, min, …), and N~expr to repeat a roll.

Modernises the C++ original: it ships its own Mersenne-Twister RNG in C
and parses via shunting-yard with a variadic-argument hack; this is a
typed AST from a small recursive-descent parser plus the rand crate —
shorter, and the dice/sides/total caps make abuse (999999d6) a clean error
instead of a hang. Opt-in (add "diceserv" to [modules].services).
2026-07-14 03:46:34 +00:00

45 lines
1.5 KiB
TOML

[workspace]
members = ["api", "inspircd", "chanserv", "nickserv", "example", "botserv", "memoserv", "statserv", "hostserv", "operserv", "diceserv"]
[package]
name = "fedserv"
version = "0.0.1"
edition = "2021"
description = "Federated IRC services daemon (protocol-agnostic core, InspIRCd link first)"
[dependencies]
fedserv-api = { path = "api" }
fedserv-inspircd = { path = "inspircd" }
fedserv-chanserv = { path = "chanserv" }
fedserv-nickserv = { path = "nickserv" }
fedserv-example = { path = "example" }
fedserv-botserv = { path = "botserv" }
fedserv-memoserv = { path = "memoserv" }
fedserv-statserv = { path = "statserv" }
fedserv-hostserv = { path = "hostserv" }
fedserv-operserv = { path = "operserv" }
fedserv-diceserv = { path = "diceserv" }
tokio = { version = "1", features = ["net", "io-util", "rt-multi-thread", "macros", "time", "sync", "process"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
argon2 = { version = "0.5", features = ["std"] }
base64 = "0.22"
sha2 = "0.10"
hmac = "0.12"
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
subtle = "2"
regex = "1"
anyhow = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio-rustls = "0.26.4"
rustls-pemfile = "2.2.0"
tonic = { version = "0.12", features = ["tls"] }
axum = "0.7"
axum-server = { version = "0.7", features = ["tls-rustls"] }
prost = "0.13"
tokio-stream = "0.1"
[build-dependencies]
tonic-build = "0.12"