253 lines
4.8 KiB
Plaintext
253 lines
4.8 KiB
Plaintext
#[link(name = "core",
|
|
vers = "0.4",
|
|
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"];
|
|
|
|
/*!
|
|
* The Rust core library provides functionality that is closely tied to the
|
|
* Rust built-in types and runtime services, or that is used in nearly every
|
|
* non-trivial program.
|
|
*
|
|
* `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 pointers (`ptr`).
|
|
* Additionally, `core` provides very commonly used built-in types and
|
|
* operations, concurrency primitives, platform abstractions, I/O, and
|
|
* complete bindings to the C standard library.
|
|
*
|
|
* `core` is linked by default to all crates and the contents imported.
|
|
* Implicitly, all crates behave as if they included the following prologue:
|
|
*
|
|
* use core;
|
|
* import core::*;
|
|
*
|
|
* This behavior can be disabled with the `#[no_core]` crate attribute.
|
|
*/
|
|
|
|
// Don't link to core. We are core.
|
|
#[no_core];
|
|
|
|
#[deny(vecs_implicitly_copyable)];
|
|
// XXX: Switch to deny after snapshot
|
|
#[warn(non_camel_case_types)];
|
|
|
|
export int, i8, i16, i32, i64;
|
|
export uint, u8, u16, u32, u64;
|
|
export float, f32, f64;
|
|
export box, char, str, ptr, vec, at_vec, bool;
|
|
export either, option, result, iter;
|
|
export libc, os, io, run, rand, sys, unsafe, logging;
|
|
export comm, task, future, pipes;
|
|
export extfmt;
|
|
// The test harness links against core, so don't include runtime in tests.
|
|
// FIXME (#2861): Uncomment this after snapshot gets updated.
|
|
//#[cfg(notest)]
|
|
export rt;
|
|
export tuple;
|
|
export to_str, to_bytes;
|
|
export util;
|
|
export dvec, dvec_iter;
|
|
export dlist, dlist_iter;
|
|
export send_map;
|
|
export hash;
|
|
export cmp;
|
|
export num;
|
|
export path;
|
|
export managed;
|
|
export flate;
|
|
export unit;
|
|
export uniq;
|
|
|
|
// NDM seems to be necessary for resolve to work
|
|
export option_iter;
|
|
|
|
// This creates some APIs that I do not want to commit to, but it must be
|
|
// exported from core in order for uv to remain in std (see #2648).
|
|
export priv;
|
|
|
|
|
|
// Built-in-type support modules
|
|
|
|
/// Operations and constants for `int`
|
|
#[path = "int-template"]
|
|
mod int {
|
|
import inst::{ hash, pow };
|
|
export hash, pow;
|
|
#[path = "int.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i8`
|
|
#[path = "int-template"]
|
|
mod i8 {
|
|
#[path = "i8.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i16`
|
|
#[path = "int-template"]
|
|
mod i16 {
|
|
#[path = "i16.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i32`
|
|
#[path = "int-template"]
|
|
mod i32 {
|
|
#[path = "i32.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `i64`
|
|
#[path = "int-template"]
|
|
mod i64 {
|
|
#[path = "i64.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `uint`
|
|
#[path = "uint-template"]
|
|
mod uint {
|
|
import inst::{
|
|
div_ceil, div_round, div_floor, hash, iterate,
|
|
next_power_of_two
|
|
};
|
|
export div_ceil, div_round, div_floor, hash, iterate,
|
|
next_power_of_two;
|
|
|
|
#[path = "uint.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u8`
|
|
#[path = "uint-template"]
|
|
mod u8 {
|
|
import inst::is_ascii;
|
|
export is_ascii;
|
|
|
|
#[path = "u8.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u16`
|
|
#[path = "uint-template"]
|
|
mod u16 {
|
|
#[path = "u16.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u32`
|
|
#[path = "uint-template"]
|
|
mod u32 {
|
|
#[path = "u32.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
/// Operations and constants for `u64`
|
|
#[path = "uint-template"]
|
|
mod u64 {
|
|
#[path = "u64.rs"]
|
|
mod inst;
|
|
}
|
|
|
|
|
|
mod box;
|
|
mod char;
|
|
mod float;
|
|
mod f32;
|
|
mod f64;
|
|
mod str;
|
|
mod ptr;
|
|
mod vec;
|
|
mod at_vec;
|
|
mod bool;
|
|
mod tuple;
|
|
mod unit;
|
|
mod uniq;
|
|
|
|
// Ubiquitous-utility-type modules
|
|
|
|
#[cfg(notest)]
|
|
mod ops;
|
|
mod cmp;
|
|
mod num;
|
|
mod hash;
|
|
mod either;
|
|
mod iter;
|
|
mod logging;
|
|
mod option;
|
|
#[path="iter-trait"]
|
|
mod option_iter {
|
|
#[path = "option.rs"]
|
|
mod inst;
|
|
}
|
|
mod result;
|
|
mod to_str;
|
|
mod to_bytes;
|
|
mod util;
|
|
|
|
// Data structure modules
|
|
|
|
mod dvec;
|
|
#[path="iter-trait"]
|
|
mod dvec_iter {
|
|
#[path = "dvec.rs"]
|
|
mod inst;
|
|
}
|
|
mod dlist;
|
|
#[path="iter-trait"]
|
|
mod dlist_iter {
|
|
#[path ="dlist.rs"]
|
|
mod inst;
|
|
}
|
|
mod send_map;
|
|
|
|
// Concurrency
|
|
mod comm;
|
|
mod task;
|
|
mod future;
|
|
mod pipes;
|
|
|
|
// Runtime and language-primitive support
|
|
|
|
mod io;
|
|
mod libc;
|
|
mod os;
|
|
mod path;
|
|
mod rand;
|
|
mod run;
|
|
mod sys;
|
|
mod unsafe;
|
|
|
|
mod managed;
|
|
|
|
mod flate;
|
|
|
|
// Modules supporting compiler-generated code
|
|
// Exported but not part of the public interface
|
|
|
|
mod extfmt;
|
|
// The test harness links against core, so don't include runtime in tests.
|
|
#[cfg(notest)]
|
|
mod rt;
|
|
|
|
|
|
// For internal use, not exported
|
|
|
|
mod unicode;
|
|
mod priv;
|
|
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:
|