Repository: tauri-apps/tauri (language: rust)

Issue:
[bug] Vite watching src-tauri for changes prevents from running the app
### Describe the bug

Fresh tauri app won't launch. After creating the project I am unable to run the app with `npm run tauri dev`, because it keeps recompiling rust packages. It's not always the same packages, but there's always something to recompile (despite no changes being made to the project). It seems that local server starts successfully (because I'm able to see the app in the browser in the brief moment between vite starting the server and `npm run tauri dev` finishing), but vite keeps watching my src-tauri folder for changes (despite it being listed in `server.watch.ignored` configuration option by default).

When running `npm run tauri dev -- --no-watch`, the first compilation runs successfully and the app runs fine (without watching for frontend code changes, obviously). But when running `npm run tauri dev` without the `-- --no-watch` flag, I don't see the full compilation (only some random packages, as mentioned above). 

Once I run the `npm run tauri dev -- --no-watch` at least once, subsequent runs of `npm run tauri dev` recompile only the app itself (without any dependencies), but the app still doesn't start.

I've all dev dependencies installed (according to [prerequisites](https://tauri.app/start/prerequisites/#system-dependencies)). Rust is up to date, node version: `v23.4.0`, npm version: `11.0.0`.

### Reproduction

```bash
npm create tauri-app@latest
# Project name -> test
# Identifier -> Enter (default identifier)
# Frontent language -> TypeScript / JavaScript
# Package manager -> npm
# UI template -> Vanilla
# UI flavor -> TypeScript
cd test
npm install
npm run tauri dev
```

### Expected behavior

App should run and vite should actually ignore the `src-tauri` folder when watching for changes

### Full `tauri info` output

```text
npm run tauri info

> test@0.1.0 tauri
> tauri info


[✔] Environment
    - OS: Arch Linux Rolling Release x86_64 (X64) (Hyprland on wayland)
    ✔ webkit2gtk-4.1: 2.46.5
    ✔ rsvg2: 2.59.2
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (2024-05-07)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 23.4.0
    - npm: 11.0.0

[-] Packages
    - tauri 🦀: 2.2.0
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.0
    - tauri-cli 🦀: 1.6.4
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.0

[-] Plugins

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - bundler: Vite
```


### Stack trace

