mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-03 23:03:22 +00:00
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
11 lines
555 B
Rust
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()
|
|
}
|