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.
The different Mustache tags are documented at mustache(5).
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
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);
}