1. 11 1月, 2014 1 次提交
    • B
      Remove re-exports of std::io::stdio::{print, println} in the prelude. · 4fc0452a
      Brendan Zabarauskas 提交于
      The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
      4fc0452a
  2. 10 1月, 2014 1 次提交
  3. 09 1月, 2014 2 次提交
  4. 07 1月, 2014 1 次提交
  5. 04 1月, 2014 2 次提交
  6. 03 1月, 2014 1 次提交
    • A
      Add read_to_str and write_{str, line} · a2a67209
      Alex Crichton 提交于
      These methods are sorely needed on readers and writers, and I believe that the
      encoding story should be solved with composition. This commit adds back the
      missed functions when reading/writing strings onto generic Readers/Writers.
      a2a67209
  7. 02 1月, 2014 1 次提交
  8. 25 12月, 2013 3 次提交
    • A
      rustuv: Get all tests passing again after refactor · afd4e2ad
      Alex Crichton 提交于
      All tests except for the homing tests are now working again with the
      librustuv/libgreen refactoring. The homing-related tests are currently commented
      out and now placed in the rustuv::homing module.
      
      I plan on refactoring scheduler pool spawning in order to enable more homing
      tests in a future commit.
      afd4e2ad
    • A
      std: Get stdtest all passing again · 018d6050
      Alex Crichton 提交于
      This commit brings the library up-to-date in order to get all tests passing
      again
      018d6050
    • A
      native: Introduce libnative · 6aadc9d1
      Alex Crichton 提交于
      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.
      6aadc9d1
  9. 24 12月, 2013 2 次提交
  10. 21 12月, 2013 1 次提交
  11. 20 12月, 2013 1 次提交
  12. 17 12月, 2013 1 次提交
  13. 15 12月, 2013 2 次提交
  14. 12 12月, 2013 2 次提交
    • S
      Add std::io::util · 7fe5e308
      Steven Fackler 提交于
      This adds a bunch of useful Reader and Writer implementations. I'm not a
      huge fan of the name `util` but I can't think of a better name and I
      don't want to make `std::io` any longer than it already is.
      7fe5e308
    • E
      Make 'self lifetime illegal. · 5731ca30
      Erik Price 提交于
      Also remove all instances of 'self within the codebase.
      
      This fixes #10889.
      5731ca30
  15. 11 12月, 2013 2 次提交
  16. 05 12月, 2013 1 次提交
  17. 04 12月, 2013 1 次提交
  18. 30 11月, 2013 1 次提交
  19. 29 11月, 2013 1 次提交
  20. 27 11月, 2013 1 次提交
  21. 26 11月, 2013 1 次提交
  22. 20 11月, 2013 1 次提交
  23. 16 11月, 2013 1 次提交
  24. 14 11月, 2013 2 次提交
    • A
      Implement native::IoFactory · 9bcf5575
      Alex Crichton 提交于
      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!)
      9bcf5575
    • A
      Introduce an io::Buffer trait · 7bc092f1
      Alex Crichton 提交于
      This trait is meant to abstract whether a reader is actually implemented with an
      underlying buffer. For all readers which are implemented as such, we can
      efficiently implement things like read_char, read_line, read_until, etc. There
      are two required methods for managing the internal buffer, and otherwise
      read_line and friends can all become default methods.
      
      Closes #10334
      7bc092f1
  25. 12 11月, 2013 1 次提交
  26. 10 11月, 2013 2 次提交
  27. 05 11月, 2013 1 次提交
    • A
      Move io::file to io::fs and fns out of File · 3c3ed149
      Alex Crichton 提交于
      This renames the `file` module to `fs` because that more accurately describes
      its current purpose (manipulating the filesystem, not just files).
      
      Additionally, this adds an UnstableFileStat structure as a nested structure of
      FileStat to signify that the fields should not be depended on. The structure is
      currently flagged with #[unstable], but it's unlikely that it has much meaning.
      
      Closes #10241
      3c3ed149
  28. 04 11月, 2013 2 次提交
    • A
      Fill out the remaining functionality in io::file · f19d0833
      Alex Crichton 提交于
      This adds bindings to the remaining functions provided by libuv, all of which
      are useful operations on files which need to get exposed somehow.
      
      Some highlights:
      
      * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type
      * Moved all file-related methods to be static methods under `File`
      * All directory related methods are still top-level functions
      * Created `io::FilePermission` types (backed by u32) that are what you'd expect
      * Created `io::FileType` and refactored `FileStat` to use FileType and
        FilePermission
      * Removed the expanding matrix of `FileMode` operations. The mode of reading a
        file will not have the O_CREAT flag, but a write mode will always have the
        O_CREAT flag.
      
      Closes #10130
      Closes #10131
      Closes #10121
      f19d0833
    • A
      Remove all blocking std::os blocking functions · 9c185101
      Alex Crichton 提交于
      This commit moves all thread-blocking I/O functions from the std::os module.
      Their replacements can be found in either std::rt::io::file or in a hidden
      "old_os" module inside of native::file. I didn't want to outright delete these
      functions because they have a lot of special casing learned over time for each
      OS/platform, and I imagine that these will someday get integrated into a
      blocking implementation of IoFactory. For now, they're moved to a private module
      to prevent bitrot and still have tests to ensure that they work.
      
      I've also expanded the extensions to a few more methods defined on Path, most of
      which were previously defined in std::os but now have non-thread-blocking
      implementations as part of using the current IoFactory.
      
      The api of io::file is in flux, but I plan on changing it in the next commit as
      well.
      
      Closes #10057
      9c185101
  29. 01 11月, 2013 1 次提交