@carols10cents mentioned on the user forums that crates.io doesn’t currently do any analysis of crates. I’m wondering whether it’s possible to build a tool similar to docs.rs which will download any new crates, run them through
cargo, then inspect the various types and functions in its public API?
The main idea would be to create a more powerful search index which has access to information about a crate’s internals. For example, whether a crate uses
unsafe (cc: @dobkeratops), seeing if a crate is well tested/documented, or giving you the ability to search for things which implement a given trait (e.g.
serde::ser::Serializer to see what formats you can serialize to with serde).
Is there any way I can ask the
rustc tools to do something like this, preferably using their command-line interfaces or in a stable way? Or would I need to create my own program which pulls in the compiler and inspects its (unstable) internals?