This project is a reimplementation of the nice MJML markup language in Rust.
```bash
cargo install --locked mrml-cli
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
mrml-cli --help ```
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("
bash script/run-bench.sh
.Feel free to read our contributing section and the code of conduct.
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.
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).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.
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.
Thanks to zachzurn.