mrml-cli-0.3.1 is not a library.
MRML
Introduction
This project is a reimplementation of the nice MJML markup language in Rust.
How to use it
use mrml;
Why?
- A
Nodeserver rendering a mjml template takes around 20Mo of RAM at startup and 130Mo under stress test. InRust, less than 1.7Mo at startup and a bit less that 3Mo under stress test. TheRustversion can also handle 2 times more requests per seconds. You can run the bench by doingbash script/run-bench.sh. - The
JSimplementation cannot be run in the browser. InRust(andWasm), you can.
Performance
With the same linux amd64 machine, to render the amario template
- Node: 62.803ms
- Rust: 13.180ms
To reproduce those results:
- Node, in
example/mjml-benchrunnpm start -- ../../test/template-amario.mjml - Rust, run
cargo bench amario
With a web server, as of today, on a mac book pro from 2017. (Old result)
Rust Node Requests per seconds 520.50 272.61 CPU usage at boot time 0.20% 1.74% CPU usage under bench 49.81% 136.83% RAM usage at boot time 1.12MB 17.27MB RAM usage under bench 2.85MB 128.32MB Docker image size 77.3MB 178MB