<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/rt/env.rs, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2014-06-07T05:19:41+00:00</updated>
<entry>
<title>std: Extract librustrt out of libstd</title>
<updated>2014-06-07T05:19:41+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-06-04T02:11:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5ec36c358f74fe83332231e774ea20a21d165120'/>
<id>urn:sha1:5ec36c358f74fe83332231e774ea20a21d165120</id>
<content type='text'>
As part of the libstd facade efforts, this commit extracts the runtime interface
out of the standard library into a standalone crate, librustrt. This crate will
provide the following services:

* Definition of the rtio interface
* Definition of the Runtime interface
* Implementation of the Task structure
* Implementation of task-local-data
* Implementation of task failure via unwinding via libunwind
* Implementation of runtime initialization and shutdown
* Implementation of thread-local-storage for the local rust Task

Notably, this crate avoids the following services:

* Thread creation and destruction. The crate does not require the knowledge of
  an OS threading system, and as a result it seemed best to leave out the
  `rt::thread` module from librustrt. The librustrt module does depend on
  mutexes, however.
* Implementation of backtraces. There is no inherent requirement for the runtime
  to be able to generate backtraces. As will be discussed later, this
  functionality continues to live in libstd rather than librustrt.

As usual, a number of architectural changes were required to make this crate
possible. Users of "stable" functionality will not be impacted by this change,
but users of the `std::rt` module will likely note the changes. A list of
architectural changes made is:

* The stdout/stderr handles no longer live directly inside of the `Task`
  structure. This is a consequence of librustrt not knowing about `std::io`.
  These two handles are now stored inside of task-local-data.

  The handles were originally stored inside of the `Task` for perf reasons, and
  TLD is not currently as fast as it could be. For comparison, 100k prints goes
  from 59ms to 68ms (a 15% slowdown). This appeared to me to be an acceptable
  perf loss for the successful extraction of a librustrt crate.

* The `rtio` module was forced to duplicate more functionality of `std::io`. As
  the module no longer depends on `std::io`, `rtio` now defines structures such
  as socket addresses, addrinfo fiddly bits, etc. The primary change made was
  that `rtio` now defines its own `IoError` type. This type is distinct from
  `std::io::IoError` in that it does not have an enum for what error occurred,
  but rather a platform-specific error code.

  The native and green libraries will be updated in later commits for this
  change, and the bulk of this effort was put behind updating the two libraries
  for this change (with `rtio`).

* Printing a message on task failure (along with the backtrace) continues to
  live in libstd, not in librustrt. This is a consequence of the above decision
  to move the stdout/stderr handles to TLD rather than inside the `Task` itself.
  The unwinding API now supports registration of global callback functions which
  will be invoked when a task fails, allowing for libstd to register a function
  to print a message and a backtrace.

  The API for registering a callback is experimental and unsafe, as the
  ramifications of running code on unwinding is pretty hairy.

* The `std::unstable::mutex` module has moved to `std::rt::mutex`.

* The `std::unstable::sync` module has been moved to `std::rt::exclusive` and
  the type has been rewritten to not internally have an Arc and to have an RAII
  guard structure when locking. Old code should stop using `Exclusive` in favor
  of the primitives in `libsync`, but if necessary, old code should port to
  `Arc&lt;Exclusive&lt;T&gt;&gt;`.

* The local heap has been stripped down to have fewer debugging options. None of
  these were tested, and none of these have been used in a very long time.

[breaking-change]
</content>
</entry>
<entry>
<title>std: Remove generics from Option::expect</title>
<updated>2014-06-04T00:19:56+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-06-02T22:49:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=896cfcc67fb8d3e53a5dcf138f79909891bf940e'/>
<id>urn:sha1:896cfcc67fb8d3e53a5dcf138f79909891bf940e</id>
<content type='text'>
This commit removes the &lt;M: Any + Send&gt; type parameter from Option::expect in
favor of just taking a hard-coded `&amp;str` argument. This allows this function to
move into libcore.

Previous code using strings with `expect` will continue to work, but code using
this implicitly to transmit task failure will need to unwrap manually with a
`match` statement.

