I got a feeling that each time I run
cargo test, Cargo does not compile the test codes to bin, but somehow run them directly, only when I passed a target-triple will make the test really built into bins.
Do I have the right feelings about that?
- If true, how does cargo do that? By using a JIT? A VM?
- If false, where is the bin built by running "cargo test"?
P.S. I'm probably asking an A/B problem, In the real case of my project, some codes will be compiled into an so and be loaded on runtime by using "dlopen", which takes times. I'm investigating the possibility of directly read a source code into memory and change it to executable codes.