about summary refs log tree commit diff
path: root/src/libstd/rt/uv
AgeCommit message (Collapse)AuthorLines
2013-09-18Register new snapshotsAlex Crichton-41/+0
2013-09-17auto merge of #9235 : olsonjeffery/rust/newrt_file_io_1, r=thestingerbors-198/+632
A quick rundown: - added `file::{readdir, stat, mkdir, rmdir}` - Added access-constrained versions of `FileStream`; `FileReader` and `FileWriter` respectively - big rework in `uv::file` .. most actions are by-val-self methods on `FsRequest`; `FileDescriptor` has gone the way of the dinosaurs - playing nice w/ homing IO (I just copied ecr's work, hehe), etc - added `FileInfo` trait, with an impl for `Path` - wrapper for file-specific actions, with the file path always implied by self's value - has the means to create `FileReader` & `FileWriter` (this isn't exposed in the top-level free function API) - has "safe" wrappers for `stat()` that won't throw in the event of non-existence/error (in this case, I mean `is_file` and `exists`) - actions should fail if done on non-regular-files, as appropriate - added `DirectoryInfo` trait, with an impl for `Path` - pretty much ditto above, but for directories - added `readdir` (!!) to iterate over entries in a dir as a `~[Path]` (this was *brutal* to get working) ...<del>and lots of other stuff</del>not really. Do your worst!
2013-09-17remove unnecessary transmutesDaniel Micay-14/+4
2013-09-16std: FsRequest.req_boilerplate() be &mut selfJeff Olson-17/+58
2013-09-16std: remove impl'd/commented-out fstat signaturesJeff Olson-3/+0
2013-09-16std: correctly pass STDOUT in to naive_print test fnJeff Olson-1/+1
2013-09-16std: unignore some file io tests that work on windows, nowJeff Olson-2/+0
2013-09-16std: bind uv_fs_readdir(), flesh out DirectoryInfo and docs/cleanupJeff Olson-8/+94
2013-09-16std: expose more stat infoJeff Olson-1/+5
2013-09-16std: adding file::{stat,mkdir,rmdir}, FileInfo and FileReader/FileWriterJeff Olson-42/+72
add ignores for win32 tests on previous file io stuff...
2013-09-16merge cleanupJeff Olson-1/+2
2013-09-16std/rt: in-progress file io workJeff Olson-196/+473
std: remove unneeded field from RequestData struct std: rt::uv::file - map us_fs_stat & start refactoring calls into FsRequest std: stubbing out stat calls from the top-down into uvio std: us_fs_* operations are now by-val self methods on FsRequest std: post-rebase cleanup std: add uv_fs_mkdir|rmdir + tests & minor test cleanup in rt::uv::file WORKING: fleshing out FileStat and FileInfo + tests std: reverting test files.. refactoring back and cleanup...
2013-09-16switch Drop to `&mut self`Daniel Micay-7/+7
2013-09-16std::rt::uv::file: Enable tests on Win32klutzy-2/+0
Closes #8814.
2013-09-16std::rt::uv::uvio: Enable tests on Win32klutzy-2/+0
Closes #8816.
2013-09-16std::rt::uv::uvll: Fix uv_req_type on Win32klutzy-3/+27
Also enables request_sanity_check() test. Closes #8817
2013-09-13std::rt::io: Fix file I/O on Win32klutzy-0/+9
It was broken on win32 because of header inconsistency.
2013-09-06Make I/O tests use run_in_mt_newsched_task to get more multi-threaded test ↵Eric Reed-13/+51
coverage
2013-09-06Forgot to make accept() home for IOEric Reed-1/+3
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
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-06Upgrade libuv to the current master (again)Alex Crichton-123/+80
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-06auto merge of #9000 : brson/rust/dns, r=anasazibors-8/+318
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-05std::rt: Add get_host_addresses functionBrian Anderson-1/+33
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/+261
2013-09-05std::rt: Some I/O cleanupBrian Anderson-7/+10
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-4/+4
2013-06-23Split out starting a listener from accepting incoming connections.Eric Reed-51/+65
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: 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 (or until you break out of the loop) }
2013-08-27Add a variant of home_for_io that consumes the handle. Refactor out common ↵Eric Reed-48/+53
parts of the home_for_io variants.
2013-08-29auto merge of #8819 : vadimcn/rust/unit-tests, r=brsonbors-0/+9
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-742/+159
r=brson" This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
2013-08-28Turned off libstd unit tests that currently fail on Windows.Vadim Chugunov-0/+9
2013-08-27Fix merge falloutAlex Crichton-3/+3
2013-08-27Implement process bindings to libuvAlex Crichton-80/+701
Closes #6436
2013-08-27Upgrade libuv to the current master + our patchesAlex Crichton-82/+44
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-14/+14
2013-08-27librustc: Fix problem with cross-crate reexported static methods.Patrick Walton-5/+13
2013-08-27libstd: Fix merge fallout.Patrick Walton-4/+4
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-32/+32
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.
2013-08-20Added home_for_io_with_sched variant. Temporarily making IO unkillable.Eric Reed-124/+165
2013-08-22fix 32bit mac build errorJeff Olson-2/+2
2013-08-22make check appeasementJeff Olson-1/+2
2013-08-22std: put FileMode/Access->whence-mask in uvio, open/unlink as fns in file::Jeff Olson-10/+32
2013-08-22std: slight refactor on UvFilestream seek behavior, pre-seek-refactorJeff Olson-29/+30
2013-08-22std: all of the calls in rt::uv::file take a &LoopJeff Olson-44/+43
2013-08-22std: moved static file actions (open,unlink) to FsRequestJeff Olson-63/+63
2013-08-22std: reform fn sigs of FileDescriptor methods (better result signalling)Jeff Olson-42/+46
2013-08-22std: rename tmp file paths to go into ./tmp folder in builddirJeff Olson-3/+3
2013-08-22change FileDescriptor instance methods to use &mut selfJeff Olson-11/+11
2013-08-22std: naive stdio print test in uvioJeff Olson-0/+20