
Flowistry is a VSCode extension that helps you understand Rust programs. Flowistry uses dataflow analysis and pointer analysis to analyze Rust programs at a deeper level than just types can offer (e.g. as you can already find in rust-analyzer).
Flowistry is alpha software (see Limitations). I'm seeking early adopters to try it out and provide feedback! If you have questions or issues, please file a Github issue, join our Discord, or DM @wcrichton on Twitter.
Currently, Flowistry's capabilities are:
Flowistry can compute a backward static slice that identifies every piece of code that affects a value of interest. For example, let's say you're debugging an assertion failure on x. Then you could compute the backward slice of x to quickly rule out lines of code that don't influence its value, as shown here:

The green marker indicates the selected value, and the grey text indicates code with no influence on that value. Note that "influence" is a bit subtle --- for example, in the program:
if x > 0 {
*y += 1;
}
Even though x isn't directly used to change y, we would say x influences y because a mutation to y happens conditionally based on the value of x.
A forward static slice identifies every piece of code that is affected by a value of interest. For example, let's say you have a program that times a calculation, and you want to comment out all the code related to timing. You could compute a forward slice of the timer:

The timer doesn't affect the value of the computation, so run_expensive_calculation isn't part of the forward slice of start. In this example, Flowistry sets the user's selected text to the slice. Then the user can use other IDE features like bulk-commenting (⌘-/ in VSCode on macOS) on that selection.
Note that this example shows how slices are transitive: start influences elapsed, and elapsed influences println, so start influences println.
A function's effects are either inputs that it mutates, or values that it returns. The function effects panel helps identify lines of code that either mutate arguments or that could return values. Selecting an effect then shows the backward slice of that effect.