RUST · NARRATIVE & GAME AI

dialogger-rs — Branching Narrative Graph & NPC Bark Evaluator in Pure Rust

dialogger-rs is a zero-allocation Rust runtime for executing branching RPG dialogue trees, conditional story gates, and contextual NPC barks. It parses Dialogger node graphs and evaluates variable predicates and weighted response priorities in sub-microsecond time.

$ cargo add dialogger-rs
GitHub ↗

Dialogue Player

🧙‍♂️
Innkeeper Brom
[expression: welcoming] • [voice: brom_greet_01.ogg]
Welcome, weary traveler. Rest by the hearth, or seek you rumors of the shadow in the hills?

Event & State Log

[System] Initialized dialogue runner. Variable store synchronized.

Variable Store

NPC Ambient Barks

Trigger contextual reaction barks with priority gating, cooldowns, and weighted repeat prevention.

Recent Barks

Performance Benchmarks (vs Yarn/Ink)

Graph Node Step: 466.13 ns (2.1M/s)
Yarn / Ink C# Step: ~25-60 µs (80× faster)
Full Story Traversal: 2.33 µs (429k/s)
Expression Evaluator: 757.83 ns (1.3M/s)
Bark Triage (100 barks): 4.82 µs (48 ns/bark)
View Full Benchmarks Report →