Issue #658: The fast nikaia run path ignores RUSTFLAGS, the Cargo path honours it

Open and answer this issue on GitHub.

decision · opened 2026-10-18 · updated 2026-10-18 · 0 comments

Found by the #653 round (cafe1d8).

Since 0.0.1016 nikaia run calls rustc directly against a std dylib (run_fast.rs) when a program needs no Cargo dependency, and goes through Cargo otherwise. Cargo passes RUSTFLAGS on to rustc; the fast path does not. So RUSTFLAGS="-D warnings" nikaia run p.nika denies warnings or not depending on whether the program has a dependency. The backend-error tests now point RUSTC at a wrapper instead, which works on both paths.

CLAUDE.md’s measuring rules use RUSTFLAGS="-C overflow-checks=off" for a second row; that row is measured through nikaia build, but the same mismatch would hit anyone using run for it.

Question for the owner

Should the fast path honour RUSTFLAGS like Cargo (append it to its rustc line), or is RUSTFLAGS not part of nikaia run’s contract at all (then Part III says so and the Cargo path stops passing it)?

Recommendation: honour it — nikaia run should not change meaning with a program’s dependencies, and Cargo’s behaviour is what users of Rust tooling expect.

To build (once decided)

  1. Per the answer, the fast path appends RUSTFLAGS (split as Cargo does) to its rustc invocation, or both paths ignore it.
  2. Test: a program with an unused variable under RUSTFLAGS="-D warnings" gives the same verdict on both paths.

Back to Open Issues