reingold-tilford 1.0.0

A Rust library for laying out aesthetically pleasing trees (the data structure, not the plant).
Documentation
  • Coverage
  • 44.44%
    8 out of 18 items documented1 out of 9 items with examples
  • Size
  • Source code size: 5.82 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 630.72 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • seamsay/reingold-tilford
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Sean1708

Reingold-Tilford

A Rust library for laying out aesthetically pleasing trees (the data structure, not the plant).

Here is an example of the layout this algorithm produces, rendered onto a terminal grid:

                                                                    0
                                                                    |
                +---------------------+-----------------------------------+-----------------+---------------------------+
                |                     |                                   |                 |                           |
                1                     2                                   3                 4                           5
                |                                                         |                                             |
            +-------+                             +-----------------+-----------------------------+                     |
            |       |                             |                 |                             |                     |
            6       7                             8                 9                             10                    11
                    |                             |                 |                             |                     |
                    |                             |       +-------------------+                   |                     |
                    |                             |       |                   |                   |                     |
                    12                            13      14                  15                  16                    17
                    |                                     |                   |                   |                     |
    +-------+-------+-------+-------+                     |       +-------+-------+-------+       |                     |
    |       |       |       |       |                     |       |       |       |       |       |                     |
    18      19      20      21      22                    23      24      25      26      27      28                    29
                                                                                  |                                     |
                                                                              +-------+                                 |
                                                                              |       |                                 |
                                                                              30      31                                32
                                                                                      |                                 |
                                                                              +-------+-------+                 +-------+-------+
                                                                              |       |       |                 |       |       |
                                                                              33      34      35                36      37      38

Issues and Feature Requests

Feel free to open issues on the gitlab repo for any bugs you find or features you want. I will try to get bugs fixed relatively quickly (emphasis on try), but I can't guarantee that I'll ever work on feature requests (that shouldn't stop you from opening them though).

Pull Requests

If you want to do the work for me then that's great, just make sure to use rustfmt and follow conventional commit guidelines as closely as possible.

Examples

Please see the API documentation for basic examples, or the examples folder for more in-depth examples.

References

Most of the algorithm was shamelessly stolen from this blog post and the accompanying code by Rachel Lim.

This other blog post by Bill Mill is also worth a read.