tauri-plugin-devtools

Crates.iotauri-plugin-devtools
lib.rstauri-plugin-devtools
version2.0.0-beta.3
sourcesrc
created_at2023-09-18 15:56:22.944599
updated_at2024-05-29 12:18:07.042381
descriptionCrabNebula devtools for Tauri: Inspect, monitor, and understand your application with ease.
homepage
repositoryhttps://github.com/crabnebula-dev/devtools
max_upload_size
id976065
size36,426
publish (github:crabnebula-dev:publish)

documentation

README

Devtools for Tauri

Inspect, monitor, and understand your Tauri application with ease.

  • Easy Integration: With just a few lines of code, enable detailed event logging and metadata extraction for your application.
  • Rich Insights: Get insight into what your app is doing, Performance, Errors, Warnings, everything is available at a glance.
  • And more: This project is actively worked on, and we are open to hear your ideas, check out the Upcoming Features issue for details.

Getting Started

Ensure you have Tauri set up correctly. Then install the Rust instrumentation from crates.io:

cargo add tauri-plugin-devtools@2.0.0-beta

Then add the following snippet to your tauri initialization code:

fn main() {
    #[cfg(debug_assertions)] // only enable instrumentation in development builds
    let devtools = tauri_plugin_devtools::init();

    let builder = tauri::Builder::default();

    #[cfg(debug_assertions)]
    let builder = builder.plugin(devtools);

    builder
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

And then run your app as usual, if everything is set up correctly devtools will print the following message:

Screenshot 2023-11-28 at 14.05.20.png

You can click or copy & paste the link into your browser to open up the UI. Alternatively you can navigate to https://devtools.crabnebula.dev and connect from there.

Commit count: 746

cargo fmt