nightly bin+lib mdbook-aquascope

Interactive Aquascope editor for your mdBook

5 releases

0.2.0 Apr 30, 2023
0.1.4 Apr 5, 2023
0.1.3 Mar 13, 2023
0.1.2 Feb 17, 2023
0.1.0 Feb 9, 2023

#358 in Text processing

Download history 15/week @ 2023-02-10 53/week @ 2023-02-17 16/week @ 2023-02-24 16/week @ 2023-03-03 31/week @ 2023-03-10 26/week @ 2023-03-17 8/week @ 2023-03-24 25/week @ 2023-03-31 27/week @ 2023-04-07 31/week @ 2023-04-14 15/week @ 2023-04-21 38/week @ 2023-04-28 35/week @ 2023-05-05 13/week @ 2023-05-12 14/week @ 2023-05-19 20/week @ 2023-05-26

91 downloads per month
Used in mdbook-quiz

MIT license

774 lines

Aquascope: Look Beneath the Surface of Rust

tests crates.io docs

Aquascope is a tool that generates interactive visualizations of Rust programs. These visualizations show how Rust's borrow checker "thinks" about a program, and how a Rust program actually executes. Here is a sample output of Aquascope:

Example Aquascope output

Click here for a live demo. Want to learn more about what the diagram means? Read the new ownership chapter in our Rust Book Experiment.

⚠️ Aquascope is research software and under active development! ⚠️


We provide an mdBook preprocessor that embeds Aquascope diagrams into an mdBook. To use it, you need to install the mdbook-aquascope and cargo-aquascope binaries as follows:

cargo install mdbook-aquascope
rustup toolchain install nightly-2023-04-12 -c rust-src rustc-dev llvm-tools-preview miri
cargo +nightly-2023-04-12 install --git https://github.com/cognitive-engineering-lab/aquascope aquascope_front
cargo +nightly-2023-04-12 miri setup

Note that cargo-aquascope is installed via aquascope_front and must be installed via git and with a specific nightly toolchain. The miri setup command is a necessary prerequisite to running the Aquascope interpreter.

From Source

If you want to install from source, you will first need Cargo and npm installed, then you can run:

git clone https://github.com/cognitive-engineering-lab/aquascope.git
cd aquascope
npm install -g graco
cargo make init-bindings
cd frontend && graco prepare
cargo install --path crates/aquascope_front
cargo install --path crates/mdbook-aquascope


First, enable mdbook-aquascope in your mdBook's book.toml like so:

# book.toml

Then add an Aquascope code block to one of your Markdown source files like this:

#fn main() {
let mut s = String::from("hello ");`[]`

Further documentation on the syntax and configuration of Aquascope blocks will be provided once the interface is more stable.

Having trouble?

If you want to use Aquascope but are having trouble finding the relevant information, please leave an issue or email us at wcrichto@brown.edu and gagray@ethz.ch.


~768K SLoC