Docs

Project Script Modules

Docs Index

Purpose

Perro syncs Rust files from res/** into the generated .perro/scripts crate and exports behavior scripts through a generated namespace.

Project Script Modules explains behavior, constraints, and practical usage so implementation decisions stay consistent across scripts and scenes.

API Source

Functions

perro checkperro devperro build

Enums

// not documented yet for this module

Constants

res:// script path namespace

Types

ScriptBehaviorScriptContext

Usage Pattern

res/scripts/player.rsres/scripts/combat/damage.rs // scenescript = "res://scripts/player.rs"

Key Details

Scene script paths register behavior scripts.

perro check/dev/build regenerate script crate exports.

deps.toml dependencies merge into the generated script Cargo.toml.

Utility Rust modules can be imported by behavior scripts like normal Rust modules.