aboutsummaryrefslogtreecommitdiff
path: root/src/lib/sys.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-06-27 20:48:28 -0700
committerGraydon Hoare <[email protected]>2010-06-27 20:48:28 -0700
commit1316312c0c0f0225922b94fc6bfa2e07e3a85ac4 (patch)
tree3d56e02aa4afb3202a49dee2ec4c8757b97ec0fa /src/lib/sys.rs
parentChange slot_mem_ctrl to classify vec[state] as GC mem. Breaking / XFAILing mu... (diff)
downloadrust-1316312c0c0f0225922b94fc6bfa2e07e3a85ac4.tar.xz
rust-1316312c0c0f0225922b94fc6bfa2e07e3a85ac4.zip
Only translate or dwarf-emit items or stubs locally defined or used. Avoids instantiating O(sizeof(standard-library)) worth of imports stubs on each 'use std'. Closes issue 13.
Diffstat (limited to 'src/lib/sys.rs')
-rw-r--r--src/lib/sys.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/sys.rs b/src/lib/sys.rs
index 3d858413..0eafc5ee 100644
--- a/src/lib/sys.rs
+++ b/src/lib/sys.rs
@@ -1,4 +1,17 @@
+export rustrt;
+
native "rust" mod rustrt {
+
+ // Explicitly re-export native stuff we want to be made
+ // available outside this crate. Otherwise it's
+ // visible-in-crate, but not re-exported.
+
+ export last_os_error;
+ export size_of;
+ export align_of;
+ export refcount;
+ export gc;
+
fn last_os_error() -> str;
fn size_of[T]() -> uint;
fn align_of[T]() -> uint;