jesse99 / rust-mustache

mustache template library for rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mustache

Inspired by ctemplate and et, Mustache is a framework-agnostic way to render logic-free views.

As ctemplates says, "It emphasizes separating logic from presentation: it is impossible to embed application logic in this template language."

rust-mustache is a rust implementation of Mustache.

Documentation

The different Mustache tags are documented at mustache(5).

Install It

cargo install mustache

Use It

use std;
use mustache;

import std::io;
import std::map;

fn main() {
    let ctx = map::new_str_hash();
    ctx.insert("planet", mustache::str("world"));
    let s = mustache::render_str("hello {{planet}}", ctx);
    io::println(s);
}

About

mustache template library for rust

License:Other


Languages

Language:Rust 100.0%