MRML

Crates.io Crates.io

Build Status codecov

Average time to resolve an issue Percentage of issues still open Maintainability

Introduction

This project is a reimplementation of the nice MJML markup language in Rust.

How to use it in the cli

```bash

installing mrml-cli

cargo install --locked mrml-cli

using it

mrml-cli path/to/template.mjml validate mrml-cli path/to/template.mjml render mrml-cli path/to/template.mjml format-json --pretty mrml-cli path/to/template.json format-mjml --pretty

getting some help

mrml-cli --help ```

How to use it in my code

Update your cargo.toml:

toml [dependencies] mrml = "1.2" serde = { version = "1.0", features = ["derive"] }

Create your main.rs:

```rust use mrml;

fn main() { let root = mrml::parse("").expect("parse template"); let opts = mrml::prelude::render::Options::default(); match root.render(&opts) { Ok(content) => println!("{}", content), Err(_) => println!("couldn't render mjml template"), }; } ```

Why?

You want to contribute?

Feel free to read our contributing section and the code of conduct.

Performance

With the same Linux amd64 machine, to render the amario template

To reproduce those results, you can follow the configuration in gitlab-ci.yml or look on codebench.cloud.

Missing implementations

Who is using MRML?

If you are using MRML and want to be added to this list, don't hesitate to create an issue or open a pull request.

What is using MRML?

mjml_nif - Elixir library

mrml-ruby - Ruby library

If you are using MRML and want to be added to this list, don't hesitate to create an issue or open a pull request.

You want to sponsor us?

Buy Me A Coffee

Thanks to zachzurn.