proptest-rs / proptest

Hypothesis-like property testing for Rust
Apache License 2.0
1.63k stars 152 forks source link

Help request: How to emit MIR of proptest #398

Closed dkcumming closed 7 months ago

dkcumming commented 7 months ago

I am interested in doing analysis using the MIR generated from proptest, however I am unsure how exactly to extract the MIR. The approach I have taken errors like so:

$ cargo rustc -- --test --emit mir -o ABCD.mir
   Compiling proptest_example v0.1.0 (/home/daniel/Sync/RuntimeVerification/rust_experiments/proptest_example)
warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type

warning: ignoring --out-dir flag due to -o flag

error: crate `proptest` required to be available in rlib format, but was not found in this form

warning: `proptest_example` (lib) generated 2 warnings
error: could not compile `proptest_example` (lib) due to previous error; 2 warnings emitted

Does anyone have any advice for how to extract the MIR of proptest?

dkcumming commented 7 months ago

In truth I was hoping to do this without cargo, if anyone knows how to do it that way it would be helpful also.

dkcumming commented 7 months ago

I ended up getting this working with essentially the same command on another project. Not sure why the first one was throwing.