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.
- The very long-awaited enum discriminant size
patch has landed. This will
affect FFI. Size of enum discriminant is now configurable via the
reprattribute, and will by default shrink to the smallest needed.
- The extension traits for
Writerhave 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
Result's API has changed quite a bit, to be more consistent with
Option, 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
memsetis now exposed, rather than one per platform.
#[link(name = "...")]is now taken into account by rustc when creating build artifacts.
std::rt::io::filehas been fleshed out and tweaked. In particular, it has been renamed to
std::rt::io::fs, many previously-free functions are now associated functions on
FileInfohas been renamed to
- 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!
Anytype 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.
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,
procis now sugar for
~once fn, and
|A| -> B(and
fn(A) -> Bfor 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
regions (used for debugging and
@-boxes, from what I can tell), and an unused
- Bounds check failures are now marked as a cold
path, and a
coldfunction 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::randnow implements the Gamma distribution.
- Cross-crate destructor inlining now works.
type_idintrinsic has been added.
- Everything in the runtime that uses
libuvhas been split into its own crate. This means that the runtime really is pluggable: you can implement your own event loop and so forth.
Welcome to our new contributors!
- 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.
This week's meeting discussed the future of libextra, more stack things, octal literals, vector representation, and temporary ("rvalue") lifetimes.