rust/src
bors 6023350082 auto merge of #11017 : alexcrichton/rust/faster-read, r=thestinger
We were previously reading metadata via `ar p`, but as learned from rustdoc
awhile back, spawning a process to do something is pretty slow. Turns out LLVM
has an Archive class to read archives, but it cannot write archives.

This commits adds bindings to the read-only version of the LLVM archive class
(with a new type that only has a read() method), and then it uses this class
when reading the metadata out of rlibs. When you put this in tandem of not
compressing the metadata, reading the metadata is 4x faster than it used to be
The timings I got for reading metadata from the respective libraries was:

    libstd-04ff901e-0.9-pre.dylib    => 100ms
    libstd-04ff901e-0.9-pre.rlib     => 23ms
    librustuv-7945354c-0.9-pre.dylib => 4ms
    librustuv-7945354c-0.9-pre.rlib  => 1ms
    librustc-5b94a16f-0.9-pre.dylib  => 87ms
    librustc-5b94a16f-0.9-pre.rlib   => 35ms
    libextra-a6ebb16f-0.9-pre.dylib  => 63ms
    libextra-a6ebb16f-0.9-pre.rlib   => 15ms
    libsyntax-2e4c0458-0.9-pre.dylib => 86ms
    libsyntax-2e4c0458-0.9-pre.rlib  => 22ms

In order to always take advantage of these faster metadata read-times, I sort
the files in filesearch based on whether they have an rlib extension or not
(prefer all rlib files first).

Overall, this halved the compile time for a `fn main() {}` crate from 0.185s to
0.095s on my system (when preferring dynamic linking). Reading metadata is still
the slowest pass of the compiler at 0.035s, but it's getting pretty close to
linking at 0.021s! The next best optimization is to just not copy the metadata
from LLVM because that's the most expensive part of reading metadata right now.
2013-12-20 02:06:34 -08:00
..
compiletest Make Android tests fail if no device is available 2013-12-18 18:12:46 -08:00
driver Make crate hash stable and externally computable. 2013-12-10 17:04:24 -07:00
etc auto merge of #11073 : klutzy/rust/issue-10978, r=alexcrichton 2013-12-19 20:06:36 -08:00
gyp@f407f09c94 Upgrade libuv to the current master (again) 2013-09-06 11:12:49 -07:00
libextra auto merge of #11071 : huonw/rust/quiet-test, r=cmr 2013-12-19 18:51:39 -08:00
librustc auto merge of #11017 : alexcrichton/rust/faster-read, r=thestinger 2013-12-20 02:06:34 -08:00
librustdoc auto merge of #11057 : alexcrichton/rust/no-at-in-ebml, r=pcwalton 2013-12-19 17:11:40 -08:00
librustpkg Rename pkgid to crate_id 2013-12-19 10:10:23 -05:00
librustuv auto merge of #11041 : cmr/rust/pkgid_changes, r=cmr,metajack 2013-12-19 07:51:36 -08:00
libstd auto merge of #11071 : huonw/rust/quiet-test, r=cmr 2013-12-19 18:51:39 -08:00
libsyntax auto merge of #11070 : ezyang/rust/better-errors, r=alexcrichton 2013-12-19 09:51:40 -08:00
libuv@2207d4ab07 Upgrade libuv to fix a leak on OSX 2013-12-18 23:00:04 -08:00
llvm@eac6ff795c Remove unused upcalls 2013-12-05 16:29:16 -08:00
rt Register new snapshots 2013-12-07 23:02:39 -08:00
rustllvm rustc: Optimize reading metadata by 4x 2013-12-19 23:34:32 -08:00
test auto merge of #11073 : klutzy/rust/issue-10978, r=alexcrichton 2013-12-19 20:06:36 -08:00
README.txt drop the linenoise library 2013-10-16 22:57:51 -04:00
snapshots.txt Register new snapshots 2013-12-18 09:32:03 -08:00

This is a preliminary version of the Rust compiler, libraries and tools

Source layout:

librustc/          The self-hosted compiler

libstd/            The standard library (imported and linked by default)
libextra/          The "extras" library (slightly more peripheral code)
libsyntax/         The Rust parser and pretty-printer

rt/                The runtime system
rt/rust_*.cpp      - The majority of the runtime services
rt/isaac           - The PRNG used for pseudo-random choices in the runtime
rt/bigint          - The bigint library used for the 'big' type
rt/uthash          - Small hashtable-and-list library for C, used in runtime
rt/sync            - Concurrency utils
rt/util            - Small utility classes for the runtime.
rt/vg              - Valgrind headers
rt/msvc            - MSVC support

test/              Testsuite
test/compile-fail  - Tests that should fail to compile
test/run-fail      - Tests that should compile, run and fail
test/run-pass      - Tests that should compile, run and succeed
test/bench         - Benchmarks and miscellanea
test/pretty        - Pretty-printer tests
test/auxiliary     - Dependencies of tests

compiletest/       The test runner

librustpkg/        The package manager and build system

librustdoc/        The Rust API documentation tool

llvm/              The LLVM submodule

libuv/             The libuv submodule

rustllvm/          LLVM support code

libfuzzer/         A collection of fuzz testers

etc/               Scripts, editor support, misc