Add optional Cargo vendoring config and offline packaging documentation#54
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 023712ecbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```bash | ||
| cd src-tauri | ||
| cargo generate-lockfile | ||
| cargo tauri build --config tauri.conf.json |
There was a problem hiding this comment.
Use an installed Tauri CLI command in build instructions
The new packaging steps call cargo tauri build, but this repository’s documented prerequisite path only installs @tauri-apps/cli via npm ci (see package.json scripts), which provides tauri build rather than a Cargo subcommand; in this environment cargo tauri build fails with no such command: tauri. Users following this guide on a clean machine will hit an immediate command-not-found error unless you either switch these examples to tauri build/npm scripts or explicitly add a cargo-tauri installation prerequisite.
Useful? React with 👍 / 👎.
| # then (re)generate lockfile and build from src-tauri using vendored crates only | ||
| cd src-tauri | ||
| cargo generate-lockfile --offline --config 'source.crates-io.replace-with="vendored-sources"' | ||
| cargo tauri build --offline --config 'source.crates-io.replace-with="vendored-sources"' --config tauri.conf.json |
There was a problem hiding this comment.
Move Cargo source override flags before external subcommand
In the restricted-network example, --offline and --config 'source.crates-io.replace-with=…' are placed after cargo tauri build; for external Cargo subcommands, those arguments are forwarded to the subcommand binary instead of being applied by Cargo, so the crates.io replacement/offline behavior is not enforced and the first --config is interpreted as Tauri config input. This means the documented offline build path can fail even when vendor/ is present.
Useful? React with 👍 / 👎.
601a233
into
codex/add-tauri-v2-integration-and-configuration
…on (koala73#54) ### Motivation - Make Tauri/Rust dependency resolution reproducible in restricted-network CI or offline environments by providing a documented vendored source option. - Surface two supported packaging flows (online and restricted-network) in the release docs so packagers know how to provision offline inputs. - Improve validation reporting to distinguish external registry outages from failures caused by missing offline artifacts so QA results are actionable. - Allow committing `Cargo.lock` for `src-tauri` once generated by removing it from the local `.gitignore` so dependency graphs can be pinned. ### Description - Added `src-tauri/.cargo/config.toml` defining a `vendored-sources` replacement that points to `src-tauri/vendor/` and included inline instructions to `cargo vendor` for populating it. - Updated `docs/RELEASE_PACKAGING.md` with a new section describing two Rust dependency modes and example commands for (1) the standard online build and (2) a restricted-network build that uses vendored crates or an internal mirror. - Updated `docs/TAURI_VALIDATION_REPORT.md` to classify failures into **External environment outage** and **Expected failure: offline mode not provisioned**, with guidance for both. - Modified `src-tauri/.gitignore` to stop ignoring `Cargo.lock` so a lockfile can be generated and committed when network or vendored artifacts are available. ### Testing - Ran `cd src-tauri && cargo generate-lockfile`, which failed due to blocked access to `https://index.crates.io` with `403 CONNECT tunnel failed` (environmental network restriction). - Ran `cd src-tauri && cargo generate-lockfile --offline`, which failed as expected because `src-tauri/vendor/` was not provisioned (`no matching package named keyring found`). - No additional automated tests were run on the modified files; documentation and config changes were validated by applying the edits and confirming file contents. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_698ef3d2ac2c8333b576f1c85e6004a1)
Motivation
Cargo.lockforsrc-taurionce generated by removing it from the local.gitignoreso dependency graphs can be pinned.Description
src-tauri/.cargo/config.tomldefining avendored-sourcesreplacement that points tosrc-tauri/vendor/and included inline instructions tocargo vendorfor populating it.docs/RELEASE_PACKAGING.mdwith a new section describing two Rust dependency modes and example commands for (1) the standard online build and (2) a restricted-network build that uses vendored crates or an internal mirror.docs/TAURI_VALIDATION_REPORT.mdto classify failures into External environment outage and Expected failure: offline mode not provisioned, with guidance for both.src-tauri/.gitignoreto stop ignoringCargo.lockso a lockfile can be generated and committed when network or vendored artifacts are available.Testing
cd src-tauri && cargo generate-lockfile, which failed due to blocked access tohttps://index.crates.iowith403 CONNECT tunnel failed(environmental network restriction).cd src-tauri && cargo generate-lockfile --offline, which failed as expected becausesrc-tauri/vendor/was not provisioned (no matching package named keyring found).Codex Task