Welcome to a mega-This Week in Rust. I was swamped this past week with schoolwork, so TWiR was put off. This week's combines the past two weeks of progress. These past two weeks were fairly exciting in terms of language and library progress. The next few weeks should be even more exciting.
What's cooking on master?
There were 108 PRs merged these past two weeks.
Breaking Changes
- The very long-awaited enum discriminant size
patch has landed. This will
affect FFI. Size of enum discriminant is now configurable via the
repr
attribute, and will by default shrink to the smallest needed. - The extension traits for
Reader
andWriter
have been transformed into default methods on their respective trait. - Non-string literals are now disallowed in attributes.
- Type parameters are now forbidden on inner statics (statics inside functions).
- The interface to flush stdout has
changed. It was previously
unsound by allowing aliased
&mut
. Result
's API has changed quite a bit, to be more consistent withOption
, and hopefully simpler.- Linker arguments no longer propagate across crates. This means that if you link to a crate, its linker arguments won't be automatically added when your crate is linked.
- The memory intrinsics have been
simplified. A single intrinsic
for
memcpy
/memmove
/memset
is now exposed, rather than one per platform. #[link(name = "...")]
is now taken into account by rustc when creating build artifacts.std::rt::io::file
has been fleshed out and tweaked. In particular, it has been renamed tostd::rt::io::fs
, many previously-free functions are now associated functions onstd::rt::io::File
, andFileInfo
has been renamed toFileStat
.
Other Changes
- Calling variadic functions with the C FFI is now implemented. This is a pretty sweet change. The only thing missing in our C FFI now is unions.
- We now have octal numeric literals, for all your esoteric numeric needs!
- An
Any
type has been added, and it is now possible to retrieve the object a task failed with. Previously tasks could only fail with a string, now they can fail with anything. - A
concat!
syntax extension has been added for compile-time string concatenation. - Timers are now also ports, and the creator of a timer can cancel it.
- As the first part of closure reform,
proc
is now sugar for~once fn
, and|A| -> B
(andfn(A) -> B
for bare functions) are now allowed in types. - The section in the tutorial on vectors and strings has been rewritten for correctness with modern Rust.
- A bunch of C++ has been removed and rewritten. Thread
creation, memory
regions (used for debugging and
@
-boxes, from what I can tell), and an unusedarray_list
. - Bounds check failures are now marked as a cold
path, and a
cold
function attribute has been added. - The build system can cross-compile to iOS now, even though Rust doesn't actually run on that platform (yet!).
std::rand
now implements the Gamma distribution.- Cross-crate destructor inlining now works.
- A
type_id
intrinsic has been added. - Everything in the runtime that uses
libuv
has been split into its own crate. This means that the runtime really is pluggable: you can implement your own event loop and so forth.
New Contributors
Welcome to our new contributors!
- Brian
- Carol Willing
- Dirkjan Bussink
- Guillaume Pinot
- Gyorgy Andrasek
- Joshua Yanovski
- Mat Carberry
- Noufal Ibrahim
- Robert Irelan
- Tomas Sedovic
- Jennifer Ward
- Patrick Kim
At .85 new contributors a day, we'll soon dwarf every other language in the "awesome volunteer" category.
Weekly Meetings
Last week's meeting discussed segmented stacks (spoiler: they're not coming back ) and placement new (we want it, how do we want it?).
This week's meeting discussed the future of libextra, more stack things, octal literals, vector representation, and temporary ("rvalue") lifetimes.
Announcements etc
- Reminder from ~~the Ministry of Truth~~ ChrisMorgan: Rust is awesome.
- Rust Skåne, has an event page now. It will be December 3 at 17:30 in Foo Cafe.
- Integermingled Parameter Lists, and take 2.
- speculate - a parallel speculative execution library.
- mcchat - a pure-Rust Minecraft chat client.