Scrusted-yaml

Business rules in YAML, live in your Rust app

Limits, permissions, prices and order states live in files. Rust reads them into your own types and reloads them while the server runs.

cargo add scrusted-yaml --features liveGitHubDocs
The agent builds the app around the rules; the application code runs the rules from the YAML spec; the developer edits a rule and it reloads live
A big box of application code (request handlers, database queries, API requests, templates) next to a small circle of business rules that defines it

Code does the work. Rules make the decisions.

  • Rust keeps the types, the I/O and the wiring.
  • YAML keeps the numbers, conditions and texts.
  • Anyone on the team can read a rule, and change it without a deploy.

For Laravel Rust

Laravel Rust compiles your app. Scrusted-yaml keeps the rules editable.

In PHP, the next request runs the file you just saved. In Rust, every change means a rebuild and a deploy. Scrusted-yaml brings the PHP way back for your rules.

scrusted-yaml-laravel
// src/app.rs
providers.add(RulesProvider::new(compiled!("config")));

# .env: live when APP_ENV=local, compiled otherwise
RULES_MODE=auto

Skills for coding agents

Teach Claude Code, Codex or OpenCode to write rule files, move Rust logic into them, and build an editor for them.

scrusted-yaml

Writes rule files the validator accepts, and reads them into Rust structs.

scrusted-yaml-convert

Moves a match out of Rust into YAML, with a test that proves nothing changed.

scrusted-yaml-ui

Builds an admin page that edits rules on the live server, with rollback.

scrusted-yaml skill --installinto this project
scrusted-yaml skill --install globalinto your home directory

What live reload guarantees

Set up oncesrc/rules.rs
GuaranteeHow

Live, or a deploy?

ChangeTakes effectWhy

Every YAML file on this page validates with scrusted-yaml 0.2 and scripted-yaml 0.3.0. Laravel for Rust calls come from its docs; signatures the docs do not show are marked as a sketch.