#graphviz #dot #graph

dot-writer

A library for writing the Graphviz DOT graph language

5 releases

0.1.4 Oct 25, 2024
0.1.3 Nov 7, 2022
0.1.2 Jul 3, 2021
0.1.1 Jun 19, 2021
0.1.0 Jun 18, 2021

#31 in Visualization

Download history 805/week @ 2024-08-05 717/week @ 2024-08-12 372/week @ 2024-08-19 719/week @ 2024-08-26 608/week @ 2024-09-02 438/week @ 2024-09-09 621/week @ 2024-09-16 414/week @ 2024-09-23 376/week @ 2024-09-30 723/week @ 2024-10-07 363/week @ 2024-10-14 376/week @ 2024-10-21 741/week @ 2024-10-28 639/week @ 2024-11-04 543/week @ 2024-11-11 287/week @ 2024-11-18

2,234 downloads per month
Used in 12 crates (10 directly)

MIT license

42KB
663 lines

Graphviz DOT Writer

This library is a (hopefully) ergonomic library for plotting graphs. It outputs the Graphviz language DOT. Graphs written in DOT can then be easily converted to SVG or other image formats using the Graphviz dot executable.

The structs in this library leverage the Rust type system and lifetimes to ensure that it's harder to use them to construct an invalid DOT graph. It's important to note that this means you need to make sure that child structs go out of scope before using their parents again. This is to make sure that the Drop writes the closing brackets correctly.

Getting started

Have a look at the API on docs.rs for examples and how to get coding.

Non Goals

This library only writes DOT in a strongly typed way. It doesn't read DOT or render DOT into image files.

Contributing

Contributions welcome, please feel free to open issues and pull requests. I've only just realised (7/11/22) that I hadn't enabled issues on the github repository, so my apologies to anyone who tried to post issues in the past! Drop me (DrGabble) a message if you have any questions on anything at all, always happy to help.

No runtime deps