Skip to content

Tauri v2 Quickstart

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 tauri-plugin-devtools instrumentation crate to your Rust dependencies like so:

Cargo.toml
[dependencies]
tauri-plugin-devtools = { version = "2.0.0-beta.0" }

The primary export of the tauri-plugin-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 lib.rs, import, initalize, and register the plugin to your run public function :

/src-tauri/lib.rs
pub fn run() {
let devtools = tauri_plugin_devtools::init();
tauri::Builder::default()
.plugin(devtools) // then register it with Tauri
.run(tauri::generate_context!("./tauri.conf.json"))
.expect("error while running tauri application");
}

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.