Skip to content
crates · rust · bevy

Proto-driven quests forbevy_quests

A game-agnostic quest registry for Bevy — questdb.proto compiled into typed Rust structs and wrapped in a searchable QuestDb resource queryable by slug, ULID, category, or tags.

One proto, every game

The crate is game-agnostic — any game can load the same proto quest registry and query it by slug, ULID, category, or tags. It backs the KBVE isometric engine's quest data.

RustBevy crate
2024Edition
QuestDbRegistry
MITLicense

What it gives you

Features

Proto-driven

build.rs compiles questdb.proto into typed Rust structs with prost and prost-build.

Searchable registry

QuestDb indexes quests for lookup by slug, ULID, category, or tags.

Multiple loaders

Populate from Astro JSON (from_json), a proto binary (from_bytes), or decoded proto (from_proto).

Bevy plugin

BevyQuestsPlugin registers an empty QuestDb resource for games to fill at startup.

Get started

Usage

main.rs
use bevy::prelude::*;
use bevy_quests::{BevyQuestsPlugin, QuestDb};

fn load_quests(mut commands: Commands) {
    let json = include_str!("path/to/questdb.json");
    let db = QuestDb::from_json(json).expect("Failed to parse quest JSON");
    commands.insert_resource(db);
}

Questions

Frequently asked

What does the bevy_quests crate do?

bevy_quests provides proto-driven quest definitions for Bevy games. It compiles questdb.proto into typed Rust structs via prost and wraps them in a searchable QuestDb Bevy resource, so any game can load the same quest registry and query it by slug, ULID, category, or tags.

How are quests loaded into a Bevy game?

Load from Astro JSON with QuestDb::from_json, from a proto binary with QuestDb::from_bytes, or from decoded proto with QuestDb::from_proto, then insert the resulting QuestDb as a Bevy resource. BevyQuestsPlugin registers an empty QuestDb that games populate during startup.

Is bevy_quests tied to a specific game?

No. It is game-agnostic. Any game can load the same proto quest registry, since quest content lives in the shared questdb proto rather than in the crate.