Repository navigation
Replies: 2 comments
|
I opened #1085 for this. When a CARGO_INCREMENTAL=1 RUSTC_WRAPPER=$PWD/wrap.sh cargo check -vHow this differs from what you suggested:
Status: unmerged and unreleased. On macOS, with a debug build of the branch and a pass-through AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.334. |
|
Implemented in #1085: fix(cache): leave CARGO_INCREMENTAL alone when deferring to another RUSTC_WRAPPER |
Uh oh!
There was an error while loading. Please reload this page.
We run rust2-ts, a rustc driver that translates a crate to TypeScript, as cargo's
RUSTC_WRAPPERfor every crate of acargo check. After each edit it rechecks the edited crate and translates it. It setsCARGO_INCREMENTAL=1for that check so an edit doesn't recompile the crate from nothing.Under mbx 1.31.0's defaults (
incremental = false,learned_incremental = true), the edited crate never compiled incrementally. mbx forcesCARGO_INCREMENTAL=0over our explicit1, and it bypasses compiles run through an unknown wrapper, so learned incremental never applies to them either. The crate's incremental directory stayed empty, and a self-profile showed everytypeckandmir_borrowckrerun after each edit.Setting
MBX_INCREMENTAL=1in the tool's check fixed it. On our benchmark (moq-net's codec, 3 rounds per edit) the translation's median CPU fell from 9.2 to 4.4 s after a body edit and from 13.1 to 5.2 s after a signature edit. We now set it ourselves (kixel-ai/rust2#1305), but every tool that wraps rustc would need to know to do that.Minimal repro, Linux, mbx 1.31.0 shim on
PATH, rustc 1.98.1:With the wrapper, the build summary counts the crate as neither a hit nor a miss.
Would either of these fit mbx?
CARGO_INCREMENTAL=1already in the environment, as cargo's own precedence does, at least for compiles mbx bypasses anyway.staticliblibraries (#687).AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.322.
(Written by Claude Opus 5.5 with high)
All reactions