grapes

Crates.iograpes
lib.rsgrapes
version0.3.0
sourcesrc
created_at2022-04-23 12:33:26.430957
updated_at2022-05-19 12:40:57.33644
descriptionPersistent graph data structures: Tree, Graph, Arena & more
homepage
repositoryhttps://gitlab.com/dawn_best/grapes
max_upload_size
id572632
size121,177
Reinis Mazeiks (rMazeiks)

documentation

https://docs.rs/grapes/latest/grapes/

README

Grapes: Persistent Graph Data Structures

Persistent: Cheap to clone, so you can keep (and modify) older versions of the data structure easily.

Data Structures:

  • Tree: hierarchical, indexable collection with ordered children
  • MapTree: maintains a key-node mapping in addition to a tree
  • Graph: collection of nodes connected by edges
  • MapGraph: also maintains a key-node and key-edge mapping
  • Arena: for building arbitrary graph-like data structures

Alternatives

Unless you specifically need a persistent tree or a persistent graph, I recommend using these crates instead (these are more mature, and probably faster):

If you need simple persistent data structures (lists, maps), check out:

Status

This library only supports what I need it to support for my very specific use case.

There are no benchmarks; performance is probably nowhere near other libraries, and this is fine for me.

Use Cases

This library is only useful if you need graph structures that can be somewhat cheaply cloned and manipulated.

For example, if you're building an application that stores state in a graph structure, and needs efficient undo-redo functionality, you might want to store past copies of the graph in memory. To do this efficiently, those copies should share parts of the graph that didn't change.

Commit count: 130

cargo fmt