handlebars-rust

Rust templating with Handlebars.

Warning: This project, like rust, is in its early stage. Breaking changes are constantly introduced.

Why Handlebars?

For information about handlebars, you will go to handlebars.js.

It's my favorite templating tool by far. I used it in Delicious.com as javascript-side template in 2013. Also I maintained a Clojure wrapper for Handlebars.java, hbs. And you may notice the close relationship between Ember.js and Rust community, handlebars is the default templating language of Ember.js framework, which powers crates.io.

Reasons I prefer Handlebars:

Handlebars provides:

Limitations:

Usage

Check examples in the source. The example shows you how to:

Run cargo run --example render to see results. (or RUST_LOG=INFO cargo run --example render) for logging output.

Handlebars-js features supported in Handlebars-rust

Feel free to report an issue if you find something broken. We aren't going to implement all features of handlebars-js, but we should have a workaround for cases we don't support.

Handlebars for Iron

I have started another project handlebars-iron for the Iron web framework.

License

MIT, of course.

Contact

Ning Sun (sunng@about.me)