1. 15 5月, 2014 1 次提交
    • A
      Process::new etc should support non-utf8 commands/args · 046062d3
      Aaron Turon 提交于
      The existing APIs for spawning processes took strings for the command
      and arguments, but the underlying system may not impose utf8 encoding,
      so this is overly limiting.
      
      The assumption we actually want to make is just that the command and
      arguments are viewable as [u8] slices with no interior NULLs, i.e., as
      CStrings. The ToCStr trait is a handy bound for types that meet this
      requirement (such as &str and Path).
      
      However, since the commands and arguments are often a mixture of
      strings and paths, it would be inconvenient to take a slice with a
      single T: ToCStr bound. So this patch revamps the process creation API
      to instead use a builder-style interface, called `Command`, allowing
      arguments to be added one at a time with differing ToCStr
      implementations for each.
      
      The initial cut of the builder API has some drawbacks that can be
      addressed once issue #13851 (libstd as a facade) is closed. These are
      detailed as FIXMEs.
      
      Closes #11650.
      
      [breaking-change]
      046062d3
  2. 11 5月, 2014 1 次提交
    • A
      core: Remove the cast module · f94d671b
      Alex Crichton 提交于
      This commit revisits the `cast` module in libcore and libstd, and scrutinizes
      all functions inside of it. The result was to remove the `cast` module entirely,
      folding all functionality into the `mem` module. Specifically, this is the fate
      of each function in the `cast` module.
      
      * transmute - This function was moved to `mem`, but it is now marked as
                    #[unstable]. This is due to planned changes to the `transmute`
                    function and how it can be invoked (see the #[unstable] comment).
                    For more information, see RFC 5 and #12898
      
      * transmute_copy - This function was moved to `mem`, with clarification that is
                         is not an error to invoke it with T/U that are different
                         sizes, but rather that it is strongly discouraged. This
                         function is now #[stable]
      
      * forget - This function was moved to `mem` and marked #[stable]
      
      * bump_box_refcount - This function was removed due to the deprecation of
                            managed boxes as well as its questionable utility.
      
      * transmute_mut - This function was previously deprecated, and removed as part
                        of this commit.
      
      * transmute_mut_unsafe - This function doesn't serve much of a purpose when it
                               can be achieved with an `as` in safe code, so it was
                               removed.
      
      * transmute_lifetime - This function was removed because it is likely a strong
                             indication that code is incorrect in the first place.
      
      * transmute_mut_lifetime - This function was removed for the same reasons as
                                 `transmute_lifetime`
      
      * copy_lifetime - This function was moved to `mem`, but it is marked
                        `#[unstable]` now due to the likelihood of being removed in
                        the future if it is found to not be very useful.
      
      * copy_mut_lifetime - This function was also moved to `mem`, but had the same
                            treatment as `copy_lifetime`.
      
      * copy_lifetime_vec - This function was removed because it is not used today,
                            and its existence is not necessary with DST
                            (copy_lifetime will suffice).
      
      In summary, the cast module was stripped down to these functions, and then the
      functions were moved to the `mem` module.
      
          transmute - #[unstable]
          transmute_copy - #[stable]
          forget - #[stable]
          copy_lifetime - #[unstable]
          copy_mut_lifetime - #[unstable]
      
      [breaking-change]
      f94d671b
  3. 09 5月, 2014 1 次提交
  4. 03 5月, 2014 1 次提交
  5. 30 4月, 2014 1 次提交
    • A
      rustc: Add search paths to dylib load paths · 1a367c62
      Alex Crichton 提交于
      When a syntax extension is loaded by the compiler, the dylib that is opened may
      have other dylibs that it depends on. The dynamic linker must be able to find
      these libraries on the system or else the library will fail to load.
      
      Currently, unix gets by with the use of rpaths. This relies on the dylib not
      moving around too drastically relative to its dependencies. For windows,
      however, this is no rpath available, and in theory unix should work without
      rpaths as well.
      
      This modifies the compiler to add all -L search directories to the dynamic
      linker's set of load paths. This is currently managed through environment
      variables for each platform.
      
      Closes #13848
      1a367c62
  6. 01 4月, 2014 1 次提交
  7. 28 2月, 2014 1 次提交
    • A
      std: Small cleanup and test improvement · 843c5e63
      Alex Crichton 提交于
      This weeds out a bunch of warnings building stdtest on windows, and it also adds
      a check! macro to the io::fs tests to help diagnose errors that are cropping up
      on windows platforms as well.
      
      cc #12516
      843c5e63
  8. 16 2月, 2014 2 次提交
  9. 23 1月, 2014 1 次提交
  10. 08 1月, 2014 1 次提交
  11. 25 12月, 2013 1 次提交
    • A
      std: Introduce std::sync · a55c5728
      Alex Crichton 提交于
      For now, this moves the following modules to std::sync
      
      * UnsafeArc (also removed unwrap method)
      * mpsc_queue
      * spsc_queue
      * atomics
      * mpmc_bounded_queue
      * deque
      
      We may want to remove some of the queues, but for now this moves things out of
      std::rt into std::sync
      a55c5728
  12. 12 12月, 2013 1 次提交
  13. 11 12月, 2013 1 次提交
  14. 05 12月, 2013 1 次提交
  15. 30 11月, 2013 1 次提交
  16. 27 11月, 2013 1 次提交
  17. 20 11月, 2013 1 次提交
  18. 19 11月, 2013 1 次提交
    • A
      Remove the C++ lock_and_signal type · e8bf0788
      Alex Crichton 提交于
      A the same time this purges all runtime support needed for statically
      initialized mutexes, moving all users over to the new Mutex type instead.
      e8bf0788
  19. 12 11月, 2013 1 次提交
    • A
      Remove #[fixed_stack_segment] and #[rust_stack] · 7755ffd0
      Alex Crichton 提交于
      These two attributes are no longer useful now that Rust has decided to leave
      segmented stacks behind. It is assumed that the rust task's stack is always
      large enough to make an FFI call (due to the stack being very large).
      
      There's always the case of stack overflow, however, to consider. This does not
      change the behavior of stack overflow in Rust. This is still normally triggered
      by the __morestack function and aborts the whole process.
      
      C stack overflow will continue to corrupt the stack, however (as it did before
      this commit as well). The future improvement of a guard page at the end of every
      rust stack is still unimplemented and is intended to be the mechanism through
      which we attempt to detect C stack overflow.
      
      Closes #8822
      Closes #10155
      7755ffd0
  20. 11 11月, 2013 1 次提交
  21. 10 11月, 2013 1 次提交
  22. 23 10月, 2013 2 次提交
  23. 22 10月, 2013 1 次提交
  24. 16 10月, 2013 2 次提交
    • K
      path2: Adjust the API to remove all the _str mutation methods · d6d9b926
      Kevin Ballard 提交于
      Add a new trait BytesContainer that is implemented for both byte vectors
      and strings.
      
      Convert Path::from_vec and ::from_str to one function, Path::new().
      
      Remove all the _str-suffixed mutation methods (push, join, with_*,
      set_*) and modify the non-suffixed versions to use BytesContainer.
      d6d9b926
    • K
      path2: Replace the path module outright · 73d3d00e
      Kevin Ballard 提交于
      Remove the old path.
      Rename path2 to path.
      Update all clients for the new path.
      
      Also make some miscellaneous changes to the Path APIs to help the
      adoption process.
      73d3d00e
  25. 06 10月, 2013 1 次提交
    • S
      Fix thread safety issues in dynamic_lib · 1d19ad97
      Steven Fackler 提交于
      The root issue is that dlerror isn't reentrant or even thread safe.
      
      The Windows code isn't affected since errno is thread-local on Windows
      and it's running in an atomically block to ensure there isn't a green
      thread context switch.
      
      Closes #8156
      1d19ad97
  26. 01 10月, 2013 1 次提交
  27. 24 9月, 2013 1 次提交
  28. 17 9月, 2013 1 次提交
  29. 12 9月, 2013 1 次提交
  30. 28 8月, 2013 1 次提交
  31. 26 8月, 2013 1 次提交
    • K
      std: Add Win64 support · 05b6a2f5
      klutzy 提交于
      Some extern blobs are duplicated without "stdcall" abi,
      since Win64 does not use any calling convention.
      (Giving any abi to them causes llvm producing wrong bytecode.)
      05b6a2f5
  32. 19 8月, 2013 1 次提交
  33. 15 8月, 2013 1 次提交
    • K
      Add ToCStr method .with_c_str() · 03ef71e2
      Kevin Ballard 提交于
      .with_c_str() is a replacement for the old .as_c_str(), to avoid
      unnecessary boilerplate.
      
      Replace all usages of .to_c_str().with_ref() with .with_c_str().
      03ef71e2
  34. 05 8月, 2013 1 次提交
  35. 02 8月, 2013 1 次提交
  36. 01 8月, 2013 1 次提交
  37. 26 6月, 2013 1 次提交