I have forked stupid-stats in hopes of updating it to work with the latest compiler API (1.40) but I was only able to compile core. Each time trying to compiler something other than core I get can't find crate std
. I don't understand exactly how the "linking" of crates happens in the compiler but I'm assuming this is my problem.
fn main() {
let _ = rustc_driver::catch_fatal_errors(|| {
let args: Vec<_> = std::env::args_os().flat_map(|s| s.into_string()).collect();
rustc_driver::run_compiler(&args, &mut StupidCalls::new(), None, None)
}).map_err(|e| println!("{:?}", e));
}
I have also tried passing the args that are used for cargo run
by making an array of them copied from cargo run -vv
.
I asked this question on the users forum they thought it more appropriate here.
Thanks for any feedback in advanced!