Skip to content

jroweboy/rust-mustache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

git clone https://github.com/erickt/rust-mustache.git
cd rust-mustache
make 

(If you want to run the test cases you'll ned the spec as well)
git submodule init
git submodule update
make test

Use It

extern crate mustache;

#[deriving(Encodable)]
struct Name { name: ~str }

fn main() {
    let name = Name { name: ~"world" };
    let s = mustache::render_str("hello {{name}}!", ctx);
    println(s);
}

About

mustache template library for rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%