Skip to content

Get Started

DevTools consists of a Rust crate to instrument your Tauri app and a web-based graphical user interface to visualize and explore the data captured by the instrumentation.

To get started, add the devtools instrumentation crate to your Rust dependencies like so:

Cargo.toml:

[dependencies]
tauri = "1.5.4"
devtools = "0.3.0"

The primary export of the devtools crate is a Tauri Plugin that interfaces with the system, therefore you will need to initialize and register the plugin with Tauri itself before you can use the DevTools. To do that, edit your main.rs file like so:

fn main() {
let devtools = devtools::init(); // initialize the plugin as early as possible
tauri::Builder::default()
.plugin(devtools) // then register it with Tauri
.run(tauri::generate_context!("./tauri.conf.json"))
.expect("error while running tauri application");
}

Note: You should disable devtools in production builds, as it bloats your app unnecessarily and poses a possible security risk.

And that’s it! If you run your app now (cargo tauri dev), you will notice the following new output in your terminal:

Screenshot of a terminal showing a printout that reads "Tauri DevTools v0.3.0" and a link to the web-based UI for the instance

Clicking the link will open the CrabNebula DevTools in your browser.