mrml-cli-1.3.2 is not a library.
MRML
Introduction
This project is a reimplementation of the nice MJML markup language in Rust.
How to use it in the cli
# installing mrml-cli
# using it
# getting some help
How to use it in my code
Update your cargo.toml.
[]
= "1.2"
= { = "1.0", = ["derive"] }
Create your main.rs
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.
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
To reproduce those results, you can follow the configuration in the gitlab-ci.yml or look on codebench.cloud
Missing implementations
mj-style[inline]: not yet implemented. It requires parsing the generated html to apply the inline styles afterward (that's how it's done in mjml) which would kill the performances. Applying it at render time would improve the performance but it would still require to parse the css.mj-include: not yet implemented. It requires to handle loading remote templates when using mrml in a wasm (browser or server side) format, which implies being able to load from a different location (file://,https://,relative, etc).
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
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?
Thanks to zachzurn.