```text
##################################################################
# Running `npm run tauri dev` for the first time
 
npm run tauri dev

> test@0.1.0 tauri
> tauri dev

    Running BeforeDevCommand (`npm run dev`)

> test@0.1.0 dev
> vite


  VITE v6.0.7  ready in 69 ms

  ➜  Local:   http://localhost:1420/
    Info Watching /home/btj/dev/tmp/test/src-tauri for changes...
    Updating crates.io index
     Locking 480 packages to latest compatible versions
      Adding proc-macro-crate v2.0.0 (available: v2.0.2)
      Adding serialize-to-javascript v0.1.1 (available: v0.1.2)
      Adding serialize-to-javascript-impl v0.1.1 (available: v0.1.2)
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling serde v1.0.217
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.15.2
   Compiling smallvec v1.13.2
   Compiling winnow v0.6.21
   Compiling cfg-if v1.0.0
   Compiling pkg-config v0.3.31
   Compiling autocfg v1.4.0
   Compiling heck v0.5.0
   Compiling libc v0.2.169
   Compiling target-lexicon v0.12.16
   Compiling version-compare v0.2.0
   Compiling once_cell v1.20.2
   Compiling memchr v2.7.4
   Compiling byteorder v1.5.0
   Compiling syn v1.0.109
   Compiling siphasher v0.3.11
   Compiling pin-project-lite v0.2.15
   Compiling stable_deref_trait v1.2.0
   Compiling version_check v0.9.5
   Compiling futures-core v0.3.31
   Compiling itoa v1.0.14
   Compiling fnv v1.0.7
   Compiling thiserror v1.0.69
   Compiling getrandom v0.1.16
   Compiling futures-io v0.3.31
   Compiling litemap v0.7.4
   Compiling winnow v0.5.40
   Compiling writeable v0.5.5
   Compiling slab v0.4.9
   Compiling icu_locid_transform_data v1.5.0
   Compiling indexmap v2.7.0
   Compiling phf_shared v0.10.0
   Compiling icu_properties_data v1.5.0
   Compiling parking_lot_core v0.9.10
   Compiling lock_api v0.4.12
   Compiling utf8_iter v1.0.4
   Compiling futures-sink v0.3.31
   Compiling utf16_iter v1.0.5
   Compiling semver v1.0.24
   Compiling icu_normalizer_data v1.5.0
   Compiling log v0.4.22
   Compiling write16 v1.0.0
   Compiling phf_shared v0.8.0
   Compiling quote v1.0.38
   Compiling cfg-expr v0.15.8
   Compiling scopeguard v1.2.0
   Compiling pin-utils v0.1.0
   Compiling futures-task v0.3.31
   Compiling ryu v1.0.18
   Compiling precomputed-hash v0.1.1
   Compiling new_debug_unreachable v1.0.6
   Compiling bitflags v1.3.2
   Compiling syn v2.0.94
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling proc-macro-error-attr v1.0.4
   Compiling mac v0.1.1
   Compiling getrandom v0.2.15
   Compiling futf v0.1.5
   Compiling proc-macro-error v1.0.4
   Compiling futures-channel v0.3.31
   Compiling utf-8 v0.7.6
   Compiling dtoa v1.0.9
   Compiling phf v0.10.1
   Compiling rand_core v0.6.4
   Compiling rand_core v0.5.1
   Compiling tendril v0.4.3
   Compiling dtoa-short v0.3.5
   Compiling itoa v0.4.8
   Compiling typeid v1.0.2
   Compiling matches v0.1.10
   Compiling strsim v0.11.1
   Compiling rand_pcg v0.2.1
   Compiling ident_case v1.0.1
   Compiling convert_case v0.4.0
   Compiling nodrop v0.1.14
   Compiling hashbrown v0.12.3
   Compiling shlex v1.3.0
   Compiling servo_arc v0.1.1
   Compiling aho-corasick v1.1.3
   Compiling fxhash v0.2.1
   Compiling unic-common v0.9.0
   Compiling cc v1.2.6
   Compiling regex-syntax v0.8.5
   Compiling heck v0.4.1
   Compiling thiserror v2.0.9
   Compiling thin-slice v0.1.1
   Compiling unic-char-range v0.9.0
   Compiling unic-ucd-version v0.9.0
    Info File src-tauri/icons changed. Rebuilding application...onvert_case, hashbrown, thiserror(build.rs), unic-char-range, proc-macro-hack, thin-slice, cc, syn, winnow, aho-corasick, heck, libc, regex-syntax, unic-ucd-version
    Info File src-tauri/capabilities changed. Rebuilding application...
    Info File src-tauri/src changed. Rebuilding application...


# APP DOESN'T START


##################################################################
# Running `npm run tauri dev -- --no-watch` for the first time

npm run tauri dev -- --no-watch

> test@0.1.0 tauri
> tauri dev --no-watch

    Running BeforeDevCommand (`npm run dev`)

> test@0.1.0 dev
> vite


  VITE v6.0.7  ready in 68 ms

  ➜  Local:   http://localhost:1420/
   Compiling winnow v0.6.21
   Compiling libc v0.2.169
   Compiling winnow v0.5.40
   Compiling syn v2.0.94
   Compiling syn v1.0.109
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling convert_case v0.4.0
   Compiling hashbrown v0.12.3
   Compiling aho-corasick v1.1.3
   Compiling heck v0.4.1
   Compiling cc v1.2.6
   Compiling thin-slice v0.1.1
   Compiling thiserror v2.0.9
   Compiling regex-syntax v0.8.5
   Compiling unic-char-range v0.9.0
   Compiling unic-ucd-version v0.9.0
   Compiling unic-char-property v0.9.0
   Compiling phf_shared v0.11.2
   Compiling alloc-no-stdlib v2.0.4
   Compiling crossbeam-utils v0.8.21
   Compiling serde_json v1.0.134
   Compiling alloc-stdlib v0.2.2
   Compiling unic-ucd-ident v0.9.0
   Compiling parking_lot_core v0.9.10
   Compiling brotli-decompressor v4.0.1
   Compiling indexmap v1.9.3
   Compiling percent-encoding v2.3.1
   Compiling parking_lot v0.12.3
   Compiling same-file v1.0.6
   Compiling form_urlencoded v1.2.1
   Compiling camino v1.1.9
   Compiling walkdir v2.5.0
   Compiling glob v0.3.2
   Compiling gio v0.18.4
   Compiling dunce v1.0.5
   Compiling schemars v0.8.21
   Compiling memoffset v0.9.1
   Compiling bytes v1.9.0
   Compiling dyn-clone v1.0.17
   Compiling typenum v1.17.0
   Compiling generic-array v0.14.7
   Compiling anyhow v1.0.95
   Compiling option-ext v0.2.0
   Compiling brotli v7.0.0
   Compiling http v1.2.0
   Compiling vcpkg v0.2.15
   Compiling parking v2.2.1
   Compiling concurrent-queue v2.5.0
   Compiling socket2 v0.5.8
   Compiling mio v1.0.3
   Compiling gtk v0.18.2
   Compiling event-listener v5.3.1
   Compiling dirs-sys v0.4.1
   Compiling tracing-core v0.1.33
   Compiling regex-automata v0.4.9
   Compiling x11 v2.21.0
   Compiling openssl-sys v0.9.104
   Compiling simd-adler32 v0.3.7
   Compiling event-listener-strategy v0.5.3
   Compiling dirs v5.0.1
   Compiling httparse v1.9.5
   Compiling fastrand v2.3.0
   Compiling adler2 v2.0.0
   Compiling openssl v0.10.68
   Compiling foreign-types-shared v0.1.1
   Compiling foreign-types v0.3.2
   Compiling miniz_oxide v0.8.2
   Compiling x11-dl v2.21.0
   Compiling crc32fast v1.4.2
   Compiling powerfmt v0.2.0
   Compiling cpufeatures v0.2.16
   Compiling time-core v0.1.2
   Compiling native-tls v0.2.12
   Compiling semver v1.0.24
   Compiling try-lock v0.2.5
   Compiling num-conv v0.1.0
   Compiling deranged v0.3.11
   Compiling want v0.3.1
   Compiling time-macros v0.2.19
   Compiling futures-lite v2.5.0
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling flate2 v1.0.35
   Compiling fdeflate v0.3.7
   Compiling getrandom v0.2.15
   Compiling cookie v0.18.1
   Compiling rustix v0.38.42
   Compiling raw-window-handle v0.6.2
   Compiling tower-service v0.3.3
   Compiling openssl-probe v0.1.5
   Compiling png v0.17.16
   Compiling proc-macro-error v1.0.4
   Compiling crossbeam-channel v0.5.14
   Compiling atomic-waker v1.1.2
   Compiling linux-raw-sys v0.4.14
   Compiling async-task v4.7.1
   Compiling base64 v0.22.1
   Compiling tauri-runtime v2.3.0
   Compiling wry v0.48.0
   Compiling cfg_aliases v0.2.1
   Compiling nix v0.29.0
   Compiling piper v0.2.4
   Compiling rand_core v0.6.4
   Compiling sha2 v0.10.8
   Compiling async-lock v3.4.0
   Compiling async-channel v2.3.1
   Compiling synstructure v0.13.1
   Compiling darling_core v0.20.10
   Compiling serde_derive_internals v0.29.1
   Compiling zvariant_utils v2.1.0
   Compiling sync_wrapper v1.0.2
   Compiling regex v1.11.1
   Compiling ico v0.3.0
   Compiling static_assertions v1.1.0
   Compiling tauri-runtime-wry v2.3.0
   Compiling tower-layer v0.3.3
   Compiling unicode-segmentation v1.12.0
   Compiling lazy_static v1.5.0
   Compiling time v0.3.37
   Compiling rustls-pki-types v1.10.1
   Compiling endi v1.1.0
   Compiling blocking v1.6.1
   Compiling is-docker v0.2.0
   Compiling ipnet v2.10.1
   Compiling mime v0.3.17
   Compiling async-fs v2.1.2
   Compiling rustls-pemfile v2.2.0
   Compiling is-wsl v0.4.0
   Compiling async-executor v1.13.1
   Compiling sha1 v0.10.6
   Compiling async-broadcast v0.7.2
   Compiling xdg-home v1.3.0
   Compiling ordered-stream v0.2.0
   Compiling pathdiff v0.2.3
   Compiling hex v0.4.3
   Compiling open v5.3.1
   Compiling cssparser v0.27.2
   Compiling html5ever v0.26.0
   Compiling serialize-to-javascript-impl v0.1.1
   Compiling serde_derive v1.0.217
   Compiling zerocopy-derive v0.7.35
   Compiling zerofrom-derive v0.1.5
   Compiling yoke-derive v0.7.5
   Compiling zerovec-derive v0.10.3
   Compiling displaydoc v0.2.5
   Compiling thiserror-impl v1.0.69
   Compiling icu_provider_macros v1.5.0
   Compiling futures-macro v0.3.31
   Compiling cssparser-macros v0.6.1
   Compiling darling_macro v0.20.10
   Compiling derive_more v0.99.18
   Compiling thiserror-impl v2.0.9
   Compiling ctor v0.2.9
   Compiling schemars_derive v0.8.21
   Compiling darling v0.20.10
   Compiling serde_with_macros v3.12.0
   Compiling zerocopy v0.7.35
   Compiling futures-util v0.3.31
   Compiling tracing-attributes v0.1.28
   Compiling openssl-macros v0.1.1
   Compiling dlopen2_derive v0.4.0
   Compiling ppv-lite86 v0.2.20
   Compiling thiserror v1.0.69
   Compiling enumflags2_derive v0.7.10
   Compiling zerofrom v0.1.5
   Compiling yoke v0.7.5
   Compiling rand_chacha v0.3.1
   Compiling rand_chacha v0.2.2
   Compiling zerovec v0.10.4
   Compiling serde_repr v0.1.19
   Compiling rand v0.7.3
   Compiling rand v0.8.5
   Compiling dlopen2 v0.7.0
   Compiling async-trait v0.1.83
   Compiling phf_generator v0.8.0
   Compiling phf_generator v0.10.0
   Compiling phf_generator v0.11.2
   Compiling phf_codegen v0.8.0
   Compiling string_cache_codegen v0.5.2
   Compiling phf_codegen v0.10.0
   Compiling tinystr v0.7.6
   Compiling icu_collections v1.5.0
   Compiling phf_macros v0.11.2
   Compiling phf_macros v0.8.0
   Compiling selectors v0.22.0
   Compiling icu_locid v1.5.0
   Compiling markup5ever v0.11.0
   Compiling tracing v0.1.41
   Compiling serde v1.0.217
   Compiling icu_provider v1.5.0
   Compiling futures-executor v0.3.31
   Compiling phf v0.11.2
   Compiling phf v0.8.0
   Compiling icu_locid_transform v1.5.0
   Compiling icu_properties v1.5.1
   Compiling toml_datetime v0.6.8
   Compiling serde_spanned v0.6.8
   Compiling string_cache v0.8.7
   Compiling uuid v1.11.0
   Compiling erased-serde v0.4.5
   Compiling cargo-platform v0.1.9
   Compiling serde_with v3.12.0
   Compiling bitflags v2.6.0
   Compiling toml_edit v0.22.22
   Compiling toml_edit v0.20.7
   Compiling rustc_version v0.4.1
   Compiling toml_edit v0.19.15
   Compiling cfb v0.7.3
   Compiling icu_normalizer v1.5.0
   Compiling dpi v0.1.1
   Compiling serde-untagged v0.1.6
   Compiling field-offset v0.3.6
   Compiling tokio v1.42.0
   Compiling idna_adapter v1.2.0
   Compiling idna v1.0.3
   Compiling jsonptr v0.6.3
   Compiling cargo_metadata v0.19.1
   Compiling infer v0.16.0
   Compiling url v2.5.4
   Compiling json-patch v3.0.1
   Compiling http-body v1.0.1
   Compiling proc-macro-crate v2.0.0
   Compiling kuchikiki v0.8.2
   Compiling urlpattern v0.3.0
   Compiling proc-macro-crate v1.3.1
   Compiling toml v0.7.8
   Compiling toml v0.8.19
   Compiling proc-macro-crate v3.2.0
   Compiling system-deps v6.2.2
   Compiling tauri-utils v2.1.1
   Compiling embed-resource v2.5.1
   Compiling cargo_toml v0.17.2
   Compiling tauri-winres v0.1.1
   Compiling glib-macros v0.18.5
   Compiling http-body-util v0.1.2
   Compiling enumflags2 v0.7.10
   Compiling gtk3-macros v0.18.2
   Compiling keyboard-types v0.7.0
   Compiling serde_urlencoded v0.7.1
   Compiling serialize-to-javascript v0.1.1
   Compiling glib-sys v0.18.1
   Compiling gobject-sys v0.18.0
   Compiling gio-sys v0.18.1
   Compiling gdk-sys v0.18.2
   Compiling pango-sys v0.18.0
   Compiling gdk-pixbuf-sys v0.18.0
   Compiling cairo-sys-rs v0.18.2
   Compiling atk-sys v0.18.2
   Compiling gtk-sys v0.18.2
   Compiling soup3-sys v0.5.0
   Compiling javascriptcore-rs-sys v1.1.1
   Compiling gdkx11-sys v0.18.2
   Compiling webkit2gtk-sys v2.0.1
   Compiling hyper v1.5.2
   Compiling zvariant_derive v4.2.0
   Compiling tokio-util v0.7.13
   Compiling tower v0.5.2
   Compiling zbus_macros v4.4.0
   Compiling tokio-native-tls v0.3.1
   Compiling hyper-util v0.1.10
   Compiling gdkwayland-sys v0.18.2
   Compiling hyper-tls v0.6.0
   Compiling zvariant v4.2.0
   Compiling reqwest v0.12.12
   Compiling tauri-build v2.0.4
   Compiling tauri-plugin v2.0.4
   Compiling tauri-codegen v2.0.4
   Compiling glib v0.18.5
   Compiling polling v3.7.4
   Compiling async-io v2.4.0
   Compiling zbus_names v3.0.0
   Compiling tauri v2.2.0
   Compiling tauri-plugin-opener v2.2.2
   Compiling tauri-macros v2.0.4
   Compiling test v0.1.0 (/home/btj/dev/tmp/test/src-tauri)
   Compiling zbus v4.4.0
   Compiling cairo-rs v0.18.5
   Compiling atk v0.18.2
   Compiling javascriptcore-rs v1.1.2
   Compiling pango v0.18.3
   Compiling gdk-pixbuf v0.18.5
   Compiling soup3 v0.5.0
   Compiling gdk v0.18.2
   Compiling gdkx11 v0.18.2
   Compiling webkit2gtk v2.0.1
   Compiling tao v0.31.0
   Compiling muda v0.15.3
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 43.40s
     Running `target/debug/test`


# APP STARTS HERE


##################################################################
# Every subsequent run  `npm run tauri dev`

npm run tauri dev              

> test@0.1.0 tauri
> tauri dev

    Running BeforeDevCommand (`npm run dev`)

> test@0.1.0 dev
> vite


  VITE v6.0.7  ready in 69 ms

  ➜  Local:   http://localhost:1420/
    Info Watching /home/btj/dev/tmp/test/src-tauri for changes...
   Compiling test v0.1.0 (/home/btj/dev/tmp/test/src-tauri)
    Info File src-tauri/capabilities changed. Rebuilding application...            


# APP DOESN'T START HERE
```


