I’m trying to get a librustc to compile some source to the point where I can get type information out.
gist here: https://gist.github.com/phildawes/cdc4fcfce18f5bb52dc0 (I used the code in librustc/test.rs as a starting point)
Unfortunately it only gets to the resolve::resolve_crate stage with the error:
'unresolved import `std::prelude::v1::*`'. Maybe a missing `extern crate std`?'
I’m not sure why it can’t resolve the prelude, I’ve set the options.maybe_sysroot to “/usr/local” to match my rustc install. Not setting the maybe_sysroot results in another error: "can’t find crate for
Any help would be much appreciated!