You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run cargo tauri dev and trunk serve at the same time, they both watch the same folder for changes, and detect changes to temporary files from the other tool's build, so they both endlessly keep triggering rebuilds.
OTOH If I don't run trunk serve myself, then cargo tauri dev is stuck waiting forever:
Also, when these projects rebuild, they rebuild almost from scratch. I think it's because both end up using the same target/ folder and overwrite each other's build artifacts due to differences in cargo feature flags they use.
Reproduction
npm create tauri-app
# choose cargo and yewcd the-app
cargo tauri dev
and then run
trunk serve
in another terminal in the same dir.
Expected behavior
Ideally cargo tauri dev should start the server, so that a separate trunk command is not needed.
If I run cargo tauri dev and trunk serve at the same time, they both watch the same folder for changes, and detect changes to temporary files from the other tool's build, so they both endlessly keep triggering rebuilds.
The yew template has .taurignore to stop tauri-cli from retriggering builds whenever yew files change but the CLI version that supports this, is not released yet (you can use the tauri-cli from git for now cargo install --git https://github.com/tauri-apps/tauri --branch dev tauri-cli).
Unfortunately I didn't configure trunk to do the same. I will push an update shortly for this but for the mean time in your Trunk.toml add this:
[watch]
ignore = ["./src-tauri"]
OTOH If I don't run trunk serve myself, then cargo tauri dev is stuck waiting forever:
Also, when these projects rebuild, they rebuild almost from scratch. I think it's because both end up using the same target/ folder and overwrite each other's build artifacts due to differences in cargo feature flags they use.
I wasn't able to reproduce this, at least not with trunk configured correctly to ignore src-tauri and .taurignore configured to ignore yew files.
Describe the bug
If I run
cargo tauri dev
andtrunk serve
at the same time, they both watch the same folder for changes, and detect changes to temporary files from the other tool's build, so they both endlessly keep triggering rebuilds.OTOH If I don't run
trunk serve
myself, thencargo tauri dev
is stuck waiting forever:Also, when these projects rebuild, they rebuild almost from scratch. I think it's because both end up using the same
target/
folder and overwrite each other's build artifacts due to differences in cargo feature flags they use.Reproduction
and then run
in another terminal in the same dir.
Expected behavior
Ideally
cargo tauri dev
should start the server, so that a separatetrunk
command is not needed.Platform and versions
Environment
› OS: Mac OS 12.5.1 X64
› Node.js: 18.8.0
› npm: 8.18.0
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-aarch64-apple-darwin
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
package.json not found
App directory structure
├─ dist
├─ target
├─ public
├─ src-tauri
├─ .vscode
└─ src
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: