lib.rs 2.8 KB
Newer Older
S
sevrak 已提交
1
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2 3 4 5 6 7 8 9 10
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

11 12 13 14 15 16 17 18 19 20
/*!

The Rust compiler.

# Note

This API is completely unstable and subject to change.

*/

21
#![crate_id = "rustc#0.11.0-pre"]
22 23 24 25 26
#![comment = "The Rust compiler"]
#![license = "MIT/ASL2"]
#![crate_type = "dylib"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
27
      html_favicon_url = "http://www.rust-lang.org/favicon.ico",
28
      html_root_url = "http://static.rust-lang.org/doc/master")]
B
Brian Anderson 已提交
29

30 31 32
#![allow(deprecated)]
#![feature(macro_rules, globs, struct_variant, managed_boxes, quote,
           default_type_params, phase)]
33

A
Alex Crichton 已提交
34 35
extern crate flate;
extern crate arena;
36
extern crate graphviz;
A
Alex Crichton 已提交
37 38 39 40 41
extern crate syntax;
extern crate serialize;
extern crate sync;
extern crate getopts;
extern crate collections;
A
Arcterus 已提交
42
extern crate time;
43 44
extern crate libc;

45 46
#[phase(syntax, link)]
extern crate log;
47

48
pub mod middle {
49
    pub mod trans;
50
    pub mod ty;
51
    pub mod ty_fold;
52
    pub mod subst;
53
    pub mod resolve;
54
    pub mod resolve_lifetime;
B
Brian Anderson 已提交
55
    pub mod typeck;
56 57 58
    pub mod check_loop;
    pub mod check_match;
    pub mod check_const;
59
    pub mod check_static;
60
    pub mod lint;
61
    pub mod borrowck;
N
Niko Matsakis 已提交
62
    pub mod dataflow;
63 64 65 66 67 68 69 70 71 72
    pub mod mem_categorization;
    pub mod liveness;
    pub mod kind;
    pub mod freevars;
    pub mod pat_util;
    pub mod region;
    pub mod const_eval;
    pub mod astencode;
    pub mod lang_items;
    pub mod privacy;
73
    pub mod entry;
74
    pub mod effect;
75
    pub mod reachable;
76
    pub mod graph;
77
    pub mod cfg;
K
Kiet Tran 已提交
78
    pub mod dead;
79
    pub mod expr_use_visitor;
80
    pub mod dependency_format;
81 82
}

83 84 85
pub mod front {
    pub mod config;
    pub mod test;
86
    pub mod std_inject;
E
Eduard Burtescu 已提交
87
    pub mod assign_node_ids_and_map;
88
    pub mod feature_gate;
S
Seo Sanghyeon 已提交
89
    pub mod show_span;
G
Graydon Hoare 已提交
90 91
}

92 93
pub mod back {
    pub mod abi;
94
    pub mod archive;
95
    pub mod arm;
96 97
    pub mod link;
    pub mod lto;
J
Jyun-Yan You 已提交
98
    pub mod mips;
99
    pub mod rpath;
100
    pub mod svh;
101
    pub mod target_strs;
102 103
    pub mod x86;
    pub mod x86_64;
104 105
}

106
pub mod metadata;
107

108
pub mod driver;
G
Graydon Hoare 已提交
109

110 111 112
pub mod util {
    pub mod common;
    pub mod ppaux;
113
    pub mod sha2;
114
    pub mod nodemap;
115
    pub mod fs;
G
Graydon Hoare 已提交
116 117
}

118 119
pub mod lib {
    pub mod llvm;
120
    pub mod llvmdeps;
G
Graydon Hoare 已提交
121 122
}

123
pub fn main() {
124 125 126 127
    let args = std::os::args().iter()
                              .map(|x| x.to_strbuf())
                              .collect::<Vec<_>>();
    std::os::set_exit_status(driver::main_args(args.as_slice()));
128
}