229 lines
4.4 KiB
Plaintext
229 lines
4.4 KiB
Plaintext
/*!
|
|
|
|
The Rust core library.
|
|
|
|
The Rust core library provides runtime features required by the language,
|
|
including the task scheduler and memory allocators, as well as library
|
|
support for Rust built-in types, platform abstractions, and other commonly
|
|
used features.
|
|
|
|
`core` includes modules corresponding to each of the integer types, each of
|
|
the floating point types, the `bool` type, tuples, characters, strings,
|
|
vectors (`vec`), shared boxes (`box`), and unsafe and borrowed pointers
|
|
(`ptr`). Additionally, `core` provides task management and creation (`task`),
|
|
communication primitives (`comm` and `pipes`), an efficient vector builder
|
|
(`dvec`), platform abstractions (`os` and `path`), basic I/O abstractions
|
|
(`io`), common traits (`cmp`, `num`, `to_str`), and complete bindings
|
|
to the C standard library (`libc`).
|
|
|
|
`core` is linked to all crates by default and its contents imported.
|
|
Implicitly, all crates behave as if they included the following prologue:
|
|
|
|
extern mod core;
|
|
use core::*;
|
|
|
|
*/
|
|
|
|
#[link(name = "core",
|
|
vers = "0.5",
|
|
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
|
|
url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
|
|
|
|
#[comment = "The Rust core library"];
|
|
#[license = "MIT"];
|
|
#[crate_type = "lib"];
|
|
|
|
// Don't link to core. We are core.
|
|
#[no_core];
|
|
|
|
#[warn(deprecated_mode)];
|
|
#[warn(deprecated_pattern)];
|
|
|
|
#[warn(vecs_implicitly_copyable)];
|
|
#[deny(non_camel_case_types)];
|
|
|
|
// Built-in-type support modules
|
|
|
|
/// Operations and constants for `int`
|
|
#[path = "int-template"]
|
|
pub mod int {
|
|
pub use inst::{ pow };
|
|
#[path = "int.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i8`
|
|
#[path = "int-template"]
|
|
pub mod i8 {
|
|
#[path = "i8.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i16`
|
|
#[path = "int-template"]
|
|
pub mod i16 {
|
|
#[path = "i16.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i32`
|
|
#[path = "int-template"]
|
|
pub mod i32 {
|
|
#[path = "i32.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i64`
|
|
#[path = "int-template"]
|
|
pub mod i64 {
|
|
#[path = "i64.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `uint`
|
|
#[path = "uint-template"]
|
|
pub mod uint {
|
|
pub use inst::{
|
|
div_ceil, div_round, div_floor, iterate,
|
|
next_power_of_two
|
|
};
|
|
#[path = "uint.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u8`
|
|
#[path = "uint-template"]
|
|
pub mod u8 {
|
|
pub use inst::is_ascii;
|
|
#[path = "u8.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u16`
|
|
#[path = "uint-template"]
|
|
pub mod u16 {
|
|
#[path = "u16.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u32`
|
|
#[path = "uint-template"]
|
|
pub mod u32 {
|
|
#[path = "u32.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u64`
|
|
#[path = "uint-template"]
|
|
pub mod u64 {
|
|
#[path = "u64.rs"]
|
|
pub mod inst;
|
|
}
|
|
|
|
|
|
pub mod box;
|
|
pub mod char;
|
|
pub mod float;
|
|
pub mod f32;
|
|
pub mod f64;
|
|
pub mod str;
|
|
pub mod ptr;
|
|
pub mod vec;
|
|
pub mod at_vec;
|
|
pub mod bool;
|
|
pub mod tuple;
|
|
pub mod unit;
|
|
pub mod uniq;
|
|
|
|
// Ubiquitous-utility-type modules
|
|
|
|
#[cfg(notest)]
|
|
pub mod ops;
|
|
pub mod cmp;
|
|
pub mod num;
|
|
pub mod hash;
|
|
pub mod either;
|
|
pub mod iter;
|
|
pub mod logging;
|
|
pub mod option;
|
|
#[path="iter-trait"]
|
|
pub mod option_iter {
|
|
#[path = "option.rs"]
|
|
pub mod inst;
|
|
}
|
|
pub mod result;
|
|
pub mod to_str;
|
|
pub mod to_bytes;
|
|
pub mod from_str;
|
|
pub mod util;
|
|
|
|
// Data structure modules
|
|
|
|
pub mod dvec;
|
|
#[path="iter-trait"]
|
|
pub mod dvec_iter {
|
|
#[path = "dvec.rs"]
|
|
pub mod inst;
|
|
}
|
|
pub mod dlist;
|
|
#[path="iter-trait"]
|
|
pub mod dlist_iter {
|
|
#[path ="dlist.rs"]
|
|
pub mod inst;
|
|
}
|
|
pub mod send_map;
|
|
|
|
// Concurrency
|
|
pub mod comm;
|
|
pub mod task {
|
|
pub mod local_data;
|
|
mod local_data_priv;
|
|
pub mod spawn;
|
|
pub mod rt;
|
|
}
|
|
pub mod future;
|
|
pub mod pipes;
|
|
|
|
// Runtime and language-primitive support
|
|
|
|
pub mod gc;
|
|
pub mod io;
|
|
pub mod libc;
|
|
pub mod os;
|
|
pub mod path;
|
|
pub mod rand;
|
|
pub mod run;
|
|
pub mod sys;
|
|
pub mod cast;
|
|
pub mod mutable;
|
|
pub mod flate;
|
|
pub mod repr;
|
|
pub mod cleanup;
|
|
pub mod reflect;
|
|
pub mod condition;
|
|
|
|
// Modules supporting compiler-generated code
|
|
// Exported but not part of the public interface
|
|
|
|
pub mod extfmt;
|
|
// The test harness links against core, so don't include runtime in tests.
|
|
#[cfg(notest)]
|
|
#[legacy_exports]
|
|
pub mod rt;
|
|
|
|
// Ideally not exported, but currently is.
|
|
pub mod private;
|
|
|
|
// For internal use, not exported.
|
|
mod unicode;
|
|
mod cmath;
|
|
mod stackwalk;
|
|
|
|
// Local Variables:
|
|
// mode: rust;
|
|
// fill-column: 78;
|
|
// indent-tabs-mode: nil
|
|
// c-basic-offset: 4
|
|
// buffer-file-coding-system: utf-8-unix
|
|
// End:
|