Rust-backed Elixir package for validating Mermaid diagram syntax.
MermaidValidator.validate("""
graph TD
A --> B
""")Returns :ok for valid diagrams and {:error, message} for invalid diagrams.
The package uses rustler_precompiled for release artifacts. To force a local Rust build while developing or running tests:
MERMAID_VALIDATOR_BUILD=1 mix testThe GitHub Actions workflow at .github/workflows/precompiled-nifs.yaml builds the Rust NIF for the supported platform matrix. It can be run manually with workflow_dispatch for testing, and it publishes release assets when a v* tag is pushed.
Before publishing the Hex package, generate and include the checksum file:
mix rustler_precompiled.download MermaidValidator --all --print