docs.rs failed to build rustviz-plugin-2.0.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rustviz-plugin
The compiler-integrated heart of RustViz.
A rustc_private plugin that walks HIR/MIR for a single-file crate and
emits a code panel + timeline panel as SVGs on stdout. Built on Will
Crichton's rustc_plugin /
rustc_utils crates (same
family as Flowistry / Aquascope).
End users typically don't touch this crate directly — they use one of:
- the
rustvizCLI inrustviz-cli(rustviz svg foo.rs,rustviz html foo.rs), - the
mdbook-rustvizpreprocessor inmdbook-rustviz(```rvfenced blocks), - the playground in
../playground/, or - the
rustviz-libRust library inrustviz-lib.
Each of those routes calls into the binaries this crate produces
(cargo-rv-plugin, rv-plugin-driver).

Installing
The standard install path is via the rustviz CLI's bootstrap, which
also installs the matching nightly toolchain:
To install from source against a local checkout:
Limitations
RustViz is a teaching tool — it supports a meaningful subset of Rust, not all of it. Currently unsupported (or known to misbehave):
- For-loops
- Conditional
letbindings - Borrows that occur inside conditionals
- Some borrows over struct members
- Lifetime annotations beyond what the
Excerpt<'a>tutorial example covers
To fix / implement
- Handle owners that are declared inside conditional blocks
- Typecheck function ctxt to determine what type of return annotation to make
- Implement new state calculation system
- Remove struct members that are not utilized from the timeline
- Implement hoverable anonymous owner interactions in code panel
- Weird phantom annotated src bug that seems to appear when there are
\tcharacters - Add highlighting for passbyref events
- Implement For-loops (really just desugared match expr)
- last (black) data-hash doesn't render properly
- Fix resource dropping (breaks with conditionals)
- Reference aliasing
- Fix annotated source gen to handle
</>characters - Let-if / match expressions (new conditional move event)
- Conditional lifetime logic and visualization
- Bad stuff happens when you don't put a semi-colon at the end of a void stmt at the end of a block
- Chained method calls (goes hand in hand with anonymous owner interactions, e.g.
.get().get_mut()) - Lifetimes that are 'captured' by conditional statements (use MIR)
- Struct box kind of buggy
- JSONify the output