3 unstable releases

0.2.1 Oct 8, 2023
0.2.0 Oct 8, 2023
0.1.0 Apr 8, 2023

#268 in Cargo plugins

23 downloads per month
Used in cargo-indicate

MIT/Apache

145KB
3.5K SLoC

Rust 2.5K SLoC // 0.0% comments Rusty Object Notation 430 SLoC // 0.0% comments GraphQL 187 SLoC // 0.2% comments

🚨 cargo-indicate 🚨

Run GraphQL Queries on Your Rust Dependency Tree

Crates.io (cargo-indicate)


This is the result of a Master's thesis written at LTH in collaboration with Volvo Cars by Emil Eriksson.

To get started, install cargo-indicate using

cargo install cargo-indicate

and check out the cargo-indicate docs.

While cargo-indicate allows for experimenting, it might be a good idea to read the conclusions in this thesis, as they provide guidance and context on how to interpret the results, and provides context. The thesis also includes explanation of the code and design decisions.

This project relies heavily on trustfall, the query engine behind cargo-semver-checks.

Project Structure

Caching of HTTP requests

While indicate will cache already made requests during one run, it will also use the GitHub HTTP cache system, where ETags are used to verify if an API request has changed since it was last made (perhaps in another invocation of indicate). If it receives a 304 Not Changed, it will use the ~/.github/ directory to retrieve a cached version.


lib.rs:

Library for cargo-indicate, providing a way to query dependencies across different sources of information such as crates.io metadata, GitHub etc.

Queries are written using trustfall, a query engine for writing queries across data sources. Currently only GraphQL-like schemas are available. The following is the schema used that can be used to construct queries. Note that only the directives provided here can be used.

Schema

The following code is automatically included from the src/schema.trustfall.graphql file

Dependencies

~38–54MB
~1M SLoC