Docs: https://tauri.app/v1/guides/building/sidecar/
I have a binary I want to use as side car. Its a nodejs script build with pkg. The name is ftpSidecar-x86_64-apple-darwin-x86_64-apple-darwin. I am on macos.
my tauri.conf.json contains the necessary allowlist and bundle entries:
`...
"shell": {
"sidecar": true,
"scope": [
{ "name": "src-tauri/sidecars/ftpSidecar-x86_64-apple-darwin", "sidecar": true, "args":["arg0"] }
]
},
...
"bundle": {
"active": true,
"category": "DeveloperTool",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": ["src-tauri/sidecars/ftpSidecar-x86_64-apple-darwin"],
...`
In my frontend code I import the tauri shell api and execute the command as documented:
import { Command } from '@tauri-apps/api/shell' ... const command = Command.sidecar('src-tauri/sidecars/ftpSidecar-x86_64-apple-darwin',[dataBody]) const output = await command.execute() ...
When I build the app, I get this error stating that tauri doesnt find the binary:
error: failed to run custom build command for`app v0.1.0 (/Users/me/dev/taurisveltekit/src-tauri)
Caused by:
process didn't exit successfully: /Users/me/dev/taurisveltekit/src-tauri/target/debug/build/app-b3b9f8db6a9f8b3d/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=TAURI_CONFIG cargo:rerun-if-changed=tauri.conf.json cargo:rustc-cfg=desktop cargo:rustc-cfg=dev path matching src-tauri/sidecars/ftpSidecar-x86_64-apple-darwin-x86_64-apple-darwin not found. warning: build failed, waiting for other jobs to finish...
I've already tried the full path instead of the relative path, but it resulted in the same error.
What am I missing?