Files
openworker/surfaces/gui/src-tauri/build.rs
T
Rex e241019e61 Create the sidecar resource dir in build.rs so a fresh clone builds
tauri-build validates every bundle.resources path on each cargo build, dev
included, but binaries/sidecar is only staged by the release scripts and
/binaries is gitignored — so `npm run tauri dev` on a fresh checkout failed
with `resource path 'binaries/sidecar' doesn't exist`.

Create the empty placeholder in the build script. Dev needs no packaged
sidecar (server_bin() falls back to the venv server) and tauri-utils skips
empty resource directories, so the bundle is unchanged. Putting it in
build.rs rather than setup_dev_env.sh also covers Windows, where the bash
bootstrap script never runs.

Fixes #131
2026-07-25 18:08:12 +02:00

11 lines
555 B
Rust

fn main() {
// tauri-build validates every `bundle.resources` path on every build, dev included, but
// `binaries/sidecar` is only staged by the release scripts and `/binaries` is gitignored —
// so a fresh checkout died on `resource path 'binaries/sidecar' doesn't exist`. Dev needs no
// packaged server (`server_bin()` falls back to the venv) and empty resource dirs are
// skipped, so a placeholder is enough.
std::fs::create_dir_all("binaries/sidecar").expect("create the sidecar resource dir");
tauri_build::build()
}