1 // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
17 This API is completely unstable and subject to change.
21 #![crate_name = "rustc"]
23 #![comment = "The Rust compiler"]
24 #![license = "MIT/ASL2"]
25 #![crate_type = "dylib"]
26 #![crate_type = "rlib"]
27 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
28 html_favicon_url = "http://www.rust-lang.org/favicon.ico",
29 html_root_url = "http://doc.rust-lang.org/master/")]
32 #![feature(macro_rules, globs, struct_variant, managed_boxes, quote)]
33 #![feature(default_type_params, phase, unsafe_destructor)]
35 #![allow(unknown_features)] // NOTE: Remove after next snapshot
36 #![feature(rustc_diagnostic_macros)]
37 #![feature(import_shadowing)]
43 extern crate graphviz;
45 extern crate rustc_llvm;
46 extern crate rustc_back;
47 extern crate serialize;
50 #[phase(plugin, link)] extern crate log;
51 #[phase(plugin, link)] extern crate syntax;
56 pub use rustc_llvm as llvm;
61 pub use rustc_back::abi;
62 pub use rustc_back::archive;
63 pub use rustc_back::arm;
64 pub use rustc_back::mips;
65 pub use rustc_back::mipsel;
66 pub use rustc_back::rpath;
67 pub use rustc_back::svh;
68 pub use rustc_back::target_strs;
69 pub use rustc_back::x86;
70 pub use rustc_back::x86_64;
83 pub mod check_static_recursion;
86 pub mod check_rvalues;
92 pub mod dependency_format;
95 pub mod expr_use_visitor;
102 pub mod mem_categorization;
108 pub mod resolve_lifetime;
117 pub mod weak_lang_items;
129 pub use rustc_back::fs;
130 pub use rustc_back::sha2;
135 pub mod snapshot_vec;
142 __build_diagnostic_array!(DIAGNOSTICS)
144 // A private module so that macro-expanded idents like
145 // `::rustc::lint::Lint` will also work in `rustc` itself.
147 // `libstd` uses the same trick.
154 let args = std::os::args();
155 std::os::set_exit_status(driver::main_args(args.as_slice()));