I come from the Laravel side, and when I started writing server-rendered pages in Rust, the thing I missed most was Blade. Not the framework around it, just the way a template reads: @foreach, layouts, <x-button> components. So I built a small engine that gives me that, and I just published it.
It's called Sword. Templates are .sword.html files, and they get translated to MiniJinja under the hood, so you get a mature runtime without writing Jinja yourself.
What it looks like
use rustysan_sword::Sword; use serde_json::json; let html = Sword::default().render_source( "greeting", "Hello {{ name }}", &json!({"name": "<Ada>"}) )?; assert_eq!(html, "Hello <Ada>"); Output is escaped by default, as you'd expect. Real templates live under resources/views and use the directives you'd guess: @if, @foreach, @include, @extends with @section and @yield, @push and @stack, fragments, and <x-name> components with props and slots.
Some decisions I made
- Expressions are deliberately small. No function calls and no filters inside a template. If a template needs a value, the handler computes it. It costs a bit of convenience, but templates stay easy to read and review.
- Typed components. You can back a component with a Rust struct, so props are checked by the compiler and not by luck.
-
@dumpis development-only. It sits behind a Cargo feature, and a default release build contains no dump code. CI checks that on every push. The Laravel adapter also refuses to boot with@dumpon outsidelocalortesting. - Errors point at your template. Failures from the backend are mapped back to the original line and column.
Laravel Rust adapter
If you use Laravel Rust, there's an optional laravel feature with a SwordServiceProvider. It registers the engine, exposes @env, @session, @context and @vite, and reads its settings from the usual config.
Try it
[dependencies] rustysan-sword = "0.1.1" # rustysan-sword = { version = "0.1.1", features = ["laravel"] } - crates.io: https://crates.io/crates/rustysan-sword
- GitHub: https://github.com/rustysan/sword
- Docs: https://docs.rs/rustysan-sword
It's an early release (0.1.1), and the expression rules are still settling, so only use trusted template authors for now. If something breaks or a directive you rely on is missing, open an issue. I'd like to hear about it.

