Skip to main content

Crate swh_graph_stdlib

Crate swh_graph_stdlib 

Source
Expand description

Standard library to work on Software Heritage compressed graph in Rust

Modules§

collections
Helpful data structures to efficiently traverse the graph
connectivity
diff
Recursively lists differences between two directory nodes.
fs
Filesystem manipulation functions, ie. directories and contents.
labeling
Associate information to a subset of nodes
origins
Functionalities related to managing software origins in the Software Heritage graph.
vcs
Version control system (VCS) functions.

Macros§

smallnodeset

Structs§

NodeVisit
Stateful BFS (breadth-first search) visit of (a part of) the Software Heritage graph, returning deduplicated node identifiers.

Functions§

find_latest_snp
Given a graph and an origin node in it, return the node id and timestamp (as a number of seconds since Epoch) of the most recent snapshot of that origin, if it exists.
find_root_dir
Given a node id pointing to a revision or release, returns the node id of the associated topmost (“root”) directory.
fs_resolve_name_by_id
iter_nodes
Iterate on the nodes of the sub-graph rooted at start, in BFS order.