// Parse args and run the compiler. This is the primary entry point for rustc.
// See comments on CompilerCalls below for details about the callbacks argument.
// The FileLoader provides a way to load files from sources other than the file system.
Parse args and run the compiler. This is the primary entry point for rustc.
See comments on CompilerCalls below for details about the callbacks argument.
The FileLoader provides a way to load files from sources other than the file system.
Parse args and run the compiler . This is the primary entry point for rustc . See comments on CompilerCalls below for details about the callbacks argument . The FileLoader provides a way to load files from sources other than the file system .
pub fn run_compiler<'a>(args: &[String],
                        callbacks: Box<dyn CompilerCalls<'a> + sync::Send + 'a>,
                        file_loader: Option<Box<dyn FileLoader + Send + Sync + 'static>>,
                        emitter_dest: Option<Box<dyn Write + Send>>)
                        -> (CompileResult, Option<Session>)
{
    syntax::with_globals(|| {
        let matches = match handle_options(args) {
            Some(matches) => matches,
            None => return (Ok(()), None),
        };
        let (sopts, cfg) = config::build_session_options_and_crate_config(&matches);
        driver::spawn_thread_pool(sopts, |sopts| {
            run_compiler_with_pool(matches, sopts, cfg, callbacks, file_loader, emitter_dest)
        })
    })
}
pub fn run_compiler < ' a > ( args : & [ String ] , callbacks : Box < dyn CompilerCalls < ' a > + sync :: Send + ' a > , file_loader : Option < Box < dyn FileLoader + Send + Sync + ' static > > , emitter_dest : Option < Box < dyn Write + Send > > ) -> ( CompileResult , Option < Session > ) { syntax :: with_globals ( | | { let matches = match handle_options ( args ) { Some ( matches ) => matches , None => return ( Ok ( ( ) ) , None ) , } ; let ( sopts , cfg ) = config :: build_session_options_and_crate_config ( & matches ) ; driver :: spawn_thread_pool ( sopts , | sopts | { run_compiler_with_pool ( matches , sopts , cfg , callbacks , file_loader , emitter_dest ) } ) } ) }
Parse args and run the compiler.
Parse args and run the compiler .
args
&[String]
callbacks
Box<dyn CompilerCalls<'a> + sync::Send + 'a>
file_loader
Option<Box<dyn FileLoader + Send + Sync + 'static>>
emitter_dest
Option<Box<dyn Write + Send>>