Repository navigation
Replace Mermaid renderer with Merman - #82
Merged
Merged
Conversation
Owner
|
Thanks for moving this to Merman — we reached the same conclusion independently. We ran a spike comparing Merman, the current renderer and Mermaid.js 12.2 on 12 fixtures × light/dark: Merman scores SSIM 0.860 against Mermaid.js (0.897 when both use dagre), versus 0.771 for the current renderer, and it renders everything, including sequence Before we can merge, could you narrow this PR?
Known Merman differences from our spike (no need to fix in this PR; just so you know what to expect):
Thanks again — the Rust-only approach is a big improvement over the WebKit helper. |
This was referenced Oct 25, 2026
Resolve src/diagram.rs: keep both the Merman alpha-compositing test and main's zoom-raster tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the existing Mermaid renderer with Merman 0.9.1 while retaining the native SVG-to-RGBA worker/cache pipeline. Use the resvg-safe SVG lowering for text labels and composite theme alpha before encoding RGB colors.
Flowcharts use the default Dagre layout. ELK is disabled and absent from the lockfile. There are no bundled icon packs or icon-registry setup, preview-modal/reading-width changes, or project status/backlog/plan changes in this diff.
Requires Rust 1.95+; README and dependency references are updated. Existing standalone LaTeX and DOT rendering remain unchanged. Integration coverage exercises CJK flowcharts, sequence/class/state/mindmap diagrams, theme overrides and raster output. The fixture and export example allow manual inspection.
Validation on the final diff
cargo test --release --libcargo test --release --testsThe
--teststotal includes the library tests; the additional integration tests account for 80 passed and 1 ignored. Tests ran on macOS arm64. The first sandboxed integration run could not bind local IPC sockets; the same full command passed when run with local socket permissions.cargo fmt --all --checkandgit diff --checkalso passed. Existing ambiguous-import, unusedSection, and dependency future-compatibility warnings remain. Linux/Windows CI and Rust 1.95 itself were not run locally.Known circle sizing, markdown-label formatting and pie-color differences remain outside this renderer-replacement scope, as requested in review.