A benchmark for call-graph generators that analyze programs written in Rust. This benchmark is a collection of hopefully all the possible ways to call a function or a method within and across package boundaries in Rust.
This benchmark aims to enable call-graph generator implementers to assess the soundness of call-graphs generated by their tools. It can also serve as documentation of all the possible ways functions and methods may be called in Rust code.
The benchmark is built around the main package, which contains a single binary crate. The benchmark is organized into several packages, each one containing a subset of the available ways to call a function/method. These packages are static_dispatch, dynamic_dispatch, generics, function_pointers, conditionally_compiled and macros.
All packages reside under the src directory accompanied by a README describing each package and the purpose they serve.
Splitting the code across multiple packages and library crates allows for better code organization, but also for opportunities to assess how call graph generators analyze and resolve cross-package calls.
The results of the call-graph generators evaluations we have conducted can be found under the evaludations directory.