finds.dev

mitsuhiko/minijinja

MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2

View on GitHubHomepage ↗

★ 2,665RustApache-2.0updated Jun 2026

// the take

MiniJinja brings Jinja2-compatible templating to Rust with a single dependency (serde). It's aimed at Rust developers who want familiar Python-ecosystem template syntax without pulling in a heavy crate graph — and increasingly at the ML tooling space, where HuggingFace, mistral.rs, and others use it to render LLM chat templates.

The dependency story is genuinely impressive: one required dep (serde), and the cargo tree in the README proves it. Jinja2 compatibility is taken seriously — there's a COMPATIBILITY.md that documents divergences honestly rather than claiming full parity. The error messages are descriptive with line/column context, which matters a lot when templates are user-authored. The cross-language reach (Go native impl, WASM for JS/browser, Python extension, C bindings) means you can standardize on one template syntax across a polyglot stack.

No compile-time template verification — unlike Askama, errors surface at runtime, which is a real tradeoff if you're building something where template correctness is a deploy-time concern. The async story is bolted on: there's an `object-using-async` example but the core rendering loop is sync, so async functions in templates require workarounds rather than first-class support. The multi-crate layout (autoreload, embed, contrib, cli as separate crates) is reasonable but means you're juggling version compatibility across several packages when you want the full feature set. The Go implementation is a separate native port, not a WASM wrapper — so behavior drift between the Rust and Go versions is possible and the Go impl's test coverage relative to the Rust core isn't obvious from the repo.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,665
Forks
156
Language
Rust
License
Apache-2.0
Last commit
17 Jun 2026

// nearby

If minijinja isn't quite it.

All repos →