About this project

RustOwl is a tool for Rust developers that visualizes ownership movement and lifetimes of variables, aimed at debugging and optimization. When you save Rust source code, it is analyzed, and hovering over a variable or function call displays ownership and lifetime information. Visualization uses colored underlines: - Green: variable's lifetime. Solid means definitely live (provably initialized on every path reaching this point); wavy means maybe live (initialized on some paths but possibly moved, dropped, or uninitialized on others). - Blue: immutable borrowing. - Purple: mutable borrowing. - Orange: value moved / function call. - Red: lifetime error, such as a difference between actual and expected lifetime, or an invalid overlap of mutable and shared references. Editor support includes a VS Code extension (also available on Open VSX for Vscodium), a Neovim plugin, and an Emacs package. In these editors, moving the cursor over a variable or function call and waiting about two seconds triggers the visualization. The project implements an LSP server with an extended protocol, so other editors can build clients against its specification. Third-party integrations exist for RustRover/IntelliJ IDEs and Sublime Text. Installation options include crates.io, the Arch User Repository (rustowl-bin), and WinGet. The VS Code extension installs RustOwl automatically when activated. For Neovim and Emacs, the LSP server must be installed manually. After setup, the extension runs RustOwl when saving any Rust program in a cargo workspace; the first analysis may take time, but later runs use compile caching to reduce analysis time. Prerequisites are cargo (installable via rustup) and a supported editor. The project states support for the five latest Rust versions on a best-effort basis. Known limitations: due to VS Code decoration specifications, characters with descenders such as g or parentheses may occasionally not display underlines properly, and the println! macro sometimes produces extra output without significantly affecting usability. A hosted playground is available at play.rustowl.rs.