### Additional context

Found issue #8362 which describes my problem, but the solution is already merged, present in my config file and still doesn't work

**edit** the `Info File src-tauri/capabilities changed. Rebuilding application...` is present every time. Sometimes other files/folders are sometimes present as well, but this one always appears (no need to mention that I'm not changing contents of that folder).


Discussion / hints:
I don't know what exactly is going on but i highly doubt it's related to vite unless it's what modifies the folders metnioned in the `Info` lines. Otherwise vite couldn't trigger a rebuild of the rust side.

To double check that you could remove the beforeDevCommand in tauri.conf.json before running `npm run tauri dev -- --no-dev-server-wait`

p.s. to be clear this line
```
Info Watching /home/btj/dev/tmp/test/src-tauri for changes...
```
comes from tauri's cli and is correct, it's not related to vite.
Steps you mentioned did not help; after removing the default beforeDevCommand (was: `npm run dev`) and running `npm run tauri dev -- --no-dev-server-wait`, the output seems similar (except for server not starting):

```bash
npm run tauri dev -- --no-dev-server-wait

> test@0.1.0 tauri
> tauri dev --no-dev-server-wait

    Info Watching /home/btj/dev/tmp/test/src-tauri for changes...
   Compiling test v0.1.0 (/home/btj/dev/tmp/test/src-tauri)
    Info File src-tauri/tauri.conf.json changed. Rebuilding application...
```

(I ran the `-- --no-watch` variation prior, hence only the app being compiled)
Hmm, could there be _anything_ on your system that keeps touching json files or anything in that dir (or the dirs themselves)?

It must be something specific to your system but i can't think of anything right now 🤔 
I'm observing the exact same behavior. It only happens after upgrading to @tauri-apps/cli@2.2.0, there were no other changes.
I'm experiencing this as well.

Running `yarn tauri dev --no-watch` allowed everything to compile and start with the frontend still hot reloading but changes to the Rust code doesn't trigger a recompile & reload (as expected).

Worth noting that I'm using Next.js with Webpack as the bundler and not Vite.

```console
> yarn tauri info
yarn run v1.22.22
$ tauri info

[✔] Environment
    - OS: Arch Linux Unknown x86_64 (X64) (Hyprland on wayland)
    ✔ webkit2gtk-4.1: 2.46.5
    ✔ rsvg2: 2.59.2
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.10.0
    - pnpm: 9.15.2
    - yarn: 1.22.22
    - npm: 10.2.3
    - bun: 1.1.42

[-] Packages
    - tauri 🦀: 2.2.0
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.0
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.2.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../out
    - devUrl: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack
```
> Hmm, could there be anything on your system that keeps touching json files or anything in that dir (or the dirs themselves)?

I was thinking that maybe git watching the file changes or some active LSP, but after disabling anything that came to my mind the issue persists. Obviously there could be something else, but I just can't think of anything specific and also I'm not noticing any visible changes to the files.

> I'm observing the exact same behavior. It only happens after upgrading to @tauri-apps/cli@2.2.0, there were no other changes.

I remember doing a test run (template tauri app, the same as in the example above) some time ago (about 2-3 months?) and everything was fine. Don't remember what was the tauri-cli version at that time.
Thought I was going crazy... Getting the same issue here using `@tauri-apps/cli` `v2.2.0`

Works fine using `v2.1.0` or running `pnpm run tauri dev -- --no-watch` on `v2.2.0`

Output of `pnpm run tauri dev` on `v2.2.0` on a fresh install using `pnpm create tauri-app`

```
➜ pnpm tauri dev

> test@0.1.0 tauri /home/terra/Documents/projects/test
> tauri "dev"

    Running BeforeDevCommand (`pnpm dev`)

> test@0.1.0 dev /home/terra/Documents/projects/test
> vite dev

Forced re-optimization of dependencies

  VITE v6.0.7  ready in 620 ms

  ➜  Local:   http://localhost:1420/
    Info Watching /home/terra/Documents/projects/test/src-tauri for changes...
    Updating crates.io index
     Locking 480 packages to latest compatible versions
      Adding proc-macro-crate v2.0.0 (available: v2.0.2)
      Adding serialize-to-javascript v0.1.1 (available: v0.1.2)
      Adding serialize-to-javascript-impl v0.1.1 (available: v0.1.2)
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling serde v1.0.217
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.15.2
   Compiling smallvec v1.13.2
   Compiling winnow v0.6.21
   Compiling cfg-if v1.0.0
   Compiling pkg-config v0.3.31
   Compiling autocfg v1.4.0
   Compiling heck v0.5.0
   Compiling libc v0.2.169
   Compiling target-lexicon v0.12.16
   Compiling version-compare v0.2.0
   Compiling once_cell v1.20.2
   Compiling memchr v2.7.4
   Compiling byteorder v1.5.0
   Compiling syn v1.0.109
   Compiling siphasher v0.3.11
   Compiling pin-project-lite v0.2.15
   Compiling stable_deref_trait v1.2.0
   Compiling version_check v0.9.5
   Compiling futures-core v0.3.31
   Compiling itoa v1.0.14
   Compiling fnv v1.0.7
   Compiling thiserror v1.0.69
   Compiling futures-io v0.3.31
   Compiling getrandom v0.1.16
   Compiling winnow v0.5.40
   Compiling litemap v0.7.4
   Compiling writeable v0.5.5
    Info File src-tauri/icons changed. Rebuilding application... winnow, proc-macro2, target-lexicon(build), writeable, litemap, pkg-config, futures-io, thiserror(build.rs), winnow, smallvec, libc, getrand...
    Info File src-tauri/src changed. Rebuilding application...
    Info File src-tauri/capabilities changed. Rebuilding application...
```

Interestingly on my app I'm developing I'll randomly get the following error when switching between `v2.1.0` and `v2.2.0`. Not sure if it's related.

```
➜ /home/terra/Documents/projects/modly/modly/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:993
                  reject(new Error(error2));
                         ^

Error: The service was stopped: write EPIPE
    at /home/terra/Documents/projects/modly/modly/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:993:26
    at responseCallbacks.<computed> (/home/terra/Documents/projects/modly/modly/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:622:9)
    at afterClose (/home/terra/Documents/projects/modly/modly/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:613:28)
    at /home/terra/Documents/projects/modly/modly/node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild/lib/main.js:1989:18
    at onwriteError (node:internal/streams/writable:605:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:92:21)

Node.js v22.11.0
^C^C^C
```

After the final line, my terminal just hangs and I have to CTRL+C a couple of times. Also the app window appears for a split second before closing, sometimes.

tauri info

```
➜ pnpm tauri info

> test@0.1.0 tauri /home/terra/Documents/projects/test
> tauri "info"


[✔] Environment
    - OS: Arch Linux Rolling Release x86_64 (X64) (i3 on x11)
    ✔ webkit2gtk-4.1: 2.46.5
    ✔ rsvg2: 2.59.2
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 22.11.0
    - pnpm: 9.15.2
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.2.0
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.0
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.0

[-] Plugins

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite
```
It only affects on Linux, not on Windows or MacOS.
Iḿ also expriencing the sane problem as of today after upgrading the latest commit of the dev branch (cd841d8e).

Only running with `bun run tauri dev  --no-watch` seem o solve the proble; or else I'll get the following zhile the compilation is not even 20%:

```
   .
   .
   .
   Compiling utf-8 v0.7.6
   Compiling hashbrown v0.12.3
    Info File src-tauri/src/scraping changed. Rebuilding application...2, memchr, getrandom(build.rs), version_check, smallvec, writeable, utf8_iter, once_cell, pin-utils, winnow, new_debug_unreachable, writ...
    Info File src-tauri/src/models changed. Rebuilding application...
    Info File src-tauri/src/state changed. Rebuilding application...
    Info File src-tauri/src/errors changed. Rebuilding application...
    Info File src-tauri/src/events changed. Rebuilding application...
    Info File src-tauri/src/website changed. Rebuilding application...
    Info File src-tauri/src/storage changed. Rebuilding application...
    Info File src-tauri/src/listing changed. Rebuilding application...
```

I don't think I had this issue yesterday with same tauri commit (almost very sure of it), but after I ran `cargo update` this morining which updated some 3 "sub dependencies", the problem started to happen... Unfortunatly, I can't tell what where those 3 "sub dependencies" as I had already closed the window and git diff doesn't show me anything.

I'm using the latest version of rustc 1.85.0-nightly (i need it so i can use cranelift as my code gen) but I also tried with following:

- llvm and cranelift codegen
- default linker or mold linker
- with  "-Zshare-generics=y" enabled or not

The problem will still persist.

I also run the latest vite version (6.0.7). Even the 6.0.6 wich was working well yesterday has this problem now.

```

[✔] Environment
    - OS: openSUSE 20241202.0.0 x86_64 (X64) (qtile on x11)
    ✔ webkit2gtk-4.1: 2.46.4
    ✔ rsvg2: 2.59.2
    ✔ rustc: 1.85.0-nightly (4363f9b6f 2025-01-02)
    ✔ cargo: 1.85.0-nightly (d73d2caf9 2024-12-31)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: nightly-x86_64-unknown-linux-gnu (overridden by '/mnt/DATA/Projects/repos/rco/monakasat/rust-toolchain.toml')
    - node: 22.11.0
    - yarn: 1.22.22
    - npm: 10.9.0
    - bun: 1.1.42

[-] Packages
    - tauri 🦀: git+https://github.com/tauri-apps/tauri?branch=dev#cd841d8e33841c1364ead60559ba7a61355d5c21 (2.2.0)
    - tauri-build 🦀: No version detected
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.0
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : 2.2.0
    - tauri-plugin-sql 🦀: 2.2.0
    - @tauri-apps/plugin-sql : 2.2.0
    - tauri-plugin-os 🦀: 2.2.0
    - @tauri-apps/plugin-os : 2.2.0
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : 2.2.0
    - tauri-plugin-persisted-scope 🦀: 2.2.0
    - @tauri-apps/plugin-persisted-scope : not installed!
    - tauri-plugin-store 🦀: 2.2.0
    - @tauri-apps/plugin-store : 2.2.0
    - tauri-plugin-window-state 🦀: 2.2.0
    - @tauri-apps/plugin-window-state : 2.2.0
    - tauri-plugin-notification 🦀: 2.2.0
    - @tauri-apps/plugin-notification : 2.2.0
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0
    - tauri-plugin-single-instance 🦀: 2.2.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-dialog 🦀: 2.2.0
    - @tauri-apps/plugin-dialog : 2.2.0
    - tauri-plugin-http 🦀: 2.2.0
    - @tauri-apps/plugin-http : 2.2.0

[-] App
    - build-type: bundle
    - CSP: img-src 'self' asset: http://asset.localhost blob: data:; connect-src ipc: http://ipc.localhost; default-src 'self' customprotocol: asset:; font-src https://fonts.gstatic.com; style-src 'unsafe-inline' 'self' https://fonts.googleapis.com
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: SolidJS
    - bundler: Vite
```
I'm having the same issue after updating Tauri to 2.2.0. While `tauri build` works, `tauri dev` just stops on Linux. For the same project, `tauri dev` works fine on Windows.

```
$ yarn tauri info

[✔] Environment
    - OS: Ubuntu 24.4.0 x86_64 (X64) (KDE on x11)
    ✔ webkit2gtk-4.1: 2.44.0
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.18.1
    - yarn: 4.5.1
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.0
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.0

[-] Plugins
    - tauri-plugin-updater 🦀: 2.3.0
    - @tauri-apps/plugin-updater : 2.3.0
    - tauri-plugin-log 🦀: 2.2.0
    - @tauri-apps/plugin-log : 2.2.0
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0
    - tauri-plugin-single-instance 🦀: 2.2.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-store 🦀: 2.2.0
    - @tauri-apps/plugin-store : 2.2.0
    - tauri-plugin-cli 🦀: 2.2.0
    - @tauri-apps/plugin-cli : 2.2.0
    - tauri-plugin-deep-link 🦀: 2.2.0
    - @tauri-apps/plugin-deep-link : 2.2.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist/[...]/browser
    - devUrl: http://localhost:1420/
    - framework: Angular
    - bundler: Webpack
```

Fix patch:
diff --git a/.changes/ignore-notify-access-type.md b/.changes/ignore-notify-access-type.md
new file mode 100644
index 000000000000..7b053f0c6109
--- /dev/null
+++ b/.changes/ignore-notify-access-type.md
@@ -0,0 +1,6 @@
+---
+tauri-cli: 'patch:bug'
+'@tauri-apps/cli': 'patch:bug'
+---
+
+Fixed an issue that caused `tauri dev` to crash before showing the app on Linux.
diff --git a/Cargo.lock b/Cargo.lock
index 4ba3caeb6545..fe9b0041f0b5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2954,6 +2954,15 @@ dependencies = [
  "version_check",
 ]
 
+[[package]]
+name = "file-id"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bc904b9bbefcadbd8e3a9fb0d464a9b979de6324c03b3c663e8994f46a5be36"
+dependencies = [
+ "windows-sys 0.52.0",
+]
+
 [[package]]
 name = "filetime"
 version = "0.2.25"
@@ -5384,15 +5393,16 @@ dependencies = [
 ]
 
 [[package]]
-name = "notify-debouncer-mini"
-version = "0.5.0"
+name = "notify-debouncer-full"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaa5a66d07ed97dce782be94dcf5ab4d1b457f4243f7566c7557f15cabc8c799"
+checksum = "9dcf855483228259b2353f89e99df35fc639b2b2510d1166e4858e3f67ec1afb"
 dependencies = [
+ "file-id",
  "log",
  "notify",
  "notify-types",
- "tempfile",
+ "walkdir",
 ]
 
 [[package]]
@@ -9230,7 +9240,7 @@ dependencies = [
  "memchr",
  "minisign",
  "notify",
- "notify-debouncer-mini",
+ "notify-debouncer-full",
  "object 0.36.5",
  "os_info",
  "os_pipe",
diff --git a/crates/tauri-bundler/src/bundle/linux/appimage.rs b/crates/tauri-bundler/src/bundle/linux/appimage.rs
index 533f3fbe0a90..87aa238eb1f4 100644
--- a/crates/tauri-bundler/src/bundle/linux/appimage.rs
+++ b/crates/tauri-bundler/src/bundle/linux/appimage.rs
@@ -56,7 +56,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
   let product_name = settings.product_name();
 
   let mut settings = settings.clone();
-  if main_binary.name().contains(" ") {
+  if main_binary.name().contains(' ') {
     let main_binary_path = settings.binary_path(main_binary);
     let project_out_directory = settings.project_out_directory();
 
@@ -108,7 +108,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
 
   // Using create_dir_all for a single dir so we don't get errors if the path already exists
   fs::create_dir_all(&app_dir_usr_bin)?;
-  fs::create_dir_all(&app_dir_usr_lib)?;
+  fs::create_dir_all(app_dir_usr_lib)?;
 
   // Copy bins and libs that linuxdeploy doesn't know about
 
@@ -258,7 +258,7 @@ fn prepare_tools(tools_path: &Path, arch: &str) -> crate::Result<PathBuf> {
 fn write_and_make_executable(path: &Path, data: Vec<u8>) -> std::io::Result<()> {
   use std::os::unix::fs::PermissionsExt;
 
-  fs::write(path, &data)?;
+  fs::write(path, data)?;
   fs::set_permissions(path, fs::Permissions::from_mode(0o770))?;
 
   Ok(())
diff --git a/crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs b/crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs
index 75d6d9bcdb5d..4a7c08917412 100644
--- a/crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs
+++ b/crates/tauri-bundler/src/bundle/linux/freedesktop/mod.rs
@@ -153,7 +153,7 @@ pub fn generate_desktop_file(
 
   let mime_type = (!mime_type.is_empty()).then_some(mime_type.join(";"));
 
-  let bin_name_exec = if bin_name.contains(" ") {
+  let bin_name_exec = if bin_name.contains(' ') {
     format!("\"{bin_name}\"")
   } else {
     bin_name.to_string()
diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml
index ca62a001bf5d..92979dd76c12 100644
--- a/crates/tauri-cli/Cargo.toml
+++ b/crates/tauri-cli/Cargo.toml
@@ -52,7 +52,7 @@ colored = "2"
 serde = { version = "1", features = ["derive"] }
 serde_json = { version = "1", features = ["preserve_order"] }
 notify = "7"
-notify-debouncer-mini = "0.5"
+notify-debouncer-full = "0.4"
 shared_child = "1"
 duct = "0.13"
 toml_edit = { version = "0.22", features = ["serde"] }
diff --git a/crates/tauri-cli/src/build.rs b/crates/tauri-cli/src/build.rs
index 46ace0f95ec3..52d30262c113 100644
--- a/crates/tauri-cli/src/build.rs
+++ b/crates/tauri-cli/src/build.rs
@@ -87,7 +87,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> {
 
   let bin_path = interface.build(interface_options)?;
 
-  log::info!(action ="Built"; "application at: {}", tauri_utils::display_path(&bin_path));
+  log::info!(action ="Built"; "application at: {}", tauri_utils::display_path(bin_path));
 
   let app_settings = interface.app_settings();
 
diff --git a/crates/tauri-cli/src/dev/builtin_dev_server.rs b/crates/tauri-cli/src/dev/builtin_dev_server.rs
index 1353cb440b1b..9f51f2d74ca7 100644
--- a/crates/tauri-cli/src/dev/builtin_dev_server.rs
+++ b/crates/tauri-cli/src/dev/builtin_dev_server.rs
@@ -162,11 +162,10 @@ fn watch<F: Fn() + Send + 'static>(dir: PathBuf, handler: F) {
   thread::spawn(move || {
     let (tx, rx) = std::sync::mpsc::channel();
 
-    let mut watcher = notify_debouncer_mini::new_debouncer(Duration::from_secs(1), tx)
+    let mut watcher = notify_debouncer_full::new_debouncer(Duration::from_secs(1), None, tx)
       .expect("failed to start builtin server fs watcher");
 
     watcher
-      .watcher()
       .watch(&dir, notify::RecursiveMode::Recursive)
       .expect("builtin server failed to watch dir");
 
diff --git a/crates/tauri-cli/src/interface/rust.rs b/crates/tauri-cli/src/interface/rust.rs
index b6542466da18..581a380720ec 100644
--- a/crates/tauri-cli/src/interface/rust.rs
+++ b/crates/tauri-cli/src/interface/rust.rs
@@ -18,7 +18,7 @@ use anyhow::Context;
 use glob::glob;
 use ignore::gitignore::{Gitignore, GitignoreBuilder};
 use notify::RecursiveMode;
-use notify_debouncer_mini::new_debouncer;
+use notify_debouncer_full::new_debouncer;
 use serde::{Deserialize, Deserializer};
 use tauri_bundler::{
   AppCategory, AppImageSettings, BundleBinary, BundleSettings, DebianSettings, DmgSettings,
@@ -124,15 +124,13 @@ impl Interface for Rust {
   fn new(config: &Config, target: Option<String>) -> crate::Result<Self> {
     let manifest = {
       let (tx, rx) = sync_channel(1);
-      let mut watcher = new_debouncer(Duration::from_secs(1), move |r| {
+      let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| {
         if let Ok(events) = r {
           let _ = tx.send(events);
         }
       })
       .unwrap();
-      watcher
-        .watcher()
-        .watch(&tauri_dir().join("Cargo.toml"), RecursiveMode::Recursive)?;
+      watcher.watch(tauri_dir().join("Cargo.toml"), RecursiveMode::Recursive)?;
       let (manifest, _modified) = rewrite_manifest(config)?;
       let now = Instant::now();
       let timeout = Duration::from_secs(2);
@@ -527,7 +525,7 @@ impl Rust {
       .expect("watch_folders should not be empty");
     let ignore_matcher = build_ignore_matcher(&common_ancestor);
 
-    let mut watcher = new_debouncer(Duration::from_secs(1), move |r| {
+    let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| {
       if let Ok(events) = r {
         tx.send(events).unwrap()
       }
@@ -539,7 +537,7 @@ impl Rust {
         lookup(&path, |file_type, p| {
           if p != path {
             log::debug!("Watching {} for changes...", display_path(&p));
-            let _ = watcher.watcher().watch(
+            let _ = watcher.watch(
               &p,
               if file_type.is_dir() {
                 RecursiveMode::Recursive
@@ -555,42 +553,43 @@ impl Rust {
     loop {
       if let Ok(events) = rx.recv() {
         for event in events {
-          let event_path = event.path;
-
-          if !ignore_matcher.is_ignore(&event_path, event_path.is_dir()) {
-            if is_configuration_file(self.app_settings.target, &event_path) {
-              if let Ok(config) = reload_config(config.as_ref()) {
-                let (manifest, modified) =
-                  rewrite_manifest(config.lock().unwrap().as_ref().unwrap())?;
-                if modified {
-                  *self.app_settings.manifest.lock().unwrap() = manifest;
-                  // no need to run the watcher logic, the manifest was modified
-                  // and it will trigger the watcher again
-                  continue;
+          #[cfg(target_os = "linux")]
+          if event.kind.is_access() {
+            continue;
+          }
+
+          if let Some(event_path) = event.paths.first() {
+            if !ignore_matcher.is_ignore(event_path, event_path.is_dir()) {
+              if is_configuration_file(self.app_settings.target, event_path) {
+                if let Ok(config) = reload_config(config.as_ref()) {
+                  let (manifest, modified) =
+                    rewrite_manifest(config.lock().unwrap().as_ref().unwrap())?;
+                  if modified {
+                    *self.app_settings.manifest.lock().unwrap() = manifest;
+                    // no need to run the watcher logic, the manifest was modified
+                    // and it will trigger the watcher again
+                    continue;
+                  }
                 }
               }
-            }
 
-            log::info!(
-              "File {} changed. Rebuilding application...",
-              display_path(
-                event_path
-                  .strip_prefix(frontend_path)
-                  .unwrap_or(&event_path)
-              )
-            );
+              log::info!(
+                "File {} changed. Rebuilding application...",
+                display_path(event_path.strip_prefix(frontend_path).unwrap_or(event_path))
+              );
 
-            let mut p = process.lock().unwrap();
-            p.kill().with_context(|| "failed to kill app process")?;
+              let mut p = process.lock().unwrap();
+              p.kill().with_context(|| "failed to kill app process")?;
 
-            // wait for the process to exit
-            // note that on mobile, kill() already waits for the process to exit (duct implementation)
-            loop {
-              if !matches!(p.try_wait(), Ok(None)) {
-                break;
+              // wait for the process to exit
+              // note that on mobile, kill() already waits for the process to exit (duct implementation)
+              loop {
+                if !matches!(p.try_wait(), Ok(None)) {
+                  break;
+                }
               }
+              *p = run(self)?;
             }
-            *p = run(self)?;
           }
         }
       }
diff --git a/crates/tauri-macros/src/command/wrapper.rs b/crates/tauri-macros/src/command/wrapper.rs
index 4babd0dbb325..fc02b2537c3e 100644
--- a/crates/tauri-macros/src/command/wrapper.rs
+++ b/crates/tauri-macros/src/command/wrapper.rs
@@ -478,7 +478,7 @@ fn rustc_version() -> (u32, u32) {
         .split(' ')
         .nth(1)
         .unwrap_or_default()
-        .split(".")
+        .split('.')
         .take(2)
         .flat_map(|p| p.parse::<u32>().ok())
         .collect::<Vec<_>>();
diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs
index 82d636dd2d37..beaa7f9cb4af 100644
--- a/crates/tauri-runtime-wry/src/lib.rs
+++ b/crates/tauri-runtime-wry/src/lib.rs
@@ -2682,7 +2682,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
         pending,
       )?;
 
-      #[allow(clippy::manual_inspect)]
+      #[allow(unknown_lints, clippy::manual_inspect)]
       self
         .context
         .main_thread
@@ -3311,7 +3311,7 @@ fn handle_user_message<T: UserEvent>(
             let _ = webview.print();
           }
           WebviewMessage::Close => {
-            #[allow(clippy::manual_inspect)]
+            #[allow(unknown_lints, clippy::manual_inspect)]
             windows.0.borrow_mut().get_mut(&window_id).map(|window| {
               if let Some(i) = window.webviews.iter().position(|w| w.id == webview.id) {
                 window.webviews.remove(i);
@@ -3535,7 +3535,7 @@ fn handle_user_message<T: UserEvent>(
       if let Some(window) = window {
         match handler(&window) {
           Ok(webview) => {
-            #[allow(clippy::manual_inspect)]
+            #[allow(unknown_lints, clippy::manual_inspect)]
             windows.0.borrow_mut().get_mut(&window_id).map(|w| {
               w.webviews.push(webview);
               w.has_children.store(true, Ordering::Relaxed);
diff --git a/crates/tauri-utils/src/platform.rs b/crates/tauri-utils/src/platform.rs
index 7a9c99431ed5..f795820691dd 100644
--- a/crates/tauri-utils/src/platform.rs
+++ b/crates/tauri-utils/src/platform.rs
@@ -396,6 +396,7 @@ mod tests {
     assert_eq!(resource_dir, path.parent().unwrap());
 
     let path = PathBuf::from("/path/to/target/unknown-profile/app");
+    #[allow(clippy::needless_borrows_for_generic_args)]
     let resource_dir = super::resource_dir_from(&path, &package_info, &env);
     #[cfg(target_os = "macos")]
     assert!(resource_dir.is_err());
diff --git a/crates/tauri/build.rs b/crates/tauri/build.rs
index 6d42d967b4ce..86eb0f55897d 100644
--- a/crates/tauri/build.rs
+++ b/crates/tauri/build.rs
@@ -428,7 +428,7 @@ permissions = [{}]
       .join(",")
   );
 
-  write_if_changed(&default_toml, toml_content)
+  write_if_changed(default_toml, toml_content)
     .unwrap_or_else(|_| panic!("unable to autogenerate core:default set"));
 
   let _ = tauri_utils::acl::build::define_permissions(
diff --git a/examples/file-associations/src-tauri/src/main.rs b/examples/file-associations/src-tauri/src/main.rs
index 397e36eda085..ea2ec8f3b4d9 100644
--- a/examples/file-associations/src-tauri/src/main.rs
+++ b/examples/file-associations/src-tauri/src/main.rs
@@ -35,7 +35,7 @@ fn handle_file_associations(app: AppHandle, files: Vec<PathBuf>) {
   let files = files
     .into_iter()
     .map(|f| {
-      let file = f.to_string_lossy().replace("\\", "\\\\"); // escape backslash
+      let file = f.to_string_lossy().replace('\\', "\\\\"); // escape backslash
       format!("\"{file}\"",) // wrap in quotes for JS array
     })
     .collect::<Vec<_>>()
@@ -59,7 +59,7 @@ fn main() {
         // files may aslo be passed as `file://path/to/file`
         for maybe_file in std::env::args().skip(1) {
           // skip flags like -f or --flag
-          if maybe_file.starts_with("-") {
+          if maybe_file.starts_with('-') {
             continue;
           }
 


Test patch:
diff --git a/bench/tests/files_transfer/src-tauri/src/main.rs b/bench/tests/files_transfer/src-tauri/src/main.rs
index 9ac64be2d4b7..3563d86850bf 100644
--- a/bench/tests/files_transfer/src-tauri/src/main.rs
+++ b/bench/tests/files_transfer/src-tauri/src/main.rs
@@ -18,7 +18,7 @@ async fn read_file<R: Runtime>(app: AppHandle<R>) -> Result<Response, String> {
     .path()
     .resolve(".tauri_3mb.json", BaseDirectory::Home)
     .map_err(|e| e.to_string())?;
-  let contents = read(&path).map_err(|e| e.to_string())?;
+  let contents = read(path).map_err(|e| e.to_string())?;
   Ok(Response::new(contents))
 }