2011-12-06 01:46:37 +01:00
|
|
|
#[link(name = "core",
|
2012-03-22 23:25:02 +01:00
|
|
|
vers = "0.2",
|
2011-12-06 01:46:37 +01:00
|
|
|
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
|
2012-03-28 22:42:17 +02:00
|
|
|
url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
|
2011-12-06 01:46:37 +01:00
|
|
|
|
|
|
|
#[comment = "The Rust core library"];
|
2012-01-09 01:21:43 +01:00
|
|
|
#[license = "MIT"];
|
2011-12-09 06:08:23 +01:00
|
|
|
#[crate_type = "lib"];
|
2011-12-06 01:46:37 +01:00
|
|
|
|
2012-03-07 04:09:32 +01:00
|
|
|
#[doc = "
|
2012-04-19 10:00:52 +02:00
|
|
|
The Rust core library provides functionality that is closely tied to the Rust
|
2012-01-24 02:03:42 +01:00
|
|
|
built-in types and runtime services, or that is used in nearly every
|
|
|
|
non-trivial program.
|
2012-01-24 01:58:30 +01:00
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
`core` includes modules corresponding to each of the integer types, each of
|
2012-05-26 09:16:32 +02:00
|
|
|
the floating point types, the `bool` type, tuples, characters, strings,
|
2012-05-16 15:12:12 +02:00
|
|
|
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.
|
2012-04-19 10:00:52 +02:00
|
|
|
|
|
|
|
`core` is linked by default to all crates and the contents imported.
|
|
|
|
Implicitly, all crates behave as if they included the following prologue:
|
2012-01-24 01:58:30 +01:00
|
|
|
|
2012-01-24 02:11:01 +01:00
|
|
|
use core;
|
|
|
|
import core::*;
|
2012-01-24 01:58:30 +01:00
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
This behavior can be disabled with the `#[no_core]` crate attribute.
|
2012-03-07 04:09:32 +01:00
|
|
|
"];
|
2012-01-24 01:40:33 +01:00
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
// Don't link to core. We are core.
|
|
|
|
#[no_core];
|
|
|
|
|
2012-06-05 03:34:24 +02:00
|
|
|
#[warn(no_vecs_not_implicitly_copyable)];
|
|
|
|
|
2012-02-12 08:18:26 +01:00
|
|
|
export int, i8, i16, i32, i64;
|
|
|
|
export uint, u8, u16, u32, u64;
|
|
|
|
export float, f32, f64;
|
|
|
|
export box, char, str, ptr, vec, bool;
|
2012-02-01 03:52:20 +01:00
|
|
|
export either, option, result, iter;
|
2012-03-14 16:49:28 +01:00
|
|
|
export libc, os, io, run, rand, sys, unsafe, logging;
|
2012-06-17 00:21:08 +02:00
|
|
|
export comm, task, future;
|
2011-12-14 01:25:51 +01:00
|
|
|
export extfmt;
|
2012-01-17 19:43:29 +01:00
|
|
|
export tuple;
|
2012-02-22 13:06:38 +01:00
|
|
|
export to_str;
|
2012-05-10 02:30:31 +02:00
|
|
|
export dvec, dvec_iter;
|
2012-06-06 23:19:52 +02:00
|
|
|
export cmp;
|
2012-06-08 01:08:38 +02:00
|
|
|
export num;
|
2011-12-14 01:25:51 +01:00
|
|
|
|
2012-04-12 06:45:18 +02:00
|
|
|
// NDM seems to be necessary for resolve to work
|
2012-06-03 04:03:28 +02:00
|
|
|
export option_iter;
|
2012-04-12 06:45:18 +02:00
|
|
|
|
2012-04-05 06:17:50 +02:00
|
|
|
// FIXME: This creates some APIs that I do not want to commit to. It is
|
|
|
|
// currently exported for the uv code in std, but when that code moves into
|
|
|
|
// core this should become unexported
|
|
|
|
export priv;
|
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
|
2011-12-14 01:25:51 +01:00
|
|
|
// Built-in-type support modules
|
|
|
|
|
2012-04-15 02:21:10 +02:00
|
|
|
#[doc = "Operations and constants for `int`"]
|
|
|
|
#[path = "int-template"]
|
|
|
|
mod int {
|
2012-05-16 08:18:04 +02:00
|
|
|
import inst::{ hash, pow };
|
|
|
|
export hash, pow;
|
2012-04-15 02:21:10 +02:00
|
|
|
#[path = "int.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `i8`"]
|
|
|
|
#[path = "int-template"]
|
|
|
|
mod i8 {
|
|
|
|
#[path = "i8.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `i16`"]
|
|
|
|
#[path = "int-template"]
|
|
|
|
mod i16 {
|
|
|
|
#[path = "i16.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `i32`"]
|
|
|
|
#[path = "int-template"]
|
|
|
|
mod i32 {
|
|
|
|
#[path = "i32.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `i64`"]
|
|
|
|
#[path = "int-template"]
|
|
|
|
mod i64 {
|
|
|
|
#[path = "i64.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
2012-04-15 07:07:45 +02:00
|
|
|
#[doc = "Operations and constants for `uint`"]
|
|
|
|
#[path = "uint-template"]
|
|
|
|
mod uint {
|
|
|
|
import inst::{
|
|
|
|
div_ceil, div_round, div_floor, hash, iterate,
|
2012-05-16 07:50:29 +02:00
|
|
|
next_power_of_two
|
2012-04-15 07:07:45 +02:00
|
|
|
};
|
|
|
|
export div_ceil, div_round, div_floor, hash, iterate,
|
2012-05-16 07:50:29 +02:00
|
|
|
next_power_of_two;
|
2012-04-15 07:07:45 +02:00
|
|
|
|
|
|
|
#[path = "uint.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `u8`"]
|
|
|
|
#[path = "uint-template"]
|
|
|
|
mod u8 {
|
|
|
|
import inst::is_ascii;
|
|
|
|
export is_ascii;
|
|
|
|
|
|
|
|
#[path = "u8.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `u16`"]
|
|
|
|
#[path = "uint-template"]
|
|
|
|
mod u16 {
|
|
|
|
#[path = "u16.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `u32`"]
|
|
|
|
#[path = "uint-template"]
|
|
|
|
mod u32 {
|
|
|
|
#[path = "u32.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc = "Operations and constants for `u64`"]
|
|
|
|
#[path = "uint-template"]
|
|
|
|
mod u64 {
|
|
|
|
#[path = "u64.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
|
2011-12-14 01:25:51 +01:00
|
|
|
mod box;
|
|
|
|
mod char;
|
|
|
|
mod float;
|
2011-12-14 02:52:02 +01:00
|
|
|
mod f32;
|
|
|
|
mod f64;
|
2011-12-14 01:25:51 +01:00
|
|
|
mod str;
|
|
|
|
mod ptr;
|
|
|
|
mod vec;
|
|
|
|
mod bool;
|
2012-04-19 10:00:52 +02:00
|
|
|
mod tuple;
|
2011-12-14 01:25:51 +01:00
|
|
|
|
|
|
|
// Ubiquitous-utility-type modules
|
|
|
|
|
2012-06-06 23:19:52 +02:00
|
|
|
mod cmp;
|
2012-06-08 01:08:38 +02:00
|
|
|
mod num;
|
2011-12-14 01:25:51 +01:00
|
|
|
mod either;
|
2012-04-19 10:00:52 +02:00
|
|
|
mod iter;
|
|
|
|
mod logging;
|
2011-12-14 01:25:51 +01:00
|
|
|
mod option;
|
2012-04-12 06:45:18 +02:00
|
|
|
#[path="iter-trait"]
|
|
|
|
mod option_iter {
|
|
|
|
#[path = "option.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
2011-12-14 01:25:51 +01:00
|
|
|
mod result;
|
2012-04-19 10:00:52 +02:00
|
|
|
mod to_str;
|
2012-05-10 02:30:31 +02:00
|
|
|
mod dvec;
|
|
|
|
#[path="iter-trait"]
|
|
|
|
mod dvec_iter {
|
|
|
|
#[path = "dvec.rs"]
|
|
|
|
mod inst;
|
|
|
|
}
|
2012-02-22 13:06:38 +01:00
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
// Concurrency
|
|
|
|
mod comm;
|
|
|
|
mod task;
|
|
|
|
mod future;
|
|
|
|
|
2012-02-22 13:06:38 +01:00
|
|
|
|
2011-12-14 01:25:51 +01:00
|
|
|
// Runtime and language-primitive support
|
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
mod io;
|
2012-02-28 02:22:42 +01:00
|
|
|
mod libc;
|
2012-03-06 19:14:58 +01:00
|
|
|
mod os;
|
2012-03-03 02:20:00 +01:00
|
|
|
mod path;
|
2012-04-19 10:00:52 +02:00
|
|
|
mod rand;
|
|
|
|
mod run;
|
2011-12-14 01:25:51 +01:00
|
|
|
mod sys;
|
|
|
|
mod unsafe;
|
2012-02-15 01:39:20 +01:00
|
|
|
|
2011-12-14 01:25:51 +01:00
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
// Modules supporting compiler-generated code
|
|
|
|
// Exported but not part of the public interface
|
2011-12-14 01:25:51 +01:00
|
|
|
|
|
|
|
mod extfmt;
|
|
|
|
|
|
|
|
|
2012-04-19 10:00:52 +02:00
|
|
|
// For internal use, not exported
|
|
|
|
|
|
|
|
mod unicode;
|
|
|
|
mod priv;
|
|
|
|
mod cmath;
|
2012-06-06 03:47:18 +02:00
|
|
|
mod stackwalk;
|
2012-04-19 10:00:52 +02:00
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
// Local Variables:
|
|
|
|
// mode: rust;
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// End:
|