about summary refs log tree commit diff
path: root/src/libstd/io/native
AgeCommit message (Collapse)AuthorLines
2013-12-24native: Introduce libnativeAlex Crichton-1847/+0
This commit introduces a new crate called "native" which will be the crate that implements the 1:1 runtime of rust. This currently entails having an implementation of std::rt::Runtime inside of libnative as well as moving all of the native I/O implementations to libnative. The current snag is that the start lang item must currently be defined in libnative in order to start running, but this will change in the future. Cool fact about this crate, there are no extra features that are enabled. Note that this commit does not include any makefile support necessary for building libnative, that's all coming in a later commit.
2013-12-20std: silence warnings when compiling test.Huon Wilson-9/+2
2013-12-19std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.Huon Wilson-6/+7
There's no need for the restrictions of a closure with the above methods.
2013-12-15auto merge of #10984 : huonw/rust/clean-raw, r=cmrbors-4/+4
See commits for details.
2013-12-15std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].Huon Wilson-3/+3
2013-12-15Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}.Huon Wilson-1/+1
2013-12-15std: fix spelling in docs.Huon Wilson-1/+1
2013-12-10librustuv: Change `with_local_io` to use RAII.Patrick Walton-0/+3
2013-12-08Remove dead codesKiet Tran-4/+1
2013-12-04auto merge of #10796 : kballard/rust/revert-new-naming, r=alexcrichtonbors-10/+9
Rename the `*::init()` functions back to `*::new()`, since `new` is not going to become a keyword.
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-10/+9
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-04Don't dup the stdio file descriptors.Alex Crichton-1/+3
This is just an implementation detail of using libuv, so move the libuv-specific logic into librustuv.
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-9/+10
2013-11-28Register new snapshotsAlex Crichton-2/+2
2013-11-26libstd: Fix Win32 and other bustage.Patrick Walton-2/+4
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-70/+54
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+1
2013-11-26rustc: Add lint for obsolete attributesklutzy-1/+0
This also moves `#[auto_{en,de}code]` checker from syntax to lint.
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-5/+5
2013-11-19auto merge of #10495 : alexcrichton/rust/more-native-io, r=brsonbors-485/+695
This implements a fair amount of the unimpl() functionality in io::native relating to filesystem operations. I've also modified all io::fs tests to run in both a native and uv environment (so everything is actually tested). There are a few bits of remaining functionality which I was unable to get working: * truncate on windows * change_file_times on windows * lstat on windows I think that change_file_times may just need a better interface, but the other two have large implementations in libuv which I didn't want to tackle trying to copy. I found a `chsize` function to work for truncate on windows, but it doesn't quite seem to be working out.
2013-11-19Implement more native file I/OAlex Crichton-485/+695
This implements a fair amount of the unimpl() functionality in io::native relating to filesystem operations. I've also modified all io::fs tests to run in both a native and uv environment (so everything is actually tested). There are a two bits of remaining functionality which I was unable to get working: * change_file_times on windows * lstat on windows I think that change_file_times may just need a better interface, but lstat has a large implementation in libuv which I didn't want to tackle trying to copy.
2013-11-18Allow piped stdout/stderr use uv_tty_tAlex Crichton-0/+1
There are issues with reading stdin when it is actually attached to a pipe, but I have run into no problems in writing to stdout/stderr when they are attached to pipes.
2013-11-13Implement native::IoFactoryAlex Crichton-292/+389
This commit re-organizes the io::native module slightly in order to have a working implementation of rtio::IoFactory which uses native implementations. The goal is to seamlessly multiplex among libuv/native implementations wherever necessary. Right now most of the native I/O is unimplemented, but we have existing bindings for file descriptors and processes which have been hooked up. What this means is that you can now invoke println!() from libstd with no local task, no local scheduler, and even without libuv. There's still plenty of work to do on the native I/O factory, but this is the first steps into making it an official portion of the standard library. I don't expect anyone to reach into io::native directly, but rather only std::io primitives will be used. Each std::io interface seamlessly falls back onto the native I/O implementation if the local scheduler doesn't have a libuv one (hurray trait ojects!)
2013-11-11Move std::rt::io to std::ioAlex Crichton-0/+1558