Skip to content

chore: Dogfood native Cargo support in this repository - #13283

Merged
anthonyshew merged 16 commits into
mainfrom
shew/cargo-dogfood
Jul 6, 2026
Merged

anthonyshew merged 16 commits into
mainfrom
shew/cargo-dogfood

Conversation

@anthonyshew

Copy link
Copy Markdown
Contributor

Why

The Cargo workspace series is functionally complete (#13227#13281). This repo is its ideal first consumer: with crates as first-class packages, every JS-side shim for Rust work becomes either a deletion or an ordinary task dependency — and we catch real-world issues before users do.

Version requirement: futureFlags.experimentalCargoWorkspaces requires a turbo that knows the key. The published 2.10.4-canary.2 does (verified: it parses the flag, executes cargo build --package=<crate>, and derives closure hashing). Stable 2.10.3 hard-errors on it — contributors on stable global turbo must npm i -g turbo@canary (the error message is a clear parse error on the flag line). CI resolves the latest 2.x release, which is the canary, so CI is unaffected.

What

  • Root turbo.json opts in; turbo#build appends version.txt via additive $TURBO_DEFAULT$ (it's embedded with include_str! from outside any crate dir)
  • Deleted: @turbo/cli's synthetic rust-src invalidation task, hand-listed target/ outputs, and cargo-wrapper scripts — native turbo#build replaces them with derived closure hashing + deliverable caching
  • @turbo/repository#build → depends on turborepo-napi#build: a real cross-toolchain edge scoped to the crate's closure instead of the global any-Rust-changed bit; CARGO_BUILD_JOBS leaves the hash (parallelism doesn't change artifacts)
  • lockfile-tests#check-lockfiles and @turbo/types schema tasks depend on the crate build tasks whose binaries they execute
  • Cleanup: vestigial turborepo-tests/helpers package deleted (echo_args.rscrates/turborepo/src/bin/, Cargo auto-discovers it); orphaned turborepo-tests/integration/turbo.json, dead fixture-% Makefile target, and stale workspace globs removed

How

All verified with the released 2.10.4-canary.2 against this branch: turbo run build --filter=turbo executes cargo build --package=turbo (59 crates in the derived input closure, version.txt present); second run is FULL TURBO; turbo run verify-schema builds turborepo-schema-gen through the cross-toolchain edge before verifying; turborepo-napi#build derives its cdylib deliverables. The pre-push hook for this very branch ran the canary against the dogfooded config. Reviewers: turbo build --filter=turbo --dry on this branch shows the full derived task definition.

Turn on futureFlags.experimentalCargoWorkspaces in the root turbo.json:
every crate in this workspace is now a Turborepo package, and every JS-side
shim for Rust work becomes either a deletion or an ordinary task
dependency. Requires a turbo that knows the flag (>= 2.10.4 canaries);
older binaries hard-error on unknown future flags, so contributors on a
stable global turbo must update — CI already resolves the latest 2.x
release, which is the canary.

- Delete @turbo/cli synthetic rust-src invalidation task, its hand-listed
  target/ outputs, and its cargo-wrapper scripts; native turbo#build
  replaces them with derived closure hashing and deliverable caching. The
  cli package now only hosts release tooling. version.txt (embedded via
  include_str! outside any crate directory) is appended to turbo#build
  inputs via $TURBO_DEFAULT$.
- @turbo/repository#build depends on turborepo-napi#build instead of the
  rust-src hack: a real cross-toolchain edge scoped to the crate actual
  closure rather than a global any-Rust-changed bit. CARGO_BUILD_JOBS
  leaves the hash — parallelism does not change artifacts.
- lockfile-tests#check-lockfiles and @turbo/types schema tasks depend on
  the crate build tasks whose binaries they execute, replacing hardcoded
  target/debug paths and CI-ran-cargo-first convention.
- Delete the vestigial turborepo-tests/helpers pnpm package; echo_args.rs
  moves to crates/turborepo/src/bin/ where Cargo auto-discovers it. Delete
  the orphaned turborepo-tests/integration/turbo.json, the dead fixture-%
  Makefile target (its setup script no longer exists), and the
  turborepo-tests/* and crates/*/js workspace globs.

Verified with the released 2.10.4-canary.2 against this repository:
turbo run build --filter=turbo executes cargo build --package=turbo (59
crates in the derived input closure, version.txt included), a second run
is FULL TURBO, turbo run verify-schema builds turborepo-schema-gen through
the cross-toolchain edge before verifying, and turborepo-napi#build
derives its cdylib deliverables.
@anthonyshew
anthonyshew requested a review from a team as a code owner July 6, 2026 18:04
@anthonyshew
anthonyshew requested review from tknickman and removed request for a team July 6, 2026 18:04
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-svelte-web Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
examples-vite-web Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
turbo-site Ready Ready Preview, Comment, Open in v0 Jul 6, 2026 7:54pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
turborepo-eve-agent Skipped Skipped Open in v0 Jul 6, 2026 7:54pm

Comment thread turbo.json Outdated
The root turbo.json now uses futureFlags.experimentalCargoWorkspaces,
which stable turbo releases do not know yet — Vercel builders install
stable by default and fail parsing the config. Pin the build command to
the canary dist-tag until a stable release carries the key.
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 18:33 Inactive
This repository is a pnpm workspace; the deployment should use the same
package manager to fetch the canary turbo.
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 18:43 Inactive
Install turbo@canary up front and keep the stock build command running
bare turbo from PATH. npm handles the global install because pnpm global
installs require a configured PNPM_HOME, which the build container does
not have.
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 18:49 Inactive
pnpm adds turbo@canary to the workspace root inside the build container
(global pnpm installs need a configured PNPM_HOME the builder lacks), and
the build runs it via pnpm exec.
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 18:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 19:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 19:48 Inactive
Comment thread apps/docs/vercel.json Outdated
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 19:52 Inactive
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Invalid vercel.json file provided

Comment thread apps/docs/vercel.json Outdated
@vercel
vercel Bot temporarily deployed to Preview – turborepo-eve-agent July 6, 2026 19:52 Inactive
@anthonyshew
anthonyshew merged commit 42f067b into main Jul 6, 2026
49 checks passed
@anthonyshew
anthonyshew deleted the shew/cargo-dogfood branch July 6, 2026 20:19
anthonyshew pushed a commit that referenced this pull request Jul 6, 2026
## Release v2.10.4

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/28819266360)

### Changes

- release(turborepo): 2.10.3 (#13222) (`02f4ed0`)
- ci: Retry Windows nextest aborts from transient 0xc0000142 spawn
failures (#13240) (`222ffff`)
- perf: Use mimalloc as the global allocator (#13237) (`c42a8a9`)
- perf: Parse yarn v1 lockfiles in a single pass (#13241) (`6207099`)
- ci: Fix cache outputs for Eve app (#13243) (`d8b556d`)
- perf: Stop materializing spans for the disabled daemon log layer
(#13244) (`623aadc`)
- fix: Keep ancestor-scoped bun dependencies resolvable after prune
renames (#13236) (`8658b66`)
- perf: Overlap external dependency hashing with package file hashing
(#13234) (`445b0c7`)
- perf: Build tracked repo index concurrently with package graph
(#13232) (`f4699c6`)
- perf: Release tokio runtime at exit so background DNS lookups never
stall the user (#13231) (`ae635bd`)
- perf: Overhaul pnpm lockfile parsing and dependency closure
computation (#13228) (`669676d`)
- feat: Add futureFlags.experimentalCargoWorkspaces flag (no-op)
(#13227) (`f546930`)
- feat: Introduce toolchain provider abstraction (#13235) (`f03addb`)
- perf: Parse Berry lockfiles in a single pass (#13242) (`6d36125`)
- fix: Apply input exclusion globs to the filesystem walk (#13224)
(`d3f9dd3`)
- fix: Stop root-directory packages from claiming every file in change
mapping (#13225) (`f80203a`)
- chore: Rename turborepo-repository napi package to @turbo/repository
(#13226) (`c1972b3`)
- perf: Hash git blobs with hardware-accelerated SHA-1 (#13245)
(`17ffa0c`)
- release(turborepo): 2.10.4-canary.1 (#13247) (`a31389e`)
- feat: Discover Cargo crates as packages (#13248) (`d813d12`)
- perf: Reuse per-package external dependency hashes in run summaries
(#13249) (`ef7ef06`)
- perf: Stat workspace turbo.json files concurrently during discovery
(#13251) (`57be8e5`)
- chore: Add tracing spans to workspace discovery and globwalk phases
(#13252) (`bd76946`)
- fix: Avoid non-reentrant libc calls in concurrent shutdown process
scans (#13256) (`bf2d827`)
- perf: Memoize resolved task definitions during engine construction
(#13257) (`9085289`)
- perf: Compute transitive closures and external dependency hashes
concurrently with run setup (#13250) (`b305fe2`)
- perf: Probe microfrontends configs in parallel (#13262) (`ea7c1f8`)
- feat: Execute Cargo crate tasks via cargo (#13261) (`ee81349`)
- perf: Pre-size engine task collections (#13265) (`17bc22e`)
- feat: Expose resolved experimentalCI task configuration in `turbo
query` (#13264) (`0f564e5`)
- feat: Derive input and output globs for Cargo tasks (#13263)
(`05b0e74`)
- perf: Parse large pnpm lockfile sections in parallel (#13266)
(`ac4155e`)
- feat: Hash Cargo external dependencies per-crate (#13267) (`71300aa`)
- ci: Install pnpm 10 in musl containers for Library Release (#13269)
(`5ba9f66`)
- ci: Force pnpm overwrite in Library Release musl containers (#13270)
(`560ee2f`)
- perf: Defer the untracked-scan barrier to first file-hash use (#13268)
(`96b0f5a`)
- ci: Fetch API-created commit before updating local ref (#13271)
(`4cbaf48`)
- release(library): 0.0.1-canary.22 (#13272) (`d2e0691`)
- perf: Remove lock and dispatch overhead from task hash precomputation
(#13273) (`dd6de07`)
- fix: Fall back to lockfile detection in @turbo/repository when package
manager is undeclared (#13275) (`8cf0e75`)
- test: Add end-to-end coverage for Cargo workspaces (#13274)
(`ce18f0a`)
- release(library): 0.0.1-canary.23 (#13276) (`8e3a59f`)
- release(turborepo): 2.10.4-canary.2 (#13278) (`7e02f94`)
- fix: Collapse nested package-manager fallback conditional (#13279)
(`af01fdf`)
- feat: Make turbo watch Cargo-aware (#13280) (`39d623e`)
- perf: Skip dependency-closure assembly for toolchains that derive
nothing (#13277) (`ff0d508`)
- feat: Make turbo prune Cargo-aware (#13281) (`ddc584d`)
- fix: Raise the open-file soft limit at startup (#13282) (`947b478`)
- fix: Stop flagging relative imports that resolve into node_modules in
boundaries (#13284) (`11a68c7`)
- perf: Evaluate simple include globs without wax compilation (#13285)
(`189897a`)
- chore: Dogfood native Cargo support in this repository (#13283)
(`42f067b`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew pushed a commit that referenced this pull request Jul 7, 2026
## Release v2.10.5-canary.1

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/28833246614)

### Changes

- perf: Remove lock and dispatch overhead from task hash precomputation
(#13273) (`dd6de07`)
- fix: Fall back to lockfile detection in @turbo/repository when package
manager is undeclared (#13275) (`8cf0e75`)
- test: Add end-to-end coverage for Cargo workspaces (#13274)
(`ce18f0a`)
- release(library): 0.0.1-canary.23 (#13276) (`8e3a59f`)
- release(turborepo): 2.10.4-canary.2 (#13278) (`7e02f94`)
- fix: Collapse nested package-manager fallback conditional (#13279)
(`af01fdf`)
- feat: Make turbo watch Cargo-aware (#13280) (`39d623e`)
- perf: Skip dependency-closure assembly for toolchains that derive
nothing (#13277) (`ff0d508`)
- feat: Make turbo prune Cargo-aware (#13281) (`ddc584d`)
- fix: Raise the open-file soft limit at startup (#13282) (`947b478`)
- fix: Stop flagging relative imports that resolve into node_modules in
boundaries (#13284) (`11a68c7`)
- perf: Evaluate simple include globs without wax compilation (#13285)
(`189897a`)
- chore: Dogfood native Cargo support in this repository (#13283)
(`42f067b`)
- release(turborepo): 2.10.4 (#13286) (`f2fce38`)
- ci: Remove dead sccache configuration (#13289) (`558df3f`)
- feat: Serve the Remote Cache as an sccache backend for Cargo tasks
(#13288) (`0d9803f`)
- fix: Reject output path traversal (#13290) (`733ccca`)
- fix: Disable the sccache proxy when remote cache use is off (#13291)
(`3249e22`)
- feat: Embed sccache so the Cargo compile cache needs no installation
(#13293) (`b6d0035`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew added a commit that referenced this pull request Jul 7, 2026
## Why

`turborepo-eve-agent` production deployments have been failing since
#13283: the Vercel builder uses a turbo that predates
`futureFlags.experimentalCargoWorkspaces` and errors on the unknown key.
The dogfood PR (#13292) adds `experimentalCargoSccache`, which needs a
canary either way.

## What

Installs `turbo@2.10.5-canary.1` into the workspace root during the
install step, same pattern as `apps/docs/vercel.json` — the builder
detects the workspace turbo and uses it for the build.

## How

Remove the pin (restoring the plain install command) once a stable
release knows both future flags. Verify via the Vercel deployment check
on this PR.
anthonyshew pushed a commit that referenced this pull request Jul 13, 2026
## Release v2.10.5

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/29267191097)

### Changes

- perf: Evaluate simple include globs without wax compilation (#13285)
(`189897a`)
- chore: Dogfood native Cargo support in this repository (#13283)
(`42f067b`)
- release(turborepo): 2.10.4 (#13286) (`f2fce38`)
- ci: Remove dead sccache configuration (#13289) (`558df3f`)
- feat: Serve the Remote Cache as an sccache backend for Cargo tasks
(#13288) (`0d9803f`)
- fix: Reject output path traversal (#13290) (`733ccca`)
- fix: Disable the sccache proxy when remote cache use is off (#13291)
(`3249e22`)
- feat: Embed sccache so the Cargo compile cache needs no installation
(#13293) (`b6d0035`)
- release(turborepo): 2.10.5-canary.1 (#13294) (`e6cd498`)
- fix: Pin a flag-aware turbo canary for the eve-agent deployment
(#13295) (`e60a4bd`)
- fix: Make the sccache compile cache actually cache (#13296)
(`2ac099c`)
- release(turborepo): 2.10.5-canary.2 (#13297) (`e6e6fb6`)
- fix: Stop ambient CARGO_INCREMENTAL from suppressing compile cache
injection (#13298) (`784af75`)
- fix: Never let compile cache storage failures fail the build (#13299)
(`a6fc6c5`)
- test: Add outputs path-traversal negative-case regression tests
(#13300) (`2ff6df9`)
- release(turborepo): 2.10.5-canary.3 (#13302) (`7e44a29`)
- ci: Authenticate to Remote Cache via OIDC token exchange (#13303)
(`a86839c`)
- fix: Keep pnpm patches with version range keys during prune (#13307)
(`3c27a89`)
- test: Scrub ambient turbo configuration from integration test children
(#13306) (`b03d0d6`)
- fix: Show toolchain tasks in the TUI and never run in silence (#13308)
(`d7622b6`)
- ci: Fix change detection on push events (#13304) (`eec3d61`)
- refactor: Rename the Cargo toolchain id to rust (#13311) (`a548b02`)
- fix: Remove extraneous bun.lock entries during prune (#13317)
(`382e9f5`)
- feat: Require a user-declared name for the Cargo workspace package
(#13312) (`5f01746`)
- feat: Parse and validate the task command field (#13313) (`389ea49`)
- chore: Harden turbo-vsc to invoke turbo without a shell (#13319)
(`4a19b6e`)
- feat: Resolve and execute task command overrides (#13315) (`a549baa`)
- release(turborepo): 2.10.5-canary.4 (#13325) (`6626261`)
- feat: Run the Rust workspace tests through nextest via command
override (#13316) (`6711bbc`)
- feat: Engage the Remote Cache and sccache compile cache for Rust CI
(#13292) (`1ae2065`)
- ci: Pin GitHub Actions to full commit SHAs (#13143) (`ad614d6`)
- fix: Make npm prune rehoisting deterministic and complete (#13323)
(`2dac737`)
- feat: Report incremental cache reuse in the run summary (#13327)
(`9f3d24a`)
- chore: Remove planning docs (#13329) (`5cd1d02`)
- docs: Migrate docs site to @vercel/geistdocs package (#13320)
(`5517bb2`)
- ci: Update Remote Cache action (#13330) (`4a39887`)
- release(turborepo): 2.10.5-canary.5 (#13331) (`f699719`)
- ci: Remove path-based workflow scheduling (#13332) (`84f2b2c`)
- fix: Resolve EADDRINUSE in kitchen-sink api dev script (#13328)
(`5886c71`)
- ci: Disable telemetry messages in workflows (#13334) (`2218dea`)
- fix: Prevent Cargo run tasks from being cached (#13335) (`68f449b`)
- fix: Isolate Cargo cache by host platform (#13337) (`c71f5cd`)
- fix: Continue TUI text selection beyond viewport (#13338) (`9cbfd90`)
- ci: Dogfood Cargo target restoration (#13336) (`8ad90a7`)
- fix: Require current Cargo lockfiles for caching (#13339) (`3a3d381`)
- fix: Reject unsupported Cargo local packages (#13340) (`708d656`)
- fix: Allow outputs outside package roots (#13342) (`de6a0d3`)
- fix: Resolve Cargo lock dependencies by source (#13343) (`2223a33`)
- docs: Update Cargo workspace support (#13349) (`241ada8`)
- fix: Build Ghostty for baseline CPUs (#13352) (`a2a04cc`)
- fix: Preserve watch rerun semantics for task inputs (#13351)
(`6ed5eab`)
- fix: Isolate Command Overrides From Toolchain Cache I/O (#13354)
(`e76f0b4`)
- release(turborepo): 2.10.5-canary.6 (#13355) (`f82e2c7`)
- fix: Include patched Ghostty crate in Cargo workspace (#13357)
(`b3cd7a1`)
- ci: Shard Rust tests across runners (#13356) (`ef122d9`)
- fix: Hash Cargo build environment inputs (#13348) (`d533266`)
- fix: Synchronize Cargo prune Docker lockfile (#13350) (`ed17249`)
- chore: Update agents app Eve dependency (#13364) (`38aa7d2`)
- fix: Preserve Yarn package extension ranges when pruning (#13363)
(`6ed2fb4`)
- refactor: Add `Toolchain` output availability (#13360) (`82bcfb6`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
Preview – turborepo-eve-agent 1eef171d Deployed Jul 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant