#markup-language #mjml #validation #cli

app mrml-cli

CLI for the Rust implementation of MJML renderer

26 stable releases

1.6.1 Jul 3, 2024
1.5.8 Apr 20, 2024
1.5.5 Mar 21, 2024
1.4.3 Dec 19, 2023
0.3.3 Oct 14, 2020

#34 in Email

Download history 83/week @ 2024-07-26 31/week @ 2024-08-02 15/week @ 2024-08-09 16/week @ 2024-08-16 10/week @ 2024-08-23 5/week @ 2024-08-30 12/week @ 2024-09-06 35/week @ 2024-09-13 86/week @ 2024-09-20 67/week @ 2024-09-27 36/week @ 2024-10-04 116/week @ 2024-10-11 105/week @ 2024-10-18 147/week @ 2024-10-25 142/week @ 2024-11-01 104/week @ 2024-11-08

528 downloads per month

MIT license

625KB
16K SLoC

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

# 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

Why?

  • A Node.js server rendering an MJML template takes around 20 MB of RAM at startup and 130 MB under stress test. In Rust, less than 1.7 MB at startup and a bit less that 3 MB under stress test. The Rust version can also handle twice as many requests per second. You can perform the benchmarks by running bash script/run-bench.sh.
  • The JavaScript implementation cannot be run in the browser; the Rust one (and WebAssembly one) can be.

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

  • Node: 606.59ms
  • Rust: 3.48ms

You want to sponsor us?

Buy Me A Coffee

Thanks to zachzurn.

Dependencies

~5.5–7MB
~124K SLoC