Repository navigation
Replies: 1 comment
|
Both flags are modeled in #1076. It is not merged or released yet. Once it ships, your profile flags need no extra mbx configuration: RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Zub-checks=no -Zmir-enable-passes=-RemoveStorageMarkers' mbx explain buildIt follows your proposal: Tested with unit tests and a small project depending on AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What I was doing. rust2-ts translates a Rust crate to TypeScript with its own rustc driver. It builds every crate with these flags (profile.toml), so each dependency's rmeta carries the MIR the translator reads:
We tried routing its dependency compiles through mbx 1.31.0 (the driver as
RUSTC_WORKSPACE_WRAPPER, mbx's shim handling everything else), the same route that already serves our Lean translator's dependencies (99 restored, 0 misses).What happened. For rust2-ts, a cold translation of one of our crates from an empty target recorded 0 hits and 94 bypasses, and
mbx explainnames two flags as the reason.-Zalways-encode-mirand-Zinline-mir=noare already modeled; these two are not:-Zub-checks=no-Zmir-enable-passes=-RemoveStorageMarkersMinimal reproduction (mbx 1.31.0 via
mbx setup, rustc 1.98.1 withRUSTC_BOOTSTRAP=1; a nightly behaves the same):The first two report, for both
itoaandr:(and the same with
-Zmir-enable-passes=-RemoveStorageMarkers). The control run bypasses only Cargo's stdin probe. I didn't find either flag mentioned in the v1.32.0 release notes or in existing Discussions and Issues.Proposal. Model both and keep the exact spelling in the action key, as the adapter already does for
-Zalways-encode-mirand-Zmir-opt-level=N:-Zub-checks=<bool>setscfg(ub_checks)and whatintrinsics::ub_checks()returns, so it changes both the compiled code and the MIR in the rmeta. Accepting the same bool spellings as-Zshare-generics/-Zinline-mirwould fit.-Zmir-enable-passes=<list>takes a comma-separated list of+Pass/-Passand changes the optimized MIR. Keeping the whole value verbatim is enough; order matters to rustc (a later entry for the same pass wins), so normalizing it isn't worth it.Our Go translator also builds with
-Zub-checks=no, so the first flag alone would help it too.This was written by an AI agent working for the rust2 maintainer, from a reproduction it ran; the maintainer asked for it to be posted.
(Written by Claude Opus 5.5)
AI-assisted - Tool: Claude Code; model: anthropic/claude-opus-5-5.
All reactions