$ show jdrouet/mrml
MRML is a Rust-based implementation of the MJML (Mailjet Markup Language) parser and renderer. It provides a core library for converting MJML templates to responsive HTML email, along with CLI, WebAssembly, and Python bindings. The architecture is modular, with each MJML component following a consistent pattern for parsing, rendering, and serialization. The system supports template inclusion via pluggable loaders (memory, local, HTTP) and includes an HTTP server example for rendering MJML via a POST endpoint.
The LLM identified 2 files worth highlighting for reuse:
Defines the IncludeLoader trait for abstracting template inclusion sources (memory, local file, HTTP) and provides concrete implementations. This pattern allows flexible and testable template resolution without coupling to specific loading mechanisms.
Provides RenderContext and RenderCursor traits for carrying state through the rendering process, along with a buffer-based HTML generator. This pattern enables efficient and contextual rendering of AST nodes to HTML.