Transpiling Elementor, Divi, and Gutenberg into a Unified Rust Layout AST
The page-builder lock-in problem
If you export a modern WordPress site to WXR XML and import it into another CMS, you quickly discover a dirty secret: your pages aren't HTML. If the site was built with Elementor, the real layout lives in _elementor_data postmeta as deeply nested JSON. If it used Divi, the post body is a soup of [et_pb_section][et_pb_row] shortcodes. If it used Gutenberg, styling is split between <!-- wp:group --> comments and theme.json presets.
A migration tool that only copies post_content leaves seventy percent of modern WordPress websites broken on arrival.
Inside the Daypress AST Transpiler
To solve this cleanly, we built our Rust AST compiler (crates/daypress-ast). During a 1-click JSON bundle or WXR XML import, the transpiler inspects both post_content and wp_postmeta:
- Elementor Transpiler (
src/elementor/): Parses_elementor_datacontainers, columns, and over 50 widget types alongsideElementorKitglobal colors and typography into typed AST node trees. - Divi 4 & 5 Transpiler (
src/divi/): Lexes nested[et_pb_*]shortcodes and Divi 5 block comments into responsive grid and flex containers. - Gutenberg & HTML Transpiler (
src/gutenberg/&src/html_transpiler.rs): Converts core blocks and raw HTML documents into editable Daystudio nodes.
Zero-leak SSR sanitization
Once a page is in the canonical AST, the exact same tree powers both the interactive Daystudio visual builder and public Server-Side Rendering. Before any HTML reaches a visitor, our 3-tier SSR firewall (sanitize_ssr_html) strips all editor-only classes, contenteditable attributes, and drag handles while compiling responsive tablet/mobile media queries and hover pseudo-states into a scoped stylesheet.