Maud: a fast, safe template engine for Rust
lfairy.gitbooks.io
lfairy.gitbooks.io
I also wonder if Maud could benefit from the Syntex library (https://github.com/erickt/rust-syntex) which uses a fork of Rust's (currently unstable) parsing library to enable syntax extensions to work on the stable Rust release via code generation.
I wonder if it would make sense to have splicing of previously created Maud values not escape them. That seems like the most common case where you'd end up using $$ otherwise: piecemeal generation of HTML fragments. Since Maud has a special type to represent the result of a template, it could recognize that type in a splice.
Also, the need to handle control structures inline (such as $if and $for) seems like it could be replaced with a mechanism to splice in arbitrary Rust code of the appropriate type. Because otherwise, Maud would need to handle things like $match.
Props for the name and documentation as well.
https://github.com/allan-simon/rust-http-template
I first wanted it to be used with Iron, but unfortunately I lost motivation when I saw that syntax extension will not be part of 1.0 . if people are interested I can revive it.
Otherwise Maud has to re-implement if/then/else, iterator methods, etc. But perhaps you could use 'if/then' and other structures inside a $() block.
So Rust is hype (let's admit it, new is always better, like your new toy for christmas) and its standard library come with enough webservices-friendly things to make it sexy to develop small webservices with it. Also it introduces a lot of interesting features (functionnal programming, immutability by default, primitives to write parallel code) in a C-syntax language that was before in some more exotic language.
And I am going to see more titles about Rust with "fast and safe". But it doesn't mean the program is stable. :P
We had a 1.0 release two weeks ago, so the syntax and almost all of the standard library is. The things that aren't are clearly marked, and aren't able to be used from a release build, so you aren't affected by their instability.