Skip to content

Getting started

Mermaid Native is currently consumed from source while artifact publication remains gated. The repository builds with JDK 17 and the included Gradle wrapper.

Build and test

bash
git clone https://github.com/botiverse/mermaid-native.git
cd mermaid-native
./gradlew check

Run the focused multiplatform compatibility suites:

bash
./gradlew \
  :mermaid-core:allTests \
  :mermaid-layout-simple:allTests \
  :mermaid-testkit:allTests \
  :mermaid-web:allTests

Parse source

kotlin
val result = MermaidParser.parse("flowchart LR; A[Start] --> B[Finish]")
when (result) {
    is MermaidParseResult.Success -> {
        // Pass result.diagram to a supported layout and renderer.
    }
    is MermaidParseResult.Failure -> {
        result.diagnostics.forEach(::println)
    }
}

Choose a module

ModuleResponsibility
mermaid-coreParser, typed AST, and diagnostics
mermaid-layout-apiPlatform-neutral scene graph and layout SPI
mermaid-layout-simpleDeterministic built-in layout
mermaid-render-svgCommon SVG serialization
mermaid-webKotlin/Wasm browser-facing adapter
mermaid-testkitFixtures, semantic vectors, and geometry goldens
mermaid-kuiklyReserved Kuikly adapter module; the real renderer is not implemented yet

Publication status

The Gradle publication model and Maven coordinates exist, but no stable Maven release is currently documented. Do not copy an unpublished version into production dependencies.

Mermaid-compatible, not Mermaid official.