GraphViz
A Swift package for working with GraphViz.
Requirements
- Swift 5.2+
- GraphViz
Usage

Note:
render(using:to:)
and related methods require
GraphViz to be installed on your system.
Using Function Builders, Custom Operators, and Fluent Attribute Setters
Note:
Swift 5.1 may require explicit typecast expressions in order to
reconcile use of custom edge operators like-->
.
(error: ambiguous reference to member '-->'
)
Installation
System Dependencies
You can install GraphViz on your system by running the following command:
Important:
If you add GraphViz to your macOS app
and installed system dependencies using Homebrew,
Xcode may emit an error message like the following:Warning: Could not load "/usr/lib/graphviz/libgvplugin_gdk.so.6" It was found, so perhaps one of its dependents was not. Try ldd.
One solution is to run the following commands to sign the dependencies
(replacingMyName (MyTeam)
with your developer account name and team name):
Swift Package Manager
Add the GraphViz package to your target dependencies in Package.swift
:
Add GraphViz
as a dependency to your target(s):