rust
```cargo
[dependencies]
minijinja = { version = "1.0", features = ["loader"] }
```
use minijinja::{Environment, context};
fn main() {
let mut env = Environment::new();
env.add_template_owned(
"hello", "Hello {{ name }}!".to_string()
).unwrap();
let skeleton = env.get_template("hello").unwrap();
let output = skeleton.render(context!(name => "World")).unwrap();
println!("{}", output);
}
results start
This is a basic MiniJinja example. It's pulled
directly from the docs with one change. It uses
`
.add
_
template
_
owned()
[TODO: Code shorthand span ]
so that strings (i.e.
`
String
[TODO: Code shorthand span ]
.