10 releases (4 breaking)

0.4.2 Oct 23, 2018
0.4.1 Aug 28, 2018
0.3.0 Aug 3, 2018
0.2.1 Jul 30, 2018
0.0.1 Jul 15, 2018

#72 in Development tools

Download history 43/week @ 2018-12-13 91/week @ 2018-12-20 1/week @ 2018-12-27 12/week @ 2019-01-03 3/week @ 2019-01-10 1/week @ 2019-01-17 1/week @ 2019-01-24 1/week @ 2019-01-31 1/week @ 2019-02-21 22/week @ 2019-02-28 5/week @ 2019-03-07 62/week @ 2019-03-21

183 downloads per month
Used in 1 crate

MIT license



Travis CI Build Status

This is a library for parsing Haml templates. You are able to get Haml-rs on Crates.io. The aim for this is to produce identical HTML to what the Ruby Haml gem produces.


To include haml-rs in your project add the following to your Cargo.toml:

hamlrs = "0.4.2"

Then add the following to your code:

extern crate haml;



extern crate haml;

fn main() {
    let test_haml = "%span";
    let html = haml::to_html(&test_haml);


This software is in its early stages and as such there may be issues with stability.

If you find any bugs please don't hesitate to open an issue on github or, if you want, you can reach out directly to me at jon@dontbreakthebuild.com

Integration tests

There are currently a few integration tests (and more to come). If you are going to contribute to an integration test please make sure that the HTML file that is generated by the Ruby Haml gem so that we can ensure that we are producing the same output as the reference implementation.

Current limitations

There is no variable/expression support in Haml-rs. This is something that is being thought about and if you want to add your thoughts you are more than welcome to comment here.


This project is licensed under the MIT license.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Haml-rs by you, shall be licensed as MIT, without any additional terms or conditions.

If you have any questions you can reach me via email at jon@dontbreakthebuild.com

No runtime deps