[breaking-change]
Closes #14008
</content>
</entry>
<entry>
<title>libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.</title>
<updated>2014-05-22T21:42:01+00:00</updated>
<author>
<name>Patrick Walton</name>
<email>pcwalton@mimiga.net</email>
</author>
<published>2014-05-16T17:45:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=36195eb91f15975fed7555a3aa52807ecd5698a1'/>
<id>urn:sha1:36195eb91f15975fed7555a3aa52807ecd5698a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>core: Move Option::expect to libstd from libcore</title>
<updated>2014-05-07T15:17:32+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-05-07T04:25:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0d8f5fa618da00653897be2050980c800389be82'/>
<id>urn:sha1:0d8f5fa618da00653897be2050980c800389be82</id>
<content type='text'>
See #14008 for more details
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2014-02-15T06:55:20+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-02-14T18:03:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=359ac360a453b31494d18bf838f6620032a663e5'/>
<id>urn:sha1:359ac360a453b31494d18bf838f6620032a663e5</id>
<content type='text'>
This enables the parser error for `extern mod` =&gt; `extern crate` transitions.
</content>
</entry>
<entry>
<title>remove type descriptors from proc and @T</title>
<updated>2014-02-08T01:08:35+00:00</updated>
<author>
<name>Daniel Micay</name>
<email>danielmicay@gmail.com</email>
</author>
<published>2014-02-06T04:05:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=940d1ae2f3b1cba8cfd858ab3a54d6408b53b033'/>
<id>urn:sha1:940d1ae2f3b1cba8cfd858ab3a54d6408b53b033</id>
<content type='text'>
This also drops support for the managed pointer POISON_ON_FREE feature
as it's not worth adding back the support for it. After a snapshot, the
leftovers can be removed.
</content>
</entry>
<entry>
<title>Use `mmap` to map in task stacks and guard page</title>
<updated>2014-01-25T06:30:00+00:00</updated>
<author>
<name>Corey Richardson</name>
<email>corey@octayn.net</email>
</author>
<published>2013-11-13T10:21:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dee7fa58dd4203a19b83ad47c3b0a0efb92c0e9a'/>
<id>urn:sha1:dee7fa58dd4203a19b83ad47c3b0a0efb92c0e9a</id>
<content type='text'>
Also implement caching of stacks.
</content>
</entry>
<entry>
<title>green: Rip the bandaid off, introduce libgreen</title>
<updated>2013-12-25T03:59:52+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-12-13T02:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=51abdee5f1ad932671350fdd8a7911fe144d08b8'/>
<id>urn:sha1:51abdee5f1ad932671350fdd8a7911fe144d08b8</id>
<content type='text'>
This extracts everything related to green scheduling from libstd and introduces
a new libgreen crate. This mostly involves deleting most of std::rt and moving
it to libgreen.

Along with the movement of code, this commit rearchitects many functions in the
scheduler in order to adapt to the fact that Local::take now *only* works on a
Task, not a scheduler. This mostly just involved threading the current green
task through in a few locations, but there were one or two spots where things
got hairy.

There are a few repercussions of this commit:

* tube/rc have been removed (the runtime implementation of rc)
* There is no longer a "single threaded" spawning mode for tasks. This is now
  encompassed by 1:1 scheduling + communication. Convenience methods have been
  introduced that are specific to libgreen to assist in the spawning of pools of
  schedulers.
</content>
</entry>
<entry>
<title>Decrease the default stack size back to 2MB</title>
<updated>2013-11-11T18:40:34+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-10T22:46:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1f192430956704ddf263aba0cfb5b8856c547beb'/>
<id>urn:sha1:1f192430956704ddf263aba0cfb5b8856c547beb</id>
<content type='text'>
I increased this to 4MB when I implemented abort-on-stack-overflow for Rust
functions. Now that the fixed_stack_segment attribute is removed, no rust
function will ever reasonably request 2MB of stack (due to calling an FFI
function).

The default size of 2MB should be plenty for everyday use-cases, and tasks can
still request more stack via the spawning API.
</content>
</entry>
<entry>
<title>Rewrite boxed_region/memory_region in Rust</title>
<updated>2013-10-26T08:10:39+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-26T08:10:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=357ef1f69cd1ffbd3c36a9e7e171b10263d94139'/>
<id>urn:sha1:357ef1f69cd1ffbd3c36a9e7e171b10263d94139</id>
<content type='text'>
This drops more of the old C++ runtime to rather be written in rust. A few
features were lost along the way, but hopefully not too many. The main loss is
that there are no longer backtraces associated with allocations (rust doesn't
have a way of acquiring those just yet). Other than that though, I believe that
the rest of the debugging utilities made their way over into rust.

Closes #8704
</content>
</entry>
</feed>
