Skip to content

lord/arena-graph

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

arena-graph: fast, arena-allocated graphs

A library for constructing fast, pointer-based graphs in Rust. A lil hacky, and my understanding of variance is dubious at best, so consult your local lifetime specialist before using. Useful if your graph has the following properties:

  • the node lookup overhead of a slotmap-style graph is too slow for your the problem you're trying to solve
  • nodes in your graph all have the same type
  • you only need & access to nodes once they've been added, and can use mutexes or cells to handle mutation
  • your graph doesn't need to delete individual nodes, only an entire graph of nodes all at once (although having a Cell<bool> that indicates deleted status is fine, as is creating a linked list of deleted nodes for recycling)
  • your Node's Drop implementation doesn't need to access other nodes

Still need to write documentation, but you can check out anchors if you're interested in seeing this in action.

About

fast and dangerous arena-allocated graphs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages