# Bundled rclone binaries

These binaries are **not committed** to the repository. They are fetched
automatically by CI and can be fetched locally with:

```sh
pnpm fetch-rclone
```

The pinned version is stored in `rclone-version`. CI opens a PR to bump
this file whenever a new rclone release is detected (runs weekly).

## Expected paths

| Platform | Path                                    |
| -------- | --------------------------------------- |
| Linux    | `src-tauri/binaries/linux/rclone`       |
| macOS    | `src-tauri/binaries/macos/rclone`       |
| Windows  | `src-tauri/binaries/windows/rclone.exe` |

## Overriding the version

Pass an explicit version to download a specific release:

```sh
node scripts/fetch-rclone.mjs v1.69.0
```

## Overriding the architecture

Set `SYNCIZEN_RCLONE_ARCH` to force a specific architecture download.

```sh
SYNCIZEN_RCLONE_ARCH=amd64 node scripts/fetch-rclone.mjs
SYNCIZEN_RCLONE_ARCH=arm64 node scripts/fetch-rclone.mjs
```

On macOS, `SYNCIZEN_RCLONE_ARCH=universal` downloads both amd64 and arm64
archives and combines them into a single universal `rclone` binary via `lipo`.
This is what CI uses for release artifacts.

## Notes

- During development builds, SynciZen prefers `rclone` from the system `PATH`
  when available.
- If system `rclone` is not found, SynciZen uses the bundled binary.
- The `.rclone-fetched-version` marker file next to each binary records the
  downloaded version so re-runs skip the download when already up-to-date.
