[rust-dev] Rust 0.8 released

Brian Anderson banderson at mozilla.com
Thu Sep 26 17:12:24 PDT 2013

Mozilla and the Rust community are pleased to announce version 0.8 of
the Rust compiler and tools. Rust is a systems programming language
with a focus on safety, performance and concurrency.

This was another very active release cycle that continued the trend
toward refining the standard library while making minor adjustments to
the language. In this release the `for` keyword has been changed to work
with `Iterator` types, the runtime and task scheduler was rewritten, a
new experimental I/O subsystem was added, and we added a new family of
string formatting macros, `format!`, that will eventually replace `fmt!`.

The brief release notes are included in this announcement, and there is
further explanation in the detailed release [notes] on the wiki.
Documentation and all the links in this email are available on the
[website]. As usual, version 0.8 should be considered an alpha release,
suitable for early adopters and language enthusiasts. Please file [bugs]
and join the [fun].

[website]: http://www.rust-lang.org
[notes]: https://github.com/mozilla/rust/wiki/Doc-detailed-release-notes
[bugs]: https://github.com/mozilla/rust/issues
[fun]: https://github.com/mozilla/rust/wiki/Note-guide-for-new-contributors

This release is available as both a tarball and a Windows installer:

* http://static.rust-lang.org/dist/rust-0.8.tar.gz
SHA256 (of .tar.gz):

* http://static.rust-lang.org/dist/rust-0.8-install.exe
SHA256 (of .exe):

Thanks to everyone who contributed!

The Rust Team

Version 0.8 (September 2013)

* ~2200 changes, numerous bugfixes

* Language
* The `for` loop syntax has changed to work with the `Iterator` trait.
* At long last, unwinding works on Windows.
* Default methods are ready for use.
* Many trait inheritance bugs fixed.
* Owned and borrowed trait objects work more reliably.
* `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
* rustc can omit emission of code for the `debug!` macro if it is passed
`--cfg ndebug`
* mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
for foo.rs, then foo/mod.rs, and will generate an error when both are
* Strings no longer contain trailing nulls. The new `std::c_str` module
provides new mechanisms for converting to C strings.
* The type of foreign functions is now `extern "C" fn` instead of `*u8'.
* The FFI has been overhauled such that foreign functions are called 
instead of through a stack-switching wrapper.
* Calling a foreign function must be done through a Rust function with the
`#[fixed_stack_segment]` attribute.
* The `externfn!` macro can be used to declare both a foreign function and
a `#[fixed_stack_segment]` wrapper at once.
* `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
* `unsafe` is no longer allowed on extern fns - they are all unsafe.
* `priv` is disallowed everywhere except for struct fields and enum 
* `&T` (besides `&'static T`) is no longer allowed in `@T`.
* `ref` bindings in irrefutable patterns work correctly now.
* `char` is now prevented from containing invalid code points.
* Casting to `bool` is no longer allowed.
* `\0` is now accepted as an escape in chars and strings.
* `yield` is a reserved keyword.
* `typeof` is a reserved keyword.
* Crates may be imported by URL with `extern mod foo = "url";`.
* Explicit enum discriminants may be given as uints as in `enum E { V = 
0u }`
* Static vectors can be initialized with repeating elements,
e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
* Static structs can be initialized with functional record update,
e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
* `cfg!` can be used to conditionally execute code based on the crate
configuration, similarly to `#[cfg(...)]`.
* The `unnecessary_qualification` lint detects unneeded module
prefixes (default: allow).
* Arithmetic operations have been implemented on the SIMD types in
* Exchange allocation headers were removed, reducing memory usage.
* `format!` implements a completely new, extensible, and higher-performance
string formatting system. It will replace `fmt!`.
* `print!` and `println!` write formatted strings (using the `format!`
extension) to stdout.
* `write!` and `writeln!` write formatted strings (using the `format!`
extension) to the new Writers in `std::rt::io`.
* The library section in which a function or static is placed may
be specified with `#[link_section = "..."]`.
* The `proto!` syntax extension for defining bounded message protocols
was removed.
* `macro_rules!` is hygienic for `let` declarations.
* The `#[export_name]` attribute specifies the name of a symbol.
* `unreachable!` can be used to indicate unreachable code, and fails
if executed.

