Registry / web-framework / askama

askama

JSON →
library0.16.0rscratesunverified

Type-safe, compiled Jinja-like templates for Rust.

# Cargo.toml [dependencies] askama = "0.16.0"
INSTALL
IMPORT
SIG · ASKAMA
A
askama
web-frameworkrustv0.16.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Template
use askama::Template;

Render a simple template with a variable.

use askama::Template; #[derive(Template)] #[template(source = "Hello {{ name }}!", ext = "txt")] struct HelloTemplate<'a> { name: &'a str, } fn main() { let hello = HelloTemplate { name: "world" }; println!("{}", hello.render().unwrap()); }
Debug
Known issues
gotchaTemplate syntax is Jinja-like but not identical
fix
Refer to Askama documentation for supported syntax (e.g., no filters).
affects: *
Upgrade
Version history
0.16.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Meta
1
Amazon
1
OpenAI (training)
1
Resources
askama — cargo add askama · libregistry