A Mermaid renderer for Apple platforms with no JavaScript engine, no WKWebView, and no network entitlement — for sandboxed apps that need Markdown previews with diagrams. It's what powers MaiD.
Most Mermaid renderers run JavaScript inside a web view. That's a non-starter for a sandboxed app with no network entitlement. swift-mermaid takes a different path.
Parsing, layout, and drawing happen in Swift with Core Graphics and Core Text — no JS runtime to bundle, sandbox, or wait on.
Nothing to instantiate, no HTML bridge, no async page loads. You get a native view you can drop straight into SwiftUI or AppKit.
It never reaches the internet, so it's safe inside the App Sandbox. Your reviewers — and your users — stay happy.
Flowcharts, sequence diagrams, pie charts, and architecture diagrams — the same set MaiD renders in its live preview.
swift-mermaid is distributed with Swift Package Manager. Two steps and you're drawing diagrams.
swift-mermaid lives on GitHub. Stars, issues, and pull requests are all welcome.