* Libraries
* std: Transitioned to the new runtime, written in Rust.
* std: Added an experimental I/O library, `rt::io`, based on the new
* std: A new generic `range` function was added to the prelude, replacing
`uint::range` and friends.
* std: `range_rev` no longer exists. Since range is an iterator it can be
reversed with `range(lo, hi).invert()`.
* std: The `chain` method on option renamed to `and_then`; 
renamed to `unwrap_or`.
* std: The `iterator` module was renamed to `iter`.
* std: Integral types now support the `checked_add`, `checked_sub`, and
`checked_mul` operations for detecting overflow.
* std: Many methods in `str`, `vec`, `option, `result` were renamed for
* std: Methods are standardizing on conventions for casting methods:
`to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
and cheap casts.
* std: The `CString` type in `c_str` provides new ways to convert to and
from C strings.
* std: `DoubleEndedIterator` can yield elements in two directions.
* std: The `mut_split` method on vectors partitions an `&mut [T]` into
two splices.
* std: `str::from_bytes` renamed to `str::from_utf8`.
* std: `pop_opt` and `shift_opt` methods added to vectors.
* std: The task-local data interface no longer uses @, and keys are
no longer function pointers.
* std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
* std: Added `SharedPort` to `comm`.
* std: `Eq` has a default method for `ne`; only `eq` is required
in implementations.
* std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
is required in implementations.
* std: `is_utf8` performance is improved, impacting many string functions.
* std: `os::MemoryMap` provides cross-platform mmap.
* std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
are not 'in-bounds' are considered undefined.
* std: Many freestanding functions in `vec` removed in favor of methods.
* std: Many freestanding functions on scalar types removed in favor of
* std: Many options to task builders were removed since they don't make
sense in the new scheduler design.
* std: More containers implement `FromIterator` so can be created by the
`collect` method.
* std: More complete atomic types in `unstable::atomics`.
* std: `comm::PortSet` removed.
* std: Mutating methods in the `Set` and `Map` traits have been moved into
the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
`Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
default implementations.
* std: Various `from_str` functions were removed in favor of a generic
`from_str` which is available in the prelude.
* std: `util::unreachable` removed in favor of the `unreachable!` macro.
* extra: `dlist`, the doubly-linked list was modernized.
* extra: Added a `hex` module with `ToHex` and `FromHex` traits.
* extra: Added `glob` module, replacing `std::os::glob`.
* extra: `rope` was removed.
* extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
* extra: `net`, and `timer` were removed. The experimental replacements
are `std::rt::io::net` and `std::rt::io::timer`.
* extra: Iterators implemented for `SmallIntMap`.
* extra: Iterators implemented for `Bitv` and `BitvSet`.
* extra: `SmallIntSet` removed. Use `BitvSet`.
* extra: Performance of JSON parsing greatly improved.
* extra: `semver` updated to SemVer 2.0.0.
* extra: `term` handles more terminals correctly.
* extra: `dbg` module removed.
* extra: `par` module removed.
* extra: `future` was cleaned up, with some method renames.
* extra: Most free functions in `getopts` were converted to methods.

* Other
* rustc's debug info generation (`-Z debug-info`) is greatly improved.
* rustc accepts `--target-cpu` to compile to a specific CPU architecture,
similarly to gcc's `--march` flag.
* rustc's performance compiling small crates is much better.
* rustpkg has received many improvements.
* rustpkg supports git tags as package IDs.
* rustpkg builds into target-specific directories so it can be used for
* The number of concurrent test tasks is controlled by the environment
* The test harness can now report metrics for benchmarks.
* All tools have man pages.
* Programs compiled with `--test` now support the `-h` and `--help` flags.
* The runtime uses jemalloc for allocations.
* Segmented stacks are temporarily disabled as part of the transition to
the new runtime. Stack overflows are possible!
* A new documentation backend, rustdoc_ng, is available for use. It is
still invoked through the normal `rustdoc` command.

Contributors to Rust 0.8

Aaron Laursen <aaronlaursen at gmail.com>
Aaron Todd <github at opprobrio.us>
adridu59 <adri-from-59 at hotmail.fr>
Adrien Tétar <adri-from-59 at hotmail.fr>
Alex Crichton <alex at alexcrichton.com>
Aljaž "g5pw" Srebrnič <a2piratesoft at gmail.com>
Anders Kaseorg <andersk at mit.edu>
Andreas Martens <andreasm at fastmail.fm>
Andrew Dunham <andrew at du.nham.ca>
Andrew Paseltiner <apaseltiner at gmail.com>
Armin Ronacher <armin.ronacher at active-4.com>
Austin King <shout at ozten.com>
Ben Blum <bblum at andrew.cmu.edu>
Benjamin Herr <ben at 0x539.de>
Birunthan Mohanathas <birunthan at mohanathas.com>
Björn Steinbrink <bsteinbr at gmail.com>
blake2-ppc <ulrik.sverdrup at gmail.com>
Bouke van der Bijl <boukevanderbijl at gmail.com>
Brandon Sanderson <singingboyo at hotmail.com>
Brendan Cully <brendan at kublai.com>
Brendan Zabarauskas <bjzaba at yahoo.com.au>
Brian Anderson <banderson at mozilla.com>
Carlos <toqueteos at gmail.com>
Chris Morgan <me at chrismorgan.info>
Corey Richardson <corey at octayn.net>
Daniel Micay <danielmicay at gmail.com>
Daniel Rosenwasser <DanielRosenwasser at gmail.com>
darkf <lw9k123 at gmail.com>
David Creswick <dcrewi at gyrae.net>
David Halperin <halperin.dr at gmail.com>
David Manescu <dman2626 at uni.sydney.edu.au>
Dmitry Ermolov <epdmitry at yandex.ru>
Do Nhat Minh <mrordinaire at gmail.com>
Erick Tryzelaar <erick.tryzelaar at gmail.com>
Eric Martin <e.a.martin1337 at gmail.com>
Eric Reed <ecreed at cs.washington.edu>
Etienne Millon <me at emillon.org>
Evgeny Sologubov
Fedor Indutny <fedor.indutny at gmail.com>
Felix S. Klock II <pnkfelix at pnkfx.org>
Flaper Fesp <flaper87 at gmail.com>
Flavio Percoco <flaper87 at gmail.com>
Florian Hahn <flo at fhahn.com>
Florian Zeitz <florob at babelmonkeys.de>
Gábor Horváth <xazax.hun at gmail.com>
Gareth Smith <garethdanielsmith at gmail.com>
Gary Linscott <glinscott at gmail.com>
Gavin Baker <gavinb at antonym.org>
Graydon Hoare <graydon at mozilla.com>
Huon Wilson <dbau.pp+github at gmail.com>
Ilyong Cho <ilyoan at gmail.com>
Jack Moffitt <jack at metajack.im>
Jakub <jakub at jakub.cc>
James Miller <james at aatch.net>
Jan Kobler <eng1 at koblersystems.de>
Jason Fager <jfager at gmail.com>
Jed Davis <jld at panix.com>
Jeff Olson <olson.jeffery at gmail.com>
Jens Nockert <jens at nockert.se>
Jimmy Zelinskie <jimmyzelinskie at gmail.com>
jmgrosen <jmgrosen at gmail.com>
John Barker <jebarker at gmail.com>
John Clements <clements at racket-lang.org>
Jordi Boggiano <j.boggiano at seld.be>
Josh Matthews <josh at joshmatthews.net>
Jyun-Yan You <jyyou at cs.nctu.edu.tw>
Keegan McAllister <kmcallister at mozilla.com>
Kevin Ballard <kevin at sb.org>
Kevin Mehall <km at kevinmehall.net>
Kevin Murphy <kemurphy.cmu at gmail.com>
klutzy <klutzytheklutzy at gmail.com>
korenchkin <korenchkin2 at gmail.com>
Lars Bergstrom <lbergstrom at mozilla.com>
Lenny222 <github at kudling.de>
Lindsey Kuper <lindsey at composition.al>
Luca Bruno <lucab at debian.org>
Luqman Aden <me at luqman.ca>
maikklein <maikklein at googlemail.com>
Makoto Nakashima <makoto.nksm+github at gmail.com>
Mark Sinclair <mark.edward.x at gmail.com>
Marvin Löbel <loebel.marvin at gmail.com>
Matthijs Hofstra <thiezz at gmail.com>
Maxim Kolganov <kolganov.mv at gmail.com>
Micah Chalmer <micah at micahchalmer.net>
Michael Sullivan <sully at msully.net>
Michael Woerister <michaelwoerister at gmail>
Mihnea Dobrescu-Balaur <mihnea at linux.com>
Mukilan Thiagarajan <mukilanthiagarajan at gmail.com>
NiccosSystem <niccossystem at gmail.com>
Nick Desaulniers <ndesaulniers at mozilla.com>
Niko Matsakis <niko at alum.mit.edu>
novalis <novalis at novalis.org>
nsf <no.smile.face at gmail.com>
OGINO Masanori <masanori.ogino at gmail.com>
Palmer Cox <p at lmercox.com>
Patrick Walton <pcwalton at mimiga.net>
Paul Collins <paul at ondioline.org>
Philipp Brüschweiler <blei42 at gmail.com>
Robert Knight <robertknight at gmail.com>
Robert Millar <robert.millar at cantab.net>
Sangeun Kim <sammy.kim at samsung.com>
Sankha Narayan Guria <sankha93 at gmail.com>
Seo Sanghyeon <sanxiyn at gmail.com>
SiegeLord <slabode at aim.com>
Simon Sapin <simon.sapin at exyr.org>
sp3d <sp3d at github>
Stepan Koltsov <stepan.koltsov at gmail.com>
Steve Klabnik <steve at steveklabnik.com>
Steven Fackler <sfackler at gmail.com>
Steven Stewart-Gallus <sstewartgallus00 at mylangara.bc.ca>
Ted Horst <ted.horst at earthlink.net>
Tim Chevalier <chevalier at alum.wellesley.edu>
Tim Kuehn <tkuehn at cmu.edu>
Tom Lee <github at tomlee.co>
Vadim Chugunov <vadimcn at gmail.com>
Young-il Choi <duddlf.choi at samsung.com>
Zack Slayton <zack.slayton at gmail.com>

More information about the Rust-dev mailing list