Skip to content

Commit

Permalink
chore: update README (#290)
Browse files Browse the repository at this point in the history
* chore: update README

* add version specifier
  • Loading branch information
lucasfernog-crabnebula authored May 27, 2024
1 parent f6acabd commit 250c8b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tauri-build = "1.5.0"
Ensure you have [Tauri](https://beta.tauri.app/guides/create/) set up correctly. Then install the Rust instrumentation from crates.io:

```sh
cargo add tauri-plugin-devtools --git https://github.com/crabnebula-dev/devtools
cargo add tauri-plugin-devtools@2.0.0-beta
```

You also have to use Tauri **2.0.0-beta.1** (or later) so your `Cargo.toml` file should look as follows:
Expand Down
12 changes: 1 addition & 11 deletions crates/devtools-v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ Ensure you have [Tauri](https://tauri.app/v1/guides/getting-started/setup/) set
cargo add devtools
```

You also have to enable the `tracing` feature for Tauri, so your `Cargo.toml` file should look as follows:

```toml
[dependencies]
devtools = "0.2.4" # replace with latest
tauri = { version = "1.5.3", features = ["tracing"] }
[build-dependencies]
tauri-build = "1.5.0"
```

Then add the following snippet to your tauri initialization code:

```rust
Expand All @@ -37,7 +27,7 @@ fn main() {
let builder = builder.plugin(devtools);

builder
.run(tauri::generate_context!("./tauri.conf.json"))
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
Expand Down
16 changes: 3 additions & 13 deletions crates/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,23 @@ Inspect, monitor, and understand your [Tauri](https://tauri.app) application wit
Ensure you have [Tauri](https://tauri.app/v1/guides/getting-started/setup/) set up correctly. Then install the Rust instrumentation from crates.io:

```sh
cargo add devtools
```

You also have to enable the `tracing` feature for Tauri, so your `Cargo.toml` file should look as follows:

```toml
[dependencies]
devtools = "0.2.4" # replace with latest
tauri = { version = "1.5.3", features = ["tracing"] }
[build-dependencies]
tauri-build = "1.5.0"
cargo add tauri-plugin-devtools@2.0.0-beta
```

Then add the following snippet to your tauri initialization code:

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

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

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

builder
.run(tauri::generate_context!("./tauri.conf.json"))
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
Expand Down

0 comments on commit 250c8b1

Please sign in to comment.