Registry / utility / tinytemplate

tinytemplate

JSON →
library1.2.1rscratesunverified

Simple, lightweight template engine for Rust.

# Cargo.toml [dependencies] tinytemplate = "1.2.1"
INSTALL
IMPORT
SIG · TINYTEMPLATE
T
tinytemplate
utilityrustv1.2.1
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.

TinyTemplate
✓ use tinytemplate::TinyTemplate;

Rendering a simple template with a context.

use tinytemplate::TinyTemplate; use serde::Serialize; #[derive(Serialize)] struct Context { name: String, } fn main() -> Result<(), Box<dyn std::error::Error>> { let mut tt = TinyTemplate::new(); tt.add_template("hello", "Hello {{name}}!")?; let ctx = Context { name: "World".into() }; let rendered = tt.render("hello", &ctx)?; println!("{}", rendered); Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
tinytemplate — cargo add tinytemplate · libregistry