Expand description
Standard library to work on Software Heritage compressed graph in Rust
Structs§
- Stateful BFS (breadth-first search) visit of (a part of) the Software Heritage graph, returning deduplicated node identifiers.
Functions§
- 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.
- Given a node id pointing to a revision or release, returns the node id of the associated topmost (“root”) directory.
- Given a graph and a directory node, return the node id of a named directory entry located (not recursively) in that directory, if it exists.
- Same as fs_resolve_name, but using a pre-resolved FilenameId as entry name. Using this function is more efficient in case the same name (e.g., “README.md”) is to be looked up in many directories.
- Given a graph and a directory node, return the node id of a directory entry located at a given path within that directory, if it exists.
- Same as fs_resolve_path, but using as path a sequence of pre-resolved FilenameId-s. Using this function is more efficient in case the same path (e.g., “src/main.c”) is to be looked up in many directories.
- Iterate on the nodes of the sub-graph rooted at
start
, in BFS order.