Description
Miri can now read from stdin (thanks to @samrat), but unfortunately stdin is always empty when doing cargo miri run
. I think this is because of the way that we are contorting cargo
into running Miri -- Miri needs all the compiler flags, so we run cargo check
and set RUSTC_WRAPPER
to ourselves to dispatch "compiling" the final binary to Miri. cargo thinks it is running a compiler, and does not forward any stdin to it. (Here is a test that should work.)
Similarly, stdout is always buffered, so even if the program flushes stdout, cargo miri run
will only print it after the next newline (this is rust-lang/cargo#6641).
@ehuss is there any chance that we could get cargo to invoke Miri in a way that's more like cargo run
and less like running a compiler?