Follow-up from #261 (PR #307). After Nix and the unused runtimes were removed, the Rust toolchain is the largest layer in the agent image: about 626 MB uncompressed, for the minimal profile with rustc, cargo and rust-std.
The runtime only needs cargo for cargo generate-lockfile and cargo metadata (SBOM resolution), plus cargo-audit, which is already a standalone binary. cargo metadata calls rustc for target info, so rustc stays. The host rust-std is probably not needed.
Try: drop rust-std from the runtime toolchain, or copy just cargo and rustc from the builder image. Then check that lockfile generation and metadata still work on a real crate (the itoa scan used in #307).
Acceptance: the itoa scan still gives the same SBOM, and the agent image is measurably smaller.
Follow-up from #261 (PR #307). After Nix and the unused runtimes were removed, the Rust toolchain is the largest layer in the agent image: about 626 MB uncompressed, for the minimal profile with rustc, cargo and rust-std.
The runtime only needs cargo for `cargo generate-lockfile` and `cargo metadata` (SBOM resolution), plus cargo-audit, which is already a standalone binary. `cargo metadata` calls `rustc` for target info, so rustc stays. The host `rust-std` is probably not needed.
**Try:** drop `rust-std` from the runtime toolchain, or copy just `cargo` and `rustc` from the builder image. Then check that lockfile generation and metadata still work on a real crate (the itoa scan used in #307).
**Acceptance:** the itoa scan still gives the same SBOM, and the agent image is measurably smaller.
sharang
added this to the R1 · Dynamic & OT depth milestone 2026-09-21 16:57:55 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up from #261 (PR #307). After Nix and the unused runtimes were removed, the Rust toolchain is the largest layer in the agent image: about 626 MB uncompressed, for the minimal profile with rustc, cargo and rust-std.
The runtime only needs cargo for
cargo generate-lockfileandcargo metadata(SBOM resolution), plus cargo-audit, which is already a standalone binary.cargo metadatacallsrustcfor target info, so rustc stays. The hostrust-stdis probably not needed.Try: drop
rust-stdfrom the runtime toolchain, or copy justcargoandrustcfrom the builder image. Then check that lockfile generation and metadata still work on a real crate (the itoa scan used in #307).Acceptance: the itoa scan still gives the same SBOM, and the agent image is measurably smaller.