rust/src
Aaron Turon 046062d3bf Process::new etc should support non-utf8 commands/args
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]
2014-05-14 22:52:31 -07:00
..
compiler-rt@ed112ca1e4
compiletest Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
doc add a line to the example to clarify semantics 2014-05-13 17:24:08 -07:00
driver
etc Get rid of the android-cross-path flag to rustc. 2014-05-14 02:16:14 -04:00
gyp@1e46da1000
jemalloc@6a96910f2e
libarena libarena: Remove all uses of ~str from libarena 2014-05-14 14:58:01 -07:00
libbacktrace
libcollections libcollections: Remove most uses of ~str from libcollections 2014-05-14 18:29:14 -07:00
libcore core: Allow using failure outside of libcore 2014-05-13 23:59:03 -07:00
libflate
libfmt_macros
libfourcc
libgetopts
libglob libglob: Remove all uses of ~str from libglob 2014-05-14 18:29:12 -07:00
libgraphviz libgraphviz: Remove all uses of ~str from libgraphviz. 2014-05-14 18:29:12 -07:00
libgreen
libhexfloat libhexfloat: Remove all uses of ~str from libhexfloat 2014-05-14 14:58:01 -07:00
liblibc io: Implement process wait timeouts 2014-05-13 17:27:42 -07:00
liblog liblog: Remove all uses of ~str from liblog 2014-05-14 18:29:12 -07:00
libnative Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
libnum libnum: Remove all uses of ~str from libnum 2014-05-14 18:29:14 -07:00
librand librand: Remove all uses of ~str from librand 2014-05-14 18:29:13 -07:00
libregex librand: Remove all uses of ~str from librand 2014-05-14 18:29:13 -07:00
libregex_macros libregex: Remove all uses of ~str from libregex 2014-05-14 18:29:12 -07:00
librustc Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
librustdoc Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
librustuv Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
libsemver libsemver: Remove all uses of ~str from libsemver 2014-05-14 18:29:12 -07:00
libserialize serialize: Broaden ignores of json tests 2014-05-13 09:28:26 -07:00
libstd Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
libsync libsync: Remove all uses of ~str from libsync 2014-05-14 18:29:13 -07:00
libsyntax Removed unnecessary arguments for walk_* functions 2014-05-14 02:20:25 -04:00
libterm libterm: Remove all uses of ~str from libterm 2014-05-14 18:29:13 -07:00
libtest libtest: Remove all uses of ~str from libtest. 2014-05-14 18:29:13 -07:00
libtime libtime: Remove all uses of ~str from libtime 2014-05-14 18:29:13 -07:00
liburl liburl: Remove all uses of ~str from liburl 2014-05-14 18:29:14 -07:00
libuuid libuuid: Remove all uses of ~str from libuuid. 2014-05-14 14:58:01 -07:00
libuv@43495892de
libworkcache Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
llvm@4b4d0533b4
rt
rustllvm rustllvm: Add LLVMRustArrayType 2014-05-13 17:24:08 -07:00
test Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
README.md
snapshots.txt

This is a preliminary version of the Rust compiler, libraries and tools.

Source layout:

Path Description
librustc/ The self-hosted compiler
libstd/ The standard library (imported and linked by default)
libextra/ The "extras" library (slightly more peripheral code)
libgreen/ The M:N runtime library
libnative/ The 1:1 runtime library
libsyntax/ The Rust parser and pretty-printer
libcollections/ A collection of useful data structures and containers
libnum/ Extended number support library (complex, rational, etc)
libtest/ Rust's test-runner code
------------------- ---------------------------------------------------------
libarena/ The arena (a fast but limited) memory allocator
libflate/ Simple compression library
libfourcc/ Data format identifier library
libgetopts/ Get command-line-options library
libglob/ Unix glob patterns library
libregex/ Regular expressions
libsemver/ Rust's semantic versioning library
libserialize/ Encode-Decode types library
libsync/ Concurrency mechanisms and primitives
libterm/ ANSI color library for terminals
libtime/ Time operations library
libuuid/ UUID's handling code
------------------- ---------------------------------------------------------
rt/ The runtime system
rt/rust_*.c - Some of the runtime services
rt/vg - Valgrind headers
rt/msvc - MSVC support
rt/sundown - The Markdown library used by rustdoc
------------------- ---------------------------------------------------------
compiletest/ The test runner
test/ Testsuite
test/codegen - Tests for the LLVM IR infrastructure
test/compile-fail - Tests that should fail to compile
test/debug-info - Tests for the debuginfo tool
test/run-fail - Tests that should compile, run and fail
test/run-make - Tests that depend on a Makefile infrastructure
test/run-pass - Tests that should compile, run and succeed
test/bench - Benchmarks and miscellaneous
test/pretty - Pretty-printer tests
test/auxiliary - Dependencies of tests
------------------- ---------------------------------------------------------
librustdoc/ The Rust API documentation tool
libuv/ The libuv submodule
librustuv/ Rust libuv support code
------------------- ---------------------------------------------------------
llvm/ The LLVM submodule
rustllvm/ LLVM support code
------------------- ---------------------------------------------------------
etc/ Scripts, editors support, misc

NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.