summary refs log tree commit diff
path: root/src/libstd/rt
AgeCommit message (Collapse)AuthorLines
2013-09-06Make I/O tests use run_in_mt_newsched_task to get more multi-threaded test ↵Eric Reed-50/+187
coverage
2013-09-06Forgot to make accept() home for IOEric Reed-1/+3
2013-09-06Upgrade libuv to the current master (again)Alex Crichton-124/+81
This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't cause random segfaults all over the place. The windows regression in testing should also be fixed (it shouldn't build the whole compiler twice). A notable difference from before is that gyp is now a git submodule instead of always git-cloned at make time. This allows bundling for releases more easily. Closes #8850
2013-09-06Fix Acceptor iterator ending early if a connection attempt failsEric Reed-4/+9
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-6/+6
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-07Handle global log levels (fixes #6033)novalis-36/+100
2013-09-06Fix #6031. Allow symbolic log levels, not just numbers.novalis-18/+53
2013-09-06auto merge of #9000 : brson/rust/dns, r=anasazibors-15/+382
This exposes a very simple function for resolving host names. There's a lot more that needs to be done, but this is probably enough for servo to get started connecting to real websites again.
2013-09-05std::rt: Fix addrinfo definition on BSDBrian Anderson-1/+15
2013-09-05auto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brsonbors-12/+12
Patch for #8985
2013-09-05std::rt: Add get_host_addresses functionBrian Anderson-10/+78
This is a very simplistic method for host name resolution. It converts a host name to a vector of IP addresses. Should be enough to get started.
2013-09-05std::rt: Add libuv bindings for getaddrinfoBrian Anderson-0/+282
2013-09-05std::rt: Some I/O cleanupBrian Anderson-7/+10
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-12/+12
2013-09-05Implement Stream automatically for Reader + WriterChris Morgan-0/+2
This is consistent with the existing documentation but was not the actual behaviour, which I've found to be rather a nuisance, actually.
2013-09-04auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichtonbors-5/+3
Fix #6009. Rebased version of #8970. Inherits review from alexcrichton.
2013-09-04auto merge of #8935 : blake2-ppc/rust/reader-bytes, r=brsonbors-1/+89
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader. In the generic form the `Bytes` iterator is well behaved itself and does not read ahead. It performs abysmally on top of a FileStream, and much better if a buffering reader is inserted inbetween.
2013-09-04auto merge of #8880 : fhahn/rust/issue_8703, r=brsonbors-15/+248
I've started working on #8703. RUST_LOG="::help" should work, I hope I'll be able to finish the rest this weekend.
2013-09-04Convert rust_log.cpp to Rust, closes #8703Florian Hahn-15/+248
2013-09-04stop treating char as an integer typeDaniel Micay-6/+7
Closes #7609
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-5/+3
2013-09-03auto merge of #8943 : alexcrichton/rust/issue-8904, r=brsonbors-2/+8
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-09-03auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichtonbors-0/+4
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+4
2013-09-03auto merge of #8954 : anasazi/rust/tcp-acceptor, r=catamorphismbors-160/+234
The Listener trait takes two type parameters, the type of connection and the type of Acceptor, and specifies only one method, listen, which consumes the listener and produces an Acceptor. The Acceptor trait takes one type parameter, the type of connection, and defines two methods. The accept() method waits for an incoming connection attempt and returns the result. The incoming() method creates an iterator over incoming connections and is a default method. Example: ```rust let listener = TcpListener.bind(addr); // Bind to a socket let acceptor = listener.listen(); // Start the listener for stream in acceptor.incoming() { // Process incoming connections forever (a failure will kill the task). } ``` Closes #8689
2013-09-03rt::io: Rename Bytes to ByteIterator and add note about iterationblake2-ppc-8/+14
2013-09-02Raise the file descriptor limits when running compiletestAlex Crichton-2/+8
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-09-02Implement BufReaderSteven Fackler-3/+39
2013-09-02rt::io: Add Bytes iterator for Readerblake2-ppc-1/+83
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader.
2013-08-30auto merge of #8854 : huonw/rust/rt-papercuts, r=brsonbors-31/+25
The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely: ``` $ RUST_THREADS=x rustc # old You've met with a terrible fate, haven't you? fatal runtime error: runtime tls key not initialized Aborted $ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new You've met with a terrible fate, haven't you? fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer Aborted ``` The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts. (Also, fixes a typo in `extra::test` from #8823.)
2013-08-29auto merge of #8819 : vadimcn/rust/unit-tests, r=brsonbors-0/+20
Some of the tests are failing. I've only managed to fix 'memory_map_file', the rest are up for grabs... Fixes #5261.
2013-08-29Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, ↵Brian Anderson-845/+169
r=brson" This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
2013-08-29auto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelixbors-2/+2
Moves the Times trait to num while the question of whether it should exist at all gets hashed out as a completely separate question.
2013-08-29rt: remove a series of unfortunate casts.Huon Wilson-13/+6
2013-08-29rt: use sugary functions rather than manual range loops.Huon Wilson-16/+11
2013-08-29rt: Handle non-integer RUST_THREADS (slightly) more gracefully.Huon Wilson-2/+8
Previously it would call Option.unwrap(), which calls `fail!` on None, which doesn't work without the runtime (e.g. when initialising it).
2013-08-29Remove the iter module.Jason Fager-2/+2
Moves the Times trait to num while the question of whether it should exist at all gets hashed out as a completely separate question.
2013-08-28auto merge of #8447 : alexcrichton/rust/local-data-merge, r=brsonbors-19/+14
This moves all local_data stuff into the `local_data` module and only that module alone. It also removes a fair amount of "super-unsafe" code in favor of just vanilla code generated by the compiler at the same time. Closes #8113
2013-08-28auto merge of #8807 : alexcrichton/rust/remove-two-offsets, r=thestingerbors-1/+3
Everything that we do is actually inbounds, so there's no reason for us to be exposing two of these functions
2013-08-28Turned off libstd unit tests that currently fail on Windows.Vadim Chugunov-0/+20
2013-08-27Remove offset_inbounds for an unsafe offset functionAlex Crichton-1/+3
2013-08-27Consolidate local_data implementations, and cleanupAlex Crichton-19/+14
This moves all local_data stuff into the `local_data` module and only that module alone. It also removes a fair amount of "super-unsafe" code in favor of just vanilla code generated by the compiler at the same time. Closes #8113
2013-08-27Fix merge falloutAlex Crichton-3/+3
2013-08-27Implement process bindings to libuvAlex Crichton-89/+803
Closes #6436
2013-08-27Upgrade libuv to the current master + our patchesAlex Crichton-83/+45
There were two main differences with the old libuv and the master version: 1. The uv_last_error function is now gone. The error code returned by each function is the "last error" so now a UvError is just a wrapper around a c_int. 2. The repo no longer includes a makefile, and the build system has change. According to the build directions on joyent/libuv, this now downloads a `gyp` program into the `libuv/build` directory and builds using that. This shouldn't add any dependences on autotools or anything like that. Closes #8407 Closes #6567 Closes #6315
2013-08-27librustc: Fix merge falloutPatrick Walton-19/+19
2013-08-27librustc: Fix problem with cross-crate reexported static methods.Patrick Walton-5/+13
2013-08-27libstd: Fix merge fallout.Patrick Walton-5/+5
2013-08-27librustc: Stop calling `each_path` in coherence.Patrick Walton-3/+3
10% win or so for small crates.
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-96/+